Class ReportItem
- All Implemented Interfaces:
Cloneable,ICompatibleReportItem,IReportItem
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the iterator of all available bindings.booleanIndicates whether the report item can be allowed to export to library.Checks the parser compatibilities for this report item and return the status.voidcheckProperty(String propName, Object value) Checks the value of a property prior to setting it.copy()Creates deep copy of the IReportItem and return the new element.voiddeserialize(String propName, ByteArrayInputStream data) Deserializes the model.Returns the method definition list of extension elements.getMethods(String methodName) Returns the method info list of extension elements.Gets list of the predefined styles.getProperty(String propName) Returns the value of a public property.Gets the list of all the property definitions that the extended element model has.Returns a list containing the possible JavaScript expressions.Gets the script property definition of this report item.Returns the interface for script operations.voidhandle the compatibility issuebooleanIndicates whether the report item has fixed size.booleanJustifies whether the property list of the extended element is changed.Serializes the model given the property name.voidsetHandle(ExtendedItemHandle handle) Sets the handle of this report item.voidsetProperty(String propName, Object value) Sets the value of a property.voidupdateRowExpressions(Map newExpressions) Updates existed expression with the given expressions.voidupdateStyleReference(Map<String, String> styleMap) validate()Performs a semantic check on the report item.
-
Constructor Details
-
ReportItem
public ReportItem()
-
-
Method Details
-
serialize
Description copied from interface:IReportItemSerializes the model given the property name. The property is visible to BIRT and its type isXMLPropertyType. The serialized data must be Unicode text. XML is preferred, but any text format is legal. If the model is binary, then one solution is to serialize the model as Base64 encoded data.- Specified by:
serializein interfaceIReportItem- Parameters:
propName- the model property name to serialize- Returns:
- a byte array that represents the serialized extended element model.
-
deserialize
Description copied from interface:IReportItemDeserializes the model. The property is visible to BIRT and its type isXMLPropertyType. The data provided will be that created by theserializemethod. A well-written extension will handle two exceptional cases. First, it will handle all previous versions of this same extension. Second, it will handle erroneous input, perhaps created when a human editied the saved state by hand.- Specified by:
deserializein interfaceIReportItem- Parameters:
propName- the model property name to deserializedata- a byte array stream containing the serialized data- Throws:
ExtendedElementException- if the serialized model is invalid
-
getPropertyDefinitions
Description copied from interface:IReportItemGets the list of all the property definitions that the extended element model has.- Specified by:
getPropertyDefinitionsin interfaceIReportItem- Returns:
- the dynamic property list of the extended element model
-
getProperty
Description copied from interface:IReportItemReturns the value of a public property. Returns null if the property is not defined. If theIReportItemFactoryclass defines a property, then this method must accept that property name.Property names can be separated with dots and can include array indexes. For example: barColors[1].pattern. This will occur if a property is defined as a list or structure.
If the report element support styles or inheritance, then a return value of
nullmeans that the value should be inherited. BIRT will use its normal inheritance mechanisms to locate the value. If the extended element does not support inheritance or styles, then this method must return the value of each property, including defaults if the value has not yet been set.- Specified by:
getPropertyin interfaceIReportItem- Parameters:
propName- the name of the property to get- Returns:
- the property value as one of the supported BIRT property types: String, Integer, Double, BigDecimal, etc.
-
checkProperty
Description copied from interface:IReportItemChecks the value of a property prior to setting it. BIRT calls this operation before setting the value. See thesetPropertymethod for details on the process for setting a property value.- Specified by:
checkPropertyin interfaceIReportItem- Parameters:
propName- the name of the property to checkvalue- the new property value as one of the supported BIRT types- Throws:
ExtendedElementException- if the property value is invalid or the property name is invalid- See Also:
-
setProperty
Description copied from interface:IReportItemSets the value of a property. This operation is done in response to a BIRT-defined command. That is, this method call is the result of an application using the BIRT Model API to set a property. BIRT will have validated the property using thecheckPropertymethod, and will have created a command to set the property.If this element supports styles or inheritance, then the value can be
null, which means to clear the property value so that it will inherit from the base element or the style.- Specified by:
setPropertyin interfaceIReportItem- Parameters:
propName- the name of the property to setvalue- the new property value as one of the supported BIRT types- See Also:
-
validate
Description copied from interface:IReportItemPerforms a semantic check on the report item. The extended element can use this to validate the values of properties, to ensure that a set of values are consistent, etc.- Specified by:
validatein interfaceIReportItem- Returns:
- List List contains ExtendedElementException.
-
copy
Description copied from interface:IReportItemCreates deep copy of the IReportItem and return the new element.- Specified by:
copyin interfaceIReportItem- Returns:
- the deep copied IReportItem
-
refreshPropertyDefinition
public boolean refreshPropertyDefinition()Description copied from interface:IReportItemJustifies whether the property list of the extended element is changed.- Specified by:
refreshPropertyDefinitionin interfaceIReportItem- Returns:
- true if the property list of the extended element is changed, otherwise false
-
getMethods
Description copied from interface:IReportItemReturns the method definition list of extension elements. Each object in the list is instance ofIElementPropertyDefn.- Specified by:
getMethodsin interfaceIReportItem- Returns:
- the method definition list.
-
getScriptPropertyDefinition
Description copied from interface:IReportItemGets the script property definition of this report item.- Specified by:
getScriptPropertyDefinitionin interfaceIReportItem- Returns:
- the script property definition of this report item
-
getSimpleElement
Description copied from interface:IReportItemReturns the interface for script operations. If the extension element want to provide multi row data function, need to extend simpleapi.IMultiRowItem and extension.MultiRowItem; If not, need to extend simpleapi.IReportItem and extension.SimpleRowItem.- Specified by:
getSimpleElementin interfaceIReportItem- Returns:
- the simple interface
-
getPredefinedStyles
Description copied from interface:IReportItemGets list of the predefined styles. Each one in the list can be one of the following instance:StringIStyleDeclaration- Specified by:
getPredefinedStylesin interfaceIReportItem- Returns:
-
getMethods
Description copied from interface:IReportItemReturns the method info list of extension elements. Each object in the list is instance ofIMethodInfo.- Specified by:
getMethodsin interfaceIReportItem- Parameters:
methodName- the method name- Returns:
- the method definition list.
-
checkCompatibility
Description copied from interface:ICompatibleReportItemChecks the parser compatibilities for this report item and return the status.- Specified by:
checkCompatibilityin interfaceICompatibleReportItem- Returns:
- the compatibility status.
-
getRowExpressions
Description copied from interface:ICompatibleReportItemReturns a list containing the possible JavaScript expressions. During parsing the design file, this method is automatically called to add bound data columns so that the design file before BIRT 2.1.0 can be compatible with BIRT 2.1.0 or later.- Specified by:
getRowExpressionsin interfaceICompatibleReportItem- Returns:
- a list containing the possible expressions.
-
updateRowExpressions
Description copied from interface:ICompatibleReportItemUpdates existed expression with the given expressions. The keys innewExpressionsare existed expressions, while, the values are the new expressions to replace existed ones.- Specified by:
updateRowExpressionsin interfaceICompatibleReportItem- Parameters:
newExpressions- a map containing the updated expressions.
-
setHandle
Description copied from interface:IReportItemSets the handle of this report item.- Specified by:
setHandlein interfaceIReportItem- Parameters:
handle- extended item handle
-
canExport
public boolean canExport()Description copied from interface:IReportItemIndicates whether the report item can be allowed to export to library.- Specified by:
canExportin interfaceIReportItem- Returns:
trueif the report item can be allowed to export to library;falseotherwise.
-
availableBindings
Description copied from interface:IReportItemGets the iterator of all available bindings.- Specified by:
availableBindingsin interfaceIReportItem- Returns:
- the iterator
-
getReferencedStyle
- Specified by:
getReferencedStylein interfaceIReportItem
-
updateStyleReference
- Specified by:
updateStyleReferencein interfaceIReportItem
-
handleCompatibilityIssue
public void handleCompatibilityIssue()Description copied from interface:ICompatibleReportItemhandle the compatibility issue- Specified by:
handleCompatibilityIssuein interfaceICompatibleReportItem
-
hasFixedSize
public boolean hasFixedSize()Description copied from interface:IReportItemIndicates whether the report item has fixed size.- Specified by:
hasFixedSizein interfaceIReportItem- Returns:
-