001// license-header java merge-point
002//
003// Attention: generated code (by Metafacade.vsl) - do not modify!
004//
005package org.andromda.metafacades.uml;
006
007import java.util.Collection;
008import org.andromda.core.metafacade.ModelValidationMessage;
009
010/**
011 * Represents a UML template parameter. Exposes a parameterable element as a formal template
012 * parameter of a template. Only UML2 TemplateParameter inherits from ModelElement, so the UML14
013 * implementation cannot extend ModelElement. UML14 TemplateParameter.parameter inherits from
014 * Parameter.
015 *
016 * Metafacade interface to be used by AndroMDA cartridges.
017 */
018public interface TemplateParameterFacade
019{
020    /**
021     * Indicates the metafacade type (used for metafacade mappings).
022     *
023     * @return boolean always <code>true</code>
024     */
025    public boolean isTemplateParameterFacadeMetaType();
026
027    /**
028     * Provides any required initialization of the metafacade.
029     */
030    void initialize();
031
032    /**
033     * Gets the metafacade that acts as the <code>owner</code> of this metafacade.
034     * (for example: an operation is an owner of its parameters, etc). This is used
035     * by AndroMDA's validation framework to provide more context as to where the
036     * error has occurred.
037     * @return Object the Validation Owner
038     */
039    public Object getValidationOwner();
040
041    /**
042     * Gets the name of the metafacade used within validation messages.  This provides
043     * the full name of the metafacade.
044     * @return String the Validation Name
045     */
046    public String getValidationName();
047
048    /**
049     * Performs validation of any invariants found on this model element
050     * and stores the messages within the <code>validationMessages</code>
051     * collection.
052     *
053     * @param validationMessages the collection of messages to which additional
054     *        validation messages will be added if invariants are broken.
055     */
056    void validateInvariants(Collection<ModelValidationMessage> validationMessages);
057
058    /**
059     * UML2 only: Returns the list of classifiers (Classes) which constrain the parameter type.
060     * Results in <? extends ConstrainingClassifier> declaration.
061     * @return Collection<ClassifierFacade>
062     */
063    public Collection<ClassifierFacade> getConstrainingClassifiers();
064
065    /**
066     * Return the default element for the template parameter
067     * @return ModelElementFacade
068     */
069    public ModelElementFacade getDefaultElement();
070
071    /**
072     * Gets the documentation for the model element, The indent argument is prefixed to each line.
073     * By default this method wraps lines after 64 characters.
074     * This method is equivalent to <code>getDocumentation(indent, 64)</code>.
075     * @param indent String
076     * @return String
077     */
078    public String getDocumentation(String indent);
079
080    /**
081     * This method returns the documentation for this model element, with the lines wrapped after
082     * the specified number of characters, values of less than 1 will indicate no line wrapping is
083     * required. By default paragraphs are returned as HTML.
084     * This method is equivalent to <code>getDocumentation(indent, lineLength, true)</code>.
085     * @param indent String
086     * @param lineLength int
087     * @return String
088     */
089    public String getDocumentation(String indent, int lineLength);
090
091    /**
092     * TODO: Model Documentation for
093     * org.andromda.metafacades.uml.TemplateParameterFacade.getDocumentation
094     * @param indent String
095     * @param lineLength int
096     * @param htmlStyle boolean
097     * @return String
098     */
099    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}