Class StructureHandle
java.lang.Object
org.eclipse.birt.report.model.api.ElementDetailHandle
org.eclipse.birt.report.model.api.ValueHandle
org.eclipse.birt.report.model.api.StructureHandle
- Direct Known Subclasses:
ActionHandle
,AggregationArgumentHandle
,CachedMetaDataHandle
,CalculationArgumentHandle
,ColumnHintHandle
,ComputedColumnHandle
,ConfigVariableHandle
,CustomColorHandle
,DataSetParameterHandle
,DimensionConditionHandle
,DimensionJoinConditionHandle
,EmbeddedImageHandle
,ExtendedPropertyHandle
,FilterConditionHandle
,FormatValueHandle
,HideRuleHandle
,IncludedCssStyleSheetHandle
,IncludedLibraryHandle
,IncludeScriptHandle
,JoinConditionHandle
,LevelAttributeHandle
,OdaDesignerStateHandle
,ParamBindingHandle
,PropertyBindingHandle
,PropertyMaskHandle
,ResultSetColumnHandle
,RuleHandle
,ScriptLibHandle
,SearchKeyHandle
,SelectionChoiceHandle
,SortHintHandle
,SortKeyHandle
,StyleRuleHandle
,TimeIntervalHandle
,TOCHandle
Handle to a structure within a list property. List properties contain objects
called structures. Structures have members that hold data values.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.eclipse.birt.report.model.core.StructureContext
Reference to the structure.Fields inherited from class org.eclipse.birt.report.model.api.ElementDetailHandle
elementHandle
-
Constructor Summary
ConstructorsConstructorDescriptionStructureHandle
(DesignElementHandle element, org.eclipse.birt.report.model.core.MemberRef ref) Deprecated.StructureHandle
(DesignElementHandle element, org.eclipse.birt.report.model.core.StructureContext context) Constructs a handle for a structure within a list property of a given element.StructureHandle
(SimpleValueHandle valueHandle, int index) Constructs a handle for a structure within a list property or a structure member. -
Method Summary
Modifier and TypeMethodDescriptionvoid
drop()
Removes this structure from a list property or member.org.eclipse.birt.report.model.core.StructureContext
Returns the structure context to the value.getDefn()
Returns the definition of the structure.getExpressionProperty
(String memberName) Gets the value of the member as an expression.getExternalizedValue
(String textIDProp, String textProp) Returns externalized message.getExternalizedValue
(String textIDProp, String textProp, com.ibm.icu.util.ULocale locale) Returns the externalized message.protected int
getIntProperty
(String memberName) Get the integer value of a member.Returns a handle to a structure member.getProperty
(String memberName) Gets the value of a member.Gets the property definition.protected String
getStringProperty
(String memberName) Get the string value of a member.Returns the structure.boolean
Justifies whether this structure handle is generated in design time.boolean
Determines whether this value is set locally for the given member in this structure.iterator()
Returns an iterator over the members of this structure.void
setDesignTime
(boolean isDesignTime) void
setExpressionProperty
(String memberName, Expression value) Sets the value of the member as an expression.void
setProperty
(String memberName, Object value) Sets the value of the member.protected final void
setPropertySilently
(String memberName, Object value) Set the value of a member without throwing exceptions.Methods inherited from class org.eclipse.birt.report.model.api.ValueHandle
getReference
Methods inherited from class org.eclipse.birt.report.model.api.ElementDetailHandle
getDesign, getElement, getElementHandle, getModule
-
Field Details
-
structContext
protected org.eclipse.birt.report.model.core.StructureContext structContextReference to the structure.
-
-
Constructor Details
-
StructureHandle
public StructureHandle(DesignElementHandle element, org.eclipse.birt.report.model.core.StructureContext context) Constructs a handle for a structure within a list property of a given element.- Parameters:
element
- handle to the report element.context
- context of the structure
-
StructureHandle
@Deprecated public StructureHandle(DesignElementHandle element, org.eclipse.birt.report.model.core.MemberRef ref) Deprecated.Constructs a handle for a structure within a list property of a given element.- Parameters:
element
- handle to the report element.ref
- reference to the structure
-
StructureHandle
Constructs a handle for a structure within a list property or a structure member.- Parameters:
valueHandle
- handle to a list property or memberindex
- index of the structure within the list
-
-
Method Details
-
getPropertyDefn
Description copied from class:ValueHandle
Gets the property definition. This is the definition of the property that contains the specific value. If the value is a structure or member, then this is the definition of the property that contains the list that contains the structure that contains the member.- Specified by:
getPropertyDefn
in classValueHandle
- Returns:
- the property definition
-
getStructure
Returns the structure. The application can cast this to the specific structure type to query the structure directly. Note: do not modify the structure directly; use theMemberHandle
class for all modifications.- Returns:
- the structure
-
getProperty
Gets the value of a member.- Parameters:
memberName
- name of the member to get- Returns:
- String value of the member, or
null
if the member is not set or is not found.
-
getStringProperty
Get the string value of a member.- Parameters:
memberName
- name of the member to get- Returns:
- String value of the member, or
null
if the member is not set or is not found.
-
getIntProperty
Get the integer value of a member.- Parameters:
memberName
- name of the member to get- Returns:
- integer value of the member, or
0
if the member is not set or is not defined.
-
setProperty
Sets the value of the member.- Parameters:
memberName
- name of the member to set.value
- the value to set- Throws:
SemanticException
- if the member name is not defined on the structure or the value is not valid for the member.
-
setPropertySilently
Set the value of a member without throwing exceptions. That is the set operation should not failed. This method is designed to be called by the sub-class where that it is certain that a set operation should never failed.Note that this method will internal swallow exceptions thrown when performing the set operation. The exception will be deemed as internal error. So calling this method when you are sure that exception is a programming error.
- Parameters:
memberName
- name of the member to set.value
- value to set.
-
getDefn
Returns the definition of the structure.- Returns:
- the structure definition
-
getMember
Returns a handle to a structure member.- Parameters:
memberName
- the name of the member- Returns:
- a handle to the member or
null
if the member is not defined on the structure.
-
iterator
Returns an iterator over the members of this structure. The iterator is of typeMemberIterator
.- Returns:
- an iterator over the members of the structure.
- See Also:
-
getContext
public org.eclipse.birt.report.model.core.StructureContext getContext()Description copied from class:ValueHandle
Returns the structure context to the value. The context is used to identify a list entry or member.- Specified by:
getContext
in classValueHandle
-
drop
Removes this structure from a list property or member. Once the structure is dropped, the handle should not be used to do any setter operations.- Throws:
PropertyValueException
- if the structure is not contained in the list.
-
getExternalizedValue
Returns externalized message.- Parameters:
textIDProp
- name of the property that defines the message keytextProp
- name of the property that defines the default non-externalized value if the key is not found in message file- Returns:
- externalized message if found, otherwise return the default
non-externalized value defined by property
textProp
-
getExternalizedValue
public String getExternalizedValue(String textIDProp, String textProp, com.ibm.icu.util.ULocale locale) Returns the externalized message.- Parameters:
textIDProp
- name of the property that defines the message keytextProp
- name of the property that defines the default non-externalized value if the key is not found in message filelocale
- the user-defined locale- Returns:
- externalized message if found, otherwise return the default
non-externalized value defined by property
textProp
-
isDesignTime
public boolean isDesignTime()Justifies whether this structure handle is generated in design time.- Returns:
if the structure handle is generated in design time, otherwise return .
-
setDesignTime
- Parameters:
isDesignTime
-- Throws:
SemanticException
-
setExpressionProperty
Sets the value of the member as an expression.- Parameters:
memberName
- name of the member to set.value
- the expression to set- Throws:
SemanticException
- if the member name is not defined on the structure or the value is not valid for the member.
-
getExpressionProperty
Gets the value of the member as an expression.- Parameters:
memberName
- name of the member to set.- Returns:
- the expression
- Throws:
SemanticException
- if the member name is not defined on the structure or the value is not valid for the member.
-
isLocal
Determines whether this value is set locally for the given member in this structure. It is set if and only if it is defined on this structure local property.- Returns:
true
if the local value is set, otherwisefalse
.
-