Interface PageFilter

    • Method Detail

      • getId

        String getId()
        Get the filter id
        Returns:
        The filter id
      • setId

        void setId​(String id)
        Set the filter id.
        Parameters:
        id - The id to set.
      • 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

        List<StringgetTags()
        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
      • 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
      • getPageId

        String 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

        void setResolver​(AmetysObjectResolver resolver)
        Set the ametys object resolver to execute query
        Parameters:
        resolver - The ametys object resolver to set
      • getMatchingPages

        AmetysObjectIterable<PagegetMatchingPages​(String siteName,
                                                    String lang,
                                                    Page page)
        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.