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 BaseControllerController forCustomerGroupFacade
-
-
Field Summary
-
Fields inherited from class de.hybris.platform.ycommercewebservices.v1.controller.BaseController
DEFAULT_CURRENT_PAGE, DEFAULT_PAGE_SIZE
-
-
Constructor Summary
Constructors Constructor Description CustomerGroupsController()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidassignUserToCustomerGroup(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 restrictedHTTPSchannel.
Method type :PUT.voidcreateNewCustomerGroup(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 restrictedHTTPSchannel.
Method type :POST.UserGroupDataListgetAllCustomerGroups(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 restrictedHTTPSchannel.
Method type :GET.UserGroupDatagetCustomerGroup(java.lang.String uid, java.lang.String options)protected java.util.Set<UserGroupOption>getOptions(java.lang.String options)voidremoveUsersFromCustomerGroup(java.lang.String customerGroupUid, java.lang.String userId)-
Methods inherited from class de.hybris.platform.ycommercewebservices.v1.controller.BaseController
handleErrorInternal, handleModelNotFoundException, sanitize
-
-
-
-
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 restrictedHTTPSchannel.
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 restrictedHTTPSchannel.
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 restrictedHTTPSchannel.
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)
-
-