public interface Extension extends Serializable
Extension objects holds extension data as a DOM element.
This data can be used by the extension point to extract contribution objects by using
XMap
XML mapping engine.
Modifier and Type | Method and Description |
---|---|
void |
dispose()
Disposes this extension.
|
ComponentInstance |
getComponent()
Gets the component instance owning this extension.
|
RuntimeContext |
getContext()
Gets the context of the component who contributed this extension.
|
Object[] |
getContributions()
Gets the extension contribution objects.
|
String |
getDocumentation()
Gets any comment on this extension.
|
Element |
getElement()
Gets the DOM element held by this extension.
|
String |
getExtensionPoint()
Gets the extension point name where this extension should be contributed.
|
String |
getId()
Identifies the extension inside the contributing component.
|
ComponentName |
getTargetComponent()
Gets the component name where this extension should be contributed.
|
void |
setComponent(ComponentInstance component)
Sets the component owning this extension.
|
void |
setContributions(Object[] contributions)
Sets the contribution objects.
|
void |
setElement(Element element)
Sets the DOM element that defines this extension.
|
String |
toXML()
Gets the XML representation for this extension.
|
ComponentName getTargetComponent()
String getExtensionPoint()
void dispose()
This will erase any data held by the extension.
Element getElement()
The DOM element correspond to the "extension" element in the component XML descriptor.
void setElement(Element element)
element
- the extension DOM elementObject[] getContributions()
These objects are generated by the extension point from the DOM element and then attached to the extension.
void setContributions(Object[] contributions)
This method is used by the extension point to attach the contribution objects to the extension.
contributions
- the contribution objectsvoid setComponent(ComponentInstance component)
component
- the component instance owning this extensionComponentInstance getComponent()
RuntimeContext getContext()
String getId()
The id is never null. If the user is not specifying an ID, one will be generated as follow: componentName#targetExtensionPoint.randomNumber
String getDocumentation()
Comments can be used to document extensions.
Comments should be short because they are stored in memory.
Copyright © 2016 Nuxeo SA. All rights reserved.