Class BlogFilters
java.lang.Object
org.silverpeas.components.blog.service.BlogFilters
Class allowing to define several filters for blog post fetching.
- Author:
- silveryocha
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the maximum of results if any.Predicate<org.silverpeas.core.contribution.publication.model.PublicationDetail>Gets the predicate to apply on publication list.withCreatorId(String creatorId) Sets the identifier of the creator.withMaxResult(int maxResult) Sets the maximum result if result must be limited.
-
Constructor Details
-
BlogFilters
public BlogFilters(boolean getDraftIfNotCreator) Mandatory constructor.- Parameters:
getDraftIfNotCreator- true to get
-
-
Method Details
-
withCreatorId
Sets the identifier of the creator.The creator is a registered Silverpeas user.
- Parameters:
creatorId- identifier of a user.- Returns:
- itself.
-
withMaxResult
Sets the maximum result if result must be limited.- Parameters:
maxResult- positive integer to set a maximum result, 0 or negative means no limit.- Returns:
- itself.
-
toPredicate
public Predicate<org.silverpeas.core.contribution.publication.model.PublicationDetail> toPredicate()Gets the predicate to apply on publication list.- Returns:
- the
Predicateinstance.
-
getMaxResult
Gets the maximum of results if any.- Returns:
- an optional positive integer.
-