1 // license-header java merge-point
2 //
3 // Attention: generated code (by MetafacadeLogic.vsl) - do not modify!
4 //
5 package org.andromda.cartridges.bpm4struts.metafacades;
6
7 import java.util.Collection;
8 import java.util.List;
9 import java.util.Map;
10 import javax.swing.tree.TreeNode;
11 import org.andromda.core.common.Introspector;
12 import org.andromda.core.metafacade.MetafacadeBase;
13 import org.andromda.core.metafacade.MetafacadeFactory;
14 import org.andromda.core.metafacade.ModelValidationMessage;
15 import org.andromda.metafacades.uml.ActivityGraphFacade;
16 import org.andromda.metafacades.uml.AssociationEndFacade;
17 import org.andromda.metafacades.uml.AttributeFacade;
18 import org.andromda.metafacades.uml.ClassifierFacade;
19 import org.andromda.metafacades.uml.ConstraintFacade;
20 import org.andromda.metafacades.uml.DependencyFacade;
21 import org.andromda.metafacades.uml.ExtendFacade;
22 import org.andromda.metafacades.uml.ExtensionPointFacade;
23 import org.andromda.metafacades.uml.FrontEndAction;
24 import org.andromda.metafacades.uml.FrontEndActivityGraph;
25 import org.andromda.metafacades.uml.FrontEndController;
26 import org.andromda.metafacades.uml.FrontEndFinalState;
27 import org.andromda.metafacades.uml.FrontEndParameter;
28 import org.andromda.metafacades.uml.FrontEndUseCase;
29 import org.andromda.metafacades.uml.FrontEndView;
30 import org.andromda.metafacades.uml.GeneralizableElementFacade;
31 import org.andromda.metafacades.uml.GeneralizationFacade;
32 import org.andromda.metafacades.uml.IncludeFacade;
33 import org.andromda.metafacades.uml.ModelElementFacade;
34 import org.andromda.metafacades.uml.ModelFacade;
35 import org.andromda.metafacades.uml.OperationFacade;
36 import org.andromda.metafacades.uml.PackageFacade;
37 import org.andromda.metafacades.uml.Role;
38 import org.andromda.metafacades.uml.StateMachineFacade;
39 import org.andromda.metafacades.uml.StereotypeFacade;
40 import org.andromda.metafacades.uml.TaggedValueFacade;
41 import org.andromda.metafacades.uml.TemplateParameterFacade;
42 import org.andromda.metafacades.uml.TypeMappings;
43 import org.andromda.translation.ocl.validation.OCLCollections;
44 import org.andromda.translation.ocl.validation.OCLIntrospector;
45 import org.andromda.translation.ocl.validation.OCLResultEnsurer;
46 import org.apache.log4j.Logger;
47
48 /**
49 * A Struts use-case represents a set of related client/server requests and communication.
50 * MetafacadeLogic for StrutsUseCase
51 *
52 * @see StrutsUseCase
53 */
54 public abstract class StrutsUseCaseLogic
55 extends MetafacadeBase
56 implements StrutsUseCase
57 {
58 /**
59 * The underlying UML object
60 * @see Object
61 */
62 protected Object metaObject;
63
64 /** Create Metafacade implementation instance using the MetafacadeFactory from the context
65 * @param metaObjectIn
66 * @param context
67 */
68 protected StrutsUseCaseLogic(Object metaObjectIn, String context)
69 {
70 super(metaObjectIn, getContext(context));
71 this.superFrontEndUseCase =
72 (FrontEndUseCase)
73 MetafacadeFactory.getInstance().createFacadeImpl(
74 "org.andromda.metafacades.uml.FrontEndUseCase",
75 metaObjectIn,
76 getContext(context));
77 this.metaObject = metaObjectIn;
78 }
79
80 /**
81 * The logger instance.
82 */
83 private static final Logger logger = Logger.getLogger(StrutsUseCaseLogic.class);
84
85 /**
86 * Gets the context for this metafacade logic instance.
87 * @param context String. Set to StrutsUseCase if null
88 * @return context String
89 */
90 private static String getContext(String context)
91 {
92 if (context == null)
93 {
94 context = "org.andromda.cartridges.bpm4struts.metafacades.StrutsUseCase";
95 }
96 return context;
97 }
98
99 private FrontEndUseCase superFrontEndUseCase;
100 private boolean superFrontEndUseCaseInitialized = false;
101
102 /**
103 * Gets the FrontEndUseCase parent instance.
104 * @return this.superFrontEndUseCase FrontEndUseCase
105 */
106 private FrontEndUseCase getSuperFrontEndUseCase()
107 {
108 if (!this.superFrontEndUseCaseInitialized)
109 {
110 ((MetafacadeBase)this.superFrontEndUseCase).setMetafacadeContext(this.getMetafacadeContext());
111 this.superFrontEndUseCaseInitialized = true;
112 }
113 return this.superFrontEndUseCase;
114 }
115
116 /** Reset context only for non-root metafacades
117 * @param context
118 * @see MetafacadeBase#resetMetafacadeContext(String context)
119 */
120 @Override
121 public void resetMetafacadeContext(String context)
122 {
123 if (!this.contextRoot) // reset context only for non-root metafacades
124 {
125 context = getContext(context); // to have same value as in original constructor call
126 setMetafacadeContext (context);
127 if (this.superFrontEndUseCaseInitialized)
128 {
129 ((MetafacadeBase)this.superFrontEndUseCase).resetMetafacadeContext(context);
130 }
131 }
132 }
133
134 /**
135 * @return boolean true always
136 * @see StrutsUseCase
137 */
138 public boolean isStrutsUseCaseMetaType()
139 {
140 return true;
141 }
142
143 // --------------- attributes ---------------------
144
145 /**
146 * @see org.andromda.cartridges.bpm4struts.metafacades.StrutsUseCase#getTitleKey()
147 * @return String
148 */
149 protected abstract String handleGetTitleKey();
150
151 private String __titleKey1a;
152 private boolean __titleKey1aSet = false;
153
154 /**
155 * The title message key for this use-case.
156 * @return (String)handleGetTitleKey()
157 */
158 public final String getTitleKey()
159 {
160 String titleKey1a = this.__titleKey1a;
161 if (!this.__titleKey1aSet)
162 {
163 // titleKey has no pre constraints
164 titleKey1a = handleGetTitleKey();
165 // titleKey has no post constraints
166 this.__titleKey1a = titleKey1a;
167 if (isMetafacadePropertyCachingEnabled())
168 {
169 this.__titleKey1aSet = true;
170 }
171 }
172 return titleKey1a;
173 }
174
175 /**
176 * @see org.andromda.cartridges.bpm4struts.metafacades.StrutsUseCase#getTitleValue()
177 * @return String
178 */
179 protected abstract String handleGetTitleValue();
180
181 private String __titleValue2a;
182 private boolean __titleValue2aSet = false;
183
184 /**
185 * The title message value for this use-case.
186 * @return (String)handleGetTitleValue()
187 */
188 public final String getTitleValue()
189 {
190 String titleValue2a = this.__titleValue2a;
191 if (!this.__titleValue2aSet)
192 {
193 // titleValue has no pre constraints
194 titleValue2a = handleGetTitleValue();
195 // titleValue has no post constraints
196 this.__titleValue2a = titleValue2a;
197 if (isMetafacadePropertyCachingEnabled())
198 {
199 this.__titleValue2aSet = true;
200 }
201 }
202 return titleValue2a;
203 }
204
205 /**
206 * @see org.andromda.cartridges.bpm4struts.metafacades.StrutsUseCase#getActionPath()
207 * @return String
208 */
209 protected abstract String handleGetActionPath();
210
211 private String __actionPath3a;
212 private boolean __actionPath3aSet = false;
213
214 /**
215 * This use-case's action path.
216 * @return (String)handleGetActionPath()
217 */
218 public final String getActionPath()
219 {
220 String actionPath3a = this.__actionPath3a;
221 if (!this.__actionPath3aSet)
222 {
223 // actionPath has no pre constraints
224 actionPath3a = handleGetActionPath();
225 // actionPath has no post constraints
226 this.__actionPath3a = actionPath3a;
227 if (isMetafacadePropertyCachingEnabled())
228 {
229 this.__actionPath3aSet = true;
230 }
231 }
232 return actionPath3a;
233 }
234
235 /**
236 * @see org.andromda.cartridges.bpm4struts.metafacades.StrutsUseCase#getActionPathRoot()
237 * @return String
238 */
239 protected abstract String handleGetActionPathRoot();
240
241 private String __actionPathRoot4a;
242 private boolean __actionPathRoot4aSet = false;
243
244 /**
245 * The root of the action path.
246 * @return (String)handleGetActionPathRoot()
247 */
248 public final String getActionPathRoot()
249 {
250 String actionPathRoot4a = this.__actionPathRoot4a;
251 if (!this.__actionPathRoot4aSet)
252 {
253 // actionPathRoot has no pre constraints
254 actionPathRoot4a = handleGetActionPathRoot();
255 // actionPathRoot has no post constraints
256 this.__actionPathRoot4a = actionPathRoot4a;
257 if (isMetafacadePropertyCachingEnabled())
258 {
259 this.__actionPathRoot4aSet = true;
260 }
261 }
262 return actionPathRoot4a;
263 }
264
265 /**
266 * @see org.andromda.cartridges.bpm4struts.metafacades.StrutsUseCase#getActionRoles()
267 * @return String
268 */
269 protected abstract String handleGetActionRoles();
270
271 private String __actionRoles5a;
272 private boolean __actionRoles5aSet = false;
273
274 /**
275 * Returns the action roles corresponding to this use-case's action, as found in the struts
276 * deployment descriptor. The action roles specifiy the roles in which the user must be in order
277 * to be authorized to call the action. One of the roles must be satisfied.
278 * @return (String)handleGetActionRoles()
279 */
280 public final String getActionRoles()
281 {
282 String actionRoles5a = this.__actionRoles5a;
283 if (!this.__actionRoles5aSet)
284 {
285 // actionRoles has no pre constraints
286 actionRoles5a = handleGetActionRoles();
287 // actionRoles has no post constraints
288 this.__actionRoles5a = actionRoles5a;
289 if (isMetafacadePropertyCachingEnabled())
290 {
291 this.__actionRoles5aSet = true;
292 }
293 }
294 return actionRoles5a;
295 }
296
297 /**
298 * @see org.andromda.cartridges.bpm4struts.metafacades.StrutsUseCase#isApplicationValidationRequired()
299 * @return boolean
300 */
301 protected abstract boolean handleIsApplicationValidationRequired();
302
303 private boolean __applicationValidationRequired6a;
304 private boolean __applicationValidationRequired6aSet = false;
305
306 /**
307 * True if at least one client/server parameter found in the collection of existing use-cases
308 * requires validation.
309 * @return (boolean)handleIsApplicationValidationRequired()
310 */
311 public final boolean isApplicationValidationRequired()
312 {
313 boolean applicationValidationRequired6a = this.__applicationValidationRequired6a;
314 if (!this.__applicationValidationRequired6aSet)
315 {
316 // applicationValidationRequired has no pre constraints
317 applicationValidationRequired6a = handleIsApplicationValidationRequired();
318 // applicationValidationRequired has no post constraints
319 this.__applicationValidationRequired6a = applicationValidationRequired6a;
320 if (isMetafacadePropertyCachingEnabled())
321 {
322 this.__applicationValidationRequired6aSet = true;
323 }
324 }
325 return applicationValidationRequired6a;
326 }
327
328 /**
329 * @see org.andromda.cartridges.bpm4struts.metafacades.StrutsUseCase#isValidationRequired()
330 * @return boolean
331 */
332 protected abstract boolean handleIsValidationRequired();
333
334 private boolean __validationRequired7a;
335 private boolean __validationRequired7aSet = false;
336
337 /**
338 * True if some client/server parameters require validation for this use-case.
339 * @return (boolean)handleIsValidationRequired()
340 */
341 public final boolean isValidationRequired()
342 {
343 boolean validationRequired7a = this.__validationRequired7a;
344 if (!this.__validationRequired7aSet)
345 {
346 // validationRequired has no pre constraints
347 validationRequired7a = handleIsValidationRequired();
348 // validationRequired has no post constraints
349 this.__validationRequired7a = validationRequired7a;
350 if (isMetafacadePropertyCachingEnabled())
351 {
352 this.__validationRequired7aSet = true;
353 }
354 }
355 return validationRequired7a;
356 }
357
358 /**
359 * @see org.andromda.cartridges.bpm4struts.metafacades.StrutsUseCase#getOnlineHelpKey()
360 * @return String
361 */
362 protected abstract String handleGetOnlineHelpKey();
363
364 private String __onlineHelpKey8a;
365 private boolean __onlineHelpKey8aSet = false;
366
367 /**
368 * The key to lookup the online help documentation. This documentation is gathered from the
369 * documentation entered by the user, as well as analyzing the model.
370 * @return (String)handleGetOnlineHelpKey()
371 */
372 public final String getOnlineHelpKey()
373 {
374 String onlineHelpKey8a = this.__onlineHelpKey8a;
375 if (!this.__onlineHelpKey8aSet)
376 {
377 // onlineHelpKey has no pre constraints
378 onlineHelpKey8a = handleGetOnlineHelpKey();
379 // onlineHelpKey has no post constraints
380 this.__onlineHelpKey8a = onlineHelpKey8a;
381 if (isMetafacadePropertyCachingEnabled())
382 {
383 this.__onlineHelpKey8aSet = true;
384 }
385 }
386 return onlineHelpKey8a;
387 }
388
389 /**
390 * @see org.andromda.cartridges.bpm4struts.metafacades.StrutsUseCase#getOnlineHelpValue()
391 * @return String
392 */
393 protected abstract String handleGetOnlineHelpValue();
394
395 private String __onlineHelpValue9a;
396 private boolean __onlineHelpValue9aSet = false;
397
398 /**
399 * The online help documentation. This documentation is gathered from the documentation entered
400 * by the user, as well as analyzing the model. The format is HTML without any style.
401 * @return (String)handleGetOnlineHelpValue()
402 */
403 public final String getOnlineHelpValue()
404 {
405 String onlineHelpValue9a = this.__onlineHelpValue9a;
406 if (!this.__onlineHelpValue9aSet)
407 {
408 // onlineHelpValue has no pre constraints
409 onlineHelpValue9a = handleGetOnlineHelpValue();
410 // onlineHelpValue has no post constraints
411 this.__onlineHelpValue9a = onlineHelpValue9a;
412 if (isMetafacadePropertyCachingEnabled())
413 {
414 this.__onlineHelpValue9aSet = true;
415 }
416 }
417 return onlineHelpValue9a;
418 }
419
420 /**
421 * @see org.andromda.cartridges.bpm4struts.metafacades.StrutsUseCase#isApplicationUseCase()
422 * @return boolean
423 */
424 protected abstract boolean handleIsApplicationUseCase();
425
426 private boolean __applicationUseCase10a;
427 private boolean __applicationUseCase10aSet = false;
428
429 /**
430 * True if this use-case is where the application starts.
431 * @return (boolean)handleIsApplicationUseCase()
432 */
433 public final boolean isApplicationUseCase()
434 {
435 boolean applicationUseCase10a = this.__applicationUseCase10a;
436 if (!this.__applicationUseCase10aSet)
437 {
438 // applicationUseCase has no pre constraints
439 applicationUseCase10a = handleIsApplicationUseCase();
440 // applicationUseCase has no post constraints
441 this.__applicationUseCase10a = applicationUseCase10a;
442 if (isMetafacadePropertyCachingEnabled())
443 {
444 this.__applicationUseCase10aSet = true;
445 }
446 }
447 return applicationUseCase10a;
448 }
449
450 /**
451 * @see org.andromda.cartridges.bpm4struts.metafacades.StrutsUseCase#getApplicationHierarchyRoot()
452 * @return TreeNode
453 */
454 protected abstract TreeNode handleGetApplicationHierarchyRoot();
455
456 private TreeNode __applicationHierarchyRoot11a;
457 private boolean __applicationHierarchyRoot11aSet = false;
458
459 /**
460 * The root node of the application usecase hierarchy. Only makes sense when this usecase is an
461 * application usecase. Each usecase is only listed once in it's subtree, meaning when cycles ar
462 * edetected in the applicaion usecase graph the usecase will not be added when it already
463 * exists as an ancestor.
464 * @return (TreeNode)handleGetApplicationHierarchyRoot()
465 */
466 public final TreeNode getApplicationHierarchyRoot()
467 {
468 TreeNode applicationHierarchyRoot11a = this.__applicationHierarchyRoot11a;
469 if (!this.__applicationHierarchyRoot11aSet)
470 {
471 // applicationHierarchyRoot has no pre constraints
472 applicationHierarchyRoot11a = handleGetApplicationHierarchyRoot();
473 // applicationHierarchyRoot has no post constraints
474 this.__applicationHierarchyRoot11a = applicationHierarchyRoot11a;
475 if (isMetafacadePropertyCachingEnabled())
476 {
477 this.__applicationHierarchyRoot11aSet = true;
478 }
479 }
480 return applicationHierarchyRoot11a;
481 }
482
483 /**
484 * @see org.andromda.cartridges.bpm4struts.metafacades.StrutsUseCase#getHierarchyRoot()
485 * @return TreeNode
486 */
487 protected abstract TreeNode handleGetHierarchyRoot();
488
489 private TreeNode __hierarchyRoot12a;
490 private boolean __hierarchyRoot12aSet = false;
491
492 /**
493 * The root of the hierarchy of application usecases where this usecase is at the top. It is
494 * possible not all usecases are included in the descendants, they can be found in the
495 * collection of ancestor nodes.
496 * @return (TreeNode)handleGetHierarchyRoot()
497 */
498 public final TreeNode getHierarchyRoot()
499 {
500 TreeNode hierarchyRoot12a = this.__hierarchyRoot12a;
501 if (!this.__hierarchyRoot12aSet)
502 {
503 // hierarchyRoot has no pre constraints
504 hierarchyRoot12a = handleGetHierarchyRoot();
505 // hierarchyRoot has no post constraints
506 this.__hierarchyRoot12a = hierarchyRoot12a;
507 if (isMetafacadePropertyCachingEnabled())
508 {
509 this.__hierarchyRoot12aSet = true;
510 }
511 }
512 return hierarchyRoot12a;
513 }
514
515 /**
516 * @see org.andromda.cartridges.bpm4struts.metafacades.StrutsUseCase#getCssFileName()
517 * @return String
518 */
519 protected abstract String handleGetCssFileName();
520
521 private String __cssFileName13a;
522 private boolean __cssFileName13aSet = false;
523
524 /**
525 * The name of the file containing specific styles for this use-case only.
526 * @return (String)handleGetCssFileName()
527 */
528 public final String getCssFileName()
529 {
530 String cssFileName13a = this.__cssFileName13a;
531 if (!this.__cssFileName13aSet)
532 {
533 // cssFileName has no pre constraints
534 cssFileName13a = handleGetCssFileName();
535 // cssFileName has no post constraints
536 this.__cssFileName13a = cssFileName13a;
537 if (isMetafacadePropertyCachingEnabled())
538 {
539 this.__cssFileName13aSet = true;
540 }
541 }
542 return cssFileName13a;
543 }
544
545 /**
546 * @see org.andromda.cartridges.bpm4struts.metafacades.StrutsUseCase#getAllMessages()
547 * @return Map
548 */
549 protected abstract Map handleGetAllMessages();
550
551 private Map __allMessages14a;
552 private boolean __allMessages14aSet = false;
553
554 /**
555 * A map with keys sorted alphabetically, normalized across all different use-cases and pages
556 * etc..
557 * @return (Map)handleGetAllMessages()
558 */
559 public final Map getAllMessages()
560 {
561 Map allMessages14a = this.__allMessages14a;
562 if (!this.__allMessages14aSet)
563 {
564 // allMessages has no pre constraints
565 allMessages14a = handleGetAllMessages();
566 // allMessages has no post constraints
567 this.__allMessages14a = allMessages14a;
568 if (isMetafacadePropertyCachingEnabled())
569 {
570 this.__allMessages14aSet = true;
571 }
572 }
573 return allMessages14a;
574 }
575
576 /**
577 * @see org.andromda.cartridges.bpm4struts.metafacades.StrutsUseCase#isCyclic()
578 * @return boolean
579 */
580 protected abstract boolean handleIsCyclic();
581
582 private boolean __cyclic15a;
583 private boolean __cyclic15aSet = false;
584
585 /**
586 * TODO: Model Documentation for
587 * org.andromda.cartridges.bpm4struts.metafacades.StrutsUseCase.cyclic
588 * @return (boolean)handleIsCyclic()
589 */
590 public final boolean isCyclic()
591 {
592 boolean cyclic15a = this.__cyclic15a;
593 if (!this.__cyclic15aSet)
594 {
595 // cyclic has no pre constraints
596 cyclic15a = handleIsCyclic();
597 // cyclic has no post constraints
598 this.__cyclic15a = cyclic15a;
599 if (isMetafacadePropertyCachingEnabled())
600 {
601 this.__cyclic15aSet = true;
602 }
603 }
604 return cyclic15a;
605 }
606
607 /**
608 * @see org.andromda.cartridges.bpm4struts.metafacades.StrutsUseCase#getOnlineHelpPagePath()
609 * @return String
610 */
611 protected abstract String handleGetOnlineHelpPagePath();
612
613 private String __onlineHelpPagePath16a;
614 private boolean __onlineHelpPagePath16aSet = false;
615
616 /**
617 * The full path to this use-case's online help page. The returned String does not have a suffix
618 * such as '.jsp'.
619 * @return (String)handleGetOnlineHelpPagePath()
620 */
621 public final String getOnlineHelpPagePath()
622 {
623 String onlineHelpPagePath16a = this.__onlineHelpPagePath16a;
624 if (!this.__onlineHelpPagePath16aSet)
625 {
626 // onlineHelpPagePath has no pre constraints
627 onlineHelpPagePath16a = handleGetOnlineHelpPagePath();
628 // onlineHelpPagePath has no post constraints
629 this.__onlineHelpPagePath16a = onlineHelpPagePath16a;
630 if (isMetafacadePropertyCachingEnabled())
631 {
632 this.__onlineHelpPagePath16aSet = true;
633 }
634 }
635 return onlineHelpPagePath16a;
636 }
637
638 /**
639 * @see org.andromda.cartridges.bpm4struts.metafacades.StrutsUseCase#getOnlineHelpActionPath()
640 * @return String
641 */
642 protected abstract String handleGetOnlineHelpActionPath();
643
644 private String __onlineHelpActionPath17a;
645 private boolean __onlineHelpActionPath17aSet = false;
646
647 /**
648 * The full path to this use-case's online help action. The returned String does not have a
649 * suffix such as '.do'.
650 * @return (String)handleGetOnlineHelpActionPath()
651 */
652 public final String getOnlineHelpActionPath()
653 {
654 String onlineHelpActionPath17a = this.__onlineHelpActionPath17a;
655 if (!this.__onlineHelpActionPath17aSet)
656 {
657 // onlineHelpActionPath has no pre constraints
658 onlineHelpActionPath17a = handleGetOnlineHelpActionPath();
659 // onlineHelpActionPath has no post constraints
660 this.__onlineHelpActionPath17a = onlineHelpActionPath17a;
661 if (isMetafacadePropertyCachingEnabled())
662 {
663 this.__onlineHelpActionPath17aSet = true;
664 }
665 }
666 return onlineHelpActionPath17a;
667 }
668
669 /**
670 * @see org.andromda.cartridges.bpm4struts.metafacades.StrutsUseCase#getFormKey()
671 * @return String
672 */
673 protected abstract String handleGetFormKey();
674
675 private String __formKey18a;
676 private boolean __formKey18aSet = false;
677
678 /**
679 * The key under which to store the forms contained in this use-case.
680 * @return (String)handleGetFormKey()
681 */
682 public final String getFormKey()
683 {
684 String formKey18a = this.__formKey18a;
685 if (!this.__formKey18aSet)
686 {
687 // formKey has no pre constraints
688 formKey18a = handleGetFormKey();
689 // formKey has no post constraints
690 this.__formKey18a = formKey18a;
691 if (isMetafacadePropertyCachingEnabled())
692 {
693 this.__formKey18aSet = true;
694 }
695 }
696 return formKey18a;
697 }
698
699 // ------------- associations ------------------
700
701 private List<StrutsParameter> __getPageVariables1r;
702 private boolean __getPageVariables1rSet = false;
703
704 /**
705 * A Struts use-case represents a set of related client/server requests and communication.
706 * @return (List<StrutsParameter>)handleGetPageVariables()
707 */
708 public final List<StrutsParameter> getPageVariables()
709 {
710 List<StrutsParameter> getPageVariables1r = this.__getPageVariables1r;
711 if (!this.__getPageVariables1rSet)
712 {
713 // strutsUseCase has no pre constraints
714 List result = handleGetPageVariables();
715 List shieldedResult = this.shieldedElements(result);
716 try
717 {
718 getPageVariables1r = (List<StrutsParameter>)shieldedResult;
719 }
720 catch (ClassCastException ex)
721 {
722 // Bad things happen if the metafacade type mapping in metafacades.xml is wrong - Warn
723 StrutsUseCaseLogic.logger.warn("incorrect metafacade cast for StrutsUseCaseLogic.getPageVariables List<StrutsParameter> " + result + ": " + shieldedResult);
724 }
725 // strutsUseCase has no post constraints
726 this.__getPageVariables1r = getPageVariables1r;
727 if (isMetafacadePropertyCachingEnabled())
728 {
729 this.__getPageVariables1rSet = true;
730 }
731 }
732 return getPageVariables1r;
733 }
734
735 /**
736 * UML Specific type is returned in Collection, transformed by shieldedElements to AndroMDA Metafacade type
737 * @return List
738 */
739 protected abstract List handleGetPageVariables();
740
741 private List<StrutsJsp> __getAllPages2r;
742 private boolean __getAllPages2rSet = false;
743
744 /**
745 * A Struts use-case represents a set of related client/server requests and communication.
746 * @return (List<StrutsJsp>)handleGetAllPages()
747 */
748 public final List<StrutsJsp> getAllPages()
749 {
750 List<StrutsJsp> getAllPages2r = this.__getAllPages2r;
751 if (!this.__getAllPages2rSet)
752 {
753 // strutsUseCase has no pre constraints
754 List result = handleGetAllPages();
755 List shieldedResult = this.shieldedElements(result);
756 try
757 {
758 getAllPages2r = (List<StrutsJsp>)shieldedResult;
759 }
760 catch (ClassCastException ex)
761 {
762 // Bad things happen if the metafacade type mapping in metafacades.xml is wrong - Warn
763 StrutsUseCaseLogic.logger.warn("incorrect metafacade cast for StrutsUseCaseLogic.getAllPages List<StrutsJsp> " + result + ": " + shieldedResult);
764 }
765 // strutsUseCase has no post constraints
766 this.__getAllPages2r = getAllPages2r;
767 if (isMetafacadePropertyCachingEnabled())
768 {
769 this.__getAllPages2rSet = true;
770 }
771 }
772 return getAllPages2r;
773 }
774
775 /**
776 * UML Specific type is returned in Collection, transformed by shieldedElements to AndroMDA Metafacade type
777 * @return List
778 */
779 protected abstract List handleGetAllPages();
780
781 private List<StrutsParameter> __getFormFields3r;
782 private boolean __getFormFields3rSet = false;
783
784 /**
785 * A Struts use-case represents a set of related client/server requests and communication.
786 * @return (List<StrutsParameter>)handleGetFormFields()
787 */
788 public final List<StrutsParameter> getFormFields()
789 {
790 List<StrutsParameter> getFormFields3r = this.__getFormFields3r;
791 if (!this.__getFormFields3rSet)
792 {
793 // strutsUseCase has no pre constraints
794 List result = handleGetFormFields();
795 List shieldedResult = this.shieldedElements(result);
796 try
797 {
798 getFormFields3r = (List<StrutsParameter>)shieldedResult;
799 }
800 catch (ClassCastException ex)
801 {
802 // Bad things happen if the metafacade type mapping in metafacades.xml is wrong - Warn
803 StrutsUseCaseLogic.logger.warn("incorrect metafacade cast for StrutsUseCaseLogic.getFormFields List<StrutsParameter> " + result + ": " + shieldedResult);
804 }
805 // strutsUseCase has no post constraints
806 this.__getFormFields3r = getFormFields3r;
807 if (isMetafacadePropertyCachingEnabled())
808 {
809 this.__getFormFields3rSet = true;
810 }
811 }
812 return getFormFields3r;
813 }
814
815 /**
816 * UML Specific type is returned in Collection, transformed by shieldedElements to AndroMDA Metafacade type
817 * @return List
818 */
819 protected abstract List handleGetFormFields();
820
821 private List<StrutsJsp> __getPages4r;
822 private boolean __getPages4rSet = false;
823
824 /**
825 * A Struts use-case represents a set of related client/server requests and communication.
826 * @return (List<StrutsJsp>)handleGetPages()
827 */
828 public final List<StrutsJsp> getPages()
829 {
830 List<StrutsJsp> getPages4r = this.__getPages4r;
831 if (!this.__getPages4rSet)
832 {
833 // strutsUseCase has no pre constraints
834 List result = handleGetPages();
835 List shieldedResult = this.shieldedElements(result);
836 try
837 {
838 getPages4r = (List<StrutsJsp>)shieldedResult;
839 }
840 catch (ClassCastException ex)
841 {
842 // Bad things happen if the metafacade type mapping in metafacades.xml is wrong - Warn
843 StrutsUseCaseLogic.logger.warn("incorrect metafacade cast for StrutsUseCaseLogic.getPages List<StrutsJsp> " + result + ": " + shieldedResult);
844 }
845 // strutsUseCase has no post constraints
846 this.__getPages4r = getPages4r;
847 if (isMetafacadePropertyCachingEnabled())
848 {
849 this.__getPages4rSet = true;
850 }
851 }
852 return getPages4r;
853 }
854
855 /**
856 * UML Specific type is returned in Collection, transformed by shieldedElements to AndroMDA Metafacade type
857 * @return List
858 */
859 protected abstract List handleGetPages();
860
861 /**
862 * @return true
863 * @see FrontEndUseCase
864 */
865 public boolean isFrontEndUseCaseMetaType()
866 {
867 return true;
868 }
869
870 /**
871 * @return true
872 * @see org.andromda.metafacades.uml.UseCaseFacade
873 */
874 public boolean isUseCaseFacadeMetaType()
875 {
876 return true;
877 }
878
879 /**
880 * @return true
881 * @see org.andromda.metafacades.uml.NamespaceFacade
882 */
883 public boolean isNamespaceFacadeMetaType()
884 {
885 return true;
886 }
887
888 /**
889 * @return true
890 * @see ClassifierFacade
891 */
892 public boolean isClassifierFacadeMetaType()
893 {
894 return true;
895 }
896
897 /**
898 * @return true
899 * @see GeneralizableElementFacade
900 */
901 public boolean isGeneralizableElementFacadeMetaType()
902 {
903 return true;
904 }
905
906 /**
907 * @return true
908 * @see ModelElementFacade
909 */
910 public boolean isModelElementFacadeMetaType()
911 {
912 return true;
913 }
914
915 // ----------- delegates to FrontEndUseCase ------------
916 /**
917 * Return the attribute which name matches the parameter
918 * @see ClassifierFacade#findAttribute(String name)
919 */
920 public AttributeFacade findAttribute(String name)
921 {
922 return this.getSuperFrontEndUseCase().findAttribute(name);
923 }
924
925 /**
926 * Those abstraction dependencies for which this classifier is the client.
927 * @see ClassifierFacade#getAbstractions()
928 */
929 public Collection<ClassifierFacade> getAbstractions()
930 {
931 return this.getSuperFrontEndUseCase().getAbstractions();
932 }
933
934 /**
935 * Lists all classes associated to this one and any ancestor classes (through generalization).
936 * There will be no duplicates. The order of the elements is predictable.
937 * @see ClassifierFacade#getAllAssociatedClasses()
938 */
939 public Collection<ClassifierFacade> getAllAssociatedClasses()
940 {
941 return this.getSuperFrontEndUseCase().getAllAssociatedClasses();
942 }
943
944 /**
945 * A collection containing all 'properties' of the classifier and its ancestors. Properties are
946 * any attributes and navigable connecting association ends.
947 * @see ClassifierFacade#getAllProperties()
948 */
949 public Collection<ModelElementFacade> getAllProperties()
950 {
951 return this.getSuperFrontEndUseCase().getAllProperties();
952 }
953
954 /**
955 * A collection containing all required and/or read-only 'properties' of the classifier and its
956 * ancestors. Properties are any attributes and navigable connecting association ends.
957 * @see ClassifierFacade#getAllRequiredConstructorParameters()
958 */
959 public Collection<ModelElementFacade> getAllRequiredConstructorParameters()
960 {
961 return this.getSuperFrontEndUseCase().getAllRequiredConstructorParameters();
962 }
963
964 /**
965 * Gets the array type for this classifier. If this classifier already represents an array, it
966 * just returns itself.
967 * @see ClassifierFacade#getArray()
968 */
969 public ClassifierFacade getArray()
970 {
971 return this.getSuperFrontEndUseCase().getArray();
972 }
973
974 /**
975 * The name of the classifier as an array.
976 * @see ClassifierFacade#getArrayName()
977 */
978 public String getArrayName()
979 {
980 return this.getSuperFrontEndUseCase().getArrayName();
981 }
982
983 /**
984 * Lists the classes associated to this one, there is no repitition of classes. The order of the
985 * elements is predictable.
986 * @see ClassifierFacade#getAssociatedClasses()
987 */
988 public Collection<ClassifierFacade> getAssociatedClasses()
989 {
990 return this.getSuperFrontEndUseCase().getAssociatedClasses();
991 }
992
993 /**
994 * Gets the association ends belonging to a classifier.
995 * @see ClassifierFacade#getAssociationEnds()
996 */
997 public List<AssociationEndFacade> getAssociationEnds()
998 {
999 return this.getSuperFrontEndUseCase().getAssociationEnds();
1000 }
1001
1002 /**
1003 * Gets the attributes that belong to the classifier.
1004 * @see ClassifierFacade#getAttributes()
1005 */
1006 public List<AttributeFacade> getAttributes()
1007 {
1008 return this.getSuperFrontEndUseCase().getAttributes();
1009 }
1010
1011 /**
1012 * Gets all attributes for the classifier and if 'follow' is true goes up the inheritance
1013 * hierarchy and gets the attributes from the super classes as well.
1014 * @see ClassifierFacade#getAttributes(boolean follow)
1015 */
1016 public List<AttributeFacade> getAttributes(boolean follow)
1017 {
1018 return this.getSuperFrontEndUseCase().getAttributes(follow);
1019 }
1020
1021 /**
1022 * The fully qualified name of the classifier as an array.
1023 * @see ClassifierFacade#getFullyQualifiedArrayName()
1024 */
1025 public String getFullyQualifiedArrayName()
1026 {
1027 return this.getSuperFrontEndUseCase().getFullyQualifiedArrayName();
1028 }
1029
1030 /**
1031 * Returns all those operations that could be implemented at this classifier's level. This means
1032 * the operations owned by this classifier as well as any realized interface's operations
1033 * (recursively) in case this classifier itself is not already an interface, or generalized when
1034 * this classifier is an interface.
1035 * @see ClassifierFacade#getImplementationOperations()
1036 */
1037 public Collection<OperationFacade> getImplementationOperations()
1038 {
1039 return this.getSuperFrontEndUseCase().getImplementationOperations();
1040 }
1041
1042 /**
1043 * A comma separated list of the fully qualified names of all implemented interfaces.
1044 * @see ClassifierFacade#getImplementedInterfaceList()
1045 */
1046 public String getImplementedInterfaceList()
1047 {
1048 return this.getSuperFrontEndUseCase().getImplementedInterfaceList();
1049 }
1050
1051 /**
1052 * Those attributes that are scoped to an instance of this class.
1053 * @see ClassifierFacade#getInstanceAttributes()
1054 */
1055 public Collection<AttributeFacade> getInstanceAttributes()
1056 {
1057 return this.getSuperFrontEndUseCase().getInstanceAttributes();
1058 }
1059
1060 /**
1061 * Those operations that are scoped to an instance of this class.
1062 * @see ClassifierFacade#getInstanceOperations()
1063 */
1064 public List<OperationFacade> getInstanceOperations()
1065 {
1066 return this.getSuperFrontEndUseCase().getInstanceOperations();
1067 }
1068
1069 /**
1070 * Those interfaces that are abstractions of this classifier, this basically means this
1071 * classifier realizes them.
1072 * @see ClassifierFacade#getInterfaceAbstractions()
1073 */
1074 public Collection<ClassifierFacade> getInterfaceAbstractions()
1075 {
1076 return this.getSuperFrontEndUseCase().getInterfaceAbstractions();
1077 }
1078
1079 /**
1080 * A String representing a new Constructor declaration for this classifier type to be used in a
1081 * Java environment.
1082 * @see ClassifierFacade#getJavaNewString()
1083 */
1084 public String getJavaNewString()
1085 {
1086 return this.getSuperFrontEndUseCase().getJavaNewString();
1087 }
1088
1089 /**
1090 * A String representing the null-value for this classifier type to be used in a Java
1091 * environment.
1092 * @see ClassifierFacade#getJavaNullString()
1093 */
1094 public String getJavaNullString()
1095 {
1096 return this.getSuperFrontEndUseCase().getJavaNullString();
1097 }
1098
1099 /**
1100 * The other ends of this classifier's association ends which are navigable.
1101 * @see ClassifierFacade#getNavigableConnectingEnds()
1102 */
1103 public Collection<AssociationEndFacade> getNavigableConnectingEnds()
1104 {
1105 return this.getSuperFrontEndUseCase().getNavigableConnectingEnds();
1106 }
1107
1108 /**
1109 * Get the other ends of this classifier's association ends which are navigable and if 'follow'
1110 * is true goes up the inheritance hierarchy and gets the super association ends as well.
1111 * @see ClassifierFacade#getNavigableConnectingEnds(boolean follow)
1112 */
1113 public List<AssociationEndFacade> getNavigableConnectingEnds(boolean follow)
1114 {
1115 return this.getSuperFrontEndUseCase().getNavigableConnectingEnds(follow);
1116 }
1117
1118 /**
1119 * Assuming that the classifier is an array, this will return the non array type of the
1120 * classifier from
1121 * the model. If the classifier is NOT an array, it will just return itself.
1122 * @see ClassifierFacade#getNonArray()
1123 */
1124 public ClassifierFacade getNonArray()
1125 {
1126 return this.getSuperFrontEndUseCase().getNonArray();
1127 }
1128
1129 /**
1130 * The attributes from this classifier in the form of an operation call (this example would be
1131 * in Java): '(String attributeOne, String attributeTwo). If there were no attributes on the
1132 * classifier, the result would be an empty '()'.
1133 * @see ClassifierFacade#getOperationCallFromAttributes()
1134 */
1135 public String getOperationCallFromAttributes()
1136 {
1137 return this.getSuperFrontEndUseCase().getOperationCallFromAttributes();
1138 }
1139
1140 /**
1141 * The operations owned by this classifier.
1142 * @see ClassifierFacade#getOperations()
1143 */
1144 public List<OperationFacade> getOperations()
1145 {
1146 return this.getSuperFrontEndUseCase().getOperations();
1147 }
1148
1149 /**
1150 * A collection containing all 'properties' of the classifier. Properties are any attributes
1151 * and navigable connecting association ends.
1152 * @see ClassifierFacade#getProperties()
1153 */
1154 public List<ModelElementFacade> getProperties()
1155 {
1156 return this.getSuperFrontEndUseCase().getProperties();
1157 }
1158
1159 /**
1160 * Gets all properties (attributes and navigable association ends) for the classifier and if
1161 * 'follow' is true goes up the inheritance hierarchy and gets the properties from the super
1162 * classes as well.
1163 * @see ClassifierFacade#getProperties(boolean follow)
1164 */
1165 public List getProperties(boolean follow)
1166 {
1167 return this.getSuperFrontEndUseCase().getProperties(follow);
1168 }
1169
1170 /**
1171 * A collection containing all required and/or read-only 'properties' of the classifier.
1172 * Properties are any attributes and navigable connecting association ends.
1173 * @see ClassifierFacade#getRequiredConstructorParameters()
1174 */
1175 public Collection<ModelElementFacade> getRequiredConstructorParameters()
1176 {
1177 return this.getSuperFrontEndUseCase().getRequiredConstructorParameters();
1178 }
1179
1180 /**
1181 * Returns the serial version UID of the underlying model element.
1182 * @see ClassifierFacade#getSerialVersionUID()
1183 */
1184 public long getSerialVersionUID()
1185 {
1186 return this.getSuperFrontEndUseCase().getSerialVersionUID();
1187 }
1188
1189 /**
1190 * Those attributes that are scoped to the definition of this class.
1191 * @see ClassifierFacade#getStaticAttributes()
1192 */
1193 public Collection<AttributeFacade> getStaticAttributes()
1194 {
1195 return this.getSuperFrontEndUseCase().getStaticAttributes();
1196 }
1197
1198 /**
1199 * Those operations that are scoped to the definition of this class.
1200 * @see ClassifierFacade#getStaticOperations()
1201 */
1202 public List<OperationFacade> getStaticOperations()
1203 {
1204 return this.getSuperFrontEndUseCase().getStaticOperations();
1205 }
1206
1207 /**
1208 * This class' superclass, returns the generalization if it is a ClassifierFacade, null
1209 * otherwise.
1210 * @see ClassifierFacade#getSuperClass()
1211 */
1212 public ClassifierFacade getSuperClass()
1213 {
1214 return this.getSuperFrontEndUseCase().getSuperClass();
1215 }
1216
1217 /**
1218 * The wrapper name for this classifier if a mapped type has a defined wrapper class (ie. 'long'
1219 * maps to 'Long'). If the classifier doesn't have a wrapper defined for it, this method will
1220 * return a null. Note that wrapper mappings must be defined for the namespace by defining the
1221 * 'wrapperMappingsUri', this property must point to the location of the mappings file which
1222 * maps the primitives to wrapper types.
1223 * @see ClassifierFacade#getWrapperName()
1224 */
1225 public String getWrapperName()
1226 {
1227 return this.getSuperFrontEndUseCase().getWrapperName();
1228 }
1229
1230 /**
1231 * Indicates if this classifier is 'abstract'.
1232 * @see ClassifierFacade#isAbstract()
1233 */
1234 public boolean isAbstract()
1235 {
1236 return this.getSuperFrontEndUseCase().isAbstract();
1237 }
1238
1239 /**
1240 * True if this classifier represents an array type. False otherwise.
1241 * @see ClassifierFacade#isArrayType()
1242 */
1243 public boolean isArrayType()
1244 {
1245 return this.getSuperFrontEndUseCase().isArrayType();
1246 }
1247
1248 /**
1249 * True if the ClassifierFacade is an AssociationClass.
1250 * @see ClassifierFacade#isAssociationClass()
1251 */
1252 public boolean isAssociationClass()
1253 {
1254 return this.getSuperFrontEndUseCase().isAssociationClass();
1255 }
1256
1257 /**
1258 * Returns true if this type represents a Blob type.
1259 * @see ClassifierFacade#isBlobType()
1260 */
1261 public boolean isBlobType()
1262 {
1263 return this.getSuperFrontEndUseCase().isBlobType();
1264 }
1265
1266 /**
1267 * Indicates if this type represents a boolean type or not.
1268 * @see ClassifierFacade#isBooleanType()
1269 */
1270 public boolean isBooleanType()
1271 {
1272 return this.getSuperFrontEndUseCase().isBooleanType();
1273 }
1274
1275 /**
1276 * Indicates if this type represents a char, Character, or java.lang.Character type or not.
1277 * @see ClassifierFacade#isCharacterType()
1278 */
1279 public boolean isCharacterType()
1280 {
1281 return this.getSuperFrontEndUseCase().isCharacterType();
1282 }
1283
1284 /**
1285 * Returns true if this type represents a Clob type.
1286 * @see ClassifierFacade#isClobType()
1287 */
1288 public boolean isClobType()
1289 {
1290 return this.getSuperFrontEndUseCase().isClobType();
1291 }
1292
1293 /**
1294 * True if this classifier represents a collection type. False otherwise.
1295 * @see ClassifierFacade#isCollectionType()
1296 */
1297 public boolean isCollectionType()
1298 {
1299 return this.getSuperFrontEndUseCase().isCollectionType();
1300 }
1301
1302 /**
1303 * True/false depending on whether or not this classifier represents a datatype. A data type is
1304 * a type whose instances are identified only by their value. A data type may contain attributes
1305 * to support the modeling of structured data types.
1306 * @see ClassifierFacade#isDataType()
1307 */
1308 public boolean isDataType()
1309 {
1310 return this.getSuperFrontEndUseCase().isDataType();
1311 }
1312
1313 /**
1314 * True when this classifier is a date type.
1315 * @see ClassifierFacade#isDateType()
1316 */
1317 public boolean isDateType()
1318 {
1319 return this.getSuperFrontEndUseCase().isDateType();
1320 }
1321
1322 /**
1323 * Indicates if this type represents a Double type or not.
1324 * @see ClassifierFacade#isDoubleType()
1325 */
1326 public boolean isDoubleType()
1327 {
1328 return this.getSuperFrontEndUseCase().isDoubleType();
1329 }
1330
1331 /**
1332 * Indicates whether or not this classifier represents an "EmbeddedValue'.
1333 * @see ClassifierFacade#isEmbeddedValue()
1334 */
1335 public boolean isEmbeddedValue()
1336 {
1337 return this.getSuperFrontEndUseCase().isEmbeddedValue();
1338 }
1339
1340 /**
1341 * True if this classifier is in fact marked as an enumeration.
1342 * @see ClassifierFacade#isEnumeration()
1343 */
1344 public boolean isEnumeration()
1345 {
1346 return this.getSuperFrontEndUseCase().isEnumeration();
1347 }
1348
1349 /**
1350 * Returns true if this type represents a 'file' type.
1351 * @see ClassifierFacade#isFileType()
1352 */
1353 public boolean isFileType()
1354 {
1355 return this.getSuperFrontEndUseCase().isFileType();
1356 }
1357
1358 /**
1359 * Indicates if this type represents a Float type or not.
1360 * @see ClassifierFacade#isFloatType()
1361 */
1362 public boolean isFloatType()
1363 {
1364 return this.getSuperFrontEndUseCase().isFloatType();
1365 }
1366
1367 /**
1368 * Indicates if this type represents an int or Integer or java.lang.Integer type or not.
1369 * @see ClassifierFacade#isIntegerType()
1370 */
1371 public boolean isIntegerType()
1372 {
1373 return this.getSuperFrontEndUseCase().isIntegerType();
1374 }
1375
1376 /**
1377 * True/false depending on whether or not this Classifier represents an interface.
1378 * @see ClassifierFacade#isInterface()
1379 */
1380 public boolean isInterface()
1381 {
1382 return this.getSuperFrontEndUseCase().isInterface();
1383 }
1384
1385 /**
1386 * True if this classifier cannot be extended and represent a leaf in the inheritance tree.
1387 * @see ClassifierFacade#isLeaf()
1388 */
1389 public boolean isLeaf()
1390 {
1391 return this.getSuperFrontEndUseCase().isLeaf();
1392 }
1393
1394 /**
1395 * True if this classifier represents a list type. False otherwise.
1396 * @see ClassifierFacade#isListType()
1397 */
1398 public boolean isListType()
1399 {
1400 return this.getSuperFrontEndUseCase().isListType();
1401 }
1402
1403 /**
1404 * Indicates if this type represents a Long type or not.
1405 * @see ClassifierFacade#isLongType()
1406 */
1407 public boolean isLongType()
1408 {
1409 return this.getSuperFrontEndUseCase().isLongType();
1410 }
1411
1412 /**
1413 * Indicates whether or not this classifier represents a Map type.
1414 * @see ClassifierFacade#isMapType()
1415 */
1416 public boolean isMapType()
1417 {
1418 return this.getSuperFrontEndUseCase().isMapType();
1419 }
1420
1421 /**
1422 * Indicates whether or not this classifier represents a primitive type.
1423 * @see ClassifierFacade#isPrimitive()
1424 */
1425 public boolean isPrimitive()
1426 {
1427 return this.getSuperFrontEndUseCase().isPrimitive();
1428 }
1429
1430 /**
1431 * True if this classifier represents a set type. False otherwise.
1432 * @see ClassifierFacade#isSetType()
1433 */
1434 public boolean isSetType()
1435 {
1436 return this.getSuperFrontEndUseCase().isSetType();
1437 }
1438
1439 /**
1440 * Indicates whether or not this classifier represents a string type.
1441 * @see ClassifierFacade#isStringType()
1442 */
1443 public boolean isStringType()
1444 {
1445 return this.getSuperFrontEndUseCase().isStringType();
1446 }
1447
1448 /**
1449 * Indicates whether or not this classifier represents a time type.
1450 * @see ClassifierFacade#isTimeType()
1451 */
1452 public boolean isTimeType()
1453 {
1454 return this.getSuperFrontEndUseCase().isTimeType();
1455 }
1456
1457 /**
1458 * Returns true if this type is a wrapped primitive type.
1459 * @see ClassifierFacade#isWrappedPrimitive()
1460 */
1461 public boolean isWrappedPrimitive()
1462 {
1463 return this.getSuperFrontEndUseCase().isWrappedPrimitive();
1464 }
1465
1466 /**
1467 * The actions for this use-case. This will include the initial action to start the use-case.
1468 * @see FrontEndUseCase#getActions()
1469 */
1470 public List<FrontEndAction> getActions()
1471 {
1472 return this.getSuperFrontEndUseCase().getActions();
1473 }
1474
1475 /**
1476 * Returns the activity graph describing this use-case in more detail.
1477 * @see FrontEndUseCase#getActivityGraph()
1478 */
1479 public FrontEndActivityGraph getActivityGraph()
1480 {
1481 return this.getSuperFrontEndUseCase().getActivityGraph();
1482 }
1483
1484 /**
1485 * All roles that directly or indirectly related to any "front-end" use cases.
1486 * @see FrontEndUseCase#getAllRoles()
1487 */
1488 public List<Role> getAllRoles()
1489 {
1490 return this.getSuperFrontEndUseCase().getAllRoles();
1491 }
1492
1493 /**
1494 * Returns all struts use-cases in this "front end" application.
1495 * @see FrontEndUseCase#getAllUseCases()
1496 */
1497 public List<FrontEndUseCase> getAllUseCases()
1498 {
1499 return this.getSuperFrontEndUseCase().getAllUseCases();
1500 }
1501
1502 /**
1503 * Returns the controller for this use-case.
1504 * @see FrontEndUseCase#getController()
1505 */
1506 public FrontEndController getController()
1507 {
1508 return this.getSuperFrontEndUseCase().getController();
1509 }
1510
1511 /**
1512 * The first view of this use case, this may actually return a view of another use case if the
1513 * first is found by traveling through the final state.
1514 * @see FrontEndUseCase#getInitialView()
1515 */
1516 public FrontEndView getInitialView()
1517 {
1518 return this.getSuperFrontEndUseCase().getInitialView();
1519 }
1520
1521 /**
1522 * The final states linking to this use case
1523 * @see FrontEndUseCase#getReferencingFinalStates()
1524 */
1525 public List<FrontEndFinalState> getReferencingFinalStates()
1526 {
1527 return this.getSuperFrontEndUseCase().getReferencingFinalStates();
1528 }
1529
1530 /**
1531 * Returns all roles that are directly and indirectly associated to this use-case.
1532 * @see FrontEndUseCase#getRoles()
1533 */
1534 public List<Role> getRoles()
1535 {
1536 return this.getSuperFrontEndUseCase().getRoles();
1537 }
1538
1539 /**
1540 * The variables for all views in this use-case. A parameter qualifies to be a variable when it
1541 * explicitely and directly receives it via an action.
1542 * @see FrontEndUseCase#getViewVariables()
1543 */
1544 public List<FrontEndParameter> getViewVariables()
1545 {
1546 return this.getSuperFrontEndUseCase().getViewVariables();
1547 }
1548
1549 /**
1550 * All views that are part of this use case.
1551 * @see FrontEndUseCase#getViews()
1552 */
1553 public List<FrontEndView> getViews()
1554 {
1555 return this.getSuperFrontEndUseCase().getViews();
1556 }
1557
1558 /**
1559 * True if this use-case is the entry point to the front end.
1560 * @see FrontEndUseCase#isEntryUseCase()
1561 */
1562 public boolean isEntryUseCase()
1563 {
1564 return this.getSuperFrontEndUseCase().isEntryUseCase();
1565 }
1566
1567 /**
1568 * Indicates if this use case is "secured". This is true when there is at least one role
1569 * associated to it.
1570 * @see FrontEndUseCase#isSecured()
1571 */
1572 public boolean isSecured()
1573 {
1574 return this.getSuperFrontEndUseCase().isSecured();
1575 }
1576
1577 /**
1578 * Finds the tagged value optional searching the entire inheritance hierarchy if 'follow' is set
1579 * to true.
1580 * @see GeneralizableElementFacade#findTaggedValue(String tagName, boolean follow)
1581 */
1582 public Object findTaggedValue(String tagName, boolean follow)
1583 {
1584 return this.getSuperFrontEndUseCase().findTaggedValue(tagName, follow);
1585 }
1586
1587 /**
1588 * All generalizations for this generalizable element, goes up the inheritance tree.
1589 * @see GeneralizableElementFacade#getAllGeneralizations()
1590 */
1591 public Collection<GeneralizableElementFacade> getAllGeneralizations()
1592 {
1593 return this.getSuperFrontEndUseCase().getAllGeneralizations();
1594 }
1595
1596 /**
1597 * All specializations (travels down the inheritance hierarchy).
1598 * @see GeneralizableElementFacade#getAllSpecializations()
1599 */
1600 public Collection<GeneralizableElementFacade> getAllSpecializations()
1601 {
1602 return this.getSuperFrontEndUseCase().getAllSpecializations();
1603 }
1604
1605 /**
1606 * Gets the direct generalization for this generalizable element.
1607 * @see GeneralizableElementFacade#getGeneralization()
1608 */
1609 public GeneralizableElementFacade getGeneralization()
1610 {
1611 return this.getSuperFrontEndUseCase().getGeneralization();
1612 }
1613
1614 /**
1615 * Gets the actual links that this generalization element is part of (it plays either the
1616 * specialization or generalization).
1617 * @see GeneralizableElementFacade#getGeneralizationLinks()
1618 */
1619 public Collection<GeneralizationFacade> getGeneralizationLinks()
1620 {
1621 return this.getSuperFrontEndUseCase().getGeneralizationLinks();
1622 }
1623
1624 /**
1625 * A comma separated list of the fully qualified names of all generalizations.
1626 * @see GeneralizableElementFacade#getGeneralizationList()
1627 */
1628 public String getGeneralizationList()
1629 {
1630 return this.getSuperFrontEndUseCase().getGeneralizationList();
1631 }
1632
1633 /**
1634 * The element found when you recursively follow the generalization path up to the root. If an
1635 * element has no generalization itself will be considered the root.
1636 * @see GeneralizableElementFacade#getGeneralizationRoot()
1637 */
1638 public GeneralizableElementFacade getGeneralizationRoot()
1639 {
1640 return this.getSuperFrontEndUseCase().getGeneralizationRoot();
1641 }
1642
1643 /**
1644 * Return all generalizations (ancestors) from this generalizable element.
1645 * @see GeneralizableElementFacade#getGeneralizations()
1646 */
1647 public Collection<GeneralizableElementFacade> getGeneralizations()
1648 {
1649 return this.getSuperFrontEndUseCase().getGeneralizations();
1650 }
1651
1652 /**
1653 * Gets the direct specializations (i.e. sub elements) for this generalizatble element.
1654 * @see GeneralizableElementFacade#getSpecializations()
1655 */
1656 public Collection<GeneralizableElementFacade> getSpecializations()
1657 {
1658 return this.getSuperFrontEndUseCase().getSpecializations();
1659 }
1660
1661 /**
1662 * Copies all tagged values from the given ModelElementFacade to this model element facade.
1663 * @see ModelElementFacade#copyTaggedValues(ModelElementFacade element)
1664 */
1665 public void copyTaggedValues(ModelElementFacade element)
1666 {
1667 this.getSuperFrontEndUseCase().copyTaggedValues(element);
1668 }
1669
1670 /**
1671 * Finds the tagged value with the specified 'tagName'. In case there are more values the first
1672 * one found will be returned.
1673 * @see ModelElementFacade#findTaggedValue(String tagName)
1674 */
1675 public Object findTaggedValue(String tagName)
1676 {
1677 return this.getSuperFrontEndUseCase().findTaggedValue(tagName);
1678 }
1679
1680 /**
1681 * Returns all the values for the tagged value with the specified name. The returned collection
1682 * will contains only String instances, or will be empty. Never null.
1683 * @see ModelElementFacade#findTaggedValues(String tagName)
1684 */
1685 public Collection<Object> findTaggedValues(String tagName)
1686 {
1687 return this.getSuperFrontEndUseCase().findTaggedValues(tagName);
1688 }
1689
1690 /**
1691 * Returns the fully qualified name of the model element. The fully qualified name includes
1692 * complete package qualified name of the underlying model element. The templates parameter will
1693 * be replaced by the correct one given the binding relation of the parameter to this element.
1694 * @see ModelElementFacade#getBindedFullyQualifiedName(ModelElementFacade bindedElement)
1695 */
1696 public String getBindedFullyQualifiedName(ModelElementFacade bindedElement)
1697 {
1698 return this.getSuperFrontEndUseCase().getBindedFullyQualifiedName(bindedElement);
1699 }
1700
1701 /**
1702 * Gets all constraints belonging to the model element.
1703 * @see ModelElementFacade#getConstraints()
1704 */
1705 public Collection<ConstraintFacade> getConstraints()
1706 {
1707 return this.getSuperFrontEndUseCase().getConstraints();
1708 }
1709
1710 /**
1711 * Returns the constraints of the argument kind that have been placed onto this model. Typical
1712 * kinds are "inv", "pre" and "post". Other kinds are possible.
1713 * @see ModelElementFacade#getConstraints(String kind)
1714 */
1715 public Collection<ConstraintFacade> getConstraints(String kind)
1716 {
1717 return this.getSuperFrontEndUseCase().getConstraints(kind);
1718 }
1719
1720 /**
1721 * Gets the documentation for the model element, The indent argument is prefixed to each line.
1722 * By default this method wraps lines after 64 characters.
1723 * This method is equivalent to <code>getDocumentation(indent, 64)</code>.
1724 * @see ModelElementFacade#getDocumentation(String indent)
1725 */
1726 public String getDocumentation(String indent)
1727 {
1728 return this.getSuperFrontEndUseCase().getDocumentation(indent);
1729 }
1730
1731 /**
1732 * This method returns the documentation for this model element, with the lines wrapped after
1733 * the specified number of characters, values of less than 1 will indicate no line wrapping is
1734 * required. By default paragraphs are returned as HTML.
1735 * This method is equivalent to <code>getDocumentation(indent, lineLength, true)</code>.
1736 * @see ModelElementFacade#getDocumentation(String indent, int lineLength)
1737 */
1738 public String getDocumentation(String indent, int lineLength)
1739 {
1740 return this.getSuperFrontEndUseCase().getDocumentation(indent, lineLength);
1741 }
1742
1743 /**
1744 * This method returns the documentation for this model element, with the lines wrapped after
1745 * the specified number of characters, values of less than 1 will indicate no line wrapping is
1746 * required. HTML style determines if HTML Escaping is applied.
1747 * @see ModelElementFacade#getDocumentation(String indent, int lineLength, boolean htmlStyle)
1748 */
1749 public String getDocumentation(String indent, int lineLength, boolean htmlStyle)
1750 {
1751 return this.getSuperFrontEndUseCase().getDocumentation(indent, lineLength, htmlStyle);
1752 }
1753
1754 /**
1755 * The fully qualified name of this model element.
1756 * @see ModelElementFacade#getFullyQualifiedName()
1757 */
1758 public String getFullyQualifiedName()
1759 {
1760 return this.getSuperFrontEndUseCase().getFullyQualifiedName();
1761 }
1762
1763 /**
1764 * Returns the fully qualified name of the model element. The fully qualified name includes
1765 * complete package qualified name of the underlying model element. If modelName is true, then
1766 * the original name of the model element (the name contained within the model) will be the name
1767 * returned, otherwise a name from a language mapping will be returned.
1768 * @see ModelElementFacade#getFullyQualifiedName(boolean modelName)
1769 */
1770 public String getFullyQualifiedName(boolean modelName)
1771 {
1772 return this.getSuperFrontEndUseCase().getFullyQualifiedName(modelName);
1773 }
1774
1775 /**
1776 * Returns the fully qualified name as a path, the returned value always starts with out a slash
1777 * '/'.
1778 * @see ModelElementFacade#getFullyQualifiedNamePath()
1779 */
1780 public String getFullyQualifiedNamePath()
1781 {
1782 return this.getSuperFrontEndUseCase().getFullyQualifiedNamePath();
1783 }
1784
1785 /**
1786 * Gets the unique identifier of the underlying model element.
1787 * @see ModelElementFacade#getId()
1788 */
1789 public String getId()
1790 {
1791 return this.getSuperFrontEndUseCase().getId();
1792 }
1793
1794 /**
1795 * UML2: Retrieves the keywords for this element. Used to modify implementation properties which
1796 * are not represented by other properties, i.e. native, transient, volatile, synchronized,
1797 * (added annotations) override, deprecated. Can also be used to suppress compiler warnings:
1798 * (added annotations) unchecked, fallthrough, path, serial, finally, all. Annotations require
1799 * JDK5 compiler level.
1800 * @see ModelElementFacade#getKeywords()
1801 */
1802 public Collection<String> getKeywords()
1803 {
1804 return this.getSuperFrontEndUseCase().getKeywords();
1805 }
1806
1807 /**
1808 * UML2: Retrieves a localized label for this named element.
1809 * @see ModelElementFacade#getLabel()
1810 */
1811 public String getLabel()
1812 {
1813 return this.getSuperFrontEndUseCase().getLabel();
1814 }
1815
1816 /**
1817 * The language mappings that have been set for this model element.
1818 * @see ModelElementFacade#getLanguageMappings()
1819 */
1820 public TypeMappings getLanguageMappings()
1821 {
1822 return this.getSuperFrontEndUseCase().getLanguageMappings();
1823 }
1824
1825 /**
1826 * Return the model containing this model element (multiple models may be loaded and processed
1827 * at the same time).
1828 * @see ModelElementFacade#getModel()
1829 */
1830 public ModelFacade getModel()
1831 {
1832 return this.getSuperFrontEndUseCase().getModel();
1833 }
1834
1835 /**
1836 * The name of the model element.
1837 * @see ModelElementFacade#getName()
1838 */
1839 public String getName()
1840 {
1841 return this.getSuperFrontEndUseCase().getName();
1842 }
1843
1844 /**
1845 * Gets the package to which this model element belongs.
1846 * @see ModelElementFacade#getPackage()
1847 */
1848 public ModelElementFacade getPackage()
1849 {
1850 return this.getSuperFrontEndUseCase().getPackage();
1851 }
1852
1853 /**
1854 * The name of this model element's package.
1855 * @see ModelElementFacade#getPackageName()
1856 */
1857 public String getPackageName()
1858 {
1859 return this.getSuperFrontEndUseCase().getPackageName();
1860 }
1861
1862 /**
1863 * Gets the package name (optionally providing the ability to retrieve the model name and not
1864 * the mapped name).
1865 * @see ModelElementFacade#getPackageName(boolean modelName)
1866 */
1867 public String getPackageName(boolean modelName)
1868 {
1869 return this.getSuperFrontEndUseCase().getPackageName(modelName);
1870 }
1871
1872 /**
1873 * Returns the package as a path, the returned value always starts with out a slash '/'.
1874 * @see ModelElementFacade#getPackagePath()
1875 */
1876 public String getPackagePath()
1877 {
1878 return this.getSuperFrontEndUseCase().getPackagePath();
1879 }
1880
1881 /**
1882 * UML2: Returns the value of the 'Qualified Name' attribute. A name which allows the
1883 * NamedElement to be identified within a hierarchy of nested Namespaces. It is constructed from
1884 * the names of the containing namespaces starting at the root of the hierarchy and ending with
1885 * the name of the NamedElement itself.
1886 * @see ModelElementFacade#getQualifiedName()
1887 */
1888 public String getQualifiedName()
1889 {
1890 return this.getSuperFrontEndUseCase().getQualifiedName();
1891 }
1892
1893 /**
1894 * Gets the root package for the model element.
1895 * @see ModelElementFacade#getRootPackage()
1896 */
1897 public PackageFacade getRootPackage()
1898 {
1899 return this.getSuperFrontEndUseCase().getRootPackage();
1900 }
1901
1902 /**
1903 * Gets the dependencies for which this model element is the source.
1904 * @see ModelElementFacade#getSourceDependencies()
1905 */
1906 public Collection<DependencyFacade> getSourceDependencies()
1907 {
1908 return this.getSuperFrontEndUseCase().getSourceDependencies();
1909 }
1910
1911 /**
1912 * If this model element is the context of an activity graph, this represents that activity
1913 * graph.
1914 * @see ModelElementFacade#getStateMachineContext()
1915 */
1916 public StateMachineFacade getStateMachineContext()
1917 {
1918 return this.getSuperFrontEndUseCase().getStateMachineContext();
1919 }
1920
1921 /**
1922 * The collection of ALL stereotype names for this model element.
1923 * @see ModelElementFacade#getStereotypeNames()
1924 */
1925 public Collection<String> getStereotypeNames()
1926 {
1927 return this.getSuperFrontEndUseCase().getStereotypeNames();
1928 }
1929
1930 /**
1931 * Gets all stereotypes for this model element.
1932 * @see ModelElementFacade#getStereotypes()
1933 */
1934 public Collection<StereotypeFacade> getStereotypes()
1935 {
1936 return this.getSuperFrontEndUseCase().getStereotypes();
1937 }
1938
1939 /**
1940 * Return the TaggedValues associated with this model element, under all stereotypes.
1941 * @see ModelElementFacade#getTaggedValues()
1942 */
1943 public Collection<TaggedValueFacade> getTaggedValues()
1944 {
1945 return this.getSuperFrontEndUseCase().getTaggedValues();
1946 }
1947
1948 /**
1949 * Gets the dependencies for which this model element is the target.
1950 * @see ModelElementFacade#getTargetDependencies()
1951 */
1952 public Collection<DependencyFacade> getTargetDependencies()
1953 {
1954 return this.getSuperFrontEndUseCase().getTargetDependencies();
1955 }
1956
1957 /**
1958 * Get the template parameter for this model element having the parameterName
1959 * @see ModelElementFacade#getTemplateParameter(String parameterName)
1960 */
1961 public Object getTemplateParameter(String parameterName)
1962 {
1963 return this.getSuperFrontEndUseCase().getTemplateParameter(parameterName);
1964 }
1965
1966 /**
1967 * Get the template parameters for this model element
1968 * @see ModelElementFacade#getTemplateParameters()
1969 */
1970 public Collection<TemplateParameterFacade> getTemplateParameters()
1971 {
1972 return this.getSuperFrontEndUseCase().getTemplateParameters();
1973 }
1974
1975 /**
1976 * The visibility (i.e. public, private, protected or package) of the model element, will
1977 * attempt a lookup for these values in the language mappings (if any).
1978 * @see ModelElementFacade#getVisibility()
1979 */
1980 public String getVisibility()
1981 {
1982 return this.getSuperFrontEndUseCase().getVisibility();
1983 }
1984
1985 /**
1986 * Returns true if the model element has the exact stereotype (meaning no stereotype inheritance
1987 * is taken into account when searching for the stereotype), false otherwise.
1988 * @see ModelElementFacade#hasExactStereotype(String stereotypeName)
1989 */
1990 public boolean hasExactStereotype(String stereotypeName)
1991 {
1992 return this.getSuperFrontEndUseCase().hasExactStereotype(stereotypeName);
1993 }
1994
1995 /**
1996 * Does the UML Element contain the named Keyword? Keywords can be separated by space, comma,
1997 * pipe, semicolon, or << >>
1998 * @see ModelElementFacade#hasKeyword(String keywordName)
1999 */
2000 public boolean hasKeyword(String keywordName)
2001 {
2002 return this.getSuperFrontEndUseCase().hasKeyword(keywordName);
2003 }
2004
2005 /**
2006 * Returns true if the model element has the specified stereotype. If the stereotype itself
2007 * does not match, then a search will be made up the stereotype inheritance hierarchy, and if
2008 * one of the stereotype's ancestors has a matching name this method will return true, false
2009 * otherwise.
2010 * For example, if we have a certain stereotype called <<exception>> and a model element has a
2011 * stereotype called <<applicationException>> which extends <<exception>>, when calling this
2012 * method with 'stereotypeName' defined as 'exception' the method would return true since
2013 * <<applicationException>> inherits from <<exception>>. If you want to check if the model
2014 * element has the exact stereotype, then use the method 'hasExactStereotype' instead.
2015 * @see ModelElementFacade#hasStereotype(String stereotypeName)
2016 */
2017 public boolean hasStereotype(String stereotypeName)
2018 {
2019 return this.getSuperFrontEndUseCase().hasStereotype(stereotypeName);
2020 }
2021
2022 /**
2023 * True if there are target dependencies from this element that are instances of BindingFacade.
2024 * Deprecated in UML2: Use TemplateBinding parameters instead of dependencies.
2025 * @see ModelElementFacade#isBindingDependenciesPresent()
2026 */
2027 public boolean isBindingDependenciesPresent()
2028 {
2029 return this.getSuperFrontEndUseCase().isBindingDependenciesPresent();
2030 }
2031
2032 /**
2033 * Indicates if any constraints are present on this model element.
2034 * @see ModelElementFacade#isConstraintsPresent()
2035 */
2036 public boolean isConstraintsPresent()
2037 {
2038 return this.getSuperFrontEndUseCase().isConstraintsPresent();
2039 }
2040
2041 /**
2042 * Indicates if any documentation is present on this model element.
2043 * @see ModelElementFacade#isDocumentationPresent()
2044 */
2045 public boolean isDocumentationPresent()
2046 {
2047 return this.getSuperFrontEndUseCase().isDocumentationPresent();
2048 }
2049
2050 /**
2051 * True if this element name is a reserved word in Java, C#, ANSI or ISO C, C++, JavaScript.
2052 * @see ModelElementFacade#isReservedWord()
2053 */
2054 public boolean isReservedWord()
2055 {
2056 return this.getSuperFrontEndUseCase().isReservedWord();
2057 }
2058
2059 /**
2060 * True is there are template parameters on this model element. For UML2, applies to Class,
2061 * Operation, Property, and Parameter.
2062 * @see ModelElementFacade#isTemplateParametersPresent()
2063 */
2064 public boolean isTemplateParametersPresent()
2065 {
2066 return this.getSuperFrontEndUseCase().isTemplateParametersPresent();
2067 }
2068
2069 /**
2070 * True if this element name is a valid identifier name in Java, C#, ANSI or ISO C, C++,
2071 * JavaScript. Contains no spaces, special characters etc. Constraint always applied on
2072 * Enumerations and Interfaces, optionally applies on other model elements.
2073 * @see ModelElementFacade#isValidIdentifierName()
2074 */
2075 public boolean isValidIdentifierName()
2076 {
2077 return this.getSuperFrontEndUseCase().isValidIdentifierName();
2078 }
2079
2080 /**
2081 * Searches for the constraint with the specified 'name' on this model element, and if found
2082 * translates it using the specified 'translation' from a translation library discovered by the
2083 * framework.
2084 * @see ModelElementFacade#translateConstraint(String name, String translation)
2085 */
2086 public String translateConstraint(String name, String translation)
2087 {
2088 return this.getSuperFrontEndUseCase().translateConstraint(name, translation);
2089 }
2090
2091 /**
2092 * Translates all constraints belonging to this model element with the given 'translation'.
2093 * @see ModelElementFacade#translateConstraints(String translation)
2094 */
2095 public String[] translateConstraints(String translation)
2096 {
2097 return this.getSuperFrontEndUseCase().translateConstraints(translation);
2098 }
2099
2100 /**
2101 * Translates the constraints of the specified 'kind' belonging to this model element.
2102 * @see ModelElementFacade#translateConstraints(String kind, String translation)
2103 */
2104 public String[] translateConstraints(String kind, String translation)
2105 {
2106 return this.getSuperFrontEndUseCase().translateConstraints(kind, translation);
2107 }
2108
2109 /**
2110 * Gets the model elements which this namespace owns.
2111 * @see org.andromda.metafacades.uml.NamespaceFacade#getOwnedElements()
2112 */
2113 public Collection<ModelElementFacade> getOwnedElements()
2114 {
2115 return this.getSuperFrontEndUseCase().getOwnedElements();
2116 }
2117
2118 /**
2119 * The extend instances related to this use-case.
2120 * @see org.andromda.metafacades.uml.UseCaseFacade#getExtends()
2121 */
2122 public Collection<ExtendFacade> getExtends()
2123 {
2124 return this.getSuperFrontEndUseCase().getExtends();
2125 }
2126
2127 /**
2128 * The extension points related to this use-case.
2129 * @see org.andromda.metafacades.uml.UseCaseFacade#getExtensionPoints()
2130 */
2131 public Collection<ExtensionPointFacade> getExtensionPoints()
2132 {
2133 return this.getSuperFrontEndUseCase().getExtensionPoints();
2134 }
2135
2136 /**
2137 * The first activity graph directly owned by this use-case.
2138 * @see org.andromda.metafacades.uml.UseCaseFacade#getFirstActivityGraph()
2139 */
2140 public ActivityGraphFacade getFirstActivityGraph()
2141 {
2142 return this.getSuperFrontEndUseCase().getFirstActivityGraph();
2143 }
2144
2145 /**
2146 * The included instances related to this use-case.
2147 * @see org.andromda.metafacades.uml.UseCaseFacade#getIncludes()
2148 */
2149 public Collection<IncludeFacade> getIncludes()
2150 {
2151 return this.getSuperFrontEndUseCase().getIncludes();
2152 }
2153
2154 /**
2155 * @see MetafacadeBase#initialize()
2156 */
2157 @Override
2158 public void initialize()
2159 {
2160 this.getSuperFrontEndUseCase().initialize();
2161 }
2162
2163 /**
2164 * @return Object getSuperFrontEndUseCase().getValidationOwner()
2165 * @see MetafacadeBase#getValidationOwner()
2166 */
2167 @Override
2168 public Object getValidationOwner()
2169 {
2170 Object owner = this.getSuperFrontEndUseCase().getValidationOwner();
2171 return owner;
2172 }
2173
2174 /**
2175 * @return String getSuperFrontEndUseCase().getValidationName()
2176 * @see MetafacadeBase#getValidationName()
2177 */
2178 @Override
2179 public String getValidationName()
2180 {
2181 String name = this.getSuperFrontEndUseCase().getValidationName();
2182 return name;
2183 }
2184
2185 /**
2186 * <p><b>Constraint:</b> org::andromda::cartridges::bpm4struts::metafacades::StrutsUseCase::use-cases that loop need at least one page</p>
2187 * <p><b>Error:</b> This use-case has a final state targetting the same use-case, while at the same time no pages have been modeled. This will lead to an infinite loop at runtime since the same event will keep invoking itself.</p>
2188 * <p><b>OCL:</b> context StrutsUseCase inv: cyclic implies pages->notEmpty()</p>
2189 * @param validationMessages Collection<ModelValidationMessage>
2190 * @see MetafacadeBase#validateInvariants(Collection validationMessages)
2191 */
2192 @Override
2193 public void validateInvariants(Collection<ModelValidationMessage> validationMessages)
2194 {
2195 this.getSuperFrontEndUseCase().validateInvariants(validationMessages);
2196 try
2197 {
2198 final Object contextElement = this.THIS();
2199 boolean constraintValid = OCLResultEnsurer.ensure((Boolean.valueOf(String.valueOf(OCLIntrospector.invoke(contextElement,"cyclic"))).booleanValue()?OCLCollections.notEmpty(OCLIntrospector.invoke(contextElement,"pages")):true));
2200 if (!constraintValid)
2201 {
2202 validationMessages.add(
2203 new ModelValidationMessage(
2204 (MetafacadeBase)contextElement ,
2205 "org::andromda::cartridges::bpm4struts::metafacades::StrutsUseCase::use-cases that loop need at least one page",
2206 "This use-case has a final state targetting the same use-case, while at the same time no pages have been modeled. This will lead to an infinite loop at runtime since the same event will keep invoking itself."));
2207 }
2208 }
2209 catch (Throwable th)
2210 {
2211 Throwable cause = th.getCause();
2212 int depth = 0; // Some throwables have infinite recursion
2213 while (cause != null && depth < 7)
2214 {
2215 th = cause;
2216 depth++;
2217 }
2218 logger.error("Error validating constraint 'org::andromda::cartridges::bpm4struts::metafacades::StrutsUseCase::use-cases that loop need at least one page' ON "
2219 + this.THIS().toString() + ": " + th.getMessage(), th);
2220 }
2221 }
2222
2223 /**
2224 * The property that stores the name of the metafacade.
2225 */
2226 private static final String NAME_PROPERTY = "name";
2227 private static final String FQNAME_PROPERTY = "fullyQualifiedName";
2228
2229 /**
2230 * @see Object#toString()
2231 */
2232 @Override
2233 public String toString()
2234 {
2235 final StringBuilder toString = new StringBuilder(this.getClass().getName());
2236 toString.append("[");
2237 try
2238 {
2239 toString.append(Introspector.instance().getProperty(this, FQNAME_PROPERTY));
2240 }
2241 catch (final Throwable tryAgain)
2242 {
2243 try
2244 {
2245 toString.append(Introspector.instance().getProperty(this, NAME_PROPERTY));
2246 }
2247 catch (final Throwable ignore)
2248 {
2249 // - just ignore when the metafacade doesn't have a name or fullyQualifiedName property
2250 }
2251 }
2252 toString.append("]");
2253 return toString.toString();
2254 }
2255 }