public class

UserConverterImpl

extends Object
implements UserConverter
java.lang.Object
   ↳ com.atlassian.jira.issue.customfields.converters.UserConverterImpl
Known Direct Subclasses

Summary

Public Constructors
UserConverterImpl(UserManager userManager, I18nHelper i18nHelper)
Public Methods
String getDbString(ApplicationUser user)
Get the String representation of the User to be passed to and from the database tier.
String getHttpParameterValue(ApplicationUser user)
Get the String representation of the User to be passed to and from the presentation tier as an HTTP parameter.
String getString(ApplicationUser user)
Get the String representation of the User.
ApplicationUser getUser(String stringValue)
Get the User Object from the user name.
ApplicationUser getUserEvenWhenUnknown(String stringValue)
Get the User Object from the user name even when the user is unknown.
ApplicationUser getUserFromDbString(String stringValue)
Get the User Object from its database string representation.
ApplicationUser getUserFromHttpParameterWithValidation(String stringValue)
Get the User Object from its presentation string representation.
ApplicationUser getUserObject(String stringValue)
Get the User Object from the user name.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.jira.issue.customfields.converters.UserConverter

Public Constructors

public UserConverterImpl (UserManager userManager, I18nHelper i18nHelper)

Public Methods

public String getDbString (ApplicationUser user)

Get the String representation of the User to be passed to and from the database tier.

Parameters
user the User
Returns
  • the String representation of the User to be passed to and from the database tier.

public String getHttpParameterValue (ApplicationUser user)

Get the String representation of the User to be passed to and from the presentation tier as an HTTP parameter.

Parameters
user the User
Returns
  • the String representation of the User to be passed to and from the presentation tier as an HTTP parameter.

public String getString (ApplicationUser user)

Get the String representation of the User.

Parameters
user the User
Returns
  • the String representation of the User

public ApplicationUser getUser (String stringValue)

Get the User Object from the user name. This will return null if the stringValue is empty.

Parameters
stringValue User name
Returns
  • A User or null if the input parameter is empty

public ApplicationUser getUserEvenWhenUnknown (String stringValue)

Get the User Object from the user name even when the user is unknown. This is usefull in places where the user needs to be shown, even though they may have disappeared remotely, say from LDAP. This will return null if the stringValue is empty.

Parameters
stringValue User name
Returns
  • A User or null if the input parameter is empty

public ApplicationUser getUserFromDbString (String stringValue)

Get the User Object from its database string representation. If a null stringValue is passed, then a null User object is returned, but it is guaranteed to return a non-null User in all other cases. This is usefull in places where the user needs to be shown, even though they may have disappeared remotely, say from LDAP.

Parameters
stringValue database string representation
Returns
  • A User or null if the input parameter is empty

public ApplicationUser getUserFromHttpParameterWithValidation (String stringValue)

Get the User Object from its presentation string representation. This will return null if the stringValue is empty.

Parameters
stringValue presentation string representation (username)
Returns
  • An ApplicationUser (or null if the input parameter is empty)

public ApplicationUser getUserObject (String stringValue)

Get the User Object from the user name. This will return null if the stringValue is empty.

Parameters
stringValue User name
Returns
  • A User or null if the input parameter is empty