@Internal public interface

UserConverter

com.atlassian.jira.issue.customfields.converters.UserConverter
Known Indirect Subclasses

@Internal

This interface is an internal implementation detail and will change without notice.

Clients that depend on @Internal classes and interfaces can not expect to be compatible with any version other than the version they were compiled against (even minor version and milestone releases may break binary compatibility with respect to @Internal elements).

Class Overview

Converts between User objects and Strings for storage and retrieval of Custom Field values.

Summary

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)
This method is deprecated. Use getHttpParameterValue(ApplicationUser) or getDbString(ApplicationUser) instead. Since v6.0.
ApplicationUser getUser(String stringValue)
This method is deprecated. Use getUserFromDbString(String) instead. Since v6.0.
ApplicationUser getUserEvenWhenUnknown(String stringValue)
This method is deprecated. Use getUserFromDbString(String) instead. Since v6.0.
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)
This method is deprecated. Use getUser(String) instead. Since v5.0.

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)

This method is deprecated.
Use getHttpParameterValue(ApplicationUser) or getDbString(ApplicationUser) instead. Since v6.0.

Get the String representation of the User.

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

public ApplicationUser getUser (String stringValue)

This method is deprecated.
Use getUserFromDbString(String) instead. Since v6.0.

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
Throws
FieldValidationException if the input parameter is null

public ApplicationUser getUserEvenWhenUnknown (String stringValue)

This method is deprecated.
Use getUserFromDbString(String) instead. Since v6.0.

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
Throws
FieldValidationException if the input parameter is null

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
See Also
  • {@link #getDbString(ApplicationUser)}

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)
Throws
FieldValidationException if no user exists with the given username
See Also
  • {@link #getHttpParameterValue(ApplicationUser)}

public ApplicationUser getUserObject (String stringValue)

This method is deprecated.
Use getUser(String) instead. Since v5.0.

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
Throws
FieldValidationException if the input parameter is null