public class ExtensionImpl extends Object implements Extension
| Constructor and Description |
|---|
ExtensionImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
dispose()
Disposes this extension.
|
static ExtensionImpl |
fromXML(RuntimeContext context,
String xml) |
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 |
toString() |
String |
toXML()
Gets the XML string for this extension.
|
public ExtensionImpl()
public void dispose()
ExtensionThis will erase any data held by the extension.
public Element getElement()
ExtensionThe DOM element correspond to the "extension" element in the component XML descriptor.
getElement in interface Extensionpublic void setElement(Element element)
ExtensionsetElement in interface Extensionelement - the extension DOM elementpublic String getExtensionPoint()
ExtensiongetExtensionPoint in interface Extensionpublic ComponentName getTargetComponent()
ExtensiongetTargetComponent in interface Extensionpublic Object[] getContributions()
ExtensionThese objects are generated by the extension point from the DOM element and then attached to the extension.
getContributions in interface Extensionpublic void setContributions(Object[] contributions)
ExtensionThis method is used by the extension point to attach the contribution objects to the extension.
setContributions in interface Extensioncontributions - the contribution objectspublic void setComponent(ComponentInstance component)
ExtensionsetComponent in interface Extensioncomponent - the component instance owning this extensionpublic ComponentInstance getComponent()
ExtensiongetComponent in interface Extensionpublic RuntimeContext getContext()
ExtensiongetContext in interface Extensionpublic String getId()
ExtensionThe id is never null. If the user is not specifying an ID, one will be generated as follow: componentName#targetExtensionPoint.randomNumber
public String getDocumentation()
ExtensionComments can be used to document extensions.
Comments should be short because they are stored in memory.
getDocumentation in interface Extensionpublic static ExtensionImpl fromXML(RuntimeContext context, String xml) throws IOException
IOExceptionCopyright © 2017 Nuxeo. All rights reserved.