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
  • 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
    • Constructor Summary

      Constructors 
      Constructor and Description
      RMException()
      Constructs an RMException object with a null message String.
    • 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 an RMException object that contains a localized message derived from the specified Exception object.
      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.
      java.lang.String getLocalizedMessage(java.util.Locale locale)
      Uses the specified locale to return a String containing the localized message for this exception.
      java.lang.String getMessage()
      Uses the default locale to return a String 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 an RMException object that contains a localized message derived from the specified Exception 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
      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • RMUNSUPPORTEDOPERATION_EXCEPTION

        public static final int RMUNSUPPORTEDOPERATION_EXCEPTION
        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 all RMException Message IDs.
    • Constructor Detail

      • RMException

        public RMException()
        Constructs an RMException object with a null message String.
    • Method Detail

      • getMessage

        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

        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

        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

        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 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

        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 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.

© Copyright IBM Corp. 2003, 2013. All Rights Reserved.