de.smartics.properties.api.core.domain
Class PropertyValidationException

Package class diagram package PropertyValidationException
java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by de.smartics.properties.api.core.app.PropertyRootException
                  extended by de.smartics.properties.api.core.domain.PropertyException
                      extended by de.smartics.properties.api.core.domain.PropertyDescriptorException
                          extended by de.smartics.properties.api.core.domain.PropertyValidationException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
PropertyValidationWithSourceException

public class PropertyValidationException
     
     
extends PropertyDescriptorException

Signals that the value does not match the given constraints.

See Also:
Serialized Form

Constructor Summary
PropertyValidationException(PropertyDescriptor propertyDescriptor, List<? extends PropertyConstraint<?>> constraints, Object value)
          Convenience constructor with no message and no root cause.
PropertyValidationException(String message, PropertyDescriptor propertyDescriptor, List<? extends PropertyConstraint<?>> constraints, Object value)
          Convenience constructor with no root cause.
PropertyValidationException(String message, Throwable cause, PropertyDescriptor propertyDescriptor, List<? extends PropertyConstraint<?>> constraints, Object value)
          Default constructor.
PropertyValidationException(Throwable cause, PropertyDescriptor propertyDescriptor, List<? extends PropertyConstraint<?>> constraints, Object value)
          Convenience constructor with no message.
 
Method Summary
 List<? extends PropertyConstraint<?>> getConstraints()
          Returns the property constraint that failed to be met.
 Serializable getValue()
          Returns the value of the property that does not meet the constraints.
 
Methods inherited from class de.smartics.properties.api.core.domain.PropertyDescriptorException
appendMetaDataMessage, getMetaDataMessage, getPropertyDescriptor
 
Methods inherited from class de.smartics.properties.api.core.domain.PropertyException
getPropertyKey
 
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

PropertyValidationException

public PropertyValidationException(PropertyDescriptor propertyDescriptor,
                                   List<? extends PropertyConstraint<?>> constraints,
                                   Object value)
Convenience constructor with no message and no root cause.

Parameters:
propertyDescriptor - the descriptor of the property raising the exception.
constraints - the property constraints that failed to be met.
value - the value of the property that does not meet the constraints. If the value is not serializable, its string representation is stored.

PropertyValidationException

public PropertyValidationException(String message,
                                   PropertyDescriptor propertyDescriptor,
                                   List<? extends PropertyConstraint<?>> constraints,
                                   Object value)
Convenience constructor with no root cause.

Parameters:
message - the detail message (which is saved for later retrieval by the Throwable.getMessage() method).
propertyDescriptor - the descriptor of the property raising the exception.
constraints - the property constraints that failed to be met.
value - the value of the property that does not meet the constraints. If the value is not serializable, its string representation is stored.

PropertyValidationException

public PropertyValidationException(Throwable cause,
                                   PropertyDescriptor propertyDescriptor,
                                   List<? extends PropertyConstraint<?>> constraints,
                                   Object value)
Convenience constructor with no message.

Parameters:
cause - the cause (which is saved for later retrieval by the Throwable.getCause() method). (A null value is permitted, and indicates that the cause is nonexistent or unknown.)
propertyDescriptor - the descriptor of the property raising the exception.
constraints - the property constraints that failed to be met.
value - the value of the property that does not meet the constraints. If the value is not serializable, its string representation is stored.

PropertyValidationException

public PropertyValidationException(String message,
                                   Throwable cause,
                                   PropertyDescriptor propertyDescriptor,
                                   List<? extends PropertyConstraint<?>> constraints,
                                   Object value)
Default constructor.

Parameters:
message - the detail message (which is saved for later retrieval by the Throwable.getMessage() method).
cause - the cause (which is saved for later retrieval by the Throwable.getCause() method). (A null value is permitted, and indicates that the cause is nonexistent or unknown.)
propertyDescriptor - the descriptor of the property raising the exception.
constraints - the property constraints that failed to be met.
value - the value of the property that does not meet the constraints. If the value is not serializable, its string representation is stored.
Method Detail

getConstraints

public final List<? extends PropertyConstraint<?>> getConstraints()
Returns the property constraint that failed to be met.

Returns:
the property constraint that failed to be met.

getValue

public final Serializable getValue()
Returns the value of the property that does not meet the constraints.

Returns:
the value of the property that does not meet the constraints.


Copyright © 2012-2013 Kronseder & Reiner GmbH - smartics. All Rights Reserved.