Class SuggestionCriteria
java.lang.Object
org.silverpeas.components.suggestionbox.model.SuggestionCriteria
Class that permits to set suggestion search criteria for suggestion box application.
- Author:
- Yohann Chastagnier
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumstatic enum -
Method Summary
Modifier and TypeMethodDescriptionapplyJoinOnData(SuggestionCriteria.JOIN_DATA_APPLY... joinDataApplies) Configures the data join to apply on the suggestion list.createdBy(org.silverpeas.core.admin.user.model.User user) Sets the creator criterion to find suggestion created by the given user.static SuggestionCriteriafrom(SuggestionBox suggestionBox) Initializes suggestion search criteria axed on the given suggestion box.Gets the suggestion box criteria value.identifierIsOneOf(String... identifiers) Sets the identifiers criterion to find the suggestions with an identifier equals to one of the specified ones.booleanIndicates if suggestion contents must be loaded.orderedBy(SuggestionCriteria.QUERY_ORDER_BY... orderBies) Configures the order of the suggestion list.paginatedBy(org.silverpeas.core.admin.PaginationPage pagination) Sets the pagination criterion on the result of the criteria.voidprocessWith(SuggestionCriteriaProcessor processor) Processes this criteria with the specified processor.statusIsOneOf(org.silverpeas.core.contribution.ContributionStatus... statuses) Sets the list of status criterion to find suggestions which have their status equals to one of the given ones.Indicates that the content of the suggestions must be loaded before returning the result.
-
Method Details
-
from
Initializes suggestion search criteria axed on the given suggestion box.- Parameters:
suggestionBox- the base suggestion box of suggestion criteria.- Returns:
- an instance of suggestion criteria based on the specified suggestion box.
-
createdBy
Sets the creator criterion to find suggestion created by the given user.- Parameters:
user- the user that must be the creator of the suggestion(s).- Returns:
- the suggestion criteria itself with the new criterion on the suggestion creator.
-
paginatedBy
Sets the pagination criterion on the result of the criteria.- Parameters:
pagination- the pagination to apply on the result.- Returns:
- the suggestion criteria itself set with the criterion on the pagination.
-
statusIsOneOf
public SuggestionCriteria statusIsOneOf(org.silverpeas.core.contribution.ContributionStatus... statuses) Sets the list of status criterion to find suggestions which have their status equals to one of the given ones.- Parameters:
statuses- the status list that the suggestion statuses must verify.- Returns:
- the suggestion criteria itself with the new criterion on the suggestion statuses.
-
applyJoinOnData
Configures the data join to apply on the suggestion list.- Parameters:
joinDataApplies- the list of join by directives.- Returns:
- the suggestion criteria itself with the join data list criterion.
-
orderedBy
Configures the order of the suggestion list.- Parameters:
orderBies- the list of order by directives.- Returns:
- the suggestion criteria itself with the list ordering criterion.
-
identifierIsOneOf
Sets the identifiers criterion to find the suggestions with an identifier equals to one of the specified ones.- Parameters:
identifiers- a list of identifiers the suggestions to find should have.- Returns:
- the suggestion criteria itself with the new criterion on the suggestion identifiers.
-
withWysiwygContent
Indicates that the content of the suggestions must be loaded before returning the result.- Returns:
- the suggestion criteria itself with the criterion on the WYSIWYG content loading.
-
getSuggestionBox
Gets the suggestion box criteria value.from(SuggestionBox)- Returns:
- the criterion on the suggestion box to which the suggestions should belong.
-
mustLoadWysiwygContent
public boolean mustLoadWysiwygContent()Indicates if suggestion contents must be loaded.- Returns:
- true if suggestion contents mus be loaded.
-
processWith
Processes this criteria with the specified processor. It chains in a given order the different criterion to process.- Parameters:
processor- the processor to use for processing each criterion in this criteria.
-