Report Item extension point allows the user to specify how the new report item should be represented and persisted in the ROM
(no description available)
Element definition
Internal unique name of the element
Predefined style to be used for the Report Item.
Field to indicate if the ReportItem instance name is required.
Name of the java class, that implements the IReportItemFactory interface.
Resource key for display name
Represent the parent element definition extending from. It can be one of the report elements defined in ROM, or group element defined in ROM, or other extensions from this point. By default, it is 'ExtendedItem'.
Marks extended item can have style or not. if value is true, extended item can have style; else not.
(no description available)
(no description available)
Internal unique name of the property extension element
Resource key for the display name
Property data type, such as integer or string. Generally, if property is of simple type(string, number, integer, dimension, color, boolean, expression, html, uri, dateTime, xml, name, float, literalString, resourceKey), then it is useless to set "subType" and "detailType" for the property; If type is "choice", then either define customized choices or set "detailType" to name of the preferred choice set in rom.def; If type is "list", the "subType" is required to determine the item type in the list value and by default its value is "string"; If type is "structure", "detailType" is required to refer a structure definition name in rom.def and set "isList" to true if value is not single; If type is "elementRef", "detailType" is required to refer an element definition name in rom.def or an extension name of any report item extension; If type is "element", then set "isList" to true if the property value list is not single.
choice:
list:
structure, elementRef and element
Detail data type, such as boolean or string. When the "type" is "choice", extension can define "detailType" to refer a choice set in original meta-data of Model; When "type" is "structure", extension must define "detailType" to refer a structure in original meta-data of Model.
When the "type" is "list", the "subType" is required and must be defined as one of the restriction choices. By default it is "string".
Flag indicating whether the property extension element can inherit
properties from another element
Default value of the property extension element in the BIRT Report
Designer UI
The flag indicating whether this property is encrypted.
The default display name, which is used if no localized display name is found with I18N.
When "type" is "structure", you will define "isList" to indicate whether property value is a single structure or a structure list.
Indicates whether the XML property should be treated as the extension model. Only works if the property type is XML. The default value is true.
true indicates the property can be set as the expression. Each expression contains the value and the type. Otherwise false. The default value is false.
(no description available)
Resource key for the display name
Internal unique name of the property group
The default display name, which is used if no localized display name is found with I18N.
(no description available)
Internal unique name of the method
Resource key for the display name
Resource key for tool-tip of this method
Data type of the method return value
Field indicating whether this method is static or not
Execution context of this method
(no description available)
Internal unique name of this argument
Data type of this argument, such as string or integer
Resource key for tag of this argument
(no description available)
Internal unique name of the choice
Value for this choice
Resource key for the display name
The default display name, which is used if no localized display name is found with I18N.
To set the visible level of this property when it is shown in the property sheet.
Internal name of the property that is set the visibility.
Two options are: hide, readonly. Support to set multiple options to one property separated by ','. For example, visibility="readonly,hide".
Extension element default style -- selector.
Resource key for the display name
Define all the allowed element types in this slot.
Name of the element which is allowed in the slot. The name must be consistent with those defined in 'rom.def' or some other reportItem extensions.
override allowed units.
Internal name of the property that is overridden by extension.
restricts to a sub set of choices from that defined on parent property definition. Uses ',' as seperator. For example: if only allowed 'none' and 'auto' as allowed choices, can set it as 'none, auto'.
units choices that use ',' as seperator. For example: if only allowed 'in' and 'cm' as allowed units, can set it as 'in,cm'.
If true, the property search algorithm is controlled by the extension element self by implementing ReportItem.getProperty(). In such case, ReportItem.getProperty() returns the final effective value. The factory property value won't call ReportItem.getProperty() directly/indirectly since it may be called in ReportItem.getProperty().
This attribute ONLY works for ROM defined style properties. The default value is false.
JavaDoc for the method in CDATA format.
1.0
The following is an example of the Report Item extension.
<p>
<pre>
<extension point="org.eclipse.birt.report.engine.reportitemPresentation">
<reportItem
class="org.eclipse.test.ReportItemFactoryImpl"
isNameRequired="true"
extensionName="TestingMatrix"
displayNameID="Element.TestingMatrix">
<property
defaultValue="default test&"<"
type="string"
displayNameID="Element.TestingMatrix.test1"
name="test1"/>
<property type="integer"
displayNameID="Element.TestingMatrix.test2"
canInherit="false"
name="test2"/>
<property
displayNameID="Element.TestingMatrix.test3"
name="test3"
type="xml"/>
<property type="choice"
displayNameID="Element.TestingMatrix.test5"
canInherit="false"
name="test5">
<choice value="one"
displayNameID="Choices.test5.choice1"
name="choice1"/>
<choice value="two"
displayNameID="Choices.test5.choice2"
name="choice2"/>
<choice value="three"
displayNameID="Choices.test5.choice3"
name="choice3"/>
</property>
<propertyGroup name="group1"
displayNameID="Element.TestingMatrix.group1">
<property type="string"
displayNameID="Element.TestingMatrix.test6"
name="test6"/>
<property type="integer"
displayNameID="Element.TestingMatrix.test7"
name="test7"/>
</propertyGroup>
<propertyVisibility name="bookmark" propertyVisibility="hide"/>
<propertyVisibility name="InvalidProperty" propertyVisibility="hide"/>
<propertyVisibility name="dataSet" propertyVisibility="readonly"/>
<propertyVisibility name="test3" propertyVisibility="hide"/>
</reportItem>
</extension>
</pre>
</p>
If the extended Report Item stores properties in its own model; i.e its own way of storing data then it must satisfy the following requirements<br>
- serialize/deserialize as part of the report design file<br>
- support undo/redo<br>
- support generic property sheet<br>
<br>
In order to acheive this, the report item extension must implement some of the interfaces defined in the <i>org.eclipse.birt.report.model.api.extension</i> package. See the package's JavaDoc documentation and API interfaces for more information.<br>
<br>
The classes/interfaces to be extend/implement are:<br>
- ReportItem ( required )<br>
- ReportItemFactory ( required )<br>
- ElementCommand ( optional, extend this class to suport undo/redo operation ). Extend ElementCommand class and integrate with the command stack in the IReportItem::setProperty() method implementation<br>
- IPropertyDefinition, IChoiceDefinition ( optional, implement this class to integrate with the generic property sheet in the designer )<br>
- IMessages ( optional, implement this class to support externalized strings )<br>
The plugin org.eclipse.birt.chart.reportitem, supplied with the BIRT installation, provides a good example for implementing an report item extension.
Copyright (c) 2005 Actuate Corporation. All rights reserved. This program and
the accompanying materials are made available under the terms of the Eclipse
Public License v1.0 which accompanies this distribution, and is available at
http://www.eclipse.org/legal/epl-v10.html
Contributors: Actuate Corporation - initial API and implementation