Class ProductTagProductEndpoint

java.lang.Object
com.broadleafcommerce.catalog.web.endpoint.ProductTagProductEndpoint

@FrameworkRestController @FrameworkMapping("/products/{productId}/tags") @DataRouteByExample(Product.class) public class ProductTagProductEndpoint extends Object
Endpoint for managing ProductTags from a Product context.
Author:
Nathan Moore (nathandmoore)
  • Field Details

  • Constructor Details

  • Method Details

    • readAllProductTags

      @FrameworkGetMapping @Policy(permissionRoots="PRODUCT") public org.springframework.data.domain.Page<ProductTag> readAllProductTags(@ContextOperation com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo, @PathVariable("productId") String productId, cz.jirutka.rsql.parser.ast.Node filters, @PageableDefault(size=50) org.springframework.data.domain.Pageable page)
    • readAllProductTags

      @FrameworkGetMapping(params="isSorted") @Policy(permissionRoots="PRODUCT") public org.springframework.data.domain.Page<ProductTag> readAllProductTags(@ContextOperation com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo, @PathVariable("productId") String productId, @RequestParam boolean isSorted, cz.jirutka.rsql.parser.ast.Node filters, @PageableDefault(size=50) org.springframework.data.domain.Pageable page)
    • readProductTag

      @FrameworkGetMapping("/{id}") @Policy(permissionRoots="PRODUCT") public ProductTag readProductTag(@ContextOperation com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo, @PathVariable("productId") String productId, @PathVariable("id") String id)
    • replaceProductTag

      @FrameworkPutMapping(path="/{id}", consumes="application/json") @Policy(permissionRoots="PRODUCT") public ProductTag replaceProductTag(@ContextOperation(UPDATE) com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo, @PathVariable("productId") String productId, @PathVariable("id") String id, @RequestBody ProductTag req)
    • updateProductTag

      @FrameworkPatchMapping(path="/{id}", consumes="application/json") @Policy(permissionRoots="PRODUCT") public ProductTag updateProductTag(@ContextOperation(UPDATE) com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo, @PathVariable("productId") String productId, @PathVariable("id") String id, @RequestBody ProductTag req)
    • addProductTag

      @FrameworkPostMapping(consumes="application/json") @Policy(permissionRoots="PRODUCT") public ProductTag addProductTag(@ContextOperation(CREATE) com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo, @PathVariable("productId") String productId, @RequestBody ProductTag req)
    • deleteProductTag

      @FrameworkDeleteMapping("/{id}") @Policy(permissionRoots="PRODUCT") public org.springframework.http.ResponseEntity<Void> deleteProductTag(@ContextOperation(DELETE) com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo, @PathVariable("productId") String productId, @PathVariable("id") String id)
    • replaceAllProductTagTranslations

      @FrameworkPutMapping(path="/{id}/translation/{locale}") @Policy(permissionRoots="PRODUCT") public com.broadleafcommerce.translation.service.dto.TranslationsPayload replaceAllProductTagTranslations(@ContextOperation(UPDATE) com.broadleafcommerce.data.tracking.core.context.ContextInfo context, @PathVariable("productId") String productId, @PathVariable("id") String id, @PathVariable("locale") Locale locale, @RequestBody com.broadleafcommerce.translation.service.dto.TranslationsPayload translationRequest)
    • reorderProductTag

      @FrameworkPatchMapping("/{id}/sort") @Policy(permissionRoots="PRODUCT") public ProductTag reorderProductTag(@ContextOperation(UPDATE) com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo, @PathVariable("productId") String productId, @PathVariable("id") String id, @UpdateSortOperation com.broadleafcommerce.data.tracking.core.sort.SortPositionRequest sortPositionRequest)
    • findWithRelatedProduct

      protected org.apache.commons.lang3.tuple.Pair<Product,ProductTag> findWithRelatedProduct(String productId, String productTagId, String operationType, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Finds the ProductTag and its Product. This will also implicitly validate that both exist and the product is the parent of the product tag.
      Parameters:
      productId - ID of the owning product
      productTagId - ID of the product tag to fetch
      contextInfo - Additional sandbox and multitenant info
      Returns:
      The ProductTag and its Product.
    • getProductService

      protected ProductService<Product> getProductService()
    • getTagService

      protected AdvancedTagService<AdvancedTag> getTagService()
    • getProductTagService

      protected ProductTagService<ProductTag> getProductTagService()
    • getTranslationEntityService

      protected com.broadleafcommerce.translation.service.TranslationEntityService<com.broadleafcommerce.translation.domain.Translation> getTranslationEntityService()