com.rshtech.exception
Class RuntimeRuleFailureException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by com.rshtech.exception.SystemException
                  extended by com.rshtech.exception.RuntimeRuleFailureException
All Implemented Interfaces:
java.io.Serializable

public class RuntimeRuleFailureException
extends SystemException

A runtime, base Exception class for rule failure exceptions (such as validation or business rules). RuntimeRuleFailureException can contain any number of inner exceptions which are used to then produce the list of resulting error messages. This class is provided for such APIs that cannot have an explicit throws RuleFailureException in their signature (like a rule engine).

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

Field Summary
static ErrorCode VALIDATION_DEFAULT_ERROR_CODE
           
 
Fields inherited from class com.rshtech.exception.SystemException
SYS_DEFAULT_ERROR_CODE
 
Constructor Summary
RuntimeRuleFailureException()
           
RuntimeRuleFailureException(ErrorCode code)
           
RuntimeRuleFailureException(ErrorCode code, java.lang.String details)
           
RuntimeRuleFailureException(ErrorCode code, java.lang.String details, java.lang.Throwable rootCause)
           
RuntimeRuleFailureException(ErrorCode code, java.lang.Throwable rootCause)
           
RuntimeRuleFailureException(java.lang.String details)
           
RuntimeRuleFailureException(java.lang.String details, java.lang.Throwable rootCause)
           
RuntimeRuleFailureException(java.lang.Throwable rootCause)
           
 
Method Summary
 void addException(ApplicationException exception)
           
 void addException(SystemException exception)
           
 java.util.Set<java.lang.String> getErrorMessages()
           
 java.util.Set<java.lang.Exception> getExceptions()
           
 void setExceptions(java.util.Set<java.lang.Exception> exceptions)
           
 
Methods inherited from class com.rshtech.exception.SystemException
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

RuntimeRuleFailureException

public RuntimeRuleFailureException()

RuntimeRuleFailureException

public RuntimeRuleFailureException(ErrorCode code)

RuntimeRuleFailureException

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

RuntimeRuleFailureException

public RuntimeRuleFailureException(java.lang.String details)

RuntimeRuleFailureException

public RuntimeRuleFailureException(java.lang.Throwable rootCause)

RuntimeRuleFailureException

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

RuntimeRuleFailureException

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

RuntimeRuleFailureException

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

getExceptions

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

setExceptions

public void setExceptions(java.util.Set<java.lang.Exception> 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<java.lang.String> getErrorMessages()