Interface ProductTagService<P extends ProductTag>
- All Superinterfaces:
com.broadleafcommerce.data.tracking.core.service.CrudEntityService<P>
,com.broadleafcommerce.data.tracking.core.service.RsqlCrudEntityService<P>
- All Known Implementing Classes:
DefaultProductTagService
public interface ProductTagService<P extends ProductTag>
extends com.broadleafcommerce.data.tracking.core.service.RsqlCrudEntityService<P>
Service API for
ProductTags
. Supported by ProductTagRepository
.- Author:
- Nathan Moore (nathandmoore)
-
Method Summary
Modifier and TypeMethodDescriptionlong
countNonProductionRecordsByProductIdsInTenant
(Collection<String> productIds, com.broadleafcommerce.data.tracking.core.context.ContextInfo context) Returns the count of non-production records that match the givenproductContextIds
and the given tenant context.Returns the name of the repository domain corresponding to the projection domain.void
hydrateProducts
(Iterable<P> productTags, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) void
hydrateTags
(Iterable<P> productTags, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Hydrates theAdvancedTag
onto theproductTags
.readAllByProductId
(String productId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Reads all of the product tags with matchingproductId
.readAllByProductIdIn
(Iterable<String> productIds, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Reads all of the product tags with matchingproductIds
.readAllByProductIdIn
(Iterable<String> productIds, cz.jirutka.rsql.parser.ast.Node filters, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Reads all of the product tags with matchingproductIds
.readAllByProductIdInAndTagIdIn
(Collection<String> productIds, Collection<String> tagIds, com.broadleafcommerce.data.tracking.core.context.ContextInfo context) Reads all of the product tags with matchingproductIds
andtagIds
.readAllByTagIdIn
(Iterable<String> tagIds, cz.jirutka.rsql.parser.ast.Node filters, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Reads all of the product tags with matchingtagIds
.readByProductContextIdAndContextId
(String productId, String id, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Looks up the product tag by the parent product's and the product tag's IDs.readByProductIdAndTagId
(String productId, String tagId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Read the product tag with matchingproductId
andtagId
.readByTagIdAndId
(String tagId, String id, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Looks up the product tag by the parent tag's and the product tag's IDs.readByVariantIdAndTagId
(String variantId, String tagId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Read a product tag matching the variant ID and tag ID.org.springframework.data.domain.Page<P>
readPageByProductId
(String productId, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Reads all of the product tags with matchingproductId
.org.springframework.data.domain.Page<P>
readPageByProductIdAndIsSorted
(String productId, boolean isSorted, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Reads all of the product tags with matchingproductId
and are all sorted or all not sorted, depending onisSorted
.org.springframework.data.domain.Page<P>
readPageByProductIdAndVariantId
(String productId, String variantId, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Reads all of the product variant tags with matchingproductId
andvariantId
.org.springframework.data.domain.Page<P>
readPageByProductIdIn
(Iterable<String> productIds, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Reads all of the product tags with matchingproductIds
.org.springframework.data.domain.Page<P>
readPageByTagId
(String tagId, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Reads all of the product tags with matchingtagId
.org.springframework.data.domain.Page<P>
readPageByTagIdAndTargetType
(String tagId, String targetType, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Reads all of the product tags with matchingtagId
.org.springframework.data.domain.Page<P>
readPageByVariantId
(String variantId, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Read a page of product tags matching the supplied variant IDorg.springframework.data.domain.Page<P>
readPageByVariantIdAndIsSorted
(String productId, String variantId, boolean sorted, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Reads all of the product variant tags with matchingproductId
andvariantId
.org.springframework.data.domain.Page<P>
readProductTagsPageAndIsSorted
(String productId, boolean isSorted, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Reads all of the product tags with matchingproductId
and are all sorted or all not sorted, depending onisSorted
.readTagsForProduct
(String productId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Read tags for a specific product.org.springframework.data.domain.Page<P>
readTagsPageForProduct
(String productId, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Reads all of the product tags with matchingproductId
.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
-
readPageByTagId
org.springframework.data.domain.Page<P> readPageByTagId(String tagId, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable page, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Reads all of the product tags with matchingtagId
.- Parameters:
tagId
- The id to matchfilters
- additional filters to apply in the query. Should beEmptyNode
if no additional filters should be applied.page
- the requested page of results from the databasecontextInfo
- Request context information around sandbox and multitenant state- Returns:
- All of the tags with matching
tagId
.
-
readPageByTagIdAndTargetType
org.springframework.data.domain.Page<P> readPageByTagIdAndTargetType(String tagId, String targetType, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable page, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Reads all of the product tags with matchingtagId
.- Parameters:
tagId
- The id to matchfilters
- additional filters to apply in the query. Should beEmptyNode
if no additional filters should be applied.page
- the requested page of results from the databasecontextInfo
- Request context information around sandbox and multitenant state- Returns:
- All of the tags with matching
tagId
.
-
readAllByProductId
List<P> readAllByProductId(String productId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Reads all of the product tags with matchingproductId
. This includes tags for products and variants.- Parameters:
productId
- The id to matchcontextInfo
- Request context information around sandbox and multitenant state- Returns:
- All of the tags with matching
productId
.
-
readTagsForProduct
List<P> readTagsForProduct(String productId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Read tags for a specific product. This excludes variant associated tags.- Parameters:
productId
- The id to matchcontextInfo
- Request context information around sandbox and multitenant state- Returns:
- All of the tags with matching
productId
.
-
readPageByProductId
org.springframework.data.domain.Page<P> readPageByProductId(String productId, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable page, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Reads all of the product tags with matchingproductId
. This includes tags for products and variants.- Parameters:
productId
- The id to matchfilters
- additional filters to apply in the query. Should beEmptyNode
if no additional filters should be applied.page
- the requested page of results from the databasecontextInfo
- Request context information around sandbox and multitenant state- Returns:
- All of the tags with matching
productId
.
-
readTagsPageForProduct
org.springframework.data.domain.Page<P> readTagsPageForProduct(String productId, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable page, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Reads all of the product tags with matchingproductId
. This excludes variant related tags.- Parameters:
productId
- The id to matchfilters
- additional filters to apply in the query. Should beEmptyNode
if no additional filters should be applied.page
- the requested page of results from the databasecontextInfo
- Request context information around sandbox and multitenant state- Returns:
- All of the tags with matching
productId
.
-
readPageByProductIdAndVariantId
org.springframework.data.domain.Page<P> readPageByProductIdAndVariantId(String productId, String variantId, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable page, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Reads all of the product variant tags with matchingproductId
andvariantId
.- Parameters:
productId
- The product id to matchvariantId
- The variant idfilters
- additional filters to apply in the query. Should beEmptyNode
if no additional filters should be applied.page
- the requested page of results from the databasecontextInfo
- Request context information around sandbox and multitenant state- Returns:
- All of the tags with matching
productId
.
-
readPageByVariantIdAndIsSorted
org.springframework.data.domain.Page<P> readPageByVariantIdAndIsSorted(String productId, String variantId, boolean sorted, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable page, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Reads all of the product variant tags with matchingproductId
andvariantId
.- Parameters:
productId
- The product id to matchvariantId
- The variant idfilters
- additional filters to apply in the query. Should beEmptyNode
if no additional filters should be applied.page
- the requested page of results from the databasecontextInfo
- Request context information around sandbox and multitenant state- Returns:
- All of the tags with matching
productId
.
-
readPageByProductIdAndIsSorted
org.springframework.data.domain.Page<P> readPageByProductIdAndIsSorted(String productId, boolean isSorted, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable page, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Reads all of the product tags with matchingproductId
and are all sorted or all not sorted, depending onisSorted
. Includes product and variant tag associations.- Parameters:
productId
- The id to matchisSorted
- Whether thefilters
- additional filters to apply in the query. Should beEmptyNode
if no additional filters should be applied.page
- the requested page of results from the databasecontextInfo
- Request context information around sandbox and multitenant state- Returns:
- All of the tags with matching
productId
.
-
readProductTagsPageAndIsSorted
org.springframework.data.domain.Page<P> readProductTagsPageAndIsSorted(String productId, boolean isSorted, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable page, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Reads all of the product tags with matchingproductId
and are all sorted or all not sorted, depending onisSorted
. This excludes variant related tags.- Parameters:
productId
- The id to matchisSorted
- Whether thefilters
- additional filters to apply in the query. Should beEmptyNode
if no additional filters should be applied.page
- the requested page of results from the databasecontextInfo
- Request context information around sandbox and multitenant state- Returns:
- All of the tags with matching
productId
.
-
readByProductIdAndTagId
Optional<P> readByProductIdAndTagId(String productId, String tagId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Read the product tag with matchingproductId
andtagId
.- Parameters:
productId
- The product id to matchtagId
- The tag id to matchcontextInfo
- Request context information around sandbox and multitenant state- Returns:
- All of the tags with matching
productId
andtagId
.
-
readAllByTagIdIn
List<P> readAllByTagIdIn(Iterable<String> tagIds, @Nullable cz.jirutka.rsql.parser.ast.Node filters, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Reads all of the product tags with matchingtagIds
.- Parameters:
tagIds
- The ids to matchfilters
- additional filters to apply in the query.contextInfo
- Request context information around sandbox and multitenant state- Returns:
- All of the tags with matching
tagIds
.
-
readAllByProductIdIn
List<P> readAllByProductIdIn(Iterable<String> productIds, @Nullable cz.jirutka.rsql.parser.ast.Node filters, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Reads all of the product tags with matchingproductIds
.- Parameters:
productIds
- The ids to matchfilters
- additional filters to apply in the query.contextInfo
- Request context information around sandbox and multitenant state- Returns:
- All of the tags with matching
productIds
.
-
readAllByProductIdIn
default List<P> readAllByProductIdIn(Iterable<String> productIds, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Reads all of the product tags with matchingproductIds
.- Parameters:
productIds
- The ids to matchcontextInfo
- Request context information around sandbox and multitenant state- Returns:
- All of the tags with matching
productIds
.
-
readAllByProductIdInAndTagIdIn
List<P> readAllByProductIdInAndTagIdIn(Collection<String> productIds, Collection<String> tagIds, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context) Reads all of the product tags with matchingproductIds
andtagIds
.- Parameters:
productIds
- the product ids to matchtagIds
- the tag ids to matchcontext
- request context information around sandbox and multitenant state- Returns:
- the list of products tags with matching productId and tagId
- Since:
- 2.1.0-GA
-
readPageByProductIdIn
org.springframework.data.domain.Page<P> readPageByProductIdIn(Iterable<String> productIds, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable page, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Reads all of the product tags with matchingproductIds
.- Parameters:
productIds
- The ids to matchfilters
- additional filters to apply in the query. Should beEmptyNode
if no additional filters should be applied.page
- the requested page of results from the databasecontextInfo
- Request context information around sandbox and multitenant state- Returns:
- All of the tags with matching
productIds
.
-
readByProductContextIdAndContextId
Optional<P> readByProductContextIdAndContextId(String productId, String id, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Looks up the product tag by the parent product's and the product tag's IDs.- Parameters:
productId
- ID of the parent productid
- ID of the product tagcontextInfo
- Request context information around sandbox and multitenant state- Returns:
- The product tag matching the
productId
andid
.
-
readByTagIdAndId
Optional<P> readByTagIdAndId(String tagId, String id, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Looks up the product tag by the parent tag's and the product tag's IDs.- Parameters:
tagId
- ID of the parent tagid
- ID of the product tagcontextInfo
- Request context information around sandbox and multitenant state- Returns:
- The product tag matching the
tagId
andid
.
-
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.
-
hydrateTags
void hydrateTags(Iterable<P> productTags, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Hydrates theAdvancedTag
onto theproductTags
.- Parameters:
productTags
-ProductTags
to hydratecontextInfo
- Request context information around sandbox and multitenant state
-
hydrateProducts
void hydrateProducts(Iterable<P> productTags, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) - Parameters:
productTags
- ProductTags to hydratecontextInfo
- Request context information around sandbox and multitenant state
-
readByVariantIdAndTagId
Optional<P> readByVariantIdAndTagId(String variantId, String tagId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Read a product tag matching the variant ID and tag ID.- Parameters:
variantId
- The variant IDtagId
- The tag ID.contextInfo
- Request context information around sandbox and multitenant state- Returns:
-
readPageByVariantId
org.springframework.data.domain.Page<P> readPageByVariantId(String variantId, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable page, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Read a page of product tags matching the supplied variant ID- Parameters:
variantId
- The variant IDfilters
- additional filters to apply in the query. Should beEmptyNode
if no additional filters should be applied.page
- the requested page of results from the databasecontextInfo
- Request context information around sandbox and multitenant state- Returns:
- A page of product tags.
-
countNonProductionRecordsByProductIdsInTenant
long countNonProductionRecordsByProductIdsInTenant(@NonNull Collection<String> productIds, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context) Returns the count of non-production records that match the givenproductContextIds
and the given tenant context.- Parameters:
productIds
- IDs of parent Products to match againstcontext
- Request context information around sandbox and multitenant state- Returns:
- the count of non-production records that match the given
productContextIds
and the given tenant context
-