|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.itracker.services.exceptions.AuthenticatorException
public class AuthenticatorException
This class encapsulates the errors that may occur during a login
or other types of actions typically performed by a pluggable
authentication module.
A pluggable authentication module should set the type of error generated
using the setType method, or the appropriate constructor. If the type
of error does not match one of the existing types and the error should
be returned to the user, the module should use the CUSTOM_ERROR type,
and then also populate the the messageKey attribute with a key that would
be suitable for display to the user.
This class can also be used to send the user to a custom error page in the
event of a failure. If this is required, the page type should be set using
the setErrorPageType method, and the appropriate value for the type is set
using setErrorPageValue. The currently supported types are either a URL
or a Struts forward action mapping..
| Field Summary | |
|---|---|
static int |
CUSTOM_ERROR
|
static int |
ERRORPAGE_TYPE_FORWARD
|
static int |
ERRORPAGE_TYPE_UNDEFINED
|
static int |
ERRORPAGE_TYPE_URL
|
static int |
INACTIVE_ACCOUNT
|
static int |
INVALID_AUTHENTICATION_TYPE
|
static int |
INVALID_DATA
|
static int |
INVALID_PASSWORD
|
static int |
SYSTEM_ERROR
|
static int |
UNKNOWN_USER
|
| Constructor Summary | |
|---|---|
AuthenticatorException()
|
|
AuthenticatorException(int type)
|
|
AuthenticatorException(int type,
String messageKey)
|
|
AuthenticatorException(String message,
int type)
|
|
AuthenticatorException(String message,
int type,
String messageKey)
|
|
AuthenticatorException(String message,
int type,
Throwable cause)
|
|
| Method Summary | |
|---|---|
int |
getErrorPageType()
Returns the type of error page that is has been set. |
String |
getErrorPageValue()
Returns the error page that should be used to display this exception Supported values are urls and Struts forward action mappings. |
String |
getMessage()
|
String |
getMessageKey()
Returns a key that contains a custom error message to display to the user. |
int |
getType()
|
void |
setErrorPageType(int value)
Sets the type of error page that should be used to display this exception. |
void |
setErrorPageValue(String value)
Returns the error page that should be used to display this exception Supported values are urls and Struts forward action mappings. |
void |
setMessageKey(String messageKey)
Sets a key that contains a custom error message to display to the user. |
void |
setType(int type)
|
| Methods inherited from class java.lang.Throwable |
|---|
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int INVALID_DATA
public static final int UNKNOWN_USER
public static final int INVALID_PASSWORD
public static final int INACTIVE_ACCOUNT
public static final int SYSTEM_ERROR
public static final int INVALID_AUTHENTICATION_TYPE
public static final int CUSTOM_ERROR
public static final int ERRORPAGE_TYPE_UNDEFINED
public static final int ERRORPAGE_TYPE_FORWARD
public static final int ERRORPAGE_TYPE_URL
| Constructor Detail |
|---|
public AuthenticatorException()
public AuthenticatorException(int type)
public AuthenticatorException(int type,
String messageKey)
public AuthenticatorException(String message,
int type)
public AuthenticatorException(String message,
int type,
Throwable cause)
public AuthenticatorException(String message,
int type,
String messageKey)
| Method Detail |
|---|
public int getType()
public void setType(int type)
public String getMessage()
getMessage in class Throwablepublic String getMessageKey()
public void setMessageKey(String messageKey)
messageKey - a resource key that can be used to look up the custom error
message for this exception.public int getErrorPageType()
ERRORPAGE_TYPE_FORWARD,
ERRORPAGE_TYPE_URLpublic void setErrorPageType(int value)
value - the type of error page that has been setERRORPAGE_TYPE_FORWARD,
ERRORPAGE_TYPE_URLpublic String getErrorPageValue()
setErrorPageType(int)public void setErrorPageValue(String value)
value - the error page that should be used to display this messagesetErrorPageType(int)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||