Package net.solarnetwork.security
Class AuthorizationException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
net.solarnetwork.security.SecurityException
net.solarnetwork.security.AuthorizationException
- All Implemented Interfaces:
Serializable
Exception thrown when authorization to some resource fails.
- Since:
- 1.60
- Version:
- 1.0
- Author:
- matt
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumAuthorization exception reason. -
Constructor Summary
ConstructorsConstructorDescriptionAuthorizationException(String username, AuthorizationException.Reason reason) Construct authorization exception.Construct authorization exception related to some primary key -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
AuthorizationException
Construct authorization exception.- Parameters:
username- the attempted loginreason- the reason for the exception
-
AuthorizationException
Construct authorization exception related to some primary key- Parameters:
reason- the reason for the exceptionid- the object ID
-
-
Method Details
-
getEmail
Get the attempted login.- Returns:
- login value (or null if not available)
-
getId
Get the primary key.- Returns:
- the primary key (or null if not available)
-
getReason
Get the authorization exception reason.- Returns:
- reason
-
getMessage
- Overrides:
getMessagein classThrowable
-