com.atlassian.jira.web.component.multiuserpicker
Class UserBean

java.lang.Object
  extended by com.atlassian.jira.web.component.multiuserpicker.UserBean

public class UserBean
extends java.lang.Object

A bean for pickertable.vm that is used for displaying the user info.

Since:
v3.13

Constructor Summary
UserBean(java.lang.String username)
          Constructs a bean for a non-existing user
UserBean(java.lang.String username, java.lang.String fullName)
          Constructs a bean for an existing user
 
Method Summary
static java.util.List convertUsernamesToUserBeans(java.util.Locale userLocale, java.util.Collection usernames)
          Converst a collection of usernames to an ordered list of user beans
static java.util.List convertUsersToUserBeans(java.util.Locale userLocale, java.util.Collection users)
          Converts a collection of user objects to an oredered list of user beans.
 java.lang.String getFullName()
          Returns user's full name if this bean represents an existing user, empty string otherwise
 java.lang.String getName()
          Returns the username
 boolean isReal()
          Returns true if this bean represents an existing user, false otherwise
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UserBean

public UserBean(java.lang.String username,
                java.lang.String fullName)
Constructs a bean for an existing user

Parameters:
username - username
fullName - user's full name

UserBean

public UserBean(java.lang.String username)
Constructs a bean for a non-existing user

Parameters:
username - username
Method Detail

convertUsernamesToUserBeans

public static java.util.List convertUsernamesToUserBeans(java.util.Locale userLocale,
                                                         java.util.Collection usernames)
Converst a collection of usernames to an ordered list of user beans

Parameters:
usernames - a collection of usernames
Returns:
a list of user beans, never null

convertUsersToUserBeans

public static java.util.List convertUsersToUserBeans(java.util.Locale userLocale,
                                                     java.util.Collection users)
Converts a collection of user objects to an oredered list of user beans.

Parameters:
users - collection of user objects
Returns:
list of user beans, never null

getName

public java.lang.String getName()
Returns the username

Returns:
username

getFullName

public java.lang.String getFullName()
Returns user's full name if this bean represents an existing user, empty string otherwise

Returns:
user's full name if this bean represents an existing user, empty string otherwise

isReal

public boolean isReal()
Returns true if this bean represents an existing user, false otherwise

Returns:
true if this bean represents an existing user, false otherwise


Copyright © 2002-2010 Atlassian. All Rights Reserved.