Class DefaultFacetGroupService<P extends com.broadleafcommerce.search.api.domain.FacetGroup>

java.lang.Object
com.broadleafcommerce.data.tracking.core.service.BaseCrudEntityService<P>
com.broadleafcommerce.data.tracking.core.service.BaseRsqlCrudEntityService<P>
com.broadleafcommerce.search.core.service.facetgroup.DefaultFacetGroupService<P>
All Implemented Interfaces:
com.broadleafcommerce.data.tracking.core.service.CrudEntityService<P>, com.broadleafcommerce.data.tracking.core.service.RsqlCrudEntityService<P>, FacetGroupService<P>

public class DefaultFacetGroupService<P extends com.broadleafcommerce.search.api.domain.FacetGroup> extends com.broadleafcommerce.data.tracking.core.service.BaseRsqlCrudEntityService<P> implements FacetGroupService<P>
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    DefaultFacetGroupService(FacetGroupRepository<com.broadleafcommerce.data.tracking.core.Trackable> repository, com.broadleafcommerce.data.tracking.core.service.RsqlCrudEntityHelper helper, com.broadleafcommerce.common.extension.cache.CacheStateManager cacheStateManager)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected com.broadleafcommerce.common.extension.cache.CacheStateManager
     
    protected FacetGroupRepository<com.broadleafcommerce.data.tracking.core.Trackable>
     
    Returns the name of the repository domain corresponding to the projection domain.
    org.springframework.data.domain.Page<P>
    readAllByName(String name, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
    Retrieves a page of facets by name
    readByContextIdAndNotArchived(String contextId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Reads the non-archived facet group by its context ID

    Methods inherited from class com.broadleafcommerce.data.tracking.core.service.BaseRsqlCrudEntityService

    getRsqlHelper, readAll, readAll, readAll, readAll

    Methods inherited from class com.broadleafcommerce.data.tracking.core.service.BaseCrudEntityService

    convertFromPersistentDomain, convertToPersistentDomain, create, createAll, createAllAllowingPartialSuccess, delete, getHelper, getSortPositionStrategy, readAll, readAll, readAll, readAllByContextId, readByContextId, replace, replaceAll, replaceAllAllowingPartialSuccess, setSortPositionStrategy, update, updateAll, updateAllAllowingPartialSuccess, updateSort

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.broadleafcommerce.data.tracking.core.service.CrudEntityService

    create, createAll, createAllAllowingPartialSuccess, delete, readAll, readAll, readAll, readAllByContextId, readByContextId, replace, replaceAll, replaceAllAllowingPartialSuccess, update, updateAll, updateAllAllowingPartialSuccess, updateSort

    Methods inherited from interface com.broadleafcommerce.data.tracking.core.service.RsqlCrudEntityService

    readAll, readAll, readAll, readAll
  • Field Details

  • Constructor Details

    • DefaultFacetGroupService

      public DefaultFacetGroupService(FacetGroupRepository<com.broadleafcommerce.data.tracking.core.Trackable> repository, com.broadleafcommerce.data.tracking.core.service.RsqlCrudEntityHelper helper, com.broadleafcommerce.common.extension.cache.CacheStateManager cacheStateManager)
  • Method Details

    • readAllByName

      public org.springframework.data.domain.Page<P> readAllByName(@Nullable String name, @Nullable cz.jirutka.rsql.parser.ast.Node filters, @Nullable org.springframework.data.domain.Pageable page, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
      Description copied from interface: FacetGroupService
      Retrieves a page of facets by name
      Specified by:
      readAllByName in interface FacetGroupService<P extends com.broadleafcommerce.search.api.domain.FacetGroup>
      Parameters:
      name - the label field being queried
      filters - additional filters to apply in the query.
      page - describes the page of results to return
      context - context information around sandbox and multitenant state
      Returns:
      a paged list of facets matching the label string
    • readByContextIdAndNotArchived

      public Optional<P> readByContextIdAndNotArchived(String contextId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Description copied from interface: FacetGroupService
      Reads the non-archived facet group by its context ID
      Specified by:
      readByContextIdAndNotArchived in interface FacetGroupService<P extends com.broadleafcommerce.search.api.domain.FacetGroup>
      Parameters:
      contextId - the contextId to filter on
      contextInfo - context information around sandbox and multitenant state
      Returns:
      the non-archived facet group, if it exists
    • getRepositoryDomain

      public String getRepositoryDomain()
      Description copied from interface: FacetGroupService
      Returns the name of the repository domain corresponding to the projection domain.
      Specified by:
      getRepositoryDomain in interface FacetGroupService<P extends com.broadleafcommerce.search.api.domain.FacetGroup>
      Returns:
      The name of the repository domain corresponding to the projection domain.
    • getRepository

      protected FacetGroupRepository<com.broadleafcommerce.data.tracking.core.Trackable> getRepository()
      Overrides:
      getRepository in class com.broadleafcommerce.data.tracking.core.service.BaseCrudEntityService<P extends com.broadleafcommerce.search.api.domain.FacetGroup>
    • getCacheStateManager

      @Nullable protected com.broadleafcommerce.common.extension.cache.CacheStateManager getCacheStateManager()