org.axonframework.commandhandling.interceptors
Class JSR303ViolationException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by org.axonframework.common.AxonException
                  extended by org.axonframework.common.AxonNonTransientException
                      extended by org.axonframework.commandhandling.StructuralCommandValidationFailedException
                          extended by org.axonframework.commandhandling.interceptors.JSR303ViolationException
All Implemented Interfaces:
Serializable

public class JSR303ViolationException
extends StructuralCommandValidationFailedException

Specialized version of the StructuralCommandValidationFailedException that provides a set of JSR303 constraint violations that provide details about the exact failure of the command.

Since:
1.1
Author:
Allard Buijze
See Also:
Serialized Form

Constructor Summary
JSR303ViolationException(String message, Set<javax.validation.ConstraintViolation<Object>> violations)
          Initializes an exception with the given message and violations.
 
Method Summary
 Set<javax.validation.ConstraintViolation<Object>> getViolations()
          Returns the violations that were detected when this exception was thrown.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JSR303ViolationException

public JSR303ViolationException(String message,
                                Set<javax.validation.ConstraintViolation<Object>> violations)
Initializes an exception with the given message and violations.

Parameters:
message - A descriptive message of the failure
violations - The violations that were detected
Method Detail

getViolations

public Set<javax.validation.ConstraintViolation<Object>> getViolations()
Returns the violations that were detected when this exception was thrown.

Returns:
the violations that were detected when this exception was thrown


Copyright © 2010-2012. All Rights Reserved.