1 package org.andromda.core.common;
2
3 import java.util.Collection;
4 import java.util.List;
5
6 import org.andromda.core.namespace.NamespaceComponent;
7 import org.andromda.core.templateengine.TemplateEngine;
8
9
10 /***
11 * Interface between an AndroMDA code generator plugin and the core. All plug-ins (such as cartridges and
12 * translation-libraries) that can be discovered and used by the framework must implement this interface.
13 *
14 * @author <a href="http://www.mbohlen.de">Matthias Bohlen </a>
15 * @author Chad Brandon
16 */
17 public interface Plugin
18 extends NamespaceComponent
19 {
20 /***
21 * Initializes the plugin.
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 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 */
58 public List getContents();
59 }