Package org.eclipse.birt.report.model.api

# Class ExtendedItemHandle

java.lang.Object
org.eclipse.birt.report.model.api.DesignElementHandle
org.eclipse.birt.report.model.api.ReportElementHandle
org.eclipse.birt.report.model.api.ReportItemHandleImpl
org.eclipse.birt.report.model.api.ReportItemHandle
org.eclipse.birt.report.model.api.ExtendedItemHandle

All Implemented Interfaces:
  `IReportItemMethodContext`, `org.eclipse.birt.report.model.elements.interfaces.IDesignElementModel`, `org.eclipse.birt.report.model.elements.interfaces.IExtendedItemModel`, `org.eclipse.birt.report.model.elements.interfaces.IInternalReportItemModel`, `org.eclipse.birt.report.model.elements.interfaces.IStyledElementModel`

public class ExtendedItemHandle extends ReportItemHandle implements org.eclipse.birt.report.model.elements.interfaces.IExtendedItemModel, IReportItemMethodContext
Represents an extended element. An extended item represents a custom element added by the application. Extended items can use user-defined properties, can use scripts, or a combination of the two. Extended items often require user-defined properties.

An extended element has a plug-in property that is a name of a Java class that implements the behavior for the element.

See Also:
  - `ExtendedItem`

## Field Summary

### Fields inherited from class org.eclipse.birt.report.model.api.ReportItemHandleImpl

`DATABINDING_TYPE_DATA, DATABINDING_TYPE_NONE, DATABINDING_TYPE_REPORT_ITEM_REF`

### Fields inherited from class org.eclipse.birt.report.model.api.ReportElementHandle

`element`

### Fields inherited from class org.eclipse.birt.report.model.api.DesignElementHandle

`module`

### Fields inherited from interface org.eclipse.birt.report.model.elements.interfaces.IDesignElementModel

`COMMENTS_PROP, CUSTOM_XML_PROP, DISPLAY_NAME_ID_PROP, DISPLAY_NAME_PROP, EVENT_HANDLER_CLASS_PROP, EXTENDS_PROP, FULL_LABEL, ID_SUFFIX, NAME_PROP, NEW_HANDLER_ON_EACH_EVENT_PROP, NO_SLOT, PROPERTY_MASKS_PROP, REF_TEMPLATE_PARAMETER_PROP, SHORT_LABEL, USER_LABEL, USER_PROPERTIES_PROP, VIEW_ACTION_PROP`

### Fields inherited from interface org.eclipse.birt.report.model.elements.interfaces.IExtendedItemModel

`ALT_TEXT_KEY_PROP, ALT_TEXT_PROP, EXTENSION_NAME_PROP, EXTENSION_VERSION_PROP, FILTER_PROP`

### Fields inherited from interface org.eclipse.birt.report.model.elements.interfaces.IInternalReportItemModel

`ACL_EXPRESSION_PROP, ALLOW_EXPORT_PROP, ALTTEXT_KEY_PROP, ALTTEXT_PROP, BOOKMARK_DISPLAY_NAME_PROP, BOOKMARK_PROP, BOUND_DATA_COLUMNS_PROP, CASCADE_ACL_PROP, CUBE_PROP, DATA_BINDING_REF_PROP, DATA_SET_PROP, HEIGHT_PROP, LANGUAGE_PROP, MULTI_VIEWS_PROP, ON_CREATE_METHOD, ON_PAGE_BREAK_METHOD, ON_PREPARE_METHOD, ON_RENDER_METHOD, ORDER_PROP, PARAM_BINDINGS_PROP, PUSH_DOWN_PROP, TAG_TYPE_PROP, THEME_PROP, TOC_PROP, URL_PROP, VISIBILITY_PROP, WIDTH_PROP, X_PROP, Y_PROP, Z_INDEX_PROP`

### Fields inherited from interface org.eclipse.birt.report.model.api.elements.IReportItemMethodContext

`ON_CREATE_CONTEXT, ON_PREPARE_CONTEXT, ON_RENDER_CONTEXT`

### Fields inherited from interface org.eclipse.birt.report.model.elements.interfaces.IStyledElementModel

`STYLE_PROP`

## Constructor Summary

Constructors
Constructor
Description
`ExtendedItemHandle(org.eclipse.birt.report.model.core.Module module, org.eclipse.birt.report.model.core.DesignElement element)`
Constructs the handle with the report design and the element it holds.

## Method Summary

Modifier and Type
Method
Description
`Iterator`
`filtersIterator()`
Returns an iterator over filter.
`String`
`getAltText()`
Returns the alternate text of this extended item.
`String`
`getAltTextKey()`
Returns the resource key of the alternate text of this extended item.
`String`
`getExtensionName()`
Returns the extension name defined by the extended item.
`List`
`getExtensionPropertyDefinitionList()`
Returns the list of extension property definition.
`String`
`getExtensionVersion()`
Gets the extension version of this element.
`String`
`getExternalScript()`
Returns the external script defined in the extended element model.
`Map<String,List<IllegalContentInfo>>`
`getIllegalContents()`
Gets all the illegal contents.
`List`
`getMethods()`
Returns the methods defined on the extension element definition and the methods defined within the extension model property inside.
`List`
`getMethods(String context)`
Returns functions that can be called in the given method.
`IReportItem`
`getReportItem()`
Returns the interface `IReportItem` for extension.
`Map<String,UndefinedPropertyInfo>`
`getUndefinedProperties()`
Gets the map of all name/value pair.
`void`
`loadExtendedElement()`
Loads the instance of extended element.
`void`
`makeUniqueName(String namePrefix)`
Makes a unique name for this element with the given name prefix.
`void`
`setAltText(String altText)`
Sets the alt text of this extended item.
`void`
`setAltTextKey(String altTextKey)`
Sets the alt text id of this extended item.
`void`
`setExtensionVersion(String extensionVersion)`
Sets the extension version of this element.
`void`
`setExternalScript(String theScript)`
Sets the scripts in the extension element model.

### Methods inherited from class org.eclipse.birt.report.model.api.ReportItemHandleImpl

`addColumnBinding, addTOC, addTOC, addView, allowExport, canAddView, canCascadeACL, cascadeACL, columnBindingsIterator, dropView, findColumnBinding, getACLExpression, getAltTextExpression, getAvailableBindings, getAvailableCubeBindingReferenceList, getAvailableDataBindingReferenceList, getAvailableDataBindingReferenceList, getAvailableDataSetBindingReferenceList, getBookmark, getBookmarkDisplayName, getColumnBindings, getCube, getCurrentView, getDataBindingReference, getDataBindingReferenceName, getDataBindingType, getDataSet, getHeight, getLanguage, getNamedCubeBindingReferenceList, getNamedDataBindingReferenceList, getNamedDataSetBindingReferenceList, getOnCreate, getOnPageBreak, getOnPrepare, getOnRender, getOrder, getProperty, getTagType, getTheme, getTOC, getTocExpression, getURL, getViewHost, getViews, getWidth, getX, getY, getZIndex, paramBindingsIterator, pushDown, removedColumnBinding, removedColumnBindings, removedUnusedColumnBindings, setACLExpression, setAllowExport, setAltTextExpression, setBookmark, setBookmarkDisplayName, setCascadeACL, setCube, setCurrentView, setDataBindingReference, setDataSet, setHeight, setHeight, setLanguage, setOnCreate, setOnPageBreak, setOnPrepare, setOnRender, setOrder, setPushDown, setTagType, setTheme, setThemeName, setTocExpression, setURL, setWidth, setWidth, setX, setX, setY, setY, setZIndex, visibilityRulesIterator`

### Methods inherited from class org.eclipse.birt.report.model.api.ReportElementHandle

`getComments, getCustomXml, getDisplayName, getDisplayNameKey, getElement, getPropertyMask, isValidLayoutForCompoundElement, isValidReferenceForCompoundElement, propertyMaskIterator, setComments, setCustomXml, setDisplayName, setDisplayNameKey, setPropertyMask`

### Methods inherited from class org.eclipse.birt.report.model.api.DesignElementHandle

`add, add, addElement, addElement, addListener, addUserPropertyDefn, cachePropertyHandles, canContain, canContain, canContain, canContain, canDrop, canEdit, canTransformToTemplate, clearAllProperties, clearContents, clearProperty, clientsIterator, copy, copyPropertyTo, createTemplateElement, derivedIterator, doSort, drop, drop, drop, dropAndClear, dropAndClear, dropAndClear, dropUserPropertyDefn, findContentSlot, getBooleanProperty, getChoices, getColorProperty, getContainer, getContainerPropertyHandle, getContainerSlotHandle, getContent, getContentCount, getContents, getDefn, getDesign, getDesignHandle, getDimensionProperty, getDisplayLabel, getDisplayLabel, getDisplayProperty, getEffectiveModule, getElementFactory, getElementProperty, getEventHandlerClass, getExpressionProperty, getExtends, getExternalizedValue, getExternalizedValue, getExternalizedValue, getFactoryElementHandle, getFactoryPropertyHandle, getFloatProperty, getFontProperty, getFullName, getHostViewHandle, getID, getIndex, getIntProperty, getListProperty, getListProperty, getModule, getModuleHandle, getName, getNumberProperty, getPrivateStyle, getPropertyBinding, getPropertyBindingExpression, getPropertyBindings, getPropertyDefn, getPropertyHandle, getPropertyIterator, getQualifiedName, getRoot, getSemanticErrors, getSlot, getStringProperty, getStyle, getUserProperties, getUserPropertyDefnHandle, getXPath, hasLocalProperties, hasSemanticError, initializeSlotHandles, isDirectionRTL, isInTemplateParameter, isTemplateParameterValue, isValid, localize, move, move, moveTo, moveTo, moveTo, moveTo, newHandlerOnEachEvent, paste, paste, paste, paste, removeListener, revertToReportItem, revertToTemplate, semanticCheck, setBooleanProperty, setEncryption, setEventHandlerClass, setExpressionProperty, setExtends, setExtendsElement, setExtendsName, setFloatProperty, setIntProperty, setName, setNewHandlerOnEachEvent, setNumberProperty, setProperties, setProperty, setPropertyBinding, setPropertyBinding, setStringProperty, setStyle, setStyleElement, setStyleName, setValid, shift, showError, slotsIterator`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### ExtendedItemHandle

public ExtendedItemHandle(org.eclipse.birt.report.model.core.Module module, org.eclipse.birt.report.model.core.DesignElement element)
Constructs the handle with the report design and the element it holds. The application generally does not create handles directly. Instead, it uses one of the navigation methods available on other element handles.

Parameters:
  `module` - the module
  `element` - the model representation of the element

## Method Details

### getExtensionName

public String getExtensionName()
Returns the extension name defined by the extended item.

Returns:
  the extension name as a string

### loadExtendedElement

public void loadExtendedElement() throws ExtendedElementException
Loads the instance of extended element. When the application invokes UI for the extended element, such as listing property values in property sheet, set the value of the extension-defined properties and so other operations, the application must create an instance of the extension element first. The created extended element reads its information cached by the handle and de-serialize the extension model.

Throws:
  `ExtendedElementException` - if the serialized model is invalid

### getReportItem

public IReportItem getReportItem() throws ExtendedElementException
Returns the interface `IReportItem` for extension.

Returns:
  the interface `IReportItem` for extension
Throws:
  `ExtendedElementException` - if the serialized model is invalid

### getExtensionPropertyDefinitionList

public List getExtensionPropertyDefinitionList()
Returns the list of extension property definition. All these properties are just those defined in extension plugin.

Returns:
  the list of extension property definition.

### getMethods

public List getMethods()
Returns the methods defined on the extension element definition and the methods defined within the extension model property inside.

Overrides:
  `getMethods` in class `DesignElementHandle`
Returns:
  the list of methods

### filtersIterator

public Iterator filtersIterator()
Returns an iterator over filter. The iterator returns instances of `FilterConditionHandle` that represents filter condition object.

Returns:
  iterator over filters.
See Also:
  - `FilterCondition`

### getExternalScript

public String getExternalScript()
Returns the external script defined in the extended element model.

Returns:
  the script

### setExternalScript

public void setExternalScript(String theScript) throws SemanticException
Sets the scripts in the extension element model.

Parameters:
  `theScript` - the script to be set
Throws:
  `SemanticException` - if fail to set the scripts

### getAltText

public String getAltText()
Returns the alternate text of this extended item.

Returns:
  the alternate text of the extended item.

### getAltTextKey

public String getAltTextKey()
Returns the resource key of the alternate text of this extended item.

Overrides:
  `getAltTextKey` in class `ReportItemHandleImpl`
Returns:
  the resource key of the alternate text

### setAltText

public void setAltText(String altText) throws SemanticException
Sets the alt text of this extended item.

Parameters:
  `altText` - the alt text
Throws:
  `SemanticException` - if the property is locked.

### setAltTextKey

public void setAltTextKey(String altTextKey) throws SemanticException
Sets the alt text id of this extended item.

Overrides:
  `setAltTextKey` in class `ReportItemHandleImpl`
Parameters:
  `altTextKey` - the alt text id
Throws:
  `SemanticException` - if the property is locked.

### getMethods

public List getMethods(String context)
Returns functions that can be called in the given method.

Overrides:
  `getMethods` in class `ReportItemHandleImpl`
Parameters:
  `context` - the method name in string
Returns:
  a list containing `IMethodInfo` for functions

### getUndefinedProperties

public Map<String,UndefinedPropertyInfo> getUndefinedProperties()
Gets the map of all name/value pair. The property in the map is either set an invalid value or the definition is not found. Key is the name of the property and value is instance of `UndefinedPropertyInfo`.

Returns:
  map of invalid property value or undefined property

### getIllegalContents

public Map<String,List<IllegalContentInfo>> getIllegalContents()
Gets all the illegal contents. The key is the property name where the contents reside. The value is the list of item that are illegal to be inserted. Each item in the list is instance of `IllegalContentInfo`.

Returns:

### getExtensionVersion

public String getExtensionVersion()
Gets the extension version of this element.

Returns:
  extension version of this element

### setExtensionVersion

public void setExtensionVersion(String extensionVersion) throws SemanticException
Sets the extension version of this element.

Parameters:
  `extensionVersion` -
Throws:
  `SemanticException`

### makeUniqueName

public void makeUniqueName(String namePrefix) throws NameException
Makes a unique name for this element with the given name prefix.

Parameters:
  `namePrefix` - the name prefix
Throws:
  `NameException`