View Javadoc
1   // license-header java merge-point
2   //
3   // Attention: generated code (by Metafacade.vsl) - do not modify!
4   //
5   package org.andromda.metafacades.uml;
6   
7   import java.util.Collection;
8   import org.andromda.core.metafacade.ModelValidationMessage;
9   
10  /**
11   * Represents a UML template parameter. Exposes a parameterable element as a formal template
12   * parameter of a template. Only UML2 TemplateParameter inherits from ModelElement, so the UML14
13   * implementation cannot extend ModelElement. UML14 TemplateParameter.parameter inherits from
14   * Parameter.
15   *
16   * Metafacade interface to be used by AndroMDA cartridges.
17   */
18  public interface TemplateParameterFacade
19  {
20      /**
21       * Indicates the metafacade type (used for metafacade mappings).
22       *
23       * @return boolean always <code>true</code>
24       */
25      public boolean isTemplateParameterFacadeMetaType();
26  
27      /**
28       * Provides any required initialization of the metafacade.
29       */
30      void initialize();
31  
32      /**
33       * Gets the metafacade that acts as the <code>owner</code> of this metafacade.
34       * (for example: an operation is an owner of its parameters, etc). This is used
35       * by AndroMDA's validation framework to provide more context as to where the
36       * error has occurred.
37       * @return Object the Validation Owner
38       */
39      public Object getValidationOwner();
40  
41      /**
42       * Gets the name of the metafacade used within validation messages.  This provides
43       * the full name of the metafacade.
44       * @return String the Validation Name
45       */
46      public String getValidationName();
47  
48      /**
49       * Performs validation of any invariants found on this model element
50       * and stores the messages within the <code>validationMessages</code>
51       * collection.
52       *
53       * @param validationMessages the collection of messages to which additional
54       *        validation messages will be added if invariants are broken.
55       */
56      void validateInvariants(Collection<ModelValidationMessage> validationMessages);
57  
58      /**
59       * UML2 only: Returns the list of classifiers (Classes) which constrain the parameter type.
60       * Results in <? extends ConstrainingClassifier> declaration.
61       * @return Collection<ClassifierFacade>
62       */
63      public Collection<ClassifierFacade> getConstrainingClassifiers();
64  
65      /**
66       * Return the default element for the template parameter
67       * @return ModelElementFacade
68       */
69      public ModelElementFacade getDefaultElement();
70  
71      /**
72       * Gets the documentation for the model element, The indent argument is prefixed to each line.
73       * By default this method wraps lines after 64 characters.
74       * This method is equivalent to <code>getDocumentation(indent, 64)</code>.
75       * @param indent String
76       * @return String
77       */
78      public String getDocumentation(String indent);
79  
80      /**
81       * This method returns the documentation for this model element, with the lines wrapped after
82       * the specified number of characters, values of less than 1 will indicate no line wrapping is
83       * required. By default paragraphs are returned as HTML.
84       * This method is equivalent to <code>getDocumentation(indent, lineLength, true)</code>.
85       * @param indent String
86       * @param lineLength int
87       * @return String
88       */
89      public String getDocumentation(String indent, int lineLength);
90  
91      /**
92       * TODO: Model Documentation for
93       * org.andromda.metafacades.uml.TemplateParameterFacade.getDocumentation
94       * @param indent String
95       * @param lineLength int
96       * @param htmlStyle boolean
97       * @return String
98       */
99      public String getDocumentation(String indent, int lineLength, boolean htmlStyle);
100 
101     /**
102      * Return the fully qualified name of the template parameter: package + class + parameter name
103      * @return String
104      */
105     public String getFullyQualifiedName();
106 
107     /**
108      * get + capitalized parameter name
109      * @return String
110      */
111     public String getGetterName();
112 
113     /**
114      * The type of the template parameter.
115      * @return String
116      */
117     public String getGetterSetterTypeName();
118 
119     /**
120      * TODO: Model Documentation for org.andromda.metafacades.uml.TemplateParameterFacade.name
121      * @return String
122      */
123     public String getName();
124 
125     /**
126      * The ModelElement that owns this parameter. For UML14, the classifier package. For UML2, the
127      * Classifier.
128      * @return ModelElementFacade
129      */
130     public ModelElementFacade getOwner();
131 
132     /**
133      * Returns the parameter value for the template parameter. In andromda, parameter and template
134      * parameter functionality are combined for simplicity.
135      * @return ModelElementFacade
136      */
137     public ModelElementFacade getParameter();
138 
139     /**
140      * set + capitalized parameter name
141      * @return String
142      */
143     public String getSetterName();
144 
145     /**
146      * TemplateParameter may be of type Classifier, PackageableElement,
147      * Operation or Property. Generally a Class parameter has a name and a type of Classifier.
148      * @return ClassifierFacade
149      */
150     public ClassifierFacade getType();
151 }