|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.birt.report.model.api.extension.ReportItem
public class ReportItem
Extension adapter class for the IReportItem. By default, the report item will have no model. Therefore, it has no model properties and all the related method will do nothing or return null.
Constructor Summary | |
---|---|
ReportItem()
|
Method Summary | |
---|---|
boolean |
canExport()
Indicates whether the report item can be allowed to export to library. |
CompatibilityStatus |
checkCompatibility()
Checks the parser compatibilities for this report item and return the status. |
void |
checkProperty(java.lang.String propName,
java.lang.Object value)
Checks the value of a property prior to setting it. |
IReportItem |
copy()
Creates deep copy of the IReportItem and return the new element. |
void |
deserialize(java.lang.String propName,
java.io.ByteArrayInputStream data)
Deserializes the model. |
IPropertyDefinition[] |
getMethods()
Returns the method definition list of extension elements. |
IMethodInfo[] |
getMethods(java.lang.String methodName)
Returns the method info list of extension elements. |
java.util.List |
getPredefinedStyles()
Gets list of the predefined styles. |
java.lang.Object |
getProperty(java.lang.String propName)
Returns the value of a public property. |
IPropertyDefinition[] |
getPropertyDefinitions()
Gets the list of all the property definitions that the extended element model has. |
java.util.List |
getRowExpressions()
Returns a list containing the possible JavaScript expressions. |
IPropertyDefinition |
getScriptPropertyDefinition()
Gets the script property definition of this report item. |
IReportItem |
getSimpleElement()
Returns the interface for script operations. |
boolean |
refreshPropertyDefinition()
Justifies whether the property list of the extended element is changed. |
java.io.ByteArrayOutputStream |
serialize(java.lang.String propName)
Serializes the model given the property name. |
void |
setHandle(ExtendedItemHandle handle)
Sets the handle of this report item. |
void |
setProperty(java.lang.String propName,
java.lang.Object value)
Sets the value of a property. |
void |
updateRowExpressions(java.util.Map newExpressions)
Updates existed expression with the given expressions. |
java.util.List |
validate()
Performs a semantic check on the report item. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ReportItem()
Method Detail |
---|
public java.io.ByteArrayOutputStream serialize(java.lang.String propName)
IReportItem
XMLPropertyType
. 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.
serialize
in interface IReportItem
propName
- the model property name to serialize
public void deserialize(java.lang.String propName, java.io.ByteArrayInputStream data) throws ExtendedElementException
IReportItem
XMLPropertyType
. The data
provided will be that created by the serialize
method. 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.
deserialize
in interface IReportItem
propName
- the model property name to deserializedata
- a byte array stream containing the serialized data
ExtendedElementException
- if the serialized model is invalidpublic IPropertyDefinition[] getPropertyDefinitions()
IReportItem
getPropertyDefinitions
in interface IReportItem
public java.lang.Object getProperty(java.lang.String propName)
IReportItem
IReportItemFactory
class 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 null
means 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.
getProperty
in interface IReportItem
propName
- the name of the property to get
public void checkProperty(java.lang.String propName, java.lang.Object value) throws ExtendedElementException
IReportItem
setProperty
method for details on the process for setting a property value.
checkProperty
in interface IReportItem
propName
- the name of the property to checkvalue
- the new property value as one of the supported BIRT types
ExtendedElementException
- if the property value is invalid or the property name is
invalidIReportItem.getProperty(java.lang.String)
public void setProperty(java.lang.String propName, java.lang.Object value)
IReportItem
checkProperty
method, 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.
setProperty
in interface IReportItem
propName
- the name of the property to setvalue
- the new property value as one of the supported BIRT typesIReportItem.getProperty(java.lang.String)
,
IReportItem.checkProperty(java.lang.String, java.lang.Object)
public java.util.List validate()
IReportItem
validate
in interface IReportItem
public IReportItem copy()
IReportItem
copy
in interface IReportItem
public boolean refreshPropertyDefinition()
IReportItem
refreshPropertyDefinition
in interface IReportItem
public IPropertyDefinition[] getMethods()
IReportItem
IElementPropertyDefn
.
getMethods
in interface IReportItem
public IPropertyDefinition getScriptPropertyDefinition()
IReportItem
getScriptPropertyDefinition
in interface IReportItem
public IReportItem getSimpleElement()
IReportItem
getSimpleElement
in interface IReportItem
public java.util.List getPredefinedStyles()
IReportItem
String
IStyleDeclaration
getPredefinedStyles
in interface IReportItem
public IMethodInfo[] getMethods(java.lang.String methodName)
IReportItem
IMethodInfo
.
getMethods
in interface IReportItem
methodName
- the method name
public CompatibilityStatus checkCompatibility()
ICompatibleReportItem
checkCompatibility
in interface ICompatibleReportItem
public java.util.List getRowExpressions()
ICompatibleReportItem
getRowExpressions
in interface ICompatibleReportItem
public void updateRowExpressions(java.util.Map newExpressions)
ICompatibleReportItem
newExpressions
are existed expressions, while, the values
are the new expressions to replace existed ones.
updateRowExpressions
in interface ICompatibleReportItem
newExpressions
- a map containing the updated expressions.public void setHandle(ExtendedItemHandle handle)
IReportItem
setHandle
in interface IReportItem
handle
- extended item handlepublic boolean canExport()
IReportItem
canExport
in interface IReportItem
true
if the report item can be allowed to export to
library; false
otherwise.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |