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
-
- All Implemented Interfaces:
- java.io.Serializable
- Direct Known Subclasses:
- RMDispositionConflictException, RMUnSupportedOperation
public class RMException 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: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.
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field and Description static int
DEBUG
static int
ERROR
static int
FATAL
static int
HOLDSWEEPERROR
static int
HOLDSWEEPFATAL
static java.lang.String
IBM_PREFIX
The IBM Message Standard three-character prefix assigned to IBM Enterprise Records products.static int
INFORMATION
static java.lang.String
MESSAGE_ID_PREFIX
The prefix string for all logging message id values.static char
MESSAGE_ID_SUFFIX
The Severity suffix character used for allRMException
Message IDs.static int
NOLOG
static int
RMEXCEPTION
static int
RMUNSUPPORTEDOPERATION_EXCEPTION
static int
SWEEPERROR
static int
SWEEPFATAL
static java.lang.String
SWG_ID
The IBM SWG Component Id assigned to the IBM Enterprise Records API.static int
WARNING
-
Constructor Summary
Constructors Constructor and Description RMException()
Constructs anRMException
object with a null messageString
.
-
Method Summary
Methods Modifier and Type Method and Description static RMException
createRMException(int aiErrorMessageId, int aiMessageType, java.lang.Exception aoException, java.lang.Object[] aoReplaceParams)
Returns for an exception of type ERROR or FATAL anRMException
object that contains a localized message derived from the specifiedException
object.java.lang.String
getLocalizedMessage()
Uses the locale specified in the Content Engine user context to return aString
containing the localized message for this exception.java.lang.String
getLocalizedMessage(java.util.Locale locale)
Uses the specified locale to return aString
containing the localized message for this exception.java.lang.String
getMessage()
Uses the default locale to return aString
containing the localized message for this exception.static 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 anRMException
object that contains a localized message derived from the specifiedException
object.void
setLoggingFile(java.io.File aoFile)
Deprecated.This method no longer performs any action.static void
setRMObjectStore(RMObjectStore aoRMObjectStore)
Deprecated.This method no longer performs any action.-
Methods inherited from class com.filenet.wcm.api.BaseRuntimeException
getFaultCode, setFaultCode, toString
-
-
-
-
Field Detail
-
RMEXCEPTION
public static final int RMEXCEPTION
- See Also:
- Constant Field Values
-
RMUNSUPPORTEDOPERATION_EXCEPTION
public static final int RMUNSUPPORTEDOPERATION_EXCEPTION
- See Also:
- Constant Field Values
-
FATAL
public static final int FATAL
- See Also:
- Constant Field Values
-
ERROR
public static final int ERROR
- See Also:
- Constant Field Values
-
WARNING
public static final int WARNING
- See Also:
- Constant Field Values
-
INFORMATION
public static final int INFORMATION
- See Also:
- Constant Field Values
-
DEBUG
public static final int DEBUG
- See Also:
- Constant Field Values
-
NOLOG
public static final int NOLOG
- See Also:
- Constant Field Values
-
SWEEPERROR
public static final int SWEEPERROR
- See Also:
- Constant Field Values
-
SWEEPFATAL
public static final int SWEEPFATAL
- See Also:
- Constant Field Values
-
HOLDSWEEPERROR
public static final int HOLDSWEEPERROR
- See Also:
- Constant Field Values
-
HOLDSWEEPFATAL
public static final int HOLDSWEEPFATAL
- See Also:
- Constant Field Values
-
IBM_PREFIX
public static final java.lang.String IBM_PREFIX
The IBM Message Standard three-character prefix assigned to IBM Enterprise Records products.- See Also:
- Constant Field Values
-
SWG_ID
public static final java.lang.String SWG_ID
The IBM SWG Component Id assigned to the IBM Enterprise Records API.- See Also:
- Constant Field Values
-
MESSAGE_ID_PREFIX
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:
- Constant Field Values
-
MESSAGE_ID_SUFFIX
public static final char MESSAGE_ID_SUFFIX
The Severity suffix character used for allRMException
Message IDs.
-
-
Constructor Detail
-
RMException
public RMException()
Constructs anRMException
object with a null messageString
.
-
-
Method Detail
-
getMessage
public final java.lang.String getMessage()
Uses the default locale to return aString
containing the localized message for this exception.- Overrides:
getMessage
in classjava.lang.Throwable
- Returns:
- A
String
containing the localized message.
-
getLocalizedMessage
public java.lang.String getLocalizedMessage()
Uses the locale specified in the Content Engine user context to return aString
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 classjava.lang.Throwable
- Returns:
- A
String
containing the localized message.
-
getLocalizedMessage
public java.lang.String getLocalizedMessage(java.util.Locale locale)
Uses the specified locale to return aString
containing the localized message for this exception.This method overrides
java.lang.Throwable.getLocalizedMessage
method.- Parameters:
locale
- A JavaLocale
object specifying the locale for which the message is to be returned.- Returns:
- A
String
containing the localized message.
-
setLoggingFile
public void setLoggingFile(java.io.File aoFile) throws java.io.IOException, 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
public static void setRMObjectStore(RMObjectStore aoRMObjectStore) 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
public static 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 anRMException
object that contains a localized message derived from the specifiedException
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 anull
instead of anRMException
object.- Parameters:
aiErrorMessageId
- Anint
value specifying the message ID. This value is also used as the ID for the newRMException
object.aiMessageType
- Anint
value specifying the severity level represented by this exception.aoException
- The JavaException
object from which the localized message is to be derived.aoReplaceParams
- AnObject
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 anull
object.
-
createRMException
public static RMException createRMException(int aiErrorMessageId, int aiMessageType, java.lang.Exception aoException, java.lang.Object[] aoReplaceParams)
Returns for an exception of type ERROR or FATAL anRMException
object that contains a localized message derived from the specifiedException
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 anull
instead of anRMException
object.- Parameters:
aiErrorMessageId
- Anint
value specifying the message ID. This value is also used as the ID for the newRMException
object.aiMessageType
- Anint
value specifying the severity level represented by this exception.aoException
- The JavaException
object from which the localized message string is to be derived.aoReplaceParams
- AnObject
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 anull
object.
-
-