Interface IPropertyDefn
- All Superinterfaces:
org.eclipse.birt.report.model.metadata.IContainerDefn
- All Known Subinterfaces:
IElementPropertyDefn
- All Known Implementing Classes:
org.eclipse.birt.report.model.metadata.ElementPropertyDefn
,org.eclipse.birt.report.model.metadata.PropertyDefn
,UserPropertyDefn
public interface IPropertyDefn
extends org.eclipse.birt.report.model.metadata.IContainerDefn
Base Interface for both element property, extension model property and
structure member definitions.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
Type code for a property defined for commercial element implementation.static final int
Type code for a property defined by an extension implementation of ReportItemExtensionPoint.static final int
Type code for a property defined in XML file with the ReportItemExtensionPoint.static final int
Type code for a property defined by a ODA extension.static final int
Type code for a system property.static final int
Type code for a user property. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Checks whether the expression can be the value of this property.Returns the allowed choices for this property.Returns the allowed units for this property.Gets the list of choices for the property.Return the context for a method or expression.Returns the default value for the property.Returns the message id for the display name.Returns the structure definition for this value.Return the element type associated with this property.int
Returns the property type.int
Returns the type of this value.boolean
Checks if a property has a set of choices whatever choice is choice, extended choice or user defined choice.boolean
Returns whether this property should be encrypted.boolean
isList()
Indicates whether this property is a list.Methods inherited from interface org.eclipse.birt.report.model.metadata.IContainerDefn
canContain, canContain, getAllowedElements, getAllowedElements, getDisplayName, getName, getNameConfig
-
Field Details
-
SYSTEM_PROPERTY
static final int SYSTEM_PROPERTYType code for a system property.- See Also:
-
USER_PROPERTY
static final int USER_PROPERTYType code for a user property.- See Also:
-
EXTENSION_PROPERTY
static final int EXTENSION_PROPERTYType code for a property defined in XML file with the ReportItemExtensionPoint.- See Also:
-
EXTENSION_MODEL_PROPERTY
static final int EXTENSION_MODEL_PROPERTYType code for a property defined by an extension implementation of ReportItemExtensionPoint.- See Also:
-
ODA_PROPERTY
static final int ODA_PROPERTYType code for a property defined by a ODA extension.- See Also:
-
COMMERCIAL_PROPERTY
static final int COMMERCIAL_PROPERTYType code for a property defined for commercial element implementation.- See Also:
-
-
Method Details
-
isList
boolean isList()Indicates whether this property is a list. It is useful only when the property type is a structure type.- Returns:
- whether the property is a list or not.
-
getTypeCode
int getTypeCode()Returns the property type. See the list inPropertyType
.- Returns:
- he property type code
-
getDisplayNameID
String getDisplayNameID()Returns the message id for the display name.- Returns:
- The display name message ID.
-
getChoices
IChoiceSet getChoices()Gets the list of choices for the property.- Returns:
- the list of choices
-
hasChoices
boolean hasChoices()Checks if a property has a set of choices whatever choice is choice, extended choice or user defined choice.- Returns:
- true if it has, otherwise false.
-
getStructDefn
IStructureDefn getStructDefn()Returns the structure definition for this value.- Returns:
- the structure definition, or null if this value is not a list of structures
-
getDefault
Object getDefault()Returns the default value for the property.- Returns:
- The default value.
-
getTargetElementType
IElementDefn getTargetElementType()Return the element type associated with this property.- Returns:
- the element type associated with the property
-
getAllowedChoices
IChoiceSet getAllowedChoices()Returns the allowed choices for this property. It contains allowed choices for a choice type.If a property has not defined the restriction, then whole set will be returned.
- Returns:
- Returns the allowed choices of this property.
-
getAllowedUnits
IChoiceSet getAllowedUnits()Returns the allowed units for this property. It contains an allowed units set for a dimension type. Only the dimension type supports allowed units feature.If a property has not defined the restriction, then whole set will be returned.
- Returns:
- Returns the allowed units of this property.
-
isEncryptable
boolean isEncryptable()Returns whether this property should be encrypted.- Returns:
true
if this property should be encrypted.
-
getValueType
int getValueType()Returns the type of this value. The return can be one of the following constants:- SYSTEM_PROPERTY
- USER_PROPERTY
- STRUCT_PROPERTY
- EXTENSION_PROPERTY
- Returns:
- the type of this definition
-
getContext
String getContext()Return the context for a method or expression. If the property type is not method/expression, the return value isnull
.- Returns:
- the expression or method context
-
allowExpression
boolean allowExpression()Checks whether the expression can be the value of this property.- Returns:
true
if the expression value is valid. Otherwisefalse
.
-