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 * Captures a view of a physical system. It is an abstraction of the physical system, with a certain
12 * purpose. This purpose determines what is to be included in the model and what is irrelevant. Thus
13 * the model completely describes those aspects of the physical system that are relevant to the
14 * purpose of the model, at the appropriate level of detail. May be a UML2 model or package.
15 *
16 * Metafacade interface to be used by AndroMDA cartridges.
17 */
18 public interface ModelFacade
19 {
20 /**
21 * Indicates the metafacade type (used for metafacade mappings).
22 *
23 * @return boolean always <code>true</code>
24 */
25 public boolean isModelFacadeMetaType();
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 * Finds the ActivityGraph with the Name.
60 * @param name String
61 * @return ActivityGraphFacade
62 */
63 public ActivityGraphFacade findActivityGraphByName(String name);
64
65 /**
66 * Finds the ActivityGraph with the Name and Stereotype.
67 * @param name String
68 * @param stereotypeName String
69 * @return ActivityGraphFacade
70 */
71 public ActivityGraphFacade findActivityGraphByNameAndStereotype(String name, String stereotypeName);
72
73 /**
74 * Return the Class belonging to this model with the tagged value or hyperlink.
75 * @param tag String
76 * @param value String
77 * @return ClassifierFacade
78 */
79 public ClassifierFacade findClassWithTaggedValueOrHyperlink(String tag, String value);
80
81 /**
82 * Finds the FinalState with the Name or Hyperlink.
83 * @param useCase UseCaseFacade
84 * @return Collection<FinalStateFacade>
85 */
86 public Collection<FinalStateFacade> findFinalStatesWithNameOrHyperlink(UseCaseFacade useCase);
87
88 /**
89 * Finds the UseCase with the Name.
90 * @param name String
91 * @return UseCaseFacade
92 */
93 public UseCaseFacade findUseCaseByName(String name);
94
95 /**
96 * Finds the UseGraph with the Name and Stereotype.
97 * @param name String
98 * @param stereotypeName String
99 * @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 }