Class OptionTemplateEndpoint

java.lang.Object
com.broadleafcommerce.catalog.web.endpoint.option.OptionTemplateEndpoint

@FrameworkRestController @FrameworkMapping("/option-templates") @DataRouteByExample(OptionTemplate.class) public class OptionTemplateEndpoint extends Object
Author:
Nathan Moore (nathanmoore).
  • Field Details

  • Constructor Details

    • OptionTemplateEndpoint

      public OptionTemplateEndpoint(OptionTemplateService<OptionTemplate> productOptionService, com.broadleafcommerce.translation.service.TranslationEntityService<com.broadleafcommerce.translation.domain.Translation> translationEntityService, ProductHydrationService productHydrationService)
  • Method Details

    • readAll

      @FrameworkGetMapping @Policy(permissionRoots="OPTION_TEMPLATE") public org.springframework.data.domain.Page<OptionTemplate> readAll(@ContextOperation com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo, @RequestParam(value="q",required=false) String query, @PageableDefault(size=50) org.springframework.data.domain.Pageable page, cz.jirutka.rsql.parser.ast.Node filters)
    • read

      @FrameworkGetMapping("/{id}") @Policy(permissionRoots="OPTION_TEMPLATE") public OptionTemplate read(@ContextOperation com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo, @PathVariable("id") String id)
    • replace

      @FrameworkPutMapping("/{id}") @Policy(permissionRoots="OPTION_TEMPLATE") public OptionTemplate replace(@ContextOperation(UPDATE) com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo, @PathVariable("id") String id, @RequestBody OptionTemplate req)
    • replaceAllProductOptionTranslations

      @FrameworkPutMapping(value="/{id}/translations/{locale}", consumes="application/json") @Policy(permissionRoots="OPTION_TEMPLATE") public com.broadleafcommerce.translation.service.dto.TranslationsPayload replaceAllProductOptionTranslations(@ContextOperation(UPDATE) com.broadleafcommerce.data.tracking.core.context.ContextInfo context, @PathVariable("id") String id, @PathVariable("locale") Locale locale, @RequestBody com.broadleafcommerce.translation.service.dto.TranslationsPayload translationRequest)
    • update

      @FrameworkPatchMapping("/{id}") @Policy(permissionRoots="OPTION_TEMPLATE") public OptionTemplate update(@ContextOperation(UPDATE) com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo, @PathVariable("id") String id, @RequestBody OptionTemplate req)
    • create

      @FrameworkPostMapping(consumes="application/json") @Policy(permissionRoots="OPTION_TEMPLATE") public OptionTemplate create(@ContextOperation(CREATE) com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo, @RequestBody OptionTemplate req)
    • delete

      @FrameworkDeleteMapping("/{id}") @Policy(permissionRoots="OPTION_TEMPLATE") public void delete(@ContextOperation(DELETE) com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo, @PathVariable("id") String id)
    • getService

      protected OptionTemplateService<OptionTemplate> getService()
    • getTranslationEntityService

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

      protected ProductHydrationService getProductHydrationService()