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)
Creates new instance of UserBeanBuilder.
Public Methods
UserBeanBuilder avatarService(AvatarService avatarService)
Sets the AvatarService to use for constructing the avatar URL.
UserBean buildFull()
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 loggedInUser(User loggedInUser)
Sets the currently logged in user.
UserBeanBuilder loggedInUser(ApplicationUser loggedInUser)
Sets the currently logged in user.
UserBeanBuilder self(URI self)
Sets the self URI.
UserBeanBuilder timeZone(TimeZone timeZone)
UserBeanBuilder user(ApplicationUser user)
Sets the User.
UserBeanBuilder user(User user)
Sets the User.
UserBeanBuilder user(String username, UserManager userManager)
Sets the user using a username and UserManager.
Protected Methods
URI createSelfLink()
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public UserBeanBuilder (JiraBaseUrls jiraBaseUrls)

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

Parameters
jiraBaseUrls An instance of JiraBaseUrls

Public Methods

public UserBeanBuilder avatarService (AvatarService avatarService)

Sets the AvatarService to use for constructing the avatar URL.

Parameters
avatarService an AvatarService
Returns
  • this

public UserBean buildFull ()

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 loggedInUser (User loggedInUser)

Sets the currently logged in user.

Parameters
loggedInUser a User
Returns
  • this

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 (ApplicationUser user)

Sets the User.

Parameters
user a User
Returns
  • this

public UserBeanBuilder user (User user)

Sets the User.

Parameters
user a User
Returns
  • this

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

Protected Methods

protected URI createSelfLink ()