Interface FacetService<P extends com.broadleafcommerce.search.api.domain.Facet>

All Superinterfaces:
com.broadleafcommerce.data.tracking.core.service.CrudEntityService<P>, com.broadleafcommerce.data.tracking.core.service.RsqlCrudEntityService<P>
All Known Implementing Classes:
DefaultFacetService

public interface FacetService<P extends com.broadleafcommerce.search.api.domain.Facet> extends com.broadleafcommerce.data.tracking.core.service.RsqlCrudEntityService<P>
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the name of the repository domain corresponding to the projection domain.
    boolean
    hasNonProductionRecordsByFieldIdsInTenant(Collection<String> fieldDefinitionIds, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Returns true if there is non-production JpaFacet that match the given fieldDefinitionIds and the given context.
    void
    hydrateFieldDefinitions(Iterable<P> facets, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Hydrates the full FieldDefinition on the provided facets.
    org.springframework.data.domain.Page<P>
    readAllByFieldDefinitionId(String fieldDefinitionId, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
    Retrieves a paged list of facets by field definition ID
    readAllByFieldDefinitionIdInAndNotArchived(Iterable<String> fieldDefinitionIds, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
    Retrieves a list of facets for the provided field definition IDs
    readAllById(List<String> facetIds, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Reads all non-archived facets by context ID
    org.springframework.data.domain.Page<P>
    readAllByLabel(String label, 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 label

    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
  • Method Details

    • hydrateFieldDefinitions

      void hydrateFieldDefinitions(Iterable<P> facets, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Hydrates the full FieldDefinition on the provided facets.
      Parameters:
      facets - An Iterable<com.broadleafcommerce.search.api.domain.Facet>. Uses iterable to support taking Collections or Pages.
      contextInfo - Additional sandbox and multitenant info
    • readAllByLabel

      org.springframework.data.domain.Page<P> readAllByLabel(@Nullable String label, @Nullable cz.jirutka.rsql.parser.ast.Node filters, @Nullable org.springframework.data.domain.Pageable page, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
      Retrieves a page of facets by label
      Parameters:
      label - 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
    • readAllByFieldDefinitionId

      org.springframework.data.domain.Page<P> readAllByFieldDefinitionId(String fieldDefinitionId, @Nullable cz.jirutka.rsql.parser.ast.Node filters, @Nullable org.springframework.data.domain.Pageable page, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
      Retrieves a paged list of facets by field definition ID
      Parameters:
      fieldDefinitionId - the field definition ID to query on
      filters - additional filters to apply in the query.
      page - the requested page of results from the database
      context - context information around sandbox and multitenant state
      Returns:
      a paged list of facets for the given field definition ID
    • readAllByFieldDefinitionIdInAndNotArchived

      List<P> readAllByFieldDefinitionIdInAndNotArchived(Iterable<String> fieldDefinitionIds, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
      Retrieves a list of facets for the provided field definition IDs
      Parameters:
      fieldDefinitionIds - the field definition IDs to query on
      context - context information around sandbox and multitenant state
      Returns:
      a list of facets for the provided field definition IDs
    • readAllById

      List<P> readAllById(List<String> facetIds, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Reads all non-archived facets by context ID
      Parameters:
      facetIds - the list of facetIds to filter on
      contextInfo - context information around sandbox and multitenant state
      Returns:
      all non-archived facets by context ID
    • hasNonProductionRecordsByFieldIdsInTenant

      boolean hasNonProductionRecordsByFieldIdsInTenant(Collection<String> fieldDefinitionIds, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Returns true if there is non-production JpaFacet that match the given fieldDefinitionIds and the given context.
      Parameters:
      fieldDefinitionIds - IDs of parent FieldDefinition to match against
      contextInfo - Request context information around sandbox and multitenant state
      Returns:
      true if there is non-production records that match the given fieldDefinitionIds and the given context, and false otherwise
      Since:
      Search Service 2.1.4, Release Train 2.1.4, Search Service 2.2.0, Release Train 2.2.0
    • getRepositoryDomain

      String getRepositoryDomain()
      Returns the name of the repository domain corresponding to the projection domain.
      Returns:
      The name of the repository domain corresponding to the projection domain.