Class CustomerGroupsController
- java.lang.Object
-
- de.hybris.platform.ycommercewebservices.v2.controller.BaseController
-
- de.hybris.platform.ycommercewebservices.v2.controller.CustomerGroupsController
-
@Controller @RequestMapping("/{baseSiteId}/customergroups") public class CustomerGroupsController extends BaseControllerController forCustomerGroupFacade
-
-
Field Summary
-
Fields inherited from class de.hybris.platform.ycommercewebservices.v2.controller.BaseController
BASIC_FIELD_SET, DEFAULT_CURRENT_PAGE, DEFAULT_FIELD_SET, DEFAULT_PAGE_SIZE, HEADER_TOTAL_COUNT, INVALID_REQUEST_BODY_ERROR_MESSAGE
-
-
Constructor Summary
Constructors Constructor Description CustomerGroupsController()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected voidcheckIfAllUsersExist(java.util.Collection<java.lang.String> ids, java.util.function.Function<java.lang.String,java.lang.String> messageSupport)protected voidcheckIfUserExist(java.lang.String id, java.util.function.Function<java.lang.String,java.lang.String> messageSupport)voidcreateCustomerGroup(UserGroupWsDTO userGroup)voidcreateCustomerGroup(java.lang.String groupId, java.lang.String localizedName)Deprecated, for removal: This API element is subject to removal in a future version.since 2005.protected java.lang.StringcreateOperationErrorMessage(java.lang.String operationMessage, java.lang.String groupId, java.lang.String userId)UserGroupWsDTOgetCustomerGroup(java.lang.String groupId, java.lang.String fields)UserGroupListWsDTOgetCustomerGroups(int currentPage, int pageSize, java.lang.String fields)voidremoveUsersFromCustomerGroup(java.lang.String groupId, java.lang.String userId)voidreplaceUserListForCustomerGroup(java.lang.String groupId, java.util.List<java.lang.String> members)Deprecated, for removal: This API element is subject to removal in a future version.since 2005.voidreplaceUsersForCustomerGroup(java.lang.String groupId, MemberListWsDTO members)protected voidsetUserListForCustomerGroupInternal(java.lang.String groupId, java.util.List<java.lang.String> members)protected java.lang.StringtoUid(java.lang.String userId, java.util.function.Function<java.lang.String,java.lang.String> messageSupport)voidupdateCustomerGroupWithUsers(java.lang.String groupId, MemberListWsDTO members)voidupdateCustomerGroupWithUsers(java.lang.String groupId, java.util.List<java.lang.String> members)Deprecated, for removal: This API element is subject to removal in a future version.since 2005.-
Methods inherited from class de.hybris.platform.ycommercewebservices.v2.controller.BaseController
addPaginationField, getDataMapper, handleDuplicateUidException, handleErrorInternal, handleHttpMessageNotReadableException, handleModelNotFoundException, logParam, logParam, logValue, sanitize, setDataMapper, setTotalCountHeader, setTotalCountHeader, validate
-
-
-
-
Method Detail
-
createCustomerGroup
@Deprecated(since="2005", forRemoval=true) @ResponseStatus(CREATED) @RequestMapping(method=POST) @Secured("ROLE_CUSTOMERMANAGERGROUP") public void createCustomerGroup(@RequestParam java.lang.String groupId, @RequestParam(required=false) java.lang.String localizedName)Deprecated, for removal: This API element is subject to removal in a future version.since 2005. Please usecreateCustomerGroup(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 java.lang.String groupId, @RequestParam("members") java.util.List<java.lang.String> members)Deprecated, for removal: This API element is subject to removal in a future version.since 2005. Please useupdateCustomerGroupWithUsers(String, MemberListWsDTO)instead.
-
updateCustomerGroupWithUsers
@RequestMapping(value="/{groupId}/members", method=PATCH, consumes={"application/json","application/xml"}) @Secured("ROLE_CUSTOMERMANAGERGROUP") @ResponseStatus(OK) public void updateCustomerGroupWithUsers(@PathVariable java.lang.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 java.lang.String groupId, @RequestParam(required=false,value="members") java.util.List<java.lang.String> members)Deprecated, for removal: This API element is subject to removal in a future version.since 2005. Please usereplaceUsersForCustomerGroup(String, MemberListWsDTO)instead.
-
setUserListForCustomerGroupInternal
protected void setUserListForCustomerGroupInternal(java.lang.String groupId, java.util.List<java.lang.String> members)
-
toUid
protected java.lang.String toUid(java.lang.String userId, java.util.function.Function<java.lang.String,java.lang.String> messageSupport)
-
checkIfAllUsersExist
protected void checkIfAllUsersExist(java.util.Collection<java.lang.String> ids, java.util.function.Function<java.lang.String,java.lang.String> messageSupport)
-
checkIfUserExist
protected void checkIfUserExist(java.lang.String id, java.util.function.Function<java.lang.String,java.lang.String> messageSupport)
-
replaceUsersForCustomerGroup
@RequestMapping(value="/{groupId}/members", method=PUT, consumes={"application/json","application/xml"}) @Secured("ROLE_CUSTOMERMANAGERGROUP") @ResponseStatus(OK) public void replaceUsersForCustomerGroup(@PathVariable java.lang.String groupId, @RequestBody MemberListWsDTO members)
-
removeUsersFromCustomerGroup
@RequestMapping(value="/{groupId}/members/{userId:.*}", method=DELETE) @Secured("ROLE_CUSTOMERMANAGERGROUP") @ResponseStatus(OK) public void removeUsersFromCustomerGroup(@PathVariable java.lang.String groupId, @PathVariable("userId") java.lang.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") java.lang.String fields)
-
getCustomerGroup
@RequestMapping(value="/{groupId}", method=GET) @Secured("ROLE_CUSTOMERMANAGERGROUP") @ResponseStatus(OK) @ResponseBody public UserGroupWsDTO getCustomerGroup(@PathVariable java.lang.String groupId, @RequestParam(defaultValue="BASIC") java.lang.String fields)
-
createOperationErrorMessage
protected java.lang.String createOperationErrorMessage(java.lang.String operationMessage, java.lang.String groupId, java.lang.String userId)
-
-