Class DefaultUserAttributesRequestHandler

java.lang.Object
com.broadleafcommerce.auth.user.service.DefaultUserAttributesRequestHandler
All Implemented Interfaces:
UserAttributesRequestHandler

public class DefaultUserAttributesRequestHandler extends Object implements UserAttributesRequestHandler
  • Constructor Details

    • DefaultUserAttributesRequestHandler

      public DefaultUserAttributesRequestHandler(UserService<User> userService)
  • Method Details

    • handle

      public void handle(UserAttributesRequest request)
      Puts the requested attributes into the attributes map for the specified User.
      Specified by:
      handle in interface UserAttributesRequestHandler
      Parameters:
      request - the request for adjusting attributes for a user
      See Also:
    • 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 the User's attributes map.
      Parameters:
      user - the user for which to add attributes
      attributesToAdd - the attributes to add to a user
    • getUserService

      protected UserService<User> getUserService()