com.filenet.rm.api.exception
Class RMException
- java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.filenet.wcm.api.BaseRuntimeException
com.filenet.rm.api.exception.RMException
- public class RMException
- extends com.filenet.wcm.api.BaseRuntimeException
Records Manager supports use of localized strings for exception messages.
You can retrieve localized messages by calling the following methods on an
RMException
object:
getLocalizedMessage(Locale)
: This method retrieves the messages for the specified locale.getLocalizedMessage()
: This method retrieves the messages for the locale specified by the Content Engine user context. If a locale has not been set in user context, the method retrieves messages using the server default locale.
For more information about the UserContext class, see the Content Engine Java API Reference.
Field Summary
Modifier and Type | Field and Description |
---|---|
|
DEBUG
|
|
ERROR
|
|
FATAL
|
|
HOLDSWEEPERROR
|
|
HOLDSWEEPFATAL
|
|
IBM_PREFIX
The IBM Message Standard three-character prefix assigned to
IBM Enterprise Records products.
|
|
INFORMATION
|
|
MESSAGE_ID_PREFIX
The prefix string for all logging message id values.
|
|
MESSAGE_ID_SUFFIX
The Severity suffix character used for all
RMException
Message IDs.
|
|
NOLOG
|
|
RMEXCEPTION
|
|
RMUNSUPPORTEDOPERATION_EXCEPTION
|
|
SWEEPERROR
|
|
SWEEPFATAL
|
|
SWG_ID
The IBM SWG Component Id assigned to the IBM Enterprise Records API.
|
|
WARNING
|
Constructor Summary
Constructor and Description |
---|
RMException()
Constructs an
RMException object with a null message String .
|
Method Summary
Modifier and Type | Method and Description |
---|---|
|
createRMException(int aiErrorMessageId,int aiMessageType,java.lang.Exception aoException,java.lang.Object[] aoReplaceParams)
Returns for an exception of type ERROR or FATAL an
RMException object that
contains a localized message derived from the specified Exception
object.
|
|
getCode()
|
|
getLocalizedMessage()
Uses the locale specified in the Content Engine user context to return
a
String containing the localized message for this exception.
|
|
getLocalizedMessage(java.util.Locale locale)
Uses the specified locale to return a
String containing the
localized message for this exception.
|
|
getMessage()
Uses the default locale to return a
String containing the
localized message for this exception.
|
|
getRMException(int aiErrorMessageId,int aiMessageType,java.lang.Exception aoException,java.lang.Object[] aoReplaceParams)
Returns for an exception of type ERROR, SWEEPERROR, HOLDSWEEPERROR, SWEEPFATAL,
HOLDSWEEPFATAL, or FATAL an
RMException object that
contains a localized message derived from the specified Exception
object.
|
|
setLoggingFile(java.io.File aoFile)
Deprecated. This method no longer performs any action.
|
|
setRMObjectStore(RMObjectStore aoRMObjectStore)
Deprecated. This method no longer performs any action.
|
Methods inherited from class com.filenet.wcm.api.BaseRuntimeException |
---|
getFaultCode, setFaultCode, toString |
Methods inherited from class java.lang.Throwable |
---|
fillInStackTrace, getCause, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail
RMEXCEPTION
- public static final int RMEXCEPTION
RMUNSUPPORTEDOPERATION_EXCEPTION
- public static final int RMUNSUPPORTEDOPERATION_EXCEPTION
FATAL
- public static final int FATAL
ERROR
- public static final int ERROR
WARNING
- public static final int WARNING
INFORMATION
- public static final int INFORMATION
DEBUG
- public static final int DEBUG
NOLOG
- public static final int NOLOG
SWEEPERROR
- public static final int SWEEPERROR
SWEEPFATAL
- public static final int SWEEPFATAL
HOLDSWEEPERROR
- public static final int HOLDSWEEPERROR
HOLDSWEEPFATAL
- public static final int HOLDSWEEPFATAL
IBM_PREFIX
- public static final java.lang.String IBM_PREFIX
SWG_ID
- public static final java.lang.String SWG_ID
MESSAGE_ID_PREFIX
- public static final java.lang.String MESSAGE_ID_PREFIX
MESSAGE_ID_SUFFIX
- public static final char MESSAGE_ID_SUFFIX
RMException
Message IDs.
Constructor Detail
RMException
- public RMException()
RMException
object with a null message String
.
Method Detail
getMessage
- public final java.lang.String getMessage( )
String
containing the
localized message for this exception.
getMessage
in class java.lang.Throwable
String
containing the localized message. getLocalizedMessage
- public java.lang.String getLocalizedMessage( )
String
containing the localized message for this exception.
If a locale has not been set in user context, this method
uses the server default locale to retrieve the message.
This method overrides java.lang.Throwable.getLocalizedMessage
method.
getLocalizedMessage
in class java.lang.Throwable
String
containing the localized message. getLocalizedMessage
- public java.lang.String getLocalizedMessage( java.util.Locale locale)
String
containing the
localized message for this exception.
This method overrides java.lang.Throwable.getLocalizedMessage
method.
locale
- A Java Locale
object specifying the locale
for which the message is to be returned. String
containing the localized message. setLoggingFile
- public void setLoggingFile(java.io.File aoFile)
- throws java.io.IOException
- java.lang.Exception
aoFile
- java.io.IOException
java.lang.Exception
setRMObjectStore
- public static void setRMObjectStore( RMObjectStore aoRMObjectStore)
- throws java.lang.Exception
aoRMObjectStore
- RMObjectStore passed java.lang.Exception
- Exception Object getRMException
- public static RMException getRMException( int aiErrorMessageId,
- int aiMessageType,
- java.lang.Exception aoException,
- java.lang.Object[] aoReplaceParams)
RMException
object that
contains a localized message derived from the specified Exception
object. This method, which uses the default locale to retrieve the message, also
records the message in the log file. In addition, the method throws the exception
for an exception of type ERROR, SWEEPERROR, or HOLDSWEEPERROR.
For exceptions of all other types, the method records a message derived from the specified
Exception
object in the log file. However, the method returns a null
instead of an RMException
object.
aiErrorMessageId
- An int
value specifying the message ID. This value is also used
as the ID for the new RMException
object. aiMessageType
- An int
value specifying the severity level represented
by this exception. aoException
- The Java Exception
object from which the localized message
is to be derived. aoReplaceParams
- An Object
array containing the values that are to replace the
parameters in the localized message. RMException
object for an exception of type ERROR, SWEEPERROR,
HOLDSWEEPERROR, SWEEPFATAL, HOLDSWEEPFATAL, or FATAL.
For all other exception types, returns a null
object. createRMException
- public static RMException createRMException( int aiErrorMessageId,
- int aiMessageType,
- java.lang.Exception aoException,
- java.lang.Object[] aoReplaceParams)
RMException
object that
contains a localized message derived from the specified Exception
object. This method, which uses the default locale to retrieve the message, also
records the message in the log file. In addition, the method throws the exception
for an exception of type ERROR, SWEEPERROR, or HOLDSWEEPERROR.
For exceptions of all other types, the method records a message derived from the specified
Exception
object in the log file. However, the method returns a null
instead of an RMException
object.
aiErrorMessageId
- An int
value specifying the message ID. This value is also used
as the ID for the new RMException
object. aiMessageType
- An int
value specifying the severity level represented
by this exception. aoException
- The Java Exception
object from which the localized message string
is to be derived. aoReplaceParams
- An Object
array containing the values that are to replace the
parameters in the localized message. RMException
object for an exception of type ERROR or FATAL; otherwise,
returns a null
object. getCode
- protected int getCode()