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 Type
    Method
    Description
    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)
    Hydrates the Product or Variant for the productTags.
    void
    hydrateTags(Iterable<P> productTags, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Hydrates the AdvancedTag onto the productTags.
    readAllByProductId(String productId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Reads all of the product tags with matching productId.
    default List<P>
    readAllByProductIdIn(Iterable<String> productIds, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Reads all of the product tags with matching productIds.
    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 matching productIds.
    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 matching tagIds.
    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 matching productId and tagId.
    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 matching productId.
    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 matching productId and are all sorted or all not sorted, depending on isSorted.
    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 matching productId and variantId.
    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 matching productIds.
    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 matching tagId.
    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 matching tagId.
    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 ID
    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, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Reads all of the product variant tags with matching productId and variantId.
    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 matching productId and are all sorted or all not sorted, depending on isSorted.
    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 matching productId.

    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 matching tagId.
      Parameters:
      tagId - The id to match
      filters - additional filters to apply in the query. Should be EmptyNode if no additional filters should be applied.
      page - the requested page of results from the database
      contextInfo - 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 matching tagId.
      Parameters:
      tagId - The id to match
      filters - additional filters to apply in the query. Should be EmptyNode if no additional filters should be applied.
      page - the requested page of results from the database
      contextInfo - 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 matching productId. This includes tags for products and variants.
      Parameters:
      productId - The id to match
      contextInfo - 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 match
      contextInfo - 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 matching productId. This includes tags for products and variants.
      Parameters:
      productId - The id to match
      filters - additional filters to apply in the query. Should be EmptyNode if no additional filters should be applied.
      page - the requested page of results from the database
      contextInfo - 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 matching productId. This excludes variant related tags.
      Parameters:
      productId - The id to match
      filters - additional filters to apply in the query. Should be EmptyNode if no additional filters should be applied.
      page - the requested page of results from the database
      contextInfo - 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 matching productId and variantId.
      Parameters:
      productId - The product id to match
      variantId - The variant id
      filters - additional filters to apply in the query. Should be EmptyNode if no additional filters should be applied.
      page - the requested page of results from the database
      contextInfo - 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 matching productId and variantId.
      Parameters:
      productId - The product id to match
      variantId - The variant id
      filters - additional filters to apply in the query. Should be EmptyNode if no additional filters should be applied.
      page - the requested page of results from the database
      contextInfo - 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 matching productId and are all sorted or all not sorted, depending on isSorted. Includes product and variant tag associations.
      Parameters:
      productId - The id to match
      isSorted - Whether the
      filters - additional filters to apply in the query. Should be EmptyNode if no additional filters should be applied.
      page - the requested page of results from the database
      contextInfo - 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 matching productId and are all sorted or all not sorted, depending on isSorted. This excludes variant related tags.
      Parameters:
      productId - The id to match
      isSorted - Whether the
      filters - additional filters to apply in the query. Should be EmptyNode if no additional filters should be applied.
      page - the requested page of results from the database
      contextInfo - 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 matching productId and tagId.
      Parameters:
      productId - The product id to match
      tagId - The tag id to match
      contextInfo - Request context information around sandbox and multitenant state
      Returns:
      All of the tags with matching productId and tagId.
    • 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 matching tagIds.
      Parameters:
      tagIds - The ids to match
      filters - 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 matching productIds.
      Parameters:
      productIds - The ids to match
      filters - 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 matching productIds.
      Parameters:
      productIds - The ids to match
      contextInfo - Request context information around sandbox and multitenant state
      Returns:
      All of the tags with matching productIds.
    • 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 matching productIds.
      Parameters:
      productIds - The ids to match
      filters - additional filters to apply in the query. Should be EmptyNode if no additional filters should be applied.
      page - the requested page of results from the database
      contextInfo - 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 product
      id - ID of the product tag
      contextInfo - Request context information around sandbox and multitenant state
      Returns:
      The product tag matching the productId and id.
    • 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 tag
      id - ID of the product tag
      contextInfo - Request context information around sandbox and multitenant state
      Returns:
      The product tag matching the tagId and id.
    • 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 the AdvancedTag onto the productTags.
      Parameters:
      productTags - ProductTags to hydrate
      contextInfo - Request context information around sandbox and multitenant state
    • hydrateProducts

      void hydrateProducts(Iterable<P> productTags, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Hydrates the Product or Variant for the productTags.
      Parameters:
      productTags - ProductTags to hydrate
      contextInfo - 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 ID
      tagId - 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 ID
      filters - additional filters to apply in the query. Should be EmptyNode if no additional filters should be applied.
      page - the requested page of results from the database
      contextInfo - Request context information around sandbox and multitenant state
      Returns:
      A page of product tags.