Class CustomerSegmentationController

    • Constructor Detail

      • CustomerSegmentationController

        @Autowired
        public CustomerSegmentationController​(CustomerSegmentationFacade csFacade,
                                              org.springframework.validation.Validator segmentationIdValidator)
    • Method Detail

      • getCustomerSegmentations

        @RequestMapping(value="/v1/customersegmentations",
                        method=GET)
        public CustomerSegmentationListWsDTO getCustomerSegmentations​(@RequestParam(required=false)
                                                                      java.lang.String customerId,
                                                                      @RequestParam(required=false)
                                                                      java.lang.String segmentId,
                                                                      @RequestParam(required=false)
                                                                      java.lang.String baseSite,
                                                                      @RequestParam(required=false)
                                                                      java.util.Map<java.lang.String,​java.lang.String> requestParams)
        Method for searching customersegmentation objects based on given parameters
        Returns:
        list of found relations or object with empty list
      • create

        @RequestMapping(value="/v1/customersegmentations",
                        method=POST)
        @ResponseStatus(CREATED)
        public org.springframework.http.ResponseEntity<CustomerSegmentationData> create​(@RequestBody
                                                                                        CustomerSegmentationData customerSegmentation,
                                                                                        org.springframework.web.util.UriComponentsBuilder builder)
        Creates relation between customer and segment
        Parameters:
        customerSegmentation - Request body parameter (DTO in xml or json format) which contains customer and segment identifiers.
        Throws:
        AlreadyExistsException - When relation between customer and segment already exists
        WebserviceValidationException - When customer or segment identifier is invalid (empty or object not exists)
        NotFoundException - When customer or segment with given identifier doesn't exist
      • getCustomerSegmentation

        @RequestMapping(value="/v1/customersegmentations/{segmentationId}",
                        method=GET)
        public CustomerSegmentationData getCustomerSegmentation​(@PathVariable
                                                                java.lang.String segmentationId)
        Returns relation between customer and segment
        Returns:
        information about relation between customer and segment
        Throws:
        NotFoundException - When there is no relation with given identifier
        WebserviceValidationException - When identifier is invalid (have not supported format)
      • update

        @RequestMapping(value="/v1/customersegmentations/{segmentationId}",
                        method=PUT)
        public CustomerSegmentationData update​(@PathVariable
                                               java.lang.String segmentationId,
                                               @RequestBody
                                               CustomerSegmentationData data)
        Updates relation between customer and segment
        Returns:
        Updated relation
        Throws:
        WebserviceValidationException - When customer or segment identifier is invalid (empty or object not exists)
        NotFoundException - When there is no relation with given identifier
      • delete

        @RequestMapping(value="/v1/customersegmentations/{segmentationId}",
                        method=DELETE)
        @ResponseStatus(NO_CONTENT)
        public void delete​(@PathVariable
                           java.lang.String segmentationId)
        Removes relation between customer and segment
        Throws:
        NotFoundException - When there is no relation with given identifier