Class CustomizationController


@RestController public class CustomizationController extends PersonalizationAbstractController
Controller exposes functionality for customizations, variations and actions
  • Field Details

  • Constructor Details

    • CustomizationController

      @Autowired public CustomizationController(CustomizationFacade cxCustomizationFacade, org.springframework.validation.Validator customizationValidator)
  • Method Details

    • getCustomizations

      @RequestMapping(value="/v1/catalogs/{catalog}/catalogVersions/{catalogVersion}/customizations", method=GET) public CustomizationListWsDTO getCustomizations(@PathVariable String catalog, @PathVariable String catalogVersion, @RequestParam(required=false) Map<String,String> requestParams)
      Returns all customizations
      Returns:
      Collection of all customizations
    • createListDTO

      protected CustomizationListWsDTO createListDTO(SearchPageData<CustomizationData> customizations)
    • createCustomization

      @RequestMapping(value="/v1/catalogs/{catalog}/catalogVersions/{catalogVersion}/customizations", method=POST, consumes={"application/json","application/xml"}) @ResponseStatus(CREATED) public org.springframework.http.ResponseEntity<CustomizationData> createCustomization(@PathVariable String catalog, @PathVariable String catalogVersion, @RequestBody CustomizationData customization, org.springframework.web.util.UriComponentsBuilder builder)
      Creates customization
      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}/customizations/{customizationCode}", method=PUT, consumes={"application/json","application/xml"}) public CustomizationData updateCustomization(@PathVariable String catalog, @PathVariable String catalogVersion, @PathVariable String customizationCode, @RequestBody CustomizationData customization)
      Updates customization with given code
      Returns:
      updated customization
      Throws:
      WebserviceValidationException - if provided data is invalid
      NotFoundException - if customization with given code does not exists
    • deleteCustomization

      @RequestMapping(value="/v1/catalogs/{catalog}/catalogVersions/{catalogVersion}/customizations/{customizationCode}", method=DELETE) @ResponseStatus(NO_CONTENT) public void deleteCustomization(@PathVariable String catalog, @PathVariable String catalogVersion, @PathVariable String customizationCode)
      Removes customization with given code
      Throws:
      NotFoundException - if customization with given code does not exists
    • getCustomization

      @RequestMapping(value="/v1/catalogs/{catalog}/catalogVersions/{catalogVersion}/customizations/{customizationCode}", method=GET) public CustomizationData getCustomization(@PathVariable String catalog, @PathVariable String catalogVersion, @PathVariable String customizationCode)
      Returns customization with given code
      Returns:
      customization with given code
      Throws:
      NotFoundException - if customization with given code does not exists
    • validateCustomization

      protected void validateCustomization(CustomizationData customization)