Interface UserConverter

All Known Subinterfaces:
MultiUserConverter
All Known Implementing Classes:
MultiUserConverterImpl, UserConverterImpl

@Internal public interface UserConverter
Converts between User objects and Strings for storage and retrieval of Custom Field values.
  • Method Details

    • getString

      String getString(ApplicationUser user)
      Get the String representation of the User.
      Parameters:
      user - the User
      Returns:
      the String representation of the User
    • getHttpParameterValue

      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.
      Since:
      v6.0
    • getDbString

      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.
      Since:
      v6.0
    • getUser

      ApplicationUser getUser(String stringValue) throws FieldValidationException
      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
    • getUserEvenWhenUnknown

      ApplicationUser getUserEvenWhenUnknown(String stringValue) throws FieldValidationException
      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
      Since:
      v4.4.5
    • getUserFromHttpParameterWithValidation

      ApplicationUser getUserFromHttpParameterWithValidation(String stringValue) throws FieldValidationException
      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
      Since:
      v6.0
    • getUserFromDbString

      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
      Since:
      v6.0
    • getUserObject

      ApplicationUser getUserObject(String stringValue) throws FieldValidationException
      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