Class CodeGeneratorEndpoint
java.lang.Object
com.broadleafcommerce.promotion.offer.web.endpoint.CodeGeneratorEndpoint
@FrameworkRestController
@FrameworkMapping("/code-generators")
@DataRouteByExample(CodeGenerator.class)
public class CodeGeneratorEndpoint
extends Object
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
protected final OfferCodeService<OfferCode>
protected final CodeGeneratorService<CodeGenerator>
-
Constructor Summary
ConstructorDescriptionCodeGeneratorEndpoint
(CodeGeneratorService<CodeGenerator> service, OfferCodeService<OfferCode> codeService) -
Method Summary
Modifier and TypeMethodDescriptioncreateCodeGenerator
(jakarta.servlet.http.HttpServletRequest request, com.broadleafcommerce.data.tracking.core.context.ContextInfo context, CodeGenerator req) void
deleteCodeGenerator
(jakarta.servlet.http.HttpServletRequest request, com.broadleafcommerce.data.tracking.core.context.ContextInfo context, String id) readCodeGeneratorById
(jakarta.servlet.http.HttpServletRequest request, com.broadleafcommerce.data.tracking.core.context.ContextInfo context, String campaignId) org.springframework.data.domain.Page<CodeGenerator>
readOfferCodeByCampaign
(jakarta.servlet.http.HttpServletRequest request, com.broadleafcommerce.data.tracking.core.context.ContextInfo context, String campaignId, org.springframework.data.domain.Pageable page) replaceCodeGenerator
(jakarta.servlet.http.HttpServletRequest request, com.broadleafcommerce.data.tracking.core.context.ContextInfo context, String id, CodeGenerator req) updateCodeGenerator
(jakarta.servlet.http.HttpServletRequest request, com.broadleafcommerce.data.tracking.core.context.ContextInfo context, String id, CodeGenerator req)
-
Field Details
-
BASE_URI
- See Also:
-
service
-
codeService
-
-
Constructor Details
-
CodeGeneratorEndpoint
public CodeGeneratorEndpoint(CodeGeneratorService<CodeGenerator> service, OfferCodeService<OfferCode> codeService)
-
-
Method Details
-
readOfferCodeByCampaign
@FrameworkGetMapping("/by-campaign/{campaignId}") @Policy(permissionRoots="CAMPAIGN") public org.springframework.data.domain.Page<CodeGenerator> readOfferCodeByCampaign(jakarta.servlet.http.HttpServletRequest request, @ContextOperation com.broadleafcommerce.data.tracking.core.context.ContextInfo context, @PathVariable("campaignId") String campaignId, @PageableDefault(size=50) org.springframework.data.domain.Pageable page) -
readCodeGeneratorById
@FrameworkGetMapping("/{id}") @Policy(permissionRoots="CAMPAIGN") public CodeGenerator readCodeGeneratorById(jakarta.servlet.http.HttpServletRequest request, @ContextOperation com.broadleafcommerce.data.tracking.core.context.ContextInfo context, @PathVariable("id") String campaignId) -
updateCodeGenerator
@FrameworkPatchMapping(value="/{id}", consumes="application/json") @Policy(permissionRoots="CAMPAIGN") public CodeGenerator updateCodeGenerator(jakarta.servlet.http.HttpServletRequest request, @ContextOperation(UPDATE) com.broadleafcommerce.data.tracking.core.context.ContextInfo context, @PathVariable("id") String id, @RequestBody CodeGenerator req) -
replaceCodeGenerator
@FrameworkPutMapping(value="/{id}", consumes="application/json") @Policy(permissionRoots="CAMPAIGN") public CodeGenerator replaceCodeGenerator(jakarta.servlet.http.HttpServletRequest request, @ContextOperation(UPDATE) com.broadleafcommerce.data.tracking.core.context.ContextInfo context, @PathVariable("id") String id, @RequestBody CodeGenerator req) -
createCodeGenerator
@FrameworkPostMapping(consumes="application/json") @Policy(permissionRoots="CAMPAIGN") public CodeGenerator createCodeGenerator(jakarta.servlet.http.HttpServletRequest request, @ContextOperation(CREATE) com.broadleafcommerce.data.tracking.core.context.ContextInfo context, @RequestBody CodeGenerator req) -
deleteCodeGenerator
@FrameworkDeleteMapping("/{id}") @Policy(permissionRoots="CAMPAIGN") public void deleteCodeGenerator(jakarta.servlet.http.HttpServletRequest request, @ContextOperation(DELETE) com.broadleafcommerce.data.tracking.core.context.ContextInfo context, @PathVariable("id") String id)
-