1 package org.andromda.core.common;
2
3 import java.util.Collection;
4
5 /***
6 * An interface for objects responsible for providing the code generation engine and the
7 * code generation scripts with a basic level of visibility into the object model.
8 *
9 * <p> This interface is the minimal set of API that must be supported by an object model
10 * in order for it to be usable by ANDROMDA. If an object model can support this API it
11 * can then be used by AndroMDA. </p>
12 *
13 * @see org.andromda.core.common.RepositoryFacade
14 *
15 * @author <A HREF="http://www.amowers.com">Anthony Mowers</A>
16 */
17 public interface ScriptHelper
18 {
19
20 /***
21 * sets the model
22 *
23 * @param model top level object in object model
24 */
25 public void setModel(Object model);
26
27 /***
28 * returns the top level object of the object model
29 */
30 public Object getModel();
31
32 /***
33 * sets rules for how to map model types to JDBC and SQL types
34 *
35 * @param mappings database type mapper object
36 */
37 public void setTypeMappings(DbMappingTable mappings);
38
39 /***
40 * returns the collection of stereotypes names associated with the
41 * given model element.
42 *
43 *@param modelElement an object from the model
44 *@return Collection of strings representing stereotype names
45 */
46 public Collection getStereotypeNames(Object modelElement);
47
48 /***
49 * returns a human readable name for given model element.
50 *
51 *@param modelElement an object from the model
52 *@return String representing the objects name
53 */
54 public String getName(Object modelElement);
55
56 /***
57 * returns a human readable name for the package in the model
58 * that contains the given model element.
59 *
60 *@param modelElement an object from the model
61 *@return String representing the objects package name
62 */
63 public String getPackageName(Object modelElement);
64
65 /***
66 * returns the collection of model elements that are contained
67 * in the model
68 *
69 *@return Collection of model elements
70 */
71 public Collection getModelElements();
72
73 }