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

Package class diagram package ReadOnlyPropertyException
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.ReadOnlyPropertyException
All Implemented Interfaces:
Serializable

public class ReadOnlyPropertyException
     
     
extends PropertyDescriptorException

Signals that the a read-only property was requested to be updated.

See Also:
Serialized Form

Constructor Summary
ReadOnlyPropertyException(PropertyDescriptor propertyDescriptor, Object currentValue, Object rejectedValue)
          Convenience constructor with no message and no root cause.
ReadOnlyPropertyException(String message, Throwable cause, PropertyDescriptor propertyDescriptor, Object currentValue, Object rejectedValue)
          Default constructor.
ReadOnlyPropertyException(Throwable cause, PropertyDescriptor propertyDescriptor, Object currentValue, Object rejectedValue)
          Convenience constructor with no message.
 
Method Summary
 Serializable getCurrentValue()
          Returns the current value of the property that has not been changed.
 Serializable getRejectedValue()
          Returns the value the property was requested to change to but has been rejected.
 
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

ReadOnlyPropertyException

public ReadOnlyPropertyException(PropertyDescriptor propertyDescriptor,
                                 Object currentValue,
                                 Object rejectedValue)
Convenience constructor with no message and no root cause.

Parameters:
propertyDescriptor - the descriptor of the property raising the exception.
currentValue - the current value of the property that has not been changed.
rejectedValue - the value the property was requested to change to but has been rejected.

ReadOnlyPropertyException

public ReadOnlyPropertyException(Throwable cause,
                                 PropertyDescriptor propertyDescriptor,
                                 Object currentValue,
                                 Object rejectedValue)
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.
currentValue - the current value of the property that has not been changed.
rejectedValue - the value the property was requested to change to but has been rejected.

ReadOnlyPropertyException

public ReadOnlyPropertyException(String message,
                                 Throwable cause,
                                 PropertyDescriptor propertyDescriptor,
                                 Object currentValue,
                                 Object rejectedValue)
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.
currentValue - the current value of the property that has not been changed.
rejectedValue - the value the property was requested to change to but has been rejected.
Method Detail

getCurrentValue

public final Serializable getCurrentValue()
Returns the current value of the property that has not been changed.

Returns:
the current value of the property that has not been changed.

getRejectedValue

public final Serializable getRejectedValue()
Returns the value the property was requested to change to but has been rejected.

Returns:
the value the property was requested to change to but has been rejected.


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