com.atlassian.jira.issue.customfields.converters
Class UserConverterImpl

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

public class UserConverterImpl
extends Object
implements UserConverter


Constructor Summary
UserConverterImpl(UserManager userManager)
           
 
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)
          Get the User Object from the user name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UserConverterImpl

public UserConverterImpl(UserManager userManager)
Method Detail

getString

public String getString(com.atlassian.crowd.embedded.api.User user)
Specified by:
getString in interface UserConverter

getUser

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

getUserObject

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


Copyright © 2002-2013 Atlassian. All Rights Reserved.