com.filenet.rm.api.exception

Class RMException

  1. java.lang.Object
  2. extended byjava.lang.Throwable
  3. extended byjava.lang.Exception
  4. extended byjava.lang.RuntimeException
  5. extended bycom.filenet.wcm.api.BaseRuntimeException
  6. extended bycom.filenet.rm.api.exception.RMException
All implemented interfaces:
java.io.Serializable
Direct known subclasses:
RMDispositionConflictException, RMUnSupportedOperation

  1. public class RMException
  2. extends com.filenet.wcm.api.BaseRuntimeException
Represents an exception that has occurred in Records Manager and provides static methods to create and retrieve such an exception.

Records Manager supports use of localized strings for exception messages. You can retrieve localized messages by calling the following methods on an RMException object:

For more information about the UserContext class, see the Content Engine Java API Reference.

See Also:
Serialized Form

Field Summary

Modifier and Type Field and Description
  1. static
  2. int
DEBUG
  1. static
  2. int
ERROR
  1. static
  2. int
FATAL
  1. static
  2. int
HOLDSWEEPERROR
  1. static
  2. int
HOLDSWEEPFATAL
  1. static
  2. java.lang.String
IBM_PREFIX
The IBM Message Standard three-character prefix assigned to IBM Enterprise Records products.
  1. static
  2. int
INFORMATION
  1. static
  2. java.lang.String
MESSAGE_ID_PREFIX
The prefix string for all logging message id values.
  1. static
  2. char
MESSAGE_ID_SUFFIX
The Severity suffix character used for all RMException Message IDs.
  1. static
  2. int
NOLOG
  1. static
  2. int
RMEXCEPTION
  1. static
  2. int
RMUNSUPPORTEDOPERATION_EXCEPTION
  1. static
  2. int
SWEEPERROR
  1. static
  2. int
SWEEPFATAL
  1. static
  2. java.lang.String
SWG_ID
The IBM SWG Component Id assigned to the IBM Enterprise Records API.
  1. static
  2. int
WARNING

Constructor Summary

Constructor and Description
RMException()
Constructs an RMException object with a null message String.

Method Summary

Modifier and Type Method and Description
  1. static
  2. RMException
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.
  1. protected
  2. int
getCode()
  1. java.lang.String
getLocalizedMessage()
Uses the locale specified in the Content Engine user context to return a String containing the localized message for this exception.
  1. java.lang.String
getLocalizedMessage(java.util.Locale locale)
Uses the specified locale to return a String containing the localized message for this exception.
  1. java.lang.String
getMessage()
Uses the default locale to return a String containing the localized message for this exception.
  1. static
  2. RMException
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.
  1. void
setLoggingFile(java.io.File aoFile)
Deprecated. This method no longer performs any action.
  1. static
  2. void
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

  1. public static final int RMEXCEPTION
See Also:

RMUNSUPPORTEDOPERATION_EXCEPTION

  1. public static final int RMUNSUPPORTEDOPERATION_EXCEPTION
See Also:

FATAL

  1. public static final int FATAL
See Also:

ERROR

  1. public static final int ERROR
See Also:

WARNING

  1. public static final int WARNING
See Also:

INFORMATION

  1. public static final int INFORMATION
See Also:

DEBUG

  1. public static final int DEBUG
See Also:

NOLOG

  1. public static final int NOLOG
See Also:

SWEEPERROR

  1. public static final int SWEEPERROR
See Also:

SWEEPFATAL

  1. public static final int SWEEPFATAL
See Also:

HOLDSWEEPERROR

  1. public static final int HOLDSWEEPERROR
See Also:

HOLDSWEEPFATAL

  1. public static final int HOLDSWEEPFATAL
See Also:

IBM_PREFIX

  1. public static final java.lang.String IBM_PREFIX
The IBM Message Standard three-character prefix assigned to IBM Enterprise Records products.
See Also:

SWG_ID

  1. public static final java.lang.String SWG_ID
The IBM SWG Component Id assigned to the IBM Enterprise Records API.
See Also:

MESSAGE_ID_PREFIX

  1. public static final java.lang.String MESSAGE_ID_PREFIX
The prefix string for all logging message id values. Each message id value will be prepended this prefix string plus a 4-digit numeric suffix.
See Also:

MESSAGE_ID_SUFFIX

  1. public static final char MESSAGE_ID_SUFFIX
The Severity suffix character used for all RMException Message IDs.

Constructor Detail

RMException

  1. public RMException()
Constructs an RMException object with a null message String.

Method Detail

getMessage

  1. public final java.lang.String getMessage( )
Uses the default locale to return a String containing the localized message for this exception.
Overrides:
getMessage in class java.lang.Throwable
Returns:
A String containing the localized message.

getLocalizedMessage

  1. public java.lang.String getLocalizedMessage( )
Uses the locale specified in the Content Engine user context to return a 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.

Overrides:
getLocalizedMessage in class java.lang.Throwable
Returns:
A String containing the localized message.

getLocalizedMessage

  1. public java.lang.String getLocalizedMessage( java.util.Locale locale)
Uses the specified locale to return a String containing the localized message for this exception.

This method overrides java.lang.Throwable.getLocalizedMessage method.

Parameters:
locale - A Java Locale object specifying the locale for which the message is to be returned.
Returns:
A String containing the localized message.

setLoggingFile

  1. public void setLoggingFile(java.io.File aoFile)
  2. throws java.io.IOException
  3. java.lang.Exception
Deprecated. This method no longer performs any action.
Sets the logging file and initializes the PrintWriterObject.
Parameters:
aoFile -
Throws:
java.io.IOException
java.lang.Exception

setRMObjectStore

  1. public static void setRMObjectStore( RMObjectStore aoRMObjectStore)
  2. throws java.lang.Exception
Deprecated. This method no longer performs any action.
Sets the RMObjectStore.
Parameters:
aoRMObjectStore - RMObjectStore passed
Throws:
java.lang.Exception - Exception Object

getRMException

  1. public static RMException getRMException( int aiErrorMessageId,
  2. int aiMessageType,
  3. java.lang.Exception aoException,
  4. 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. 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.

Parameters:
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.
Returns:
An RMException object for an exception of type ERROR, SWEEPERROR, HOLDSWEEPERROR, SWEEPFATAL, HOLDSWEEPFATAL, or FATAL. For all other exception types, returns a null object.

createRMException

  1. public static RMException createRMException( int aiErrorMessageId,
  2. int aiMessageType,
  3. java.lang.Exception aoException,
  4. 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. 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.

Parameters:
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.
Returns:
An RMException object for an exception of type ERROR or FATAL; otherwise, returns a null object.

getCode

  1. protected int getCode()