Class DefaultUserAttributesRequestHandler
- java.lang.Object
-
- com.broadleafcommerce.auth.user.service.DefaultUserAttributesRequestHandler
-
- All Implemented Interfaces:
UserAttributesRequestHandler
public class DefaultUserAttributesRequestHandler extends Object implements UserAttributesRequestHandler
-
-
Constructor Summary
Constructors Constructor Description DefaultUserAttributesRequestHandler(UserService<User> userService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected UserService<User>getUserService()voidhandle(UserAttributesRequest request)Puts the requested attributes into the attributes map for the specifiedUser.protected voidputRequestedUserAttributes(User user, Map<String,Object> attributesToAdd)Save the new attributes into theUser'sattributes map.protected UserreadUserById(String userId)Retrieve the requested User to add additional attributes.
-
-
-
Constructor Detail
-
DefaultUserAttributesRequestHandler
public DefaultUserAttributesRequestHandler(UserService<User> userService)
-
-
Method Detail
-
handle
public void handle(UserAttributesRequest request)
Puts the requested attributes into the attributes map for the specifiedUser.- Specified by:
handlein interfaceUserAttributesRequestHandler- Parameters:
request- the request for adjusting attributes for a user- See Also:
User.getAttributes()
-
readUserById
protected User readUserById(String userId)
Retrieve the requested User to add additional attributes.- Parameters:
userId- The user id- Returns:
- the user for which to add attributes
- Throws:
com.broadleafcommerce.data.tracking.core.exception.EntityMissingException- if there was no user matching the supplied ID.
-
putRequestedUserAttributes
protected void putRequestedUserAttributes(User user, Map<String,Object> attributesToAdd)
Save the new attributes into theUser'sattributes map.- Parameters:
user- the user for which to add attributesattributesToAdd- the attributes to add to a user
-
getUserService
protected UserService<User> getUserService()
-
-