Class CustomerGroupsController

java.lang.Object
de.hybris.platform.ycommercewebservices.v1.controller.BaseController
de.hybris.platform.ycommercewebservices.v1.controller.CustomerGroupsController

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

    • CustomerGroupsController

      public CustomerGroupsController()
  • Method Details

    • createNewCustomerGroup

      @ResponseStatus(CREATED) @RequestMapping(method=POST) @Secured("ROLE_CUSTOMERMANAGERGROUP") public void createNewCustomerGroup(@RequestParam String uid, @RequestParam(required=false) String localizedName)
      Web service for creating new customer group.
      Sample call: https://localhost:9002/rest/v1/mysite/customergroups
      Method requires authentication and is restricted HTTPS channel.
      Method type : POST.
      Method response with 201 Created.
    • assignUserToCustomerGroup

      @RequestMapping(value="/{uid}/members", method=PUT) @Secured("ROLE_CUSTOMERMANAGERGROUP") @ResponseStatus(OK) public void assignUserToCustomerGroup(@PathVariable("uid") String customerGroupUid, @RequestParam("member") List<String> members)
      Web service for assigning user to a customer group.
      Sample call: https://localhost:9002/rest/v1/mysite/customergroups/{groupId}/members
      Method requires authentication and is restricted HTTPS channel.
      Method type : PUT.
      Members ids must be given as put body
    • removeUsersFromCustomerGroup

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

      @RequestMapping(method=GET) @Secured("ROLE_CUSTOMERMANAGERGROUP") @ResponseStatus(OK) @ResponseBody public UserGroupDataList getAllCustomerGroups(@RequestParam(required=false,defaultValue="0") int currentPage, @RequestParam(required=false,defaultValue="2147483647") int pageSize)
      Web service for getting all customer groups.
      Sample call: https://localhost:9002/rest/v1/mysite/customergroups
      Method requires authentication and is restricted HTTPS channel.
      Method type : GET.
      Method handles optional paging parameters:
      Parameters:
      currentPage -
      pageSize -
      Returns:
      UserGroupDataList
    • getCustomerGroup

      @RequestMapping(value="/{uid}", method=GET) @Secured("ROLE_CUSTOMERMANAGERGROUP") @ResponseStatus(OK) @ResponseBody public UserGroupData getCustomerGroup(@PathVariable("uid") String uid, @RequestParam(required=false,defaultValue="BASIC") String options)
    • getOptions

      protected Set<UserGroupOption> getOptions(String options)