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 Summary
-
Constructor Summary
ConstructorDescriptionOptionTemplateEndpoint
(OptionTemplateService<OptionTemplate> productOptionService, com.broadleafcommerce.translation.service.TranslationEntityService<com.broadleafcommerce.translation.domain.Translation> translationEntityService, ProductHydrationService productHydrationService) -
Method Summary
Modifier and TypeMethodDescriptioncreate
(com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo, OptionTemplate req) void
protected ProductHydrationService
protected OptionTemplateService<OptionTemplate>
protected com.broadleafcommerce.translation.service.TranslationEntityService<com.broadleafcommerce.translation.domain.Translation>
org.springframework.data.domain.Page<OptionTemplate>
readAll
(com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo, String query, org.springframework.data.domain.Pageable page, cz.jirutka.rsql.parser.ast.Node filters) replace
(com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo, String id, OptionTemplate req) com.broadleafcommerce.translation.service.dto.TranslationsPayload
replaceAllProductOptionTranslations
(com.broadleafcommerce.data.tracking.core.context.ContextInfo context, String id, Locale locale, com.broadleafcommerce.translation.service.dto.TranslationsPayload translationRequest) update
(com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo, String id, OptionTemplate req)
-
Field Details
-
BASE_URI
- See Also:
-
-
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
-
getTranslationEntityService
protected com.broadleafcommerce.translation.service.TranslationEntityService<com.broadleafcommerce.translation.domain.Translation> getTranslationEntityService() -
getProductHydrationService
-