Class BlogFilters


  • public class BlogFilters
    extends Object
    Class allowing to define several filters for blog post fetching.
    Author:
    silveryocha
    • Constructor Detail

      • BlogFilters

        public BlogFilters​(boolean getDraftIfNotCreator)
        Mandatory constructor.
        Parameters:
        getDraftIfNotCreator - true to get
    • 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.
      • getMaxResult

        public Optional<Integer> getMaxResult()
        Gets the maximum of results if any.
        Returns:
        an optional positive integer.