com.redstarhackers.exception
Class RuleFailureException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended bycom.redstarhackers.exception.ApplicationException
              extended bycom.redstarhackers.exception.RuleFailureException
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
BusinessRuleException, ValidationException

public class RuleFailureException
extends ApplicationException

Base Exception class for rule failure exceptions (such as validation or business rules). RuleFailureException can contain any number of inner exceptions which are used to then produce the list of resulting error messages.

Version:
$Revision: 1.3 $
Author:
$Author: kostya $
See Also:
Serialized Form

Field Summary
static ErrorCode VALIDATION_DEFAULT_ERROR_CODE
           
 
Fields inherited from class com.redstarhackers.exception.ApplicationException
APP_DEFAULT_ERROR_CODE
 
Constructor Summary
RuleFailureException()
           
RuleFailureException(ErrorCode code)
           
RuleFailureException(ErrorCode code, java.lang.String details)
           
RuleFailureException(ErrorCode code, java.lang.String details, java.lang.Throwable rootCause)
           
RuleFailureException(ErrorCode code, java.lang.Throwable rootCause)
           
RuleFailureException(java.lang.String details)
           
RuleFailureException(java.lang.String details, java.lang.Throwable rootCause)
           
RuleFailureException(java.lang.Throwable rootCause)
           
 
Method Summary
 void addException(ApplicationException exception)
           
 void addException(SystemException exception)
           
 java.util.Set getErrorMessages()
           
 java.util.Set getExceptions()
           
 void setExceptions(java.util.Set exceptions)
           
 
Methods inherited from class com.redstarhackers.exception.ApplicationException
getDetails, getErrorCode, getErrorMessage, getMessage
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

VALIDATION_DEFAULT_ERROR_CODE

public static final ErrorCode VALIDATION_DEFAULT_ERROR_CODE
Constructor Detail

RuleFailureException

public RuleFailureException()

RuleFailureException

public RuleFailureException(ErrorCode code)

RuleFailureException

public RuleFailureException(ErrorCode code,
                            java.lang.String details)

RuleFailureException

public RuleFailureException(java.lang.String details)

RuleFailureException

public RuleFailureException(java.lang.Throwable rootCause)

RuleFailureException

public RuleFailureException(ErrorCode code,
                            java.lang.Throwable rootCause)

RuleFailureException

public RuleFailureException(java.lang.String details,
                            java.lang.Throwable rootCause)

RuleFailureException

public RuleFailureException(ErrorCode code,
                            java.lang.String details,
                            java.lang.Throwable rootCause)
Method Detail

getExceptions

public java.util.Set getExceptions()
Returns:
Returns the exceptions contained by this exception.

setExceptions

public void setExceptions(java.util.Set exceptions)
Parameters:
exceptions - exceptions this exception contains.

addException

public void addException(ApplicationException exception)
Parameters:
exception - the exception to add (to be contained by this exception)

addException

public void addException(SystemException exception)
Parameters:
exception - the exception to add (to be contained by this exception)

getErrorMessages

public java.util.Set getErrorMessages()