01: package org.andromda.core.common;
02:
03: import java.util.Collection;
04: import java.util.List;
05:
06: import org.andromda.core.namespace.NamespaceComponent;
07: import org.andromda.core.templateengine.TemplateEngine;
08:
09: /**
10: * Interface between an AndroMDA code generator plugin and the core. All plug-ins (such as cartridges and
11: * translation-libraries) that can be discovered and used by the framework must implement this interface.
12: *
13: * @author <a href="http://www.mbohlen.de">Matthias Bohlen </a>
14: * @author Chad Brandon
15: */
16: public interface Plugin extends NamespaceComponent {
17: /**
18: * Initializes the plugin.
19: */
20: public void initialize() throws Exception;
21:
22: /**
23: * Shuts down the plugin. The meaning of this is defined by the plugin itself. At least, it should close any
24: * logfiles.
25: */
26: public void shutdown();
27:
28: /**
29: * Returns all the TemplateObject objects that are available to this Plugin.
30: *
31: * @return a collection of TemplateObjects.
32: */
33: public Collection getTemplateObjects();
34:
35: /**
36: * Gets the TemplateEngine which implements the template processing.
37: *
38: * @return TemplateEngine
39: * @see org.andromda.core.templateengine.TemplateEngine
40: */
41: public TemplateEngine getTemplateEngine();
42:
43: /**
44: * Gets all property references available for this cartridge. This is
45: * an array of names corresponding to property references.
46: *
47: * @return the Map of property references.
48: */
49: public String[] getPropertyReferences();
50:
51: /**
52: * Returns a list containing the name of each resource contained within the plugin.
53: */
54: public List getContents();
55: }
|