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