Class BlogFilters
- java.lang.Object
-
- org.silverpeas.components.blog.service.BlogFilters
-
public class BlogFilters extends Object
Class allowing to define several filters for blog post fetching.- Author:
- silveryocha
-
-
Constructor Summary
Constructors Constructor Description BlogFilters(boolean getDraftIfNotCreator)
Mandatory constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Optional<Integer>
getMaxResult()
Gets the maximum of results if any.Predicate<org.silverpeas.core.contribution.publication.model.PublicationDetail>
toPredicate()
Gets the predicate to apply on publication list.BlogFilters
withCreatorId(String creatorId)
Sets the identifier of the creator.BlogFilters
withMaxResult(int maxResult)
Sets the maximum result if result must be limited.
-
-
-
Method Detail
-
withCreatorId
public BlogFilters withCreatorId(String creatorId)
Sets the identifier of the creator.The creator is a registered Silverpeas user.
- Parameters:
creatorId
- identifier of a user.- Returns:
- itself.
-
withMaxResult
public BlogFilters withMaxResult(int maxResult)
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
Predicate
instance.
-
-