com.atlassian.crowd.plugin.rest.util
Class UserEntityUtil
java.lang.Object
com.atlassian.crowd.plugin.rest.util.UserEntityUtil
public class UserEntityUtil
- extends Object
Utility class for UserEntity.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
expandUser
public static UserEntity expandUser(ApplicationService applicationService,
Application application,
UserEntity minimalUserEntity,
boolean expandAttributes)
throws UserNotFoundException
- Expands a UserEntity from its minimal form to the expanded version. Attributes are expanded if expandAttributes is true, otherwise, UserEntity is
returned with no attributes expanded.
N.B. This is not the same as expanding a user entity, which expands a UserEntity from its minimal form, to having
all the first name, last name, email, etc filled in. Expanding a UserEntity is automatically performed in
UserEntityExpander
.
- Parameters:
applicationService
- ApplicationService to find a userapplication
- name of the application requesting the userminimalUserEntity
- Minimal representation of a UserEntity. Must include at least a username and a link.expandAttributes
- set to true if the expanded UserEntity should expand attributes.
- Returns:
- UserEntity expanded UserEntity
- Throws:
IllegalArgumentException
- if the minimal UserEntity does not include at least a username and a link.
UserNotFoundException
- if a user with the specified username could not be found.
Copyright © 2012 Atlassian. All Rights Reserved.