public class UserBeanBuilder extends Object
Constructor and Description |
---|
UserBeanBuilder(JiraBaseUrls jiraBaseUrls)
Creates new instance of UserBeanBuilder.
|
Modifier and Type | Method and Description |
---|---|
UserBeanBuilder |
applicationRoles(Set<ApplicationRole> applicationRoles)
Sets the ApplicationRole for given user
|
UserBeanBuilder |
avatarService(AvatarService avatarService)
Sets the AvatarService to use for constructing the avatar URL.
|
UserBean |
buildFull(ApplicationRoleBeanConverter applicationRoleBeanConverter)
Returns a new UserBean with all properties set.
|
UserBean |
buildMid()
Returns a new UserBean with all properties set.
|
UserBean |
buildShort()
Returns a new UserBean with the name, self, and author properties set.
|
protected URI |
createSelfLink(boolean userDeleted) |
UserBeanBuilder |
emailFormatter(EmailFormatter emailFormatter)
Sets the EmailFormatter to use for users' email addresses.
|
static UserBeanBuilder |
fullBuilder(JiraBaseUrls jiraBaseUrls,
EmailFormatter emailFormatter,
AvatarService avatarService,
I18nHelper.BeanFactory beanFactory,
UserManager userManager,
ApplicationUser loggedInUser)
Builder with all dependencies for invoking
buildFull(ApplicationRoleBeanConverter) |
UserBeanBuilder |
groups(List<String> groups)
Sets the groups that this user belongs to.
|
UserBeanBuilder |
i18nBeanFactory(I18nHelper.BeanFactory beanFactory) |
UserBeanBuilder |
loggedInUser(ApplicationUser loggedInUser)
Sets the currently logged in user.
|
static UserBeanBuilder |
midBuilder(JiraBaseUrls jiraBaseUrls,
EmailFormatter emailFormatter,
I18nHelper.BeanFactory beanFactory,
UserManager userManager,
ApplicationUser loggedInUser)
Builder with all dependencies for invoking
buildMid() |
UserBeanBuilder |
self(URI self)
Sets the self URI.
|
static UserBeanBuilder |
shortBuilder(JiraBaseUrls jiraBaseUrls)
Builder with all dependencies for invoking
buildShort() |
UserBeanBuilder |
timeZone(TimeZone timeZone) |
UserBeanBuilder |
user(ApplicationUser user)
Sets the User.
|
UserBeanBuilder |
user(String username,
UserManager userManager)
Sets the user using a username and UserManager.
|
UserBeanBuilder |
userManager(UserManager userManager)
Sets the UserManager to use for obtaining information about deleted user.
|
public UserBeanBuilder(@Nonnull JiraBaseUrls jiraBaseUrls)
jiraBaseUrls
- An instance of JiraBaseUrlspublic static UserBeanBuilder fullBuilder(@Nonnull JiraBaseUrls jiraBaseUrls, @Nonnull EmailFormatter emailFormatter, @Nonnull AvatarService avatarService, @Nonnull I18nHelper.BeanFactory beanFactory, @Nonnull UserManager userManager, @Nullable ApplicationUser loggedInUser)
buildFull(ApplicationRoleBeanConverter)
public static UserBeanBuilder midBuilder(@Nonnull JiraBaseUrls jiraBaseUrls, @Nonnull EmailFormatter emailFormatter, @Nonnull I18nHelper.BeanFactory beanFactory, @Nonnull UserManager userManager, @Nullable ApplicationUser loggedInUser)
buildMid()
public static UserBeanBuilder shortBuilder(@Nonnull JiraBaseUrls jiraBaseUrls)
buildShort()
public UserBeanBuilder user(ApplicationUser user)
user
- a Userpublic UserBeanBuilder user(String username, UserManager userManager)
username
- The usernameuserManager
- The UserManagerpublic UserBeanBuilder groups(List<String> groups)
groups
- the groups that this user belongs to.public UserBeanBuilder self(URI self)
self
- self URI.public UserBeanBuilder loggedInUser(ApplicationUser loggedInUser)
loggedInUser
- a Userpublic UserBeanBuilder timeZone(TimeZone timeZone)
public UserBeanBuilder i18nBeanFactory(I18nHelper.BeanFactory beanFactory)
public UserBeanBuilder emailFormatter(EmailFormatter emailFormatter)
emailFormatter
- an EmailFormatterpublic UserBeanBuilder avatarService(AvatarService avatarService)
avatarService
- an AvatarServicepublic UserBeanBuilder userManager(UserManager userManager)
userManager
- an UserManagerpublic UserBeanBuilder applicationRoles(Set<ApplicationRole> applicationRoles)
applicationRoles
- public UserBean buildShort()
public UserBean buildFull(ApplicationRoleBeanConverter applicationRoleBeanConverter)
public UserBean buildMid()
protected URI createSelfLink(boolean userDeleted)
Copyright © 2002-2021 Atlassian. All Rights Reserved.