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-
Field Summary
Fields inherited from class de.hybris.platform.ycommercewebservices.v1.controller.BaseController
DEFAULT_CURRENT_PAGE, DEFAULT_PAGE_SIZE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidassignUserToCustomerGroup(String customerGroupUid, 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 restrictedHTTPSchannel.
Method type :PUT.voidcreateNewCustomerGroup(String uid, 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.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 restrictedHTTPSchannel.
Method type :GET.getCustomerGroup(String uid, String options) protected Set<UserGroupOption>getOptions(String options) voidremoveUsersFromCustomerGroup(String customerGroupUid, String userId) Methods inherited from class de.hybris.platform.ycommercewebservices.v1.controller.BaseController
handleErrorInternal, handleModelNotFoundException, sanitize
-
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 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") 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 restrictedHTTPSchannel.
Method type :PUT.
Members ids must be given as put body -
removeUsersFromCustomerGroup
-
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") String uid, @RequestParam(required=false,defaultValue="BASIC") String options) -
getOptions
-