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.exceptions.AbstractCoreRuntimeException
                  extended by de.smartics.exceptions.i18n.AbstractMessageRuntimeException
                      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:
de.smartics.exceptions.CoreException, de.smartics.exceptions.i18n.LocalizedException, Serializable
Direct Known Subclasses:
PropertyValidationWithSourceException

public class PropertyValidationException
     
     
extends PropertyDescriptorException

Signals that the value does not match the given constraints.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class de.smartics.exceptions.i18n.AbstractMessageRuntimeException
messageBean
 
Fields inherited from class de.smartics.exceptions.AbstractCoreRuntimeException
info
 
Constructor Summary
PropertyValidationException(PropertyValidationMessageBean message)
          Default constructor.
 
Method Summary
 PropertyValidationMessageBean getMessageBean()
           
static PropertyValidationException invalid(PropertyDescriptor propertyDescriptor, List<? extends PropertyConstraint<?>> constraints, Object value)
          Creates an instance of the validation exception.
 
Methods inherited from class de.smartics.exceptions.i18n.AbstractMessageRuntimeException
createMessages, createMessages, getCauseTrail, getCauseTrail, getLocalizedMessage, getLocalizedMessage, getLocalizedMessage, getLocalizedMessage, getLocalizedTextMessage, getLocalizedTextMessage, getLocalizedTextMessage, getMessage, getMessage, getMessage, getMessages, getMessages, toString
 
Methods inherited from class de.smartics.exceptions.AbstractCoreRuntimeException
getCause, getClassLoader, getCode, getId, getTime, truncateCause
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface de.smartics.exceptions.CoreException
getCause, getCode, getId, getStackTrace, getTime, setStackTrace, truncateCause
 

Constructor Detail

PropertyValidationException

public PropertyValidationException(PropertyValidationMessageBean message)
Default constructor.

Parameters:
message - the detail message (which is saved for later retrieval by the AbstractMessageRuntimeException.getMessage() method).
Method Detail

invalid

public static final PropertyValidationException invalid(PropertyDescriptor propertyDescriptor,
                                                        List<? extends PropertyConstraint<?>> constraints,
                                                        Object value)
Creates an instance of the validation exception.

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.
Returns:
the created exception instance.

getMessageBean

public final PropertyValidationMessageBean getMessageBean()
Overrides:
getMessageBean in class PropertyDescriptorException


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