|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Throwable
java.lang.Exception
com.filenet.wcm.toolkit.util.WcmException
WcmException is a utility class to facilitate globalization by retrieving a localized error message from the resource file using the given key.
Field Summary | |
protected java.lang.Object[] |
args
Arguments to use when generating the final string. |
protected java.util.Locale |
defaultLocale
The default locale to use. |
protected java.lang.String |
key
Key for looking up a resource string in the resource file. |
protected java.lang.String |
returnUrl
|
static WcmString |
rootException
|
protected int |
status
|
static int |
STATUS_ERROR
Value for setStatus/getStatus. |
static int |
STATUS_WARNING
Value for setStatus/getStatus. |
protected java.lang.Throwable |
targetException
|
Constructor Summary | |
WcmException(java.util.Locale locale,
java.lang.String aKey,
java.lang.String engString)
Constructor |
|
WcmException(java.util.Locale locale,
java.lang.String aKey,
java.lang.String engString,
java.lang.Object arg0)
Constructor |
|
WcmException(java.util.Locale locale,
java.lang.String aKey,
java.lang.String engString,
java.lang.Object[] arguments)
Constructor |
|
WcmException(java.util.Locale locale,
java.lang.String aKey,
java.lang.String engString,
java.lang.Object arg0,
java.lang.Object arg1)
Constructor |
|
WcmException(java.util.Locale locale,
java.lang.String aKey,
java.lang.String engString,
java.lang.Object arg0,
java.lang.Object arg1,
java.lang.Object arg2)
Constructor |
|
WcmException(java.lang.String aKey,
java.lang.String engString)
Constructor |
|
WcmException(java.lang.String aKey,
java.lang.String engString,
java.lang.Object arg0)
Constructor |
|
WcmException(java.lang.String aKey,
java.lang.String engString,
java.lang.Object[] arguments)
Constructor |
|
WcmException(java.lang.String aKey,
java.lang.String engString,
java.lang.Object arg0,
java.lang.Object arg1)
Constructor |
|
WcmException(java.lang.String aKey,
java.lang.String engString,
java.lang.Object arg0,
java.lang.Object arg1,
java.lang.Object arg2)
Constructor |
Method Summary | |
java.lang.String |
getKey()
Retrieve the key representing the exception. |
java.lang.String |
getLocalizedMessage()
Retrieve the localized version of the exception message. |
static java.lang.String |
getLocalizedMessage(java.util.Locale locale,
java.lang.Throwable t)
|
java.lang.String |
getMessage()
Retrieve the localized version of the exception message. |
java.lang.String |
getReturnUrl()
Get the return URL. |
int |
getStatus()
Return the status value. |
java.lang.Throwable |
getTargetException()
Return the target exception. |
static void |
loadResource(java.io.InputStream in)
Deprecated. This method has been replaced. |
static void |
loadResource(java.util.Map m)
Deprecated. This method has been replaced. |
void |
printStackTrace()
|
void |
printStackTrace(java.io.PrintStream printStream)
|
void |
printStackTrace(java.io.PrintWriter printWriter)
|
void |
setReturnUrl(java.lang.String value)
Set the return URL. |
void |
setStatus(int value)
Set the status value. |
void |
setTargetException(java.lang.Throwable value)
Set the target exception. |
java.lang.String |
toString()
Retrieve the localized version of the exception message. |
java.lang.String |
toString(java.util.Locale locale)
Retrieve the localized version of the exception message. |
Methods inherited from class java.lang.Throwable |
fillInStackTrace, getCause, getStackTrace, initCause, setStackTrace |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final WcmString rootException
public static final int STATUS_ERROR
public static final int STATUS_WARNING
protected java.lang.String key
protected java.lang.Object[] args
protected java.util.Locale defaultLocale
protected int status
protected java.lang.String returnUrl
protected java.lang.Throwable targetException
Constructor Detail |
public WcmException(java.lang.String aKey, java.lang.String engString)
aKey
- Key to use in looking up a resource in the reource file.engString
- English version of resource string the application uses to
generate the resource file.public WcmException(java.lang.String aKey, java.lang.String engString, java.lang.Object arg0)
aKey
- Key to use in looking up the specified resource string.engString
- English version of resource string the application uses to
generate the resource file.arg0
- First argument to apply when formatting the resource
string.public WcmException(java.lang.String aKey, java.lang.String engString, java.lang.Object arg0, java.lang.Object arg1)
aKey
- Key to use in looking up the specified resource string.engString
- English version of resource string the application uses to
generate the resource file.arg0
- First argument to apply when formatting the resource
string.arg1
- Second argument to apply when formatting the resource
string.public WcmException(java.lang.String aKey, java.lang.String engString, java.lang.Object arg0, java.lang.Object arg1, java.lang.Object arg2)
aKey
- Key to use in looking up the specified resource string.engString
- English version of resource string the application uses to
generate the resource file.arg0
- First argument to apply when formatting the resource
string.arg1
- Second argument to apply when formatting the resource
string.arg2
- Third argument to apply when formatting the resource
string.public WcmException(java.lang.String aKey, java.lang.String engString, java.lang.Object[] arguments)
aKey
- Key to use in looking up the specified resource string.engString
- English version of resource string the application uses to
generate the resource file.public WcmException(java.util.Locale locale, java.lang.String aKey, java.lang.String engString)
aKey
- Key to use in looking up a resource in the reource file.engString
- English version of resource string the application uses to
generate the resource file.public WcmException(java.util.Locale locale, java.lang.String aKey, java.lang.String engString, java.lang.Object arg0)
aKey
- Key to use in looking up the specified resource string.engString
- English version of resource string the application uses to
generate the resource file.arg0
- First argument to apply when formatting the resource
string.public WcmException(java.util.Locale locale, java.lang.String aKey, java.lang.String engString, java.lang.Object arg0, java.lang.Object arg1)
aKey
- Key to use in looking up the specified resource string.engString
- English version of resource string the application uses to
generate the resource file.arg0
- First argument to apply when formatting the resource
string.arg1
- Second argument to apply when formatting the resource
string.public WcmException(java.util.Locale locale, java.lang.String aKey, java.lang.String engString, java.lang.Object arg0, java.lang.Object arg1, java.lang.Object arg2)
aKey
- Key to use in looking up the specified resource string.engString
- English version of resource string the application uses to
generate the resource file.arg0
- First argument to apply when formatting the resource
string.arg1
- Second argument to apply when formatting the resource
string.arg2
- Third argument to apply when formatting the resource
string.public WcmException(java.util.Locale locale, java.lang.String aKey, java.lang.String engString, java.lang.Object[] arguments)
aKey
- Key to use in looking up the specified resource string.engString
- English version of resource string the application uses to
generate the resource file.Method Detail |
public static java.lang.String getLocalizedMessage(java.util.Locale locale, java.lang.Throwable t)
public java.lang.String toString()
public java.lang.String toString(java.util.Locale locale)
public java.lang.String getMessage()
public java.lang.String getLocalizedMessage()
public java.lang.String getKey()
public int getStatus()
public void setStatus(int value)
value
- The status value. Either STATUS_ERROR or STATUS_WARNING.public java.lang.Throwable getTargetException()
public void setTargetException(java.lang.Throwable value)
value
- A reference to the target exception.public java.lang.String getReturnUrl()
public void setReturnUrl(java.lang.String value)
value
- The return URL to use on the error page.public void printStackTrace()
public void printStackTrace(java.io.PrintStream printStream)
public void printStackTrace(java.io.PrintWriter printWriter)
public static void loadResource(java.io.InputStream in) throws java.io.IOException
in
- InputStream object
java.io.IOException
- if any IO Errors occurpublic static void loadResource(java.util.Map m)
m
- Map object containing key-value pairs
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |