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 TypeMethodDescriptionReturns 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-productionJpaFacet
that match the givenfieldDefinitionIds
and the given context.void
hydrateFieldDefinitions
(Iterable<P> facets, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Hydrates the fullFieldDefinition
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 IDreadAllByFieldDefinitionIdInAndNotArchived
(Iterable<String> fieldDefinitionIds, com.broadleafcommerce.data.tracking.core.context.ContextInfo context) Retrieves a list of facets for the provided field definition IDsreadAllById
(List<String> facetIds, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Reads all non-archived facets by context IDorg.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 labelMethods 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 fullFieldDefinition
on the provided facets.- Parameters:
facets
- AnIterable<com.broadleafcommerce.search.api.domain.Facet>
. Uses iterable to support takingCollections
orPages
.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 queriedfilters
- additional filters to apply in the query.page
- describes the page of results to returncontext
- 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 onfilters
- additional filters to apply in the query.page
- the requested page of results from the databasecontext
- 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 oncontext
- 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 oncontextInfo
- 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-productionJpaFacet
that match the givenfieldDefinitionIds
and the given context.- Parameters:
fieldDefinitionIds
- IDs of parentFieldDefinition
to match againstcontextInfo
- 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.
-