public class UserConverterImpl extends Object implements UserConverter
Constructor and Description |
---|
UserConverterImpl(UserManager userManager,
I18nHelper i18nHelper) |
Modifier and Type | Method and Description |
---|---|
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.
|
public UserConverterImpl(UserManager userManager, I18nHelper i18nHelper)
public String getString(ApplicationUser user)
UserConverter
getString
in interface UserConverter
user
- the Userpublic String getHttpParameterValue(ApplicationUser user)
UserConverter
getHttpParameterValue
in interface UserConverter
user
- the Userpublic String getDbString(ApplicationUser user)
UserConverter
getDbString
in interface UserConverter
user
- the Userpublic ApplicationUser getUser(String stringValue) throws FieldValidationException
UserConverter
getUser
in interface UserConverter
stringValue
- User nameFieldValidationException
- if the input parameter is nullpublic ApplicationUser getUserEvenWhenUnknown(String stringValue) throws FieldValidationException
UserConverter
getUserEvenWhenUnknown
in interface UserConverter
stringValue
- User nameFieldValidationException
- if the input parameter is nullpublic ApplicationUser getUserFromHttpParameterWithValidation(String stringValue) throws FieldValidationException
UserConverter
getUserFromHttpParameterWithValidation
in interface UserConverter
stringValue
- presentation string representation (username)FieldValidationException
- if no user exists with the given username#getHttpParameterValue(ApplicationUser)}
public ApplicationUser getUserFromDbString(String stringValue)
UserConverter
getUserFromDbString
in interface UserConverter
stringValue
- database string representation#getDbString(ApplicationUser)}
public ApplicationUser getUserObject(String stringValue) throws FieldValidationException
UserConverter
getUserObject
in interface UserConverter
stringValue
- User nameFieldValidationException
- if the input parameter is nullCopyright © 2002-2018 Atlassian. All Rights Reserved.