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) |
Person |
forCurrentUser()
Construct the person object for the current user.
|
Person |
forUser(ConfluenceUser user)
Construct the person object for a particular user.
|
Person |
forUsername(String username)
Construct the person object for a particular username.
|
User |
fromUser(ConfluenceUser user)
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)
user
- the user to represent as a PersonforCurrentUser()
@Nonnull public Person forCurrentUser()
forUser(com.atlassian.confluence.user.ConfluenceUser)
public User fromUser(@Nonnull ConfluenceUser user)
user
- public Anonymous anonymous()
public User buildFrom(ConfluenceUser hibernateObject, Expansions expansions)
buildFrom
in class ModelFactory<ConfluenceUser,User>
Copyright © 2003–2016 Atlassian. All rights reserved.