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