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 * Captures a view of a physical system. It is an abstraction of the physical system, with a certain
012 * purpose. This purpose determines what is to be included in the model and what is irrelevant. Thus
013 * the model completely describes those aspects of the physical system that are relevant to the
014 * purpose of the model, at the appropriate level of detail. May be a UML2 model or package.
015 *
016 * Metafacade interface to be used by AndroMDA cartridges.
017 */
018public interface ModelFacade
019{
020    /**
021     * Indicates the metafacade type (used for metafacade mappings).
022     *
023     * @return boolean always <code>true</code>
024     */
025    public boolean isModelFacadeMetaType();
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     * Finds the ActivityGraph with the Name.
060     * @param name String
061     * @return ActivityGraphFacade
062     */
063    public ActivityGraphFacade findActivityGraphByName(String name);
064
065    /**
066     * Finds the ActivityGraph with the Name and Stereotype.
067     * @param name String
068     * @param stereotypeName String
069     * @return ActivityGraphFacade
070     */
071    public ActivityGraphFacade findActivityGraphByNameAndStereotype(String name, String stereotypeName);
072
073    /**
074     * Return the Class belonging to this model with the tagged value or hyperlink.
075     * @param tag String
076     * @param value String
077     * @return ClassifierFacade
078     */
079    public ClassifierFacade findClassWithTaggedValueOrHyperlink(String tag, String value);
080
081    /**
082     * Finds the FinalState with the Name or Hyperlink.
083     * @param useCase UseCaseFacade
084     * @return Collection<FinalStateFacade>
085     */
086    public Collection<FinalStateFacade> findFinalStatesWithNameOrHyperlink(UseCaseFacade useCase);
087
088    /**
089     * Finds the UseCase with the Name.
090     * @param name String
091     * @return UseCaseFacade
092     */
093    public UseCaseFacade findUseCaseByName(String name);
094
095    /**
096     * Finds the UseGraph with the Name and Stereotype.
097     * @param name String
098     * @param stereotypeName String
099     * @return UseCaseFacade
100     */
101    public UseCaseFacade findUseCaseWithNameAndStereotype(String name, String stereotypeName);
102
103    /**
104     * Return the UseCase belonging to this model with the tagged value or hyperlink.
105     * @param tag String
106     * @param value String
107     * @return UseCaseFacade
108     */
109    public UseCaseFacade findUseCaseWithTaggedValueOrHyperlink(String tag, String value);
110
111    /**
112     * Return all ActionStates belonging to this model.
113     * @return Collection<ActionStateFacade>
114     */
115    public Collection<ActionStateFacade> getAllActionStates();
116
117    /**
118     * Finds all ActionStates with the Stereotype.
119     * @param activityGraph ActivityGraphFacade
120     * @param stereotypeName String
121     * @return Collection<ActionStateFacade>
122     */
123    public Collection<ActionStateFacade> getAllActionStatesWithStereotype(ActivityGraphFacade activityGraph, String stereotypeName);
124
125    /**
126     * Return all Actors belonging to this model.
127     * @return Collection<ActorFacade>
128     */
129    public Collection<ActorFacade> getAllActors();
130
131    /**
132     * Return all Classes and Datatypes belonging to this model.
133     * @return Collection<ClassifierFacade>
134     */
135    public Collection<ClassifierFacade> getAllClasses();
136
137    /**
138     * All object flow states in this model.
139     * @return Collection<ObjectFlowStateFacade>
140     */
141    public Collection<ObjectFlowStateFacade> getAllObjectFlowStates();
142
143    /**
144     * All transitions present in the activity graphs contained by this model.
145     * @return Collection<TransitionFacade>
146     */
147    public Collection<TransitionFacade> getAllTransitions();
148
149    /**
150     * Return all UseCases belonging to this model.
151     * @return Collection<UseCaseFacade>
152     */
153    public Collection<UseCaseFacade> getAllUseCases();
154
155    /**
156     * Return the root package belonging to this model. In UML2, the top level element may be either
157     * a package or a model.
158     * @return PackageFacade
159     */
160    public PackageFacade getRootPackage();
161}