Class CustomizationPackageController


  • @RestController
    public class CustomizationPackageController
    extends PersonalizationAbstractController
    Controller exposes functionality for customization with related objects
    • Field Detail

      • CUSTOMIZATIONPACKAGES

        public static final java.lang.String CUSTOMIZATIONPACKAGES
        See Also:
        Constant Field Values
      • CUSTOMIZATIONPACKAGE

        public static final java.lang.String CUSTOMIZATIONPACKAGE
        See Also:
        Constant Field Values
    • Constructor Detail

      • CustomizationPackageController

        @Autowired
        public CustomizationPackageController​(CustomizationFacade cxCustomizationFacade,
                                              org.springframework.validation.Validator customizationPackageValidator)
    • Method Detail

      • createCustomization

        @RequestMapping(value="/v1/catalogs/{catalog}/catalogVersions/{catalogVersion}/customizationpackages",
                        method=POST)
        @ResponseStatus(CREATED)
        public org.springframework.http.ResponseEntity<CustomizationData> createCustomization​(@PathVariable
                                                                                              java.lang.String catalog,
                                                                                              @PathVariable
                                                                                              java.lang.String catalogVersion,
                                                                                              @RequestBody
                                                                                              CustomizationData customization,
                                                                                              org.springframework.web.util.UriComponentsBuilder builder)
        Creates customization with related objects like variations and triggers.
        Returns:
        created customization
        Throws:
        AlreadyExistsException - if customization with given code already exists
        WebserviceValidationException - if provided customization data is invalid
        NotFoundException - if catalog version doesn't exists
      • updateCustomization

        @RequestMapping(value="/v1/catalogs/{catalog}/catalogVersions/{catalogVersion}/customizationpackages/{customizationCode}",
                        method=PUT)
        public CustomizationData updateCustomization​(@PathVariable
                                                     java.lang.String catalog,
                                                     @PathVariable
                                                     java.lang.String catalogVersion,
                                                     @PathVariable
                                                     java.lang.String customizationCode,
                                                     @RequestBody
                                                     CustomizationData customization)
        Updates customization and related objects
        Returns:
        updated customization
        Throws:
        WebserviceValidationException - if provided data is invalid
        NotFoundException - if customization with given code does not exists