com.atlassian.crowd.exception
Class UserNotFoundException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by com.atlassian.crowd.exception.CrowdException
              extended by com.atlassian.crowd.exception.ObjectNotFoundException
                  extended by com.atlassian.crowd.exception.UserNotFoundException
All Implemented Interfaces:
Serializable

public class UserNotFoundException
extends ObjectNotFoundException

Thrown when the specified user could not be found.

See Also:
Serialized Form

Constructor Summary
UserNotFoundException(String userName)
           
UserNotFoundException(String userName, Throwable t)
           
 
Method Summary
 String getUserName()
          Returns the name of the user that could not be found.
static void throwNotFoundByExternalId(String externalId)
          Static factory to throw a UserNotFoundException when searching by externalId rather than username.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

UserNotFoundException

public UserNotFoundException(String userName)

UserNotFoundException

public UserNotFoundException(String userName,
                             Throwable t)
Method Detail

getUserName

public String getUserName()
Returns the name of the user that could not be found.

Returns:
name of the user that could not be found

throwNotFoundByExternalId

public static void throwNotFoundByExternalId(String externalId)
                                      throws UserNotFoundException
Static factory to throw a UserNotFoundException when searching by externalId rather than username.

Parameters:
externalId - the external Id
Throws:
UserNotFoundException - always


Copyright © 2013 Atlassian. All Rights Reserved.