Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.thermidor.util.exception
Class ExceptionDescriptor  view ExceptionDescriptor download ExceptionDescriptor.java

java.lang.Object
  extended bycom.thermidor.util.exception.ExceptionDescriptor
All Implemented Interfaces:
java.io.Serializable

public class ExceptionDescriptor
extends java.lang.Object
implements java.io.Serializable

The purpose of the ExceptionDescriptor is to provide a container for additional exceptioninformation that can be included in exception subclasses in those circumstances that the variety of exceptional situations is so great that the number of exception subclasses would become unmanageable. Alternatively the descriptor may be used as part of an exception processor.

Version:
1.0

Field Summary
private  java.lang.String description
          The human meaningful description ofthe exception and its causes.
private  java.util.LinkedList elements
          The list of error elements for this descriptor
private  int major
          The exception major code.
private  int minor
          The exception minor
private  java.lang.String subject
          The subject of the exception
 
Constructor Summary
ExceptionDescriptor()
          Construct a default instance of the ExceptionDescriptor.
ExceptionDescriptor(int major, int minor, java.lang.String subject, java.lang.String description)
          Construct a new instance of an ExceptionDescriptor with the specifed details.
 
Method Summary
 void addErrorElement(java.lang.String toAdd)
          Add an error element to this descriptor.
 java.lang.String getDescription()
          Retrieve the description of the exception
 java.util.List getErrorElements()
          Retrieve the list of error elements
 int getMajor()
          Return the major exception code.
 int getMinor()
          Return the minor exception code
 java.lang.String getSubject()
          Retrieve the subject of the exception
 boolean hasErrorElements()
          Does this instance have any error elements assigned to it.
 java.lang.String toString()
          Return a string representation of this descriptor.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

elements

private java.util.LinkedList elements
The list of error elements for this descriptor


major

private int major
The exception major code.


minor

private int minor
The exception minor


subject

private java.lang.String subject
The subject of the exception


description

private java.lang.String description
The human meaningful description ofthe exception and its causes.

Constructor Detail

ExceptionDescriptor

public ExceptionDescriptor()
Construct a default instance of the ExceptionDescriptor.


ExceptionDescriptor

public ExceptionDescriptor(int major,
                           int minor,
                           java.lang.String subject,
                           java.lang.String description)
Construct a new instance of an ExceptionDescriptor with the specifed details.

Method Detail

toString

public java.lang.String toString()
Return a string representation of this descriptor.


getMajor

public int getMajor()
Return the major exception code.


getMinor

public int getMinor()
Return the minor exception code


getDescription

public java.lang.String getDescription()
Retrieve the description of the exception


getSubject

public java.lang.String getSubject()
Retrieve the subject of the exception


getErrorElements

public java.util.List getErrorElements()
Retrieve the list of error elements


addErrorElement

public void addErrorElement(java.lang.String toAdd)
Add an error element to this descriptor. In this case an error element may be a validation error that was encounterd when validing input, or similar


hasErrorElements

public boolean hasErrorElements()
Does this instance have any error elements assigned to it.