AdventNet Web NMS 4 DMS API Specification

com.adventnet.nms.rta.fw.common
Class RTAException
java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.lang.RuntimeException
                    |
                    +--com.adventnet.nms.rta.fw.common.RTAException
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
RTAModuleException

public class RTAException
extends java.lang.RuntimeException

This Exception will be extended by the RTA modules which like to throw exceptions from their applications.

See Also:
Serialized Form

Constructor Summary
RTAException()
          Constructs a new exception with empty string as its detail message.
RTAException(java.lang.String message)
          Constructs a new exception with the specified detail message.
RTAException(java.lang.String title, java.lang.String message)
          Constructs a new exception with the specified detail message and title.
 
Method Summary
 void addDetails(RTAException rex)
          This is to add RTAException itself (nested).
 void addDetails(java.lang.String errMessage)
          Add the details to the RTAException, which will be shown in the Exception dialog.
 void addDetails(java.lang.String fieldName, java.lang.String errMessage)
          This is to add the details to the RTAException.
 void addDetails(java.lang.String format, java.lang.String[] values)
          This is to add the details to the RTAException as format string and values that of in MessageFormat class.
 java.lang.String getDetails()
          Returns all the exception details in the String format.
 java.util.ArrayList getDetailsList()
          Returns all the exception details.
 java.lang.String getMessage()
          Returns the Message of the Exception dialog.
 java.lang.String getTitle()
          Returns the title of the Exception dialog.
 boolean hasDetails()
          Returns true if any other exception details have been added into this exception.
 void setMessage(java.lang.String message)
          Set the Message for the Exception dialog.
 void setTitle(java.lang.String title)
          Set the title for the Exception dialog.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, printStackTrace, printStackTrace, printStackTrace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RTAException

public RTAException()
Constructs a new exception with empty string as its detail message.

RTAException

public RTAException(java.lang.String message)
Constructs a new exception with the specified detail message.
Parameters:
message - exception message

RTAException

public RTAException(java.lang.String title,
                    java.lang.String message)
Constructs a new exception with the specified detail message and title.
Parameters:
title - title of the exception dialog, which pops up when exception occurs
message - exception message
Method Detail

addDetails

public void addDetails(java.lang.String errMessage)
Add the details to the RTAException, which will be shown in the Exception dialog. Here any number of exception details can be added. All those added exception details will be shown in the Exception dialog.
Parameters:
errMessage - Message to be shown in the error dialog.

addDetails

public void addDetails(java.lang.String fieldName,
                       java.lang.String errMessage)
This is to add the details to the RTAException. Here the "fieldName" is the name of the UI field which has the problem and "errMessage" is the message explaining the problem.
Parameters:
fieldName - name of the erroneous attribute/field to be shown in the error dialog.
errMessage - Message to be shown in the error dialog.

addDetails

public void addDetails(java.lang.String format,
                       java.lang.String[] values)
This is to add the details to the RTAException as format string and values that of in MessageFormat class.
Parameters:
format - short description about the exception(i18ned value of this will be shown in the exception dialog)
values[] - list of errorMessages

addDetails

public void addDetails(RTAException rex)
This is to add RTAException itself (nested).
Parameters:
rex - exception to be shown in the error dialog.

setTitle

public void setTitle(java.lang.String title)
Set the title for the Exception dialog.
Parameters:
title - Title of the error dialog which will show the error details.

setMessage

public void setMessage(java.lang.String message)
Set the Message for the Exception dialog.
Parameters:
message - error message to be shown in the error dialog

getTitle

public java.lang.String getTitle()
Returns the title of the Exception dialog.
Returns:
error dialog title

getMessage

public java.lang.String getMessage()
Returns the Message of the Exception dialog.
Overrides:
getMessage in class java.lang.Throwable
Returns:
error message

hasDetails

public boolean hasDetails()
Returns true if any other exception details have been added into this exception.
Returns:
true, if any more error message is left.

getDetails

public java.lang.String getDetails()
Returns all the exception details in the String format.
Returns:
all the error messages in the form of string. The error messages are read from the arraylist.

getDetailsList

public java.util.ArrayList getDetailsList()
Returns all the exception details.
Returns:
error messages array list.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Throwable
Returns:
error message

AdventNet Web NMS 4 DMS API Specification