Interface PageFilter

All Known Implementing Classes:
DefaultPageFilter, StaticPageFilter

public interface PageFilter
This interface represents a filter for Page
  • Method Details

    • getId

      Get the filter id
      Returns:
      The filter id
    • setId

      void setId(String id)
      Set the filter id.
      Parameters:
      id - The id to set.
    • getMetadataValues

      Get the metadata id and value to match
      Returns:
      The metadata to match pages
    • addMetadata

      void addMetadata(String metadataId, String value)
      Add a metadata filter
      Parameters:
      metadataId - The metadata id.
      value - The value to test. Set null to test existence
    • getTags

      Get the tag keys to match pages
      Returns:
      The tag keys to match pages
    • addTag

      void addTag(String tag)
      Add a tag to the filter
      Parameters:
      tag - The tag key to add
    • getContext

      Get the search context
      Returns:
      The search context
    • setContext

      Set the search context
      Parameters:
      context - The search context to set
    • getContextLanguage

      Get the context language
      Returns:
      The context language
    • setContextLanguage

      Set the context language
      Parameters:
      contextLang - The context language
    • getDepth

      int getDepth()
      Get the search depth
      Returns:
      The search depth
    • setDepth

      void setDepth(int depth)
      Set the search depth
      Parameters:
      depth - The search depth. Set to 0 for no depth limitation.
    • getLength

      int getLength()
      Get the max number of results
      Returns:
      The max number of results
    • setLength

      void setLength(int length)
      Set the max number o results
      Parameters:
      length - The max number of results
    • getSortCriteria

      Get the sort criteria allows to sort query results.
      Returns:
      the sort criteria
    • getPageId

      Get the parent page id
      Returns:
      The parent page id
    • setPageId

      void setPageId(String pageId)
      set the parent page Id.
      Parameters:
      pageId - Id of the parent page (when fetching child of a page).
    • addSortCriteria

      void addSortCriteria(String metadataId, boolean ascending, boolean useLowerCase)
      Add a sort criteria
      Parameters:
      metadataId - The metadata id to sort
      ascending - true to ascending sort
      useLowerCase - true for case insensitive order on a string property
    • setResolver

      Set the ametys object resolver to execute query
      Parameters:
      resolver - The ametys object resolver to set
    • getMatchingPages

      Get the pages matching this filter.
      Parameters:
      siteName - The current site name.
      lang - The current language. Can be null.
      page - The current page.
      Returns:
      The matching pages.
    • getTitle

      Get the title
      Returns:
      The title
    • setTitle

      void setTitle(I18nizableText title)
      Set the title
      Parameters:
      title - The title