Class CustomerGroupsController

java.lang.Object
de.hybris.platform.commercewebservices.core.v2.controller.BaseController
de.hybris.platform.commercewebservices.core.v2.controller.CustomerGroupsController

@Controller @RequestMapping("/{baseSiteId}/customergroups") public class CustomerGroupsController extends BaseController
Controller for CustomerGroupFacade
  • Constructor Details

    • CustomerGroupsController

      public CustomerGroupsController()
  • Method Details

    • createCustomerGroup

      @Deprecated(since="2005", forRemoval=true) @ResponseStatus(CREATED) @RequestMapping(method=POST) @Secured("ROLE_CUSTOMERMANAGERGROUP") public void createCustomerGroup(@RequestParam String groupId, @RequestParam(required=false) String localizedName)
      Deprecated, for removal: This API element is subject to removal in a future version.
      since 2005. Please use createCustomerGroup(UserGroupWsDTO) instead.
    • createCustomerGroup

      @ResponseStatus(CREATED) @RequestMapping(method=POST, consumes={"application/json","application/xml"}) @Secured("ROLE_CUSTOMERMANAGERGROUP") public void createCustomerGroup(@RequestBody UserGroupWsDTO userGroup)
    • updateCustomerGroupWithUsers

      @Deprecated(since="2005", forRemoval=true) @RequestMapping(value="/{groupId}/members", method=PATCH) @Secured("ROLE_CUSTOMERMANAGERGROUP") @ResponseStatus(OK) public void updateCustomerGroupWithUsers(@PathVariable String groupId, @RequestParam("members") List<String> members)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • updateCustomerGroupWithUsers

      @RequestMapping(value="/{groupId}/members", method=PATCH, consumes={"application/json","application/xml"}) @Secured("ROLE_CUSTOMERMANAGERGROUP") @ResponseStatus(OK) public void updateCustomerGroupWithUsers(@PathVariable String groupId, @RequestBody MemberListWsDTO members)
    • replaceUserListForCustomerGroup

      @Deprecated(since="2005", forRemoval=true) @RequestMapping(value="/{groupId}/members", method=PUT) @Secured("ROLE_CUSTOMERMANAGERGROUP") @ResponseStatus(OK) public void replaceUserListForCustomerGroup(@PathVariable String groupId, @RequestParam(required=false,value="members") List<String> members)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • setUserListForCustomerGroupInternal

      protected void setUserListForCustomerGroupInternal(String groupId, List<String> members)
    • toUid

      protected String toUid(String userId, Function<String,String> messageSupport)
    • checkIfAllUsersExist

      protected void checkIfAllUsersExist(Collection<String> ids, Function<String,String> messageSupport)
    • checkIfUserExist

      protected void checkIfUserExist(String id, Function<String,String> messageSupport)
    • replaceUsersForCustomerGroup

      @RequestMapping(value="/{groupId}/members", method=PUT, consumes={"application/json","application/xml"}) @Secured("ROLE_CUSTOMERMANAGERGROUP") @ResponseStatus(OK) public void replaceUsersForCustomerGroup(@PathVariable String groupId, @RequestBody MemberListWsDTO members)
    • removeUsersFromCustomerGroup

      @RequestMapping(value="/{groupId}/members/{userId:.*}", method=DELETE) @Secured("ROLE_CUSTOMERMANAGERGROUP") @ResponseStatus(OK) public void removeUsersFromCustomerGroup(@PathVariable String groupId, @PathVariable("userId") String userId)
    • getCustomerGroups

      @RequestMapping(method=GET) @Secured("ROLE_CUSTOMERMANAGERGROUP") @ResponseStatus(OK) @ResponseBody public UserGroupListWsDTO getCustomerGroups(@RequestParam(defaultValue="0") int currentPage, @RequestParam(defaultValue="20") int pageSize, @RequestParam(defaultValue="BASIC") String fields)
    • getCustomerGroup

      @RequestMapping(value="/{groupId}", method=GET) @Secured("ROLE_CUSTOMERMANAGERGROUP") @ResponseStatus(OK) @ResponseBody public UserGroupWsDTO getCustomerGroup(@PathVariable String groupId, @RequestParam(defaultValue="BASIC") String fields)
    • createOperationErrorMessage

      protected String createOperationErrorMessage(String operationMessage, String groupId, String userId)