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 Summary
Modifier and TypeMethodDescriptiongetDbString
(ApplicationUser user) Get the String representation of the User to be passed to and from the database tier.Get the String representation of the User to be passed to and from the presentation tier as an HTTP parameter.getString
(ApplicationUser user) Deprecated.Deprecated.UsegetUserFromDbString(String)
instead.getUserEvenWhenUnknown
(String stringValue) Deprecated.UsegetUserFromDbString(String)
instead.getUserFromDbString
(String stringValue) Get the User Object from its database string representation.getUserFromHttpParameterWithValidation
(String stringValue) Get the User Object from its presentation string representation.getUserObject
(String stringValue) Deprecated.UsegetUser(String)
instead.
-
Method Details
-
getString
Deprecated.UsegetHttpParameterValue(ApplicationUser)
orgetDbString(ApplicationUser)
instead. Since v6.0.Get the String representation of the User.- Parameters:
user
- the User- Returns:
- the String representation of the User
-
getHttpParameterValue
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
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
Deprecated.UsegetUserFromDbString(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
Deprecated.UsegetUserFromDbString(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
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
Deprecated.UsegetUser(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
-
getHttpParameterValue(ApplicationUser)
orgetDbString(ApplicationUser)
instead.