Class UsersController
- java.lang.Object
-
- de.hybris.platform.ycommercewebservices.v2.controller.BaseController
-
- de.hybris.platform.ycommercewebservices.v2.controller.BaseCommerceController
-
- de.hybris.platform.ycommercewebservices.v2.controller.UsersController
-
@Controller @RequestMapping("/{baseSiteId}/users") public class UsersController extends BaseCommerceController
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringUSER_MAPPER_CONFIG-
Fields inherited from class de.hybris.platform.ycommercewebservices.v2.controller.BaseCommerceController
API_COMPATIBILITY_B2C_CHANNELS
-
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 UsersController()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected booleancontainsRole(org.springframework.security.core.Authentication auth, java.lang.String role)protected voidconvertToCustomer(java.lang.String password, java.lang.String guid)UserWsDTOcreateUser(UserSignUpWsDTO user, java.lang.String fields, javax.servlet.http.HttpServletRequest httpRequest, javax.servlet.http.HttpServletResponse httpResponse)UserWsDTOcreateUser(java.lang.String login, java.lang.String password, java.lang.String titleCode, java.lang.String firstName, java.lang.String lastName, java.lang.String guid, java.lang.String fields, javax.servlet.http.HttpServletRequest httpRequest, javax.servlet.http.HttpServletResponse httpResponse)protected java.lang.StringgetAbsoluteLocationURL(javax.servlet.http.HttpServletRequest httpRequest, java.lang.String uid)protected CustomerDatagetCustomerData(RegisterData registerData, boolean userExists, java.lang.String userId)UserWsDTOgetUser(java.lang.String fields)UserGroupListWsDTOgetUserCustomerGroups(java.lang.String userId, java.lang.String fields)protected voidregisterNewUser(java.lang.String login, java.lang.String password, java.lang.String titleCode, java.lang.String firstName, java.lang.String lastName)voidremoveUser()voidreplaceUser(UserWsDTO user)voidreplaceUser(java.lang.String firstName, java.lang.String lastName, java.lang.String titleCode, javax.servlet.http.HttpServletRequest request)Deprecated, for removal: This API element is subject to removal in a future version.since 2005.voidreplaceUserLogin(java.lang.String newLogin, java.lang.String password)voidreplaceUserPassword(java.lang.String userId, java.lang.String old, java.lang.String newPassword)voidupdateUser(UserWsDTO user)voidupdateUser(javax.servlet.http.HttpServletRequest request)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.BaseCommerceController
addPaymentDetailsInternal, addPaymentDetailsInternal, applyVoucherForCartInternal, createAddressInternal, createAddressInternal, getAddressDTOValidator, getAddressValidator, getCartFacade, getCartVoucherValidator, getCcPaymentInfoValidator, getCheckoutFacade, getDeliveryAddressValidator, getHttpRequestAddressDataPopulator, getHttpRequestPaymentInfoPopulator, getPaymentDetailsDTOValidator, getSessionCart, getUserFacade, getVoucherFacade, setAddressDTOValidator, setAddressValidator, setCartDeliveryAddressInternal, setCartDeliveryModeInternal, setCartFacade, setCcPaymentInfoValidator, setCheckoutFacade, setDeliveryAddressValidator, setHttpRequestAddressDataPopulator, setHttpRequestPaymentInfoPopulator, setPaymentDetailsDTOValidator, setPaymentDetailsInternal, setUserFacade, setVoucherFacade, validateCartForPlaceOrder, validateStatusesEnumValue
-
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
-
-
-
-
Field Detail
-
USER_MAPPER_CONFIG
public static final java.lang.String USER_MAPPER_CONFIG
- See Also:
- Constant Field Values
-
-
Method Detail
-
createUser
@Secured({"ROLE_CLIENT","ROLE_TRUSTED_CLIENT","ROLE_CUSTOMERMANAGERGROUP"}) @RequestMapping(method=POST) @ResponseStatus(CREATED) @ResponseBody public UserWsDTO createUser(@RequestParam(required=false) java.lang.String login, @RequestParam java.lang.String password, @RequestParam(required=false) java.lang.String titleCode, @RequestParam(required=false) java.lang.String firstName, @RequestParam(required=false) java.lang.String lastName, @RequestParam(required=false) java.lang.String guid, @RequestParam(defaultValue="DEFAULT") java.lang.String fields, javax.servlet.http.HttpServletRequest httpRequest, javax.servlet.http.HttpServletResponse httpResponse) throws DuplicateUidException- Throws:
DuplicateUidException
-
convertToCustomer
protected void convertToCustomer(java.lang.String password, java.lang.String guid) throws DuplicateUidException- Throws:
DuplicateUidException
-
registerNewUser
protected void registerNewUser(java.lang.String login, java.lang.String password, java.lang.String titleCode, java.lang.String firstName, java.lang.String lastName) throws DuplicateUidException- Throws:
DuplicateUidException
-
createUser
@Secured({"ROLE_CLIENT","ROLE_TRUSTED_CLIENT","ROLE_CUSTOMERMANAGERGROUP"}) @RequestMapping(method=POST, consumes={"application/json","application/xml"}) @ResponseStatus(CREATED) @ResponseBody public UserWsDTO createUser(@RequestBody UserSignUpWsDTO user, @RequestParam(defaultValue="DEFAULT") java.lang.String fields, javax.servlet.http.HttpServletRequest httpRequest, javax.servlet.http.HttpServletResponse httpResponse)
-
getCustomerData
protected CustomerData getCustomerData(RegisterData registerData, boolean userExists, java.lang.String userId)
-
getAbsoluteLocationURL
protected java.lang.String getAbsoluteLocationURL(javax.servlet.http.HttpServletRequest httpRequest, java.lang.String uid)
-
getUser
@Secured({"ROLE_CUSTOMERGROUP","ROLE_TRUSTED_CLIENT","ROLE_CUSTOMERMANAGERGROUP"}) @RequestMapping(value="/{userId}", method=GET) @ResponseBody @SiteChannelRestriction(allowedSiteChannelsProperty="api.compatibility.b2c.channels") public UserWsDTO getUser(@RequestParam(defaultValue="DEFAULT") java.lang.String fields)
-
replaceUser
@Deprecated(since="2005", forRemoval=true) @Secured({"ROLE_CUSTOMERGROUP","ROLE_TRUSTED_CLIENT","ROLE_CUSTOMERMANAGERGROUP"}) @RequestMapping(value="/{userId}", method=PUT) @ResponseStatus(OK) public void replaceUser(@RequestParam java.lang.String firstName, @RequestParam java.lang.String lastName, @RequestParam java.lang.String titleCode, javax.servlet.http.HttpServletRequest request) throws DuplicateUidExceptionDeprecated, for removal: This API element is subject to removal in a future version.since 2005. Please usereplaceUser(UserWsDTO)instead.- Throws:
DuplicateUidException
-
replaceUser
@Secured({"ROLE_CUSTOMERGROUP","ROLE_TRUSTED_CLIENT","ROLE_CUSTOMERMANAGERGROUP"}) @RequestMapping(value="/{userId}", method=PUT, consumes={"application/json","application/xml"}) @ResponseStatus(OK) public void replaceUser(@RequestBody UserWsDTO user) throws DuplicateUidException- Throws:
DuplicateUidException
-
updateUser
@Deprecated(since="2005", forRemoval=true) @Secured({"ROLE_CUSTOMERGROUP","ROLE_TRUSTED_CLIENT","ROLE_CUSTOMERMANAGERGROUP"}) @RequestMapping(value="/{userId}", method=PATCH) @ResponseStatus(OK) public void updateUser(javax.servlet.http.HttpServletRequest request) throws DuplicateUidExceptionDeprecated, for removal: This API element is subject to removal in a future version.since 2005. Please useupdateUser(UserWsDTO)instead.- Throws:
DuplicateUidException
-
updateUser
@Secured({"ROLE_CUSTOMERGROUP","ROLE_TRUSTED_CLIENT","ROLE_CUSTOMERMANAGERGROUP"}) @RequestMapping(value="/{userId}", method=PATCH, consumes={"application/json","application/xml"}) @ResponseStatus(OK) public void updateUser(@RequestBody UserWsDTO user) throws DuplicateUidException- Throws:
DuplicateUidException
-
removeUser
@Secured({"ROLE_CUSTOMERGROUP","ROLE_TRUSTED_CLIENT","ROLE_CUSTOMERMANAGERGROUP"}) @RequestMapping(value="/{userId}", method=DELETE) @ResponseStatus(OK) public void removeUser()
-
replaceUserLogin
@Secured({"ROLE_CUSTOMERGROUP","ROLE_TRUSTED_CLIENT","ROLE_CUSTOMERMANAGERGROUP"}) @RequestMapping(value="/{userId}/login", method=PUT) @ResponseStatus(OK) public void replaceUserLogin(@RequestParam java.lang.String newLogin, @RequestParam java.lang.String password) throws DuplicateUidException- Throws:
DuplicateUidException
-
replaceUserPassword
@Secured({"ROLE_CUSTOMERGROUP","ROLE_TRUSTED_CLIENT","ROLE_CUSTOMERMANAGERGROUP"}) @RequestMapping(value="/{userId}/password", method=PUT) @ResponseStatus(ACCEPTED) public void replaceUserPassword(@PathVariable java.lang.String userId, @RequestParam(required=false) java.lang.String old, @RequestParam("new") java.lang.String newPassword)
-
containsRole
protected boolean containsRole(org.springframework.security.core.Authentication auth, java.lang.String role)
-
getUserCustomerGroups
@Secured({"ROLE_CUSTOMERGROUP","ROLE_TRUSTED_CLIENT","ROLE_CUSTOMERMANAGERGROUP"}) @RequestMapping(value="/{userId}/customergroups", method=GET) @ResponseBody public UserGroupListWsDTO getUserCustomerGroups(@PathVariable java.lang.String userId, @RequestParam(defaultValue="DEFAULT") java.lang.String fields)
-
-