public abstract class BasePlugin extends BaseNamespaceComponent implements Plugin
| Constructor and Description |
|---|
BasePlugin() |
| Modifier and Type | Method and Description |
|---|---|
void |
addMacrolibrary(String macrolibrary)
Adds a macro library to the TemplateEngine used by this BasePlugin.
|
void |
addPropertyReference(String reference)
Adds a property reference.
|
void |
addTemplateObject(TemplateObject templateObject)
Adds the
templateObject to the collection of template objects that will be made available to the
plugin during processing. |
List<String> |
getContents()
Returns a list containing the name of each resource contained within the plugin.
|
protected Logger |
getLogger()
Retrieves the logger instance that should be used for logging output for the plugin sub classes.
|
protected URL |
getMergeLocation()
Gets the current merge location for this plugin.
|
String[] |
getPropertyReferences()
Gets all property references available for this cartridge.
|
TemplateEngine |
getTemplateEngine()
Gets the TemplateEngine which implements the template processing.
|
Collection<TemplateObject> |
getTemplateObjects()
Returns all the TemplateObject objects that are available to this Plugin.
|
void |
initialize()
Initializes the plugin.
|
protected void |
populateTemplateContext(Map<String,Object> templateContext)
Populates the
templateContext with the properties and template objects defined in the
plugin's descriptor. |
void |
setTemplateEngineClass(String templateEngineClass)
Sets the template engine class for this cartridge.
|
void |
shutdown()
Shuts down the plugin.
|
String |
toString() |
getNamespace, getResource, setNamespace, setResourceclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetNamespace, getResource, setNamespace, setResourcepublic BasePlugin()
public void initialize() throws Exception
Plugininitialize in interface PluginExceptionPlugin.initialize()protected URL getMergeLocation()
public void shutdown()
Pluginshutdown in interface PluginPlugin.shutdown()public void addTemplateObject(TemplateObject templateObject)
templateObject to the collection of template objects that will be made available to the
plugin during processing.templateObject - the TemplateObject to add.public void addMacrolibrary(String macrolibrary)
macrolibrary - public Collection<TemplateObject> getTemplateObjects()
PlugingetTemplateObjects in interface PluginPlugin.getTemplateObjects()public void setTemplateEngineClass(String templateEngineClass)
templateEngineClass - the Class of the template engine implementation.public TemplateEngine getTemplateEngine()
PlugingetTemplateEngine in interface PluginPlugin.getTemplateEngine()public String[] getPropertyReferences()
PlugingetPropertyReferences in interface PluginPlugin.getPropertyReferences()public void addPropertyReference(String reference)
reference - the namespace of the reference.protected void populateTemplateContext(Map<String,Object> templateContext)
templateContext with the properties and template objects defined in the
plugin's descriptor. If the templateContext is null, a new Map instance will be created
before populating the context.templateContext - the context of the template to populate.public List<String> getContents()
PlugingetContents in interface PluginPlugin.getContents()protected Logger getLogger()
public String toString()
toString in class ObjectObject.toString()Copyright © 2003–2014 AndroMDA.org. All rights reserved.