public class PersonFactory extends ModelFactory<ConfluenceUser,User>
Constructor and Description |
---|
PersonFactory(UserAccessor userAccessor,
com.atlassian.plugin.webresource.WebResourceUrlProvider webResourceUrlProvider,
I18NBeanFactory i18nBeanFactory) |
Modifier and Type | Method and Description |
---|---|
Anonymous |
anonymous() |
User |
buildFrom(ConfluenceUser hibernateObject,
Expansions expansions) |
@NonNull Person |
forCurrentUser() |
@NonNull Person |
forCurrentUser(Expansions expansions)
Construct the person object for the current user.
|
Person |
forUser(ConfluenceUser user) |
Person |
forUser(ConfluenceUser user,
Expansions expansions)
Construct the person object for a particular user.
|
Person |
forUsername(String username)
Construct the person object for a particular username.
|
User |
fromUser(@NonNull ConfluenceUser user) |
User |
fromUser(@NonNull ConfluenceUser user,
Expansions expansions)
Constructs a User object for a particular user.
|
asFunction, buildFrom
public PersonFactory(UserAccessor userAccessor, com.atlassian.plugin.webresource.WebResourceUrlProvider webResourceUrlProvider, I18NBeanFactory i18nBeanFactory)
public Person forUsername(String username)
username
- the username of the person to representpublic Person forUser(ConfluenceUser user, Expansions expansions)
user
- the user to represent as a PersonforCurrentUser()
public Person forUser(ConfluenceUser user)
public @NonNull Person forCurrentUser(Expansions expansions)
forUser(com.atlassian.confluence.user.ConfluenceUser)
public @NonNull Person forCurrentUser()
public User fromUser(@NonNull ConfluenceUser user, Expansions expansions)
user
- public User fromUser(@NonNull ConfluenceUser user)
public Anonymous anonymous()
public User buildFrom(ConfluenceUser hibernateObject, Expansions expansions)
buildFrom
in class ModelFactory<ConfluenceUser,User>
Copyright © 2003–2021 Atlassian. All rights reserved.