Interface SuggestionCriteriaProcessor
- All Known Implementing Classes:
JPQLQueryBuilder
public interface SuggestionCriteriaProcessor
A processor of a suggestion criteria. The aim of a such processor is to process each
criterion of the criteria in the order expected by the caller in order to perform some specific
works.
- Author:
- mmoquillon
-
Method Summary
Modifier and TypeMethodDescriptionvoidInforms the processor the process is ended.processCreator(org.silverpeas.core.admin.user.model.User creator) Processes the criterion on the creator of the suggestions.processIdentifiers(List<String> identifiers) Processes the criterion on the suggestion identifiers.processJoinDataApply(List<SuggestionCriteria.JOIN_DATA_APPLY> joinDataApplies) Processes the criterion on data joins of the suggestions matching the criteria.processOrdering(List<SuggestionCriteria.QUERY_ORDER_BY> orderings) Processes the criterion on orderings of the suggestions matching the criteria.processPagination(org.silverpeas.core.admin.PaginationPage pagination) Processes the criterion on the pagination to apply on the suggestions to return.processStatus(List<org.silverpeas.core.contribution.ContributionStatus> status) Processes the criterion on suggestion status.Processes the criterion on the suggestion box.<T> Tresult()Gets the result of the processing.voidInforms the processor the start of the process.then()Informs the processor that there is a new criterion to process.
-
Method Details
-
startProcessing
void startProcessing()Informs the processor the start of the process. The processor use this method to allocate all the resources required by the processing here. It uses it to initialize the processor state machine. -
endProcessing
void endProcessing()Informs the processor the process is ended. The processor use this method to deallocate all the resources that were used during the processing. It uses it to tear down the processor state machine or to finalize some treatments.The processing has to stop once this method is called. Hence, the call of process methods should result to nothing or to an exception.
-
then
SuggestionCriteriaProcessor then()Informs the processor that there is a new criterion to process. This method must be used by the caller to chain the different criterion processings.- Returns:
- the processor itself.
-
processSuggestionBox
Processes the criterion on the suggestion box.- Parameters:
box- the suggestion box concerned by the criterion.- Returns:
- the processor itself.
-
processCreator
Processes the criterion on the creator of the suggestions.- Parameters:
creator- the user concerned by the criterion.- Returns:
- the processor itself.
-
processStatus
SuggestionCriteriaProcessor processStatus(List<org.silverpeas.core.contribution.ContributionStatus> status) Processes the criterion on suggestion status.- Parameters:
status- the suggestion status concerned by the criterion.- Returns:
- the processor itself.
-
processJoinDataApply
SuggestionCriteriaProcessor processJoinDataApply(List<SuggestionCriteria.JOIN_DATA_APPLY> joinDataApplies) Processes the criterion on data joins of the suggestions matching the criteria.- Parameters:
joinDataApplies- the result data joins concerned by the criterion.- Returns:
- the processor itself.
-
processOrdering
Processes the criterion on orderings of the suggestions matching the criteria.- Parameters:
orderings- the result orderings concerned by the criterion.- Returns:
- the processor itself.
-
processIdentifiers
Processes the criterion on the suggestion identifiers.- Parameters:
identifiers- the suggestion identifiers concerned by the criterion.- Returns:
- the processor itself.
-
processPagination
Processes the criterion on the pagination to apply on the suggestions to return.- Parameters:
pagination- a pagination definition.- Returns:
- the processor itself.
-
result
<T> T result()Gets the result of the processing. Warning, the result can be incomplete if called before the processing ending (triggered with the call ofendProcessing()method).- Type Parameters:
T- the type of the result.- Returns:
- the processing result.
-