Class UserConverterImpl

java.lang.Object
com.atlassian.jira.issue.customfields.converters.UserConverterImpl
All Implemented Interfaces:
UserConverter
Direct Known Subclasses:
MultiUserConverterImpl

public class UserConverterImpl extends Object implements UserConverter
  • Constructor Details

  • Method Details

    • getString

      public String getString(ApplicationUser user)
      Description copied from interface: UserConverter
      Get the String representation of the User.
      Specified by:
      getString in interface UserConverter
      Parameters:
      user - the User
      Returns:
      the String representation of the User
    • getHttpParameterValue

      public String getHttpParameterValue(ApplicationUser user)
      Description copied from interface: UserConverter
      Get the String representation of the User to be passed to and from the presentation tier as an HTTP parameter.
      Specified by:
      getHttpParameterValue in interface UserConverter
      Parameters:
      user - the User
      Returns:
      the String representation of the User to be passed to and from the presentation tier as an HTTP parameter.
    • getDbString

      public String getDbString(ApplicationUser user)
      Description copied from interface: UserConverter
      Get the String representation of the User to be passed to and from the database tier.
      Specified by:
      getDbString in interface UserConverter
      Parameters:
      user - the User
      Returns:
      the String representation of the User to be passed to and from the database tier.
    • getUser

      public ApplicationUser getUser(String stringValue) throws FieldValidationException
      Description copied from interface: UserConverter
      Get the User Object from the user name. This will return null if the stringValue is empty.
      Specified by:
      getUser in interface UserConverter
      Parameters:
      stringValue - User name
      Returns:
      A User or null if the input parameter is empty
      Throws:
      FieldValidationException - if the input parameter is null
    • getUserEvenWhenUnknown

      public ApplicationUser getUserEvenWhenUnknown(String stringValue) throws FieldValidationException
      Description copied from interface: UserConverter
      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.
      Specified by:
      getUserEvenWhenUnknown in interface UserConverter
      Parameters:
      stringValue - User name
      Returns:
      A User or null if the input parameter is empty
      Throws:
      FieldValidationException - if the input parameter is null
    • getUserFromHttpParameterWithValidation

      public ApplicationUser getUserFromHttpParameterWithValidation(String stringValue) throws FieldValidationException
      Description copied from interface: UserConverter
      Get the User Object from its presentation string representation. This will return null if the stringValue is empty.
      Specified by:
      getUserFromHttpParameterWithValidation in interface UserConverter
      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
    • getUserFromDbString

      public ApplicationUser getUserFromDbString(String stringValue)
      Description copied from interface: UserConverter
      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.
      Specified by:
      getUserFromDbString in interface UserConverter
      Parameters:
      stringValue - database string representation
      Returns:
      A User or null if the input parameter is empty
    • getUserObject

      public ApplicationUser getUserObject(String stringValue) throws FieldValidationException
      Description copied from interface: UserConverter
      Get the User Object from the user name. This will return null if the stringValue is empty.
      Specified by:
      getUserObject in interface UserConverter
      Parameters:
      stringValue - User name
      Returns:
      A User or null if the input parameter is empty
      Throws:
      FieldValidationException - if the input parameter is null