Class CustomerGroupsController


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

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void assignUserToCustomerGroup​(java.lang.String customerGroupUid, java.util.List<java.lang.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.
      void createNewCustomerGroup​(java.lang.String uid, java.lang.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.
      UserGroupDataList getAllCustomerGroups​(int currentPage, 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.
      UserGroupData getCustomerGroup​(java.lang.String uid, java.lang.String options)  
      protected java.util.Set<UserGroupOption> getOptions​(java.lang.String options)  
      void removeUsersFromCustomerGroup​(java.lang.String customerGroupUid, java.lang.String userId)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CustomerGroupsController

        public CustomerGroupsController()
    • Method Detail

      • createNewCustomerGroup

        @ResponseStatus(CREATED)
        @RequestMapping(method=POST)
        @Secured("ROLE_CUSTOMERMANAGERGROUP")
        public void createNewCustomerGroup​(@RequestParam
                                           java.lang.String uid,
                                           @RequestParam(required=false)
                                           java.lang.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")
                                              java.lang.String customerGroupUid,
                                              @RequestParam("member")
                                              java.util.List<java.lang.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")
                                                 java.lang.String customerGroupUid,
                                                 @PathVariable("userId")
                                                 java.lang.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")
                                              java.lang.String uid,
                                              @RequestParam(required=false,defaultValue="BASIC")
                                              java.lang.String options)
      • getOptions

        protected java.util.Set<UserGroupOption> getOptions​(java.lang.String options)