org.web_auth.utils
Class ApplicationException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended byorg.web_auth.utils.ApplicationException
All Implemented Interfaces:
java.io.Serializable

public class ApplicationException
extends java.lang.Exception

This exception class allows the thrower to embed an application resource key in the exception. Application resource maps keys to displayable messages.

Version:
1.0
Author:
Zhengrong Tang
See Also:
Serialized Form

Field Summary
static java.lang.String LOGIN_INVALID
           
static java.lang.String NEW_PASSWORD_TOO_LONG
           
static java.lang.String NEW_PASSWORD_TOO_SHORT
           
static java.lang.String NEW_PASSWORD_UNCHANGED
           
static java.lang.String NEW_PASSWORD1_MISSING
           
static java.lang.String NEW_PASSWORD2_MISSING
           
static java.lang.String NEW_PASSWORDS_MISMATCH
           
static java.lang.String OLD_PASSWORD_MISSING
           
static java.lang.String OLD_PASSWORD_WRONG
           
static java.lang.String PASSWORD_MISSING
           
static java.lang.String PASSWORD_TOO_LONG
           
static java.lang.String PASSWORD_TOO_SHORT
           
static java.lang.String SYSTEM_ERROR
           
static java.lang.String USER_NOT_EXSIT
           
static java.lang.String USERNAME_MISSING
           
static java.lang.String USERNAME_USED
           
 
Constructor Summary
ApplicationException(java.lang.String applicationResourceKey)
          Contructs an ApplicationException with an application resource key.
ApplicationException(java.lang.String applicationResourceKey, java.lang.Throwable t)
          Contructs an ApplicationException with an application resource key and to encapsulate another exception.
 
Method Summary
 java.lang.String getApplicationResourceKey()
          Get the application resource key from this object.
 void setApplicationResourceKey(java.lang.String applicationResourceKey)
          Set the application resource key in this object.
 
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
 

Field Detail

LOGIN_INVALID

public static final java.lang.String LOGIN_INVALID
See Also:
Constant Field Values

USERNAME_MISSING

public static final java.lang.String USERNAME_MISSING
See Also:
Constant Field Values

USERNAME_USED

public static final java.lang.String USERNAME_USED
See Also:
Constant Field Values

USER_NOT_EXSIT

public static final java.lang.String USER_NOT_EXSIT
See Also:
Constant Field Values

PASSWORD_MISSING

public static final java.lang.String PASSWORD_MISSING
See Also:
Constant Field Values

PASSWORD_TOO_SHORT

public static final java.lang.String PASSWORD_TOO_SHORT
See Also:
Constant Field Values

PASSWORD_TOO_LONG

public static final java.lang.String PASSWORD_TOO_LONG
See Also:
Constant Field Values

OLD_PASSWORD_MISSING

public static final java.lang.String OLD_PASSWORD_MISSING
See Also:
Constant Field Values

OLD_PASSWORD_WRONG

public static final java.lang.String OLD_PASSWORD_WRONG
See Also:
Constant Field Values

NEW_PASSWORD1_MISSING

public static final java.lang.String NEW_PASSWORD1_MISSING
See Also:
Constant Field Values

NEW_PASSWORD2_MISSING

public static final java.lang.String NEW_PASSWORD2_MISSING
See Also:
Constant Field Values

NEW_PASSWORD_TOO_SHORT

public static final java.lang.String NEW_PASSWORD_TOO_SHORT
See Also:
Constant Field Values

NEW_PASSWORD_TOO_LONG

public static final java.lang.String NEW_PASSWORD_TOO_LONG
See Also:
Constant Field Values

NEW_PASSWORD_UNCHANGED

public static final java.lang.String NEW_PASSWORD_UNCHANGED
See Also:
Constant Field Values

NEW_PASSWORDS_MISMATCH

public static final java.lang.String NEW_PASSWORDS_MISMATCH
See Also:
Constant Field Values

SYSTEM_ERROR

public static final java.lang.String SYSTEM_ERROR
See Also:
Constant Field Values
Constructor Detail

ApplicationException

public ApplicationException(java.lang.String applicationResourceKey)
Contructs an ApplicationException with an application resource key.

Parameters:
applicationResourceKey - the application resource key

ApplicationException

public ApplicationException(java.lang.String applicationResourceKey,
                            java.lang.Throwable t)
Contructs an ApplicationException with an application resource key and to encapsulate another exception.

Parameters:
applicationResourceKey - the application resource key
t - the exception to be encapsulated
Method Detail

getApplicationResourceKey

public java.lang.String getApplicationResourceKey()
Get the application resource key from this object.

Returns:
an application resource key

setApplicationResourceKey

public void setApplicationResourceKey(java.lang.String applicationResourceKey)
Set the application resource key in this object.

Parameters:
applicationResourceKey - the application resource key


Copyright © 2003 Zhengrong Tang. All Rights Reserved.