com.atlassian.jira.issue.customfields.converters
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
 String getString(com.atlassian.crowd.embedded.api.User user)
           
 com.atlassian.crowd.embedded.api.User getUser(String stringValue)
          Get the User Object from the user name.
 com.atlassian.crowd.embedded.api.User getUserEvenWhenUnknown(String stringValue)
          Get the User Object from the user name even when the user is unknown.
 com.atlassian.crowd.embedded.api.User getUserObject(String stringValue)
          Deprecated. Use getUser(String) instead. Since v5.0.
 

Method Detail

getString

String getString(com.atlassian.crowd.embedded.api.User user)

getUser

com.atlassian.crowd.embedded.api.User getUser(String stringValue)
                                              throws FieldValidationException
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

com.atlassian.crowd.embedded.api.User getUserEvenWhenUnknown(String stringValue)
                                                             throws FieldValidationException
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

getUserObject

com.atlassian.crowd.embedded.api.User 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


Copyright © 2002-2013 Atlassian. All Rights Reserved.