1
2
3
4
5 package org.andromda.metafacades.uml14;
6
7 import java.util.Collection;
8 import java.util.List;
9 import org.andromda.core.metafacade.MetafacadeBase;
10 import org.andromda.core.metafacade.ModelValidationMessage;
11 import org.andromda.metafacades.uml.FrontEndAction;
12 import org.andromda.metafacades.uml.FrontEndActivityGraph;
13 import org.andromda.metafacades.uml.FrontEndControllerOperation;
14 import org.andromda.metafacades.uml.FrontEndEvent;
15 import org.andromda.metafacades.uml.FrontEndForward;
16 import org.andromda.metafacades.uml.FrontEndParameter;
17 import org.andromda.metafacades.uml.FrontEndUseCase;
18 import org.apache.log4j.Logger;
19 import org.omg.uml.behavioralelements.statemachines.Transition;
20
21
22
23
24
25
26
27 public abstract class FrontEndForwardLogic
28 extends TransitionFacadeLogicImpl
29 implements FrontEndForward
30 {
31
32
33
34
35 protected Object metaObject;
36
37
38
39
40
41 protected FrontEndForwardLogic(Object metaObjectIn, String context)
42 {
43 super((Transition)metaObjectIn, getContext(context));
44 this.metaObject = metaObjectIn;
45 }
46
47
48
49
50 private static final Logger logger = Logger.getLogger(FrontEndForwardLogic.class);
51
52
53
54
55
56
57 private static String getContext(String context)
58 {
59 if (context == null)
60 {
61 context = "org.andromda.metafacades.uml.FrontEndForward";
62 }
63 return context;
64 }
65
66
67
68
69 @Override
70 public void resetMetafacadeContext(String context)
71 {
72 if (!this.contextRoot)
73 {
74 context = getContext(context);
75 setMetafacadeContext (context);
76 }
77 }
78
79
80
81
82
83 public boolean isFrontEndForwardMetaType()
84 {
85 return true;
86 }
87
88
89
90
91
92
93
94 protected abstract boolean handleIsContainedInFrontEndUseCase();
95
96 private boolean __containedInFrontEndUseCase1a;
97 private boolean __containedInFrontEndUseCase1aSet = false;
98
99
100
101
102
103 public final boolean isContainedInFrontEndUseCase()
104 {
105 boolean containedInFrontEndUseCase1a = this.__containedInFrontEndUseCase1a;
106 if (!this.__containedInFrontEndUseCase1aSet)
107 {
108
109 containedInFrontEndUseCase1a = handleIsContainedInFrontEndUseCase();
110
111 this.__containedInFrontEndUseCase1a = containedInFrontEndUseCase1a;
112 if (isMetafacadePropertyCachingEnabled())
113 {
114 this.__containedInFrontEndUseCase1aSet = true;
115 }
116 }
117 return containedInFrontEndUseCase1a;
118 }
119
120
121
122
123
124 protected abstract String handleGetActionMethodName();
125
126 private String __actionMethodName2a;
127 private boolean __actionMethodName2aSet = false;
128
129
130
131
132
133 public final String getActionMethodName()
134 {
135 String actionMethodName2a = this.__actionMethodName2a;
136 if (!this.__actionMethodName2aSet)
137 {
138
139 actionMethodName2a = handleGetActionMethodName();
140
141 this.__actionMethodName2a = actionMethodName2a;
142 if (isMetafacadePropertyCachingEnabled())
143 {
144 this.__actionMethodName2aSet = true;
145 }
146 }
147 return actionMethodName2a;
148 }
149
150
151
152
153
154 protected abstract boolean handleIsEnteringView();
155
156 private boolean __enteringView3a;
157 private boolean __enteringView3aSet = false;
158
159
160
161
162
163 public final boolean isEnteringView()
164 {
165 boolean enteringView3a = this.__enteringView3a;
166 if (!this.__enteringView3aSet)
167 {
168
169 enteringView3a = handleIsEnteringView();
170
171 this.__enteringView3a = enteringView3a;
172 if (isMetafacadePropertyCachingEnabled())
173 {
174 this.__enteringView3aSet = true;
175 }
176 }
177 return enteringView3a;
178 }
179
180
181
182
183
184 protected abstract boolean handleIsExitingView();
185
186 private boolean __exitingView4a;
187 private boolean __exitingView4aSet = false;
188
189
190
191
192
193 public final boolean isExitingView()
194 {
195 boolean exitingView4a = this.__exitingView4a;
196 if (!this.__exitingView4aSet)
197 {
198
199 exitingView4a = handleIsExitingView();
200
201 this.__exitingView4a = exitingView4a;
202 if (isMetafacadePropertyCachingEnabled())
203 {
204 this.__exitingView4aSet = true;
205 }
206 }
207 return exitingView4a;
208 }
209
210
211
212 private FrontEndUseCase __getUseCase1r;
213 private boolean __getUseCase1rSet = false;
214
215
216
217
218
219 public final FrontEndUseCase getUseCase()
220 {
221 FrontEndUseCase getUseCase1r = this.__getUseCase1r;
222 if (!this.__getUseCase1rSet)
223 {
224
225 Object result = handleGetUseCase();
226 MetafacadeBase shieldedResult = this.shieldedElement(result);
227 try
228 {
229 getUseCase1r = (FrontEndUseCase)shieldedResult;
230 }
231 catch (ClassCastException ex)
232 {
233
234 FrontEndForwardLogic.logger.warn("incorrect metafacade cast for FrontEndForwardLogic.getUseCase FrontEndUseCase " + result + ": " + shieldedResult);
235 }
236
237 this.__getUseCase1r = getUseCase1r;
238 if (isMetafacadePropertyCachingEnabled())
239 {
240 this.__getUseCase1rSet = true;
241 }
242 }
243 return getUseCase1r;
244 }
245
246
247
248
249
250 protected abstract Object handleGetUseCase();
251
252 private List<FrontEndAction> __getActions2r;
253 private boolean __getActions2rSet = false;
254
255
256
257
258
259 public final List<FrontEndAction> getActions()
260 {
261 List<FrontEndAction> getActions2r = this.__getActions2r;
262 if (!this.__getActions2rSet)
263 {
264
265 List result = handleGetActions();
266 List shieldedResult = this.shieldedElements(result);
267 try
268 {
269 getActions2r = (List<FrontEndAction>)shieldedResult;
270 }
271 catch (ClassCastException ex)
272 {
273
274 FrontEndForwardLogic.logger.warn("incorrect metafacade cast for FrontEndForwardLogic.getActions List<FrontEndAction> " + result + ": " + shieldedResult);
275 }
276
277 this.__getActions2r = getActions2r;
278 if (isMetafacadePropertyCachingEnabled())
279 {
280 this.__getActions2rSet = true;
281 }
282 }
283 return getActions2r;
284 }
285
286
287
288
289
290 protected abstract List handleGetActions();
291
292 private FrontEndEvent __getDecisionTrigger3r;
293 private boolean __getDecisionTrigger3rSet = false;
294
295
296
297
298
299 public final FrontEndEvent getDecisionTrigger()
300 {
301 FrontEndEvent getDecisionTrigger3r = this.__getDecisionTrigger3r;
302 if (!this.__getDecisionTrigger3rSet)
303 {
304
305 Object result = handleGetDecisionTrigger();
306 MetafacadeBase shieldedResult = this.shieldedElement(result);
307 try
308 {
309 getDecisionTrigger3r = (FrontEndEvent)shieldedResult;
310 }
311 catch (ClassCastException ex)
312 {
313
314 FrontEndForwardLogic.logger.warn("incorrect metafacade cast for FrontEndForwardLogic.getDecisionTrigger FrontEndEvent " + result + ": " + shieldedResult);
315 }
316
317 this.__getDecisionTrigger3r = getDecisionTrigger3r;
318 if (isMetafacadePropertyCachingEnabled())
319 {
320 this.__getDecisionTrigger3rSet = true;
321 }
322 }
323 return getDecisionTrigger3r;
324 }
325
326
327
328
329
330 protected abstract Object handleGetDecisionTrigger();
331
332 private FrontEndControllerOperation __getOperationCall4r;
333 private boolean __getOperationCall4rSet = false;
334
335
336
337
338
339 public final FrontEndControllerOperation getOperationCall()
340 {
341 FrontEndControllerOperation getOperationCall4r = this.__getOperationCall4r;
342 if (!this.__getOperationCall4rSet)
343 {
344
345 Object result = handleGetOperationCall();
346 MetafacadeBase shieldedResult = this.shieldedElement(result);
347 try
348 {
349 getOperationCall4r = (FrontEndControllerOperation)shieldedResult;
350 }
351 catch (ClassCastException ex)
352 {
353
354 FrontEndForwardLogic.logger.warn("incorrect metafacade cast for FrontEndForwardLogic.getOperationCall FrontEndControllerOperation " + result + ": " + shieldedResult);
355 }
356
357 this.__getOperationCall4r = getOperationCall4r;
358 if (isMetafacadePropertyCachingEnabled())
359 {
360 this.__getOperationCall4rSet = true;
361 }
362 }
363 return getOperationCall4r;
364 }
365
366
367
368
369
370 protected abstract Object handleGetOperationCall();
371
372 private List<FrontEndParameter> __getForwardParameters5r;
373 private boolean __getForwardParameters5rSet = false;
374
375
376
377
378
379 public final List<FrontEndParameter> getForwardParameters()
380 {
381 List<FrontEndParameter> getForwardParameters5r = this.__getForwardParameters5r;
382 if (!this.__getForwardParameters5rSet)
383 {
384
385 List result = handleGetForwardParameters();
386 List shieldedResult = this.shieldedElements(result);
387 try
388 {
389 getForwardParameters5r = (List<FrontEndParameter>)shieldedResult;
390 }
391 catch (ClassCastException ex)
392 {
393
394 FrontEndForwardLogic.logger.warn("incorrect metafacade cast for FrontEndForwardLogic.getForwardParameters List<FrontEndParameter> " + result + ": " + shieldedResult);
395 }
396
397 this.__getForwardParameters5r = getForwardParameters5r;
398 if (isMetafacadePropertyCachingEnabled())
399 {
400 this.__getForwardParameters5rSet = true;
401 }
402 }
403 return getForwardParameters5r;
404 }
405
406
407
408
409
410 protected abstract List handleGetForwardParameters();
411
412 private FrontEndActivityGraph __getFrontEndActivityGraph6r;
413 private boolean __getFrontEndActivityGraph6rSet = false;
414
415
416
417
418
419 public final FrontEndActivityGraph getFrontEndActivityGraph()
420 {
421 FrontEndActivityGraph getFrontEndActivityGraph6r = this.__getFrontEndActivityGraph6r;
422 if (!this.__getFrontEndActivityGraph6rSet)
423 {
424
425 Object result = handleGetFrontEndActivityGraph();
426 MetafacadeBase shieldedResult = this.shieldedElement(result);
427 try
428 {
429 getFrontEndActivityGraph6r = (FrontEndActivityGraph)shieldedResult;
430 }
431 catch (ClassCastException ex)
432 {
433
434 FrontEndForwardLogic.logger.warn("incorrect metafacade cast for FrontEndForwardLogic.getFrontEndActivityGraph FrontEndActivityGraph " + result + ": " + shieldedResult);
435 }
436
437 this.__getFrontEndActivityGraph6r = getFrontEndActivityGraph6r;
438 if (isMetafacadePropertyCachingEnabled())
439 {
440 this.__getFrontEndActivityGraph6rSet = true;
441 }
442 }
443 return getFrontEndActivityGraph6r;
444 }
445
446
447
448
449
450 protected abstract Object handleGetFrontEndActivityGraph();
451
452
453
454
455
456 @Override
457 public void validateInvariants(Collection<ModelValidationMessage> validationMessages)
458 {
459 super.validateInvariants(validationMessages);
460 }
461 }