Nuxeo Enterprise Platform 5.4

org.nuxeo.runtime.model
Interface Extension

All Superinterfaces:
java.io.Serializable
All Known Implementing Classes:
ExtensionImpl

public interface Extension
extends java.io.Serializable

A component extension.

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.

Author:
Bogdan Stefanescu

Method Summary
 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.
 java.lang.Object[] getContributions()
          Gets the extension contribution objects.
 java.lang.String getDocumentation()
          Gets any comment on this extension.
 org.w3c.dom.Element getElement()
          Gets the DOM element held by this extension.
 java.lang.String getExtensionPoint()
          Gets the extension point name where this extension should be contributed.
 java.lang.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(java.lang.Object[] contributions)
          Sets the contribution objects.
 void setElement(org.w3c.dom.Element element)
          Sets the DOM element that defines this extension.
 java.lang.String toXML()
          Gets the XML representation for this extension.
 

Method Detail

getTargetComponent

ComponentName getTargetComponent()
Gets the component name where this extension should be contributed.

Returns:
the target component name

getExtensionPoint

java.lang.String getExtensionPoint()
Gets the extension point name where this extension should be contributed.

Returns:
the target extension point

dispose

void dispose()
Disposes this extension.

This will erase any data held by the extension.


getElement

org.w3c.dom.Element getElement()
Gets the DOM element held by this extension.

The DOM element correspond to the "extension" element in the component XML descriptor.

Returns:
the DOM element

setElement

void setElement(org.w3c.dom.Element element)
Sets the DOM element that defines this extension.

Parameters:
element - the extension DOM element

getContributions

java.lang.Object[] getContributions()
Gets the extension contribution objects.

These objects are generated by the extension point from the DOM element and then attached to the extension.

Returns:
the contribution objects or null if none

setContributions

void setContributions(java.lang.Object[] contributions)
Sets the contribution objects.

This method is used by the extension point to attach the contribution objects to the extension.

Parameters:
contributions - the contribution objects

setComponent

void setComponent(ComponentInstance component)
Sets the component owning this extension.

Parameters:
component - the component instance owning this extension

getComponent

ComponentInstance getComponent()
Gets the component instance owning this extension.

Returns:
the component instance owning this extension

getContext

RuntimeContext getContext()
Gets the context of the component who contributed this extension.

Returns:
the extension context

getId

java.lang.String getId()
Identifies the extension inside the contributing component. The id should be unique in the application. It is recommended to use the following name convention for the ID: 'component_name#contribution_name'.

The id is never null. If the user is not specifying an ID, one will be generated as follow: componentName#targetExtensionPoint.randomNumber


getDocumentation

java.lang.String getDocumentation()
Gets any comment on this extension.

Comments can be used to document extensions.

Comments should be short because they are stored in memory.


toXML

java.lang.String toXML()
Gets the XML representation for this extension.


Nuxeo Enterprise Platform 5.4

Copyright © 2010 Nuxeo SAS. All Rights Reserved.