Package org.nuxeo.runtime.model.impl
Class ExtensionImpl
java.lang.Object
org.nuxeo.runtime.model.impl.ExtensionImpl
- All Implemented Interfaces:
Serializable,Extension
- Author:
- Bogdan Stefanescu
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddispose()Disposes this extension.static ExtensionImplfromXML(RuntimeContext context, String xml) Gets the component instance owning this extension.Gets the context of the component who contributed this extension.Object[]Gets the extension contribution objects.Gets any comment on this extension.Gets the DOM element held by this extension.Gets the extension point name where this extension should be contributed.getId()Identifies the extension inside the contributing component.Gets the component name where this extension should be contributed.voidsetComponent(ComponentInstance component) Sets the component owning this extension.voidsetContributions(Object[] contributions) Sets the contribution objects.voidsetElement(Element element) Sets the DOM element that defines this extension.toString()toXML()Gets the XML string for this extension.
-
Constructor Details
-
ExtensionImpl
public ExtensionImpl()
-
-
Method Details
-
dispose
public void dispose()Description copied from interface:ExtensionDisposes this extension.This will erase any data held by the extension.
-
getElement
Description copied from interface:ExtensionGets the DOM element held by this extension.The DOM element correspond to the "extension" element in the component XML descriptor.
- Specified by:
getElementin interfaceExtension- Returns:
- the DOM element
-
setElement
Description copied from interface:ExtensionSets the DOM element that defines this extension.- Specified by:
setElementin interfaceExtension- Parameters:
element- the extension DOM element
-
getExtensionPoint
Description copied from interface:ExtensionGets the extension point name where this extension should be contributed.- Specified by:
getExtensionPointin interfaceExtension- Returns:
- the target extension point
-
getTargetComponent
Description copied from interface:ExtensionGets the component name where this extension should be contributed.- Specified by:
getTargetComponentin interfaceExtension- Returns:
- the target component name
-
getContributions
Description copied from interface:ExtensionGets the extension contribution objects.These objects are generated by the extension point from the DOM element and then attached to the extension.
- Specified by:
getContributionsin interfaceExtension- Returns:
- the contribution objects or null if none
-
setContributions
Description copied from interface:ExtensionSets the contribution objects.This method is used by the extension point to attach the contribution objects to the extension.
- Specified by:
setContributionsin interfaceExtension- Parameters:
contributions- the contribution objects
-
setComponent
Description copied from interface:ExtensionSets the component owning this extension.- Specified by:
setComponentin interfaceExtension- Parameters:
component- the component instance owning this extension
-
getComponent
Description copied from interface:ExtensionGets the component instance owning this extension.- Specified by:
getComponentin interfaceExtension- Returns:
- the component instance owning this extension
-
getContext
Description copied from interface:ExtensionGets the context of the component who contributed this extension.- Specified by:
getContextin interfaceExtension- Returns:
- the extension context
-
getId
Description copied from interface:ExtensionIdentifies 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
Description copied from interface:ExtensionGets any comment on this extension.Comments can be used to document extensions.
Comments should be short because they are stored in memory.
- Specified by:
getDocumentationin interfaceExtension
-
toString
-
toXML
Gets the XML string for this extension. -
fromXML
- Throws:
IOException
-