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, setResource
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getNamespace, getResource, setNamespace, setResource
public BasePlugin()
public void initialize() throws Exception
Plugin
initialize
in interface Plugin
Exception
Plugin.initialize()
protected URL getMergeLocation()
public void shutdown()
Plugin
shutdown
in interface Plugin
Plugin.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()
Plugin
getTemplateObjects
in interface Plugin
Plugin.getTemplateObjects()
public void setTemplateEngineClass(String templateEngineClass)
templateEngineClass
- the Class of the template engine implementation.public TemplateEngine getTemplateEngine()
Plugin
getTemplateEngine
in interface Plugin
Plugin.getTemplateEngine()
public String[] getPropertyReferences()
Plugin
getPropertyReferences
in interface Plugin
Plugin.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()
Plugin
getContents
in interface Plugin
Plugin.getContents()
protected Logger getLogger()
public String toString()
toString
in class Object
Object.toString()
Copyright © 2003–2014 AndroMDA.org. All rights reserved.