Package org.eclipse.birt.report.model.api.metadata

# Class PropertyValueException

java.lang.Object
java.lang.Throwable
java.lang.Exception
org.eclipse.birt.core.exception.BirtException
org.eclipse.birt.report.model.api.ModelException
org.eclipse.birt.report.model.api.activity.SemanticException
org.eclipse.birt.report.model.api.metadata.PropertyValueException

All Implemented Interfaces:
  `Serializable`

Direct Known Subclasses:
  `ValidationValueException`

public class PropertyValueException extends SemanticException
Indicates an invalid property value.

See Also:
  - Serialized Form

## Field Summary

Fields
Modifier and Type
Field
Description
`static final String`
`DESIGN_EXCEPTION_CHOICE_NOT_ALLOWED`
Error code constant indicating the choice value is not allowed for a choice type property.
`static final String`
`DESIGN_EXCEPTION_CHOICE_NOT_FOUND`
Error code constant indicating that the choice value is not found in the choice set.
`static final String`
`DESIGN_EXCEPTION_DOT_FORBIDDEN`
Deprecated.
`static final String`
`DESIGN_EXCEPTION_EXTENSION_SETTING_FORBIDDEN`
The extension property of ExtendedItem is forbidden to be set by commands.
`static final String`
`DESIGN_EXCEPTION_INVALID_VALUE`
Error code constant indicating that the property value is invalid.
`static final String`
`DESIGN_EXCEPTION_ITEM_NOT_FOUND`
Error code constant indicating that the item is not found in a list.
`static final String`
`DESIGN_EXCEPTION_NEGATIVE_VALUE`
Error code constant indicating that the property value can not be negative.
`static final String`
`DESIGN_EXCEPTION_NON_POSITIVE_VALUE`
Error code constant indicating that the property value can not be negative or zero.
`static final String`
`DESIGN_EXCEPTION_NOT_LIST_TYPE`
Error code constant indicating that the property is not a list type.
`static final String`
`DESIGN_EXCEPTION_NOT_SUPPORTED_REPORT_ITEM_THEME_TYPE`
Error codes that indicates that the report item theme type is not supported yet.
`static final String`
`DESIGN_EXCEPTION_PROPERTY_CHANGE_FORBIDDEN`
Within child element, properties that can cause structure change are not allowed to set.
`static final String`
`DESIGN_EXCEPTION_UNIT_NOT_ALLOWED`
Error code constant indicating unit is not allowed for the dimension property.
`static final String`
`DESIGN_EXCEPTION_VALUE_EXISTS`
Error code constant indicating that the property value already exists.
`static final String`
`DESIGN_EXCEPTION_VALUE_LOCKED`
Error code constant indicating that property has been locked in a base element, and the value of the property cannot be set in a derived element.
`static final String`
`DESIGN_EXCEPTION_VALUE_REQUIRED`
Error code constant indicating that the property value is required.
`static final String`
`DESIGN_EXCEPTION_WRONG_ELEMENT_TYPE`
Error code constant indicating that the elements are of different types.
`static final String`
`DESIGN_EXCEPTION_WRONG_ITEM_TYPE`
Error code constant indicating that the item is not type of structure list referred.
`protected Object`
`invalidValue`
The invalid value.
`protected String`
`memberName`
The name of the member being set.
`protected String`
`propertyDisplayName`
The display name of the property being set.
`protected String`
`propertyName`
The name of the property being set.
`protected String`
`propertyTypeName`
Name of the type of the property.

### Fields inherited from class org.eclipse.birt.report.model.api.activity.SemanticException

`DESIGN_EXCEPTION__EXPORT_ELEMENT_FAIL, element`

### Fields inherited from class org.eclipse.birt.report.model.api.ModelException

`PLUGIN_ID`

### Fields inherited from class org.eclipse.birt.core.exception.BirtException

`CANCEL, ERROR, INFO, oaMessageArguments, OK, pluginId, rb, severity, sResourceKey, WARNING`

## Constructor Summary

Constructors
Constructor
Description
`PropertyValueException(Object value, String errCode)`
Constructs an exception given an invalid value, error code.
`PropertyValueException(Object value, String errCode, int type)`
Constructs an exception given an invalid value, error code and the property type constants.
`PropertyValueException(org.eclipse.birt.report.model.core.DesignElement obj, String propName, Object value, String errCode)`
Constructs an exception given an design element, an element property name, an invalid value and the error code.
`PropertyValueException(org.eclipse.birt.report.model.core.DesignElement obj, IPropertyDefn propDefn, Object value, String errCode)`
Constructs an exception given the definition of the property, an invalid value and its error code.
`PropertyValueException(org.eclipse.birt.report.model.core.DesignElement obj, IPropertyDefn propDefn, IPropertyDefn memberDefn, Object value, String errCode)`
Constructs an exception given the definition of the property, the structure member definition, an invalid value and its error code.

## Method Summary

Modifier and Type
Method
Description
`Object`
`getInvalidValue()`
Returns the invalid value.
`String`
`getLocalizedMessage()`
`String`
`getPropertyName()`
Returns the name of the property being set.
`void`
`setElement(org.eclipse.birt.report.model.core.DesignElement obj)`
Sets the element, if it is known.
`void`
`setPropertyName(String propName)`
Sets the name of the property being set, if it is known.

### Methods inherited from class org.eclipse.birt.report.model.api.activity.SemanticException

`getElement, getElementName, getMessage`

### Methods inherited from class org.eclipse.birt.core.exception.BirtException

`getErrorCode, getLocalizedMessage, getPluginId, getSeverity, setSeverity`

### Methods inherited from class java.lang.Throwable

`addSuppressed, fillInStackTrace, getCause, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

## Field Details

### DESIGN_EXCEPTION_INVALID_VALUE

public static final String DESIGN_EXCEPTION_INVALID_VALUE
Error code constant indicating that the property value is invalid.

See Also:
  - Constant Field Values

### DESIGN_EXCEPTION_NEGATIVE_VALUE

public static final String DESIGN_EXCEPTION_NEGATIVE_VALUE
Error code constant indicating that the property value can not be negative.

See Also:
  - Constant Field Values

### DESIGN_EXCEPTION_NON_POSITIVE_VALUE

public static final String DESIGN_EXCEPTION_NON_POSITIVE_VALUE
Error code constant indicating that the property value can not be negative or zero.

See Also:
  - Constant Field Values

### DESIGN_EXCEPTION_CHOICE_NOT_FOUND

public static final String DESIGN_EXCEPTION_CHOICE_NOT_FOUND
Error code constant indicating that the choice value is not found in the choice set.

See Also:
  - Constant Field Values

### DESIGN_EXCEPTION_NOT_LIST_TYPE

public static final String DESIGN_EXCEPTION_NOT_LIST_TYPE
Error code constant indicating that the property is not a list type.

See Also:
  - Constant Field Values

### DESIGN_EXCEPTION_ITEM_NOT_FOUND

public static final String DESIGN_EXCEPTION_ITEM_NOT_FOUND
Error code constant indicating that the item is not found in a list.

See Also:
  - Constant Field Values

### DESIGN_EXCEPTION_WRONG_ITEM_TYPE

public static final String DESIGN_EXCEPTION_WRONG_ITEM_TYPE
Error code constant indicating that the item is not type of structure list referred.

See Also:
  - Constant Field Values

### DESIGN_EXCEPTION_WRONG_ELEMENT_TYPE

public static final String DESIGN_EXCEPTION_WRONG_ELEMENT_TYPE
Error code constant indicating that the elements are of different types.

See Also:
  - Constant Field Values

### DESIGN_EXCEPTION_VALUE_EXISTS

public static final String DESIGN_EXCEPTION_VALUE_EXISTS
Error code constant indicating that the property value already exists.

See Also:
  - Constant Field Values

### DESIGN_EXCEPTION_VALUE_REQUIRED

public static final String DESIGN_EXCEPTION_VALUE_REQUIRED
Error code constant indicating that the property value is required.

See Also:
  - Constant Field Values

### DESIGN_EXCEPTION_VALUE_LOCKED

public static final String DESIGN_EXCEPTION_VALUE_LOCKED
Error code constant indicating that property has been locked in a base element, and the value of the property cannot be set in a derived element.

See Also:
  - Constant Field Values

### DESIGN_EXCEPTION_UNIT_NOT_ALLOWED

public static final String DESIGN_EXCEPTION_UNIT_NOT_ALLOWED
Error code constant indicating unit is not allowed for the dimension property.

See Also:
  - Constant Field Values

### DESIGN_EXCEPTION_CHOICE_NOT_ALLOWED

public static final String DESIGN_EXCEPTION_CHOICE_NOT_ALLOWED
Error code constant indicating the choice value is not allowed for a choice type property.

See Also:
  - Constant Field Values

### DESIGN_EXCEPTION_EXTENSION_SETTING_FORBIDDEN

public static final String DESIGN_EXCEPTION_EXTENSION_SETTING_FORBIDDEN
The extension property of ExtendedItem is forbidden to be set by commands.

See Also:
  - Constant Field Values

### DESIGN_EXCEPTION_PROPERTY_CHANGE_FORBIDDEN

public static final String DESIGN_EXCEPTION_PROPERTY_CHANGE_FORBIDDEN
Within child element, properties that can cause structure change are not allowed to set.

See Also:
  - Constant Field Values

### DESIGN_EXCEPTION_DOT_FORBIDDEN

@Deprecated public static final String DESIGN_EXCEPTION_DOT_FORBIDDEN
Deprecated.
The character "." is forbidden to NamePropertyType.

See Also:
  - Constant Field Values

### DESIGN_EXCEPTION_NOT_SUPPORTED_REPORT_ITEM_THEME_TYPE

public static final String DESIGN_EXCEPTION_NOT_SUPPORTED_REPORT_ITEM_THEME_TYPE
Error codes that indicates that the report item theme type is not supported yet.

See Also:
  - Constant Field Values

### invalidValue

protected Object invalidValue
The invalid value.

### propertyName

protected String propertyName
The name of the property being set.

### memberName

protected String memberName
The name of the member being set.

### propertyTypeName

protected String propertyTypeName
Name of the type of the property.

### propertyDisplayName

protected String propertyDisplayName
The display name of the property being set.

## Constructor Details

### PropertyValueException

public PropertyValueException(Object value, String errCode, int type)
Constructs an exception given an invalid value, error code and the property type constants.

Parameters:
  `value` - The invalid value.
  `errCode` - description of the problem
  `type` - the parameter data type

### PropertyValueException

public PropertyValueException(org.eclipse.birt.report.model.core.DesignElement obj, String propName, Object value, String errCode)
Constructs an exception given an design element, an element property name, an invalid value and the error code. Using this constructor when the property is an element property.

Parameters:
  `obj` - design element on which the property was being set
  `propName` - name of the property or the method being set
  `value` - the invalid value
  `errCode` - description of the problem

### PropertyValueException

public PropertyValueException(org.eclipse.birt.report.model.core.DesignElement obj, IPropertyDefn propDefn, Object value, String errCode)
Constructs an exception given the definition of the property, an invalid value and its error code. Using this constructor when the definition of the property is available

Parameters:
  `obj` - design element on which the property was being set
  `propDefn` - definition of the property.
  `value` - invalid value of the property.
  `errCode` - error code.

### PropertyValueException

public PropertyValueException(org.eclipse.birt.report.model.core.DesignElement obj, IPropertyDefn propDefn, IPropertyDefn memberDefn, Object value, String errCode)
Constructs an exception given the definition of the property, the structure member definition, an invalid value and its error code. Using this constructor when the definition of the structure member is available.

Parameters:
  `obj` - design element on which the property was being set
  `propDefn` - definition of the property.
  `memberDefn` - definition of the structure member
  `value` - invalid value of the property.
  `errCode` - error code.

### PropertyValueException

public PropertyValueException(Object value, String errCode)
Constructs an exception given an invalid value, error code.

Parameters:
  `value` - The invalid value.
  `errCode` - description of the problem

## Method Details

### setElement

public void setElement(org.eclipse.birt.report.model.core.DesignElement obj)
Sets the element, if it is known.

Parameters:
  `obj` - The element on which the property was being set.

### setPropertyName

public void setPropertyName(String propName)
Sets the name of the property being set, if it is known.

Parameters:
  `propName` - The name of the property being set.

### getInvalidValue

public Object getInvalidValue()
Returns the invalid value.

Returns:
  the invalid value

### getPropertyName

public String getPropertyName()
Returns the name of the property being set.

Returns:
  the property name, or null if not known

### getLocalizedMessage

public String getLocalizedMessage()

Overrides:
  `getLocalizedMessage` in class `SemanticException`