public class UserEntityUtil extends Object
Modifier and Type | Method and Description |
---|---|
static UserEntity |
expandUser(ApplicationService applicationService,
Application application,
UserEntity minimalUserEntity,
boolean expandAttributes)
Expands a UserEntity from its minimal form to the expanded version.
|
static UserEntity |
expandUser(DirectoryManager directoryManager,
long directoryId,
UserEntity minimalUserEntity,
boolean expandAttributes) |
static UserEntity |
translate(User user,
com.atlassian.plugins.rest.common.Link oldLink) |
static UserEntity |
translateWithAttributes(User user,
Attributes attributes,
com.atlassian.plugins.rest.common.Link oldLink) |
public static UserEntity expandUser(ApplicationService applicationService, Application application, UserEntity minimalUserEntity, boolean expandAttributes) throws UserNotFoundException
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
.
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.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.public static UserEntity translate(User user, com.atlassian.plugins.rest.common.Link oldLink)
public static UserEntity translateWithAttributes(User user, Attributes attributes, com.atlassian.plugins.rest.common.Link oldLink)
public static UserEntity expandUser(DirectoryManager directoryManager, long directoryId, UserEntity minimalUserEntity, boolean expandAttributes) throws UserNotFoundException, DirectoryNotFoundException, OperationFailedException
Copyright © 2021 Atlassian. All rights reserved.