Class AbstractCollectionPageSearchProcessor

java.lang.Object
com.broadleafcommerce.advancedcms.search.AbstractCollectionPageSearchProcessor
All Implemented Interfaces:
CollectionPageSearchProcessor
Direct Known Subclasses:
DefaultCollectionPageSearchProcessor

public abstract class AbstractCollectionPageSearchProcessor extends Object implements CollectionPageSearchProcessor
This class is a useful starting point for Search Processors that need to retrieve all of the collection pages of a given type while applying the rules they are attached to.
Author:
Jerry Ocanas (jocanas), Phillip Verheyden (phillipuniverse)
  • Field Details

  • Constructor Details

    • AbstractCollectionPageSearchProcessor

      public AbstractCollectionPageSearchProcessor()
  • Method Details

    • constructSearchResultObject

      protected SearchResult constructSearchResultObject(List<org.broadleafcommerce.openadmin.dto.FilterAndSortCriteria> originalCriteria, List<org.broadleafcommerce.common.page.dto.PageDTO> results)
      Convenience method for constructing the return object. This will also take care of sorting the list of PageDTO that is passed in.
      Parameters:
      originalQuery -
      results -
      Returns:
    • fetchAllPagesAssociatedWithType

      protected List<org.broadleafcommerce.common.page.dto.PageDTO> fetchAllPagesAssociatedWithType(com.broadleafcommerce.theme.domain.page.PageType type)
      Fetches all the Structured Content of the StructuredContentType passed in.

      The results are filtered by the rules of the given Structured Content item.

      Parameters:
      type -
      Returns:
    • sortResults

      public List<org.broadleafcommerce.common.page.dto.PageDTO> sortResults(List<org.broadleafcommerce.common.page.dto.PageDTO> pageList, List<org.broadleafcommerce.openadmin.dto.FilterAndSortCriteria> criteriaList)
      Returns a new, sorted list of PageDTO based on the criteria list being based in. The original pageList parameter is left unsorted.
      Parameters:
      pageList - the list of content to sort
      criteriaList - the criteria that contains the properties to sort on as well as their sort directions
      Returns:
      a new list based on pageList but sorted according to criteriaList
    • buildMvelParameters

      protected Map<String,Object> buildMvelParameters(jakarta.servlet.http.HttpServletRequest request)
      MVEL is used to process the content targeting rules.
      Parameters:
      request -
      Returns: