Class PropertySettingNotSupportedException

java.lang.Object
java.lang.Throwable
java.lang.Exception
com.deltaxml.core.exceptions.DeltaXMLException
com.deltaxml.core.exceptions.PropertySettingNotSupportedException
All Implemented Interfaces:
Serializable

public class PropertySettingNotSupportedException extends DeltaXMLException

Thrown to indicate a problem setting a property with an unsupported value or type.

Properties provide an extensible mechanism for configuring the operation of the pipeline. Unlike features these methods accept or provide complex String, or more generally Object, values rather than booleans. They are used in different contexts:

In certain circumstances the acceptable types and values which can be assigned are restricted. This exception is used to indicate when these restrictions have been broken. The getSuppliedClass() can be used to report the Class of argument supplied, while getRequiredClass() lists the class with which the supplied value must be assignment compatible.

Author:
Nigel Whitaker
See Also:
  • Constructor Details

    • PropertySettingNotSupportedException

      public PropertySettingNotSupportedException(String message, Throwable e, String propertyName, Class<?> suppliedClass, Class<?> requiredClass)
      Creates a new PropertySettingNotSupportedException.
      Parameters:
      message - The message string
      e - A nested throwable should it have lead to this exception
      propertyName - the name of the property that caused the problem
      suppliedClass - the class of the supplied value
      requiredClass - the class which the supplied value should be compatible with
    • PropertySettingNotSupportedException

      public PropertySettingNotSupportedException(String message, String propertyName, Class<?> suppliedClass)
      Creates a new PropertySettingNotSupportedException.
      Parameters:
      message - The message string
      propertyName - the name of the property being set or requested
      suppliedClass - the class of the supplied value
    • PropertySettingNotSupportedException

      public PropertySettingNotSupportedException(String message, String propertyName, Class<?> suppliedClass, Class<?> requiredClass)
      Creates a new PropertySettingNotSupportedException.
      Parameters:
      message - The message string
      propertyName - the name of the property being set or requested
      suppliedClass - the class of the supplied value
      requiredClass - the class which the supplied value should be compatible with
    • PropertySettingNotSupportedException

      public PropertySettingNotSupportedException(Throwable e, String propertyName, Class<?> suppliedClass, Class<?> requiredClass)
      Creates a new PropertySettingNotSupportedException.
      Parameters:
      e - A nested throwable should it have lead to this exception
      propertyName - the name of the property being set or requested
      suppliedClass - the class of the supplied value
      requiredClass - the class which the supplied value should be compatible with
  • Method Details

    • getSuppliedClass

      public Class<?> getSuppliedClass()
      Reports the Class of the value supplied when trying to set the property.
      Returns:
      provides the Class of the value supplied when trying to set the property
    • getRequiredClass

      public Class<?> getRequiredClass()
      Reports the Class to which the supplied value must be assignment compatible.
      Returns:
      the Class to which the supplied value must be assignment compatible, or null if unknown
    • getPropertyName

      public String getPropertyName()
      Reports the property name which was being set.
      Returns:
      the property name which was being set