public class

UserBeanBuilder

extends Object
java.lang.Object
   ↳ com.atlassian.jira.rest.v2.issue.UserBeanBuilder

Class Overview

Builder for UserBean instances.

Summary

Public Constructors
UserBeanBuilder(JiraBaseUrls jiraBaseUrls, JiraAvatarSupport jiraAvatarSupport)
Creates new instance of UserBeanBuilder.
Public Methods
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.
UserBeanBuilder emailFormatter(EmailFormatter emailFormatter)
Sets the EmailFormatter to use for users' email addresses.
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.
UserBeanBuilder self(URI self)
Sets the self URI.
UserBeanBuilder timeZone(TimeZone timeZone)
UserBeanBuilder user(String username, UserManager userManager)
Sets the user using a username and UserManager.
UserBeanBuilder user(ApplicationUser user)
Sets the User.
Protected Methods
URI createSelfLink()
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public UserBeanBuilder (JiraBaseUrls jiraBaseUrls, JiraAvatarSupport jiraAvatarSupport)

Creates new instance of UserBeanBuilder. Requires JiraBaseUrls to build values of self parameter.

Parameters
jiraBaseUrls An instance of JiraBaseUrls

Public Methods

public UserBeanBuilder applicationRoles (Set<ApplicationRole> applicationRoles)

Sets the ApplicationRole for given user

public UserBeanBuilder avatarService (AvatarService avatarService)

Sets the AvatarService to use for constructing the avatar URL.

Parameters
avatarService an AvatarService
Returns
  • this

public UserBean buildFull (ApplicationRoleBeanConverter applicationRoleBeanConverter)

Returns a new UserBean with all properties set.

Returns
  • a new UserBean

public UserBean buildMid ()

Returns a new UserBean with all properties set.

Returns
  • a new UserBean

public UserBean buildShort ()

Returns a new UserBean with the name, self, and author properties set.

Returns
  • a new UserBean

public UserBeanBuilder emailFormatter (EmailFormatter emailFormatter)

Sets the EmailFormatter to use for users' email addresses.

Parameters
emailFormatter an EmailFormatter
Returns
  • this

public UserBeanBuilder groups (List<String> groups)

Sets the groups that this user belongs to.

Parameters
groups the groups that this user belongs to.
Returns
  • this

public UserBeanBuilder i18nBeanFactory (I18nHelper.BeanFactory beanFactory)

public UserBeanBuilder loggedInUser (ApplicationUser loggedInUser)

Sets the currently logged in user.

Parameters
loggedInUser a User
Returns
  • this

public UserBeanBuilder self (URI self)

Sets the self URI.

Parameters
self self URI.
Returns
  • this

public UserBeanBuilder timeZone (TimeZone timeZone)

public UserBeanBuilder user (String username, UserManager userManager)

Sets the user using a username and UserManager. If the given User no longer exists, we still create a UserBean with the given username

Parameters
username The username
userManager The UserManager
Returns
  • this Builder

public UserBeanBuilder user (ApplicationUser user)

Sets the User.

Parameters
user a User
Returns
  • this

Protected Methods

protected URI createSelfLink ()