Class PropertyBinding
- java.lang.Object
-
- org.eclipse.birt.report.model.core.Structure
-
- org.eclipse.birt.report.model.api.elements.structures.PropertyBinding
-
- All Implemented Interfaces:
java.lang.Cloneable,IStructure,org.eclipse.birt.report.model.core.IPropertySet
public class PropertyBinding extends org.eclipse.birt.report.model.core.StructureRepresents the property binding structure. The property binding defines the overridable property value. It includes property name, element ID and overridden value.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.StringencryptionIDThe encryption id for the encrypted property value.protected java.math.BigDecimalidElement id of the property binding.static java.lang.StringID_MEMBERName of the "id" property.protected java.lang.StringnameName of the property binding.static java.lang.StringNAME_MEMBERName of the "name" property.static java.lang.StringPROPERTY_BINDING_STRUCTName of the structure.protected ExpressionvalueValue expression of this property binding.static java.lang.StringVALUE_MEMBERName of the "value" property.
-
Constructor Summary
Constructors Constructor Description PropertyBinding()Constructs a PropertyMask.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)java.lang.StringgetEncryption()Returns the encryption id.java.math.BigDecimalgetID()Gets the element id of the binding.protected java.lang.ObjectgetIntrinsicProperty(java.lang.String propName)Returns the value of a structure property represented as a member variable.java.lang.StringgetName()Gets the property name of this binding.java.lang.StringgetStructName()Returns the name of the structure definition.java.lang.StringgetValue()Gets the overridden value of this binding.protected StructureHandlehandle(SimpleValueHandle valueHandle, int index)Creates the specific handle of this structure.voidsetEncryption(java.lang.String encryptionID)Sets the encryption id for the encrypted value.voidsetID(long id)Sets the element id of this binding.protected voidsetIntrinsicProperty(java.lang.String propName, java.lang.Object value)Sets the value of of a structure property represented as a member variable.voidsetName(java.lang.String name)Sets the name of the property binding.voidsetValue(java.lang.String expression)Sets the overridden value of this binding.java.util.List<SemanticException>validate(org.eclipse.birt.report.model.core.Module module, org.eclipse.birt.report.model.core.DesignElement element)Validate whether this structure is valid.-
Methods inherited from class org.eclipse.birt.report.model.core.Structure
checkStringMember, copy, getCompatibleValue, getContext, getDefn, getElement, getExpressionProperty, getHandle, getHandle, getLocalProperty, getLocalProperty, getMemberDefn, getObjectDefn, getProperty, getProperty, getReferencableProperty, getStringProperty, isDesignTime, isReferencable, setContext, setExpressionProperty, setProperty, setProperty, setupContext, updateReference
-
-
-
-
Field Detail
-
PROPERTY_BINDING_STRUCT
public static final java.lang.String PROPERTY_BINDING_STRUCT
Name of the structure.- See Also:
- Constant Field Values
-
NAME_MEMBER
public static final java.lang.String NAME_MEMBER
Name of the "name" property.- See Also:
- Constant Field Values
-
ID_MEMBER
public static final java.lang.String ID_MEMBER
Name of the "id" property.- See Also:
- Constant Field Values
-
VALUE_MEMBER
public static final java.lang.String VALUE_MEMBER
Name of the "value" property.- See Also:
- Constant Field Values
-
name
protected java.lang.String name
Name of the property binding.
-
id
protected java.math.BigDecimal id
Element id of the property binding. Then CallModuleHandleImpl.getElementByID(long)to find the host element of this property binding defined.
-
value
protected Expression value
Value expression of this property binding.
-
encryptionID
protected java.lang.String encryptionID
The encryption id for the encrypted property value.
-
-
Method Detail
-
getIntrinsicProperty
protected java.lang.Object getIntrinsicProperty(java.lang.String propName)
Description copied from class:org.eclipse.birt.report.model.core.StructureReturns the value of a structure property represented as a member variable.- Specified by:
getIntrinsicPropertyin classorg.eclipse.birt.report.model.core.Structure- Parameters:
propName- name of the property- Returns:
- the value of the property, or null if the property is not set
-
setIntrinsicProperty
protected void setIntrinsicProperty(java.lang.String propName, java.lang.Object value)Description copied from class:org.eclipse.birt.report.model.core.StructureSets the value of of a structure property represented as a member variable.- Specified by:
setIntrinsicPropertyin classorg.eclipse.birt.report.model.core.Structure- Parameters:
propName- the name of the property to setvalue- the property value
-
handle
protected StructureHandle handle(SimpleValueHandle valueHandle, int index)
Description copied from class:org.eclipse.birt.report.model.core.StructureCreates the specific handle of this structure. This handle is always created.- Specified by:
handlein classorg.eclipse.birt.report.model.core.Structure- Parameters:
valueHandle- the value handle of this structure list property this structure is inindex- the position of this structure in structure list- Returns:
- the handle of this structure.
-
getStructName
public java.lang.String getStructName()
Description copied from interface:IStructureReturns the name of the structure definition. The name is the one used to define the structure in the meta-data dictionary.- Returns:
- the internal name of the structure a defined in the meta-data dictionary.
-
setName
public void setName(java.lang.String name)
Sets the name of the property binding. It must be one of the defined property in the element.- Parameters:
name- the property name
-
getName
public java.lang.String getName()
Gets the property name of this binding.- Returns:
- the property name of this binding
-
setID
public void setID(long id)
Sets the element id of this binding.- Parameters:
id- the element id to set
-
getID
public java.math.BigDecimal getID()
Gets the element id of the binding.- Returns:
- the element id of this binding
-
getValue
public java.lang.String getValue()
Gets the overridden value of this binding.- Returns:
- the overridden value of this binding.
-
setValue
public void setValue(java.lang.String expression)
Sets the overridden value of this binding.- Parameters:
expression- the value expression to set
-
validate
public java.util.List<SemanticException> validate(org.eclipse.birt.report.model.core.Module module, org.eclipse.birt.report.model.core.DesignElement element)
Description copied from class:org.eclipse.birt.report.model.core.StructureValidate whether this structure is valid. The derived class should override this method if semantic check is needed. The each error is the instance ofPropertyValueException.- Overrides:
validatein classorg.eclipse.birt.report.model.core.Structure- Parameters:
module- the moduleelement- the element contains this structure- Returns:
- the semantic error list
-
setEncryption
public void setEncryption(java.lang.String encryptionID)
Sets the encryption id for the encrypted value. This method is not recommended to be called by users. It is just called by Model inner APIs. Otherwise, if user sets a wrong id inconsistent with the value, they might get an odd value.- Parameters:
encryptionID-
-
getEncryption
public java.lang.String getEncryption()
Returns the encryption id.- Returns:
- the encryption id.
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classorg.eclipse.birt.report.model.core.Structure
-
-