1 // license-header java merge-point
2 //
3 // Attention: generated code (by MetafacadeLogic.vsl) - do not modify!
4 //
5 package org.andromda.cartridges.jsf.metafacades;
6
7 import java.util.Collection;
8 import java.util.List;
9 import org.andromda.core.common.Introspector;
10 import org.andromda.core.metafacade.MetafacadeBase;
11 import org.andromda.core.metafacade.MetafacadeFactory;
12 import org.andromda.core.metafacade.ModelValidationMessage;
13 import org.andromda.metafacades.uml.ActionFacade;
14 import org.andromda.metafacades.uml.ConstraintFacade;
15 import org.andromda.metafacades.uml.DependencyFacade;
16 import org.andromda.metafacades.uml.EventFacade;
17 import org.andromda.metafacades.uml.FrontEndAction;
18 import org.andromda.metafacades.uml.FrontEndActivityGraph;
19 import org.andromda.metafacades.uml.FrontEndControllerOperation;
20 import org.andromda.metafacades.uml.FrontEndEvent;
21 import org.andromda.metafacades.uml.FrontEndExceptionHandler;
22 import org.andromda.metafacades.uml.FrontEndParameter;
23 import org.andromda.metafacades.uml.FrontEndUseCase;
24 import org.andromda.metafacades.uml.GuardFacade;
25 import org.andromda.metafacades.uml.ModelElementFacade;
26 import org.andromda.metafacades.uml.ModelFacade;
27 import org.andromda.metafacades.uml.PackageFacade;
28 import org.andromda.metafacades.uml.StateMachineFacade;
29 import org.andromda.metafacades.uml.StateVertexFacade;
30 import org.andromda.metafacades.uml.StereotypeFacade;
31 import org.andromda.metafacades.uml.TaggedValueFacade;
32 import org.andromda.metafacades.uml.TemplateParameterFacade;
33 import org.andromda.metafacades.uml.TypeMappings;
34
35 /**
36 * TODO: Model Documentation for org.andromda.cartridges.jsf.metafacades.JSFExceptionHandler
37 * MetafacadeLogic for JSFExceptionHandler
38 *
39 * @see JSFExceptionHandler
40 */
41 public abstract class JSFExceptionHandlerLogic
42 extends MetafacadeBase
43 implements JSFExceptionHandler
44 {
45 /**
46 * The underlying UML object
47 * @see Object
48 */
49 protected Object metaObject;
50
51 /** Create Metafacade implementation instance using the MetafacadeFactory from the context
52 * @param metaObjectIn
53 * @param context
54 */
55 protected JSFExceptionHandlerLogic(Object metaObjectIn, String context)
56 {
57 super(metaObjectIn, getContext(context));
58 this.superFrontEndExceptionHandler =
59 (FrontEndExceptionHandler)
60 MetafacadeFactory.getInstance().createFacadeImpl(
61 "org.andromda.metafacades.uml.FrontEndExceptionHandler",
62 metaObjectIn,
63 getContext(context));
64 this.metaObject = metaObjectIn;
65 }
66
67 /**
68 * Gets the context for this metafacade logic instance.
69 * @param context String. Set to JSFExceptionHandler if null
70 * @return context String
71 */
72 private static String getContext(String context)
73 {
74 if (context == null)
75 {
76 context = "org.andromda.cartridges.jsf.metafacades.JSFExceptionHandler";
77 }
78 return context;
79 }
80
81 private FrontEndExceptionHandler superFrontEndExceptionHandler;
82 private boolean superFrontEndExceptionHandlerInitialized = false;
83
84 /**
85 * Gets the FrontEndExceptionHandler parent instance.
86 * @return this.superFrontEndExceptionHandler FrontEndExceptionHandler
87 */
88 private FrontEndExceptionHandler getSuperFrontEndExceptionHandler()
89 {
90 if (!this.superFrontEndExceptionHandlerInitialized)
91 {
92 ((MetafacadeBase)this.superFrontEndExceptionHandler).setMetafacadeContext(this.getMetafacadeContext());
93 this.superFrontEndExceptionHandlerInitialized = true;
94 }
95 return this.superFrontEndExceptionHandler;
96 }
97
98 /** Reset context only for non-root metafacades
99 * @param context
100 * @see org.andromda.core.metafacade.MetafacadeBase#resetMetafacadeContext(String context)
101 */
102 @Override
103 public void resetMetafacadeContext(String context)
104 {
105 if (!this.contextRoot) // reset context only for non-root metafacades
106 {
107 context = getContext(context); // to have same value as in original constructor call
108 setMetafacadeContext (context);
109 if (this.superFrontEndExceptionHandlerInitialized)
110 {
111 ((MetafacadeBase)this.superFrontEndExceptionHandler).resetMetafacadeContext(context);
112 }
113 }
114 }
115
116 /**
117 * @return boolean true always
118 * @see JSFExceptionHandler
119 */
120 public boolean isJSFExceptionHandlerMetaType()
121 {
122 return true;
123 }
124
125 // --------------- attributes ---------------------
126
127 /**
128 * @see org.andromda.cartridges.jsf.metafacades.JSFExceptionHandler#getExceptionKey()
129 * @return String
130 */
131 protected abstract String handleGetExceptionKey();
132
133 private String __exceptionKey1a;
134 private boolean __exceptionKey1aSet = false;
135
136 /**
137 * The key to use with this handler's message resource bundle that will retrieve the error
138 * message template for this exception.
139 * @return (String)handleGetExceptionKey()
140 */
141 public final String getExceptionKey()
142 {
143 String exceptionKey1a = this.__exceptionKey1a;
144 if (!this.__exceptionKey1aSet)
145 {
146 // exceptionKey has no pre constraints
147 exceptionKey1a = handleGetExceptionKey();
148 // exceptionKey has no post constraints
149 this.__exceptionKey1a = exceptionKey1a;
150 if (isMetafacadePropertyCachingEnabled())
151 {
152 this.__exceptionKey1aSet = true;
153 }
154 }
155 return exceptionKey1a;
156 }
157
158 /**
159 * @see org.andromda.cartridges.jsf.metafacades.JSFExceptionHandler#getExceptionPath()
160 * @return String
161 */
162 protected abstract String handleGetExceptionPath();
163
164 private String __exceptionPath2a;
165 private boolean __exceptionPath2aSet = false;
166
167 /**
168 * The module-relative URI to the resource that will complete the request/response if this
169 * exception occurs.
170 * @return (String)handleGetExceptionPath()
171 */
172 public final String getExceptionPath()
173 {
174 String exceptionPath2a = this.__exceptionPath2a;
175 if (!this.__exceptionPath2aSet)
176 {
177 // exceptionPath has no pre constraints
178 exceptionPath2a = handleGetExceptionPath();
179 // exceptionPath has no post constraints
180 this.__exceptionPath2a = exceptionPath2a;
181 if (isMetafacadePropertyCachingEnabled())
182 {
183 this.__exceptionPath2aSet = true;
184 }
185 }
186 return exceptionPath2a;
187 }
188
189 /**
190 * @see org.andromda.cartridges.jsf.metafacades.JSFExceptionHandler#getExceptionType()
191 * @return String
192 */
193 protected abstract String handleGetExceptionType();
194
195 private String __exceptionType3a;
196 private boolean __exceptionType3aSet = false;
197
198 /**
199 * Fully qualified Java class name of the exception type to register with this handler.
200 * @return (String)handleGetExceptionType()
201 */
202 public final String getExceptionType()
203 {
204 String exceptionType3a = this.__exceptionType3a;
205 if (!this.__exceptionType3aSet)
206 {
207 // exceptionType has no pre constraints
208 exceptionType3a = handleGetExceptionType();
209 // exceptionType has no post constraints
210 this.__exceptionType3a = exceptionType3a;
211 if (isMetafacadePropertyCachingEnabled())
212 {
213 this.__exceptionType3aSet = true;
214 }
215 }
216 return exceptionType3a;
217 }
218
219 /**
220 * @see org.andromda.cartridges.jsf.metafacades.JSFExceptionHandler#getMessageKey()
221 * @return String
222 */
223 protected abstract String handleGetMessageKey();
224
225 private String __messageKey4a;
226 private boolean __messageKey4aSet = false;
227
228 /**
229 * TODO: Model Documentation for
230 * org.andromda.cartridges.jsf.metafacades.JSFExceptionHandler.messageKey
231 * @return (String)handleGetMessageKey()
232 */
233 public final String getMessageKey()
234 {
235 String messageKey4a = this.__messageKey4a;
236 if (!this.__messageKey4aSet)
237 {
238 // messageKey has no pre constraints
239 messageKey4a = handleGetMessageKey();
240 // messageKey has no post constraints
241 this.__messageKey4a = messageKey4a;
242 if (isMetafacadePropertyCachingEnabled())
243 {
244 this.__messageKey4aSet = true;
245 }
246 }
247 return messageKey4a;
248 }
249
250 /**
251 * @return true
252 * @see FrontEndExceptionHandler
253 */
254 public boolean isFrontEndExceptionHandlerMetaType()
255 {
256 return true;
257 }
258
259 /**
260 * @return true
261 * @see org.andromda.metafacades.uml.FrontEndForward
262 */
263 public boolean isFrontEndForwardMetaType()
264 {
265 return true;
266 }
267
268 /**
269 * @return true
270 * @see org.andromda.metafacades.uml.TransitionFacade
271 */
272 public boolean isTransitionFacadeMetaType()
273 {
274 return true;
275 }
276
277 /**
278 * @return true
279 * @see ModelElementFacade
280 */
281 public boolean isModelElementFacadeMetaType()
282 {
283 return true;
284 }
285
286 // ----------- delegates to FrontEndExceptionHandler ------------
287 /**
288 * Indicatesif this element carries the FrontEndException stereotype.
289 * @see FrontEndExceptionHandler#isFrontEndException()
290 */
291 public boolean isFrontEndException()
292 {
293 return this.getSuperFrontEndExceptionHandler().isFrontEndException();
294 }
295
296 /**
297 * The method name used to delegate to this forward.
298 * @see org.andromda.metafacades.uml.FrontEndForward#getActionMethodName()
299 */
300 public String getActionMethodName()
301 {
302 return this.getSuperFrontEndExceptionHandler().getActionMethodName();
303 }
304
305 /**
306 * The front-end actions directly containing this front-end forward.
307 * @see org.andromda.metafacades.uml.FrontEndForward#getActions()
308 */
309 public List<FrontEndAction> getActions()
310 {
311 return this.getSuperFrontEndExceptionHandler().getActions();
312 }
313
314 /**
315 * The trigger for this front-end forward.
316 * @see org.andromda.metafacades.uml.FrontEndForward#getDecisionTrigger()
317 */
318 public FrontEndEvent getDecisionTrigger()
319 {
320 return this.getSuperFrontEndExceptionHandler().getDecisionTrigger();
321 }
322
323 /**
324 * Tthe set of parameter used during transport in this forward.
325 * @see org.andromda.metafacades.uml.FrontEndForward#getForwardParameters()
326 */
327 public List<FrontEndParameter> getForwardParameters()
328 {
329 return this.getSuperFrontEndExceptionHandler().getForwardParameters();
330 }
331
332 /**
333 * The activity graph which holds this forward if the graph is contained in a FrontEndUseCase.
334 * @see org.andromda.metafacades.uml.FrontEndForward#getFrontEndActivityGraph()
335 */
336 public FrontEndActivityGraph getFrontEndActivityGraph()
337 {
338 return this.getSuperFrontEndExceptionHandler().getFrontEndActivityGraph();
339 }
340
341 /**
342 * The operation to which is called during execution of this front-end forward.
343 * @see org.andromda.metafacades.uml.FrontEndForward#getOperationCall()
344 */
345 public FrontEndControllerOperation getOperationCall()
346 {
347 return this.getSuperFrontEndExceptionHandler().getOperationCall();
348 }
349
350 /**
351 * The use case in which this forward is contained.
352 * @see org.andromda.metafacades.uml.FrontEndForward#getUseCase()
353 */
354 public FrontEndUseCase getUseCase()
355 {
356 return this.getSuperFrontEndExceptionHandler().getUseCase();
357 }
358
359 /**
360 * Indicates if this forward is contained in a FrontEndUseCase.
361 * @see org.andromda.metafacades.uml.FrontEndForward#isContainedInFrontEndUseCase()
362 */
363 public boolean isContainedInFrontEndUseCase()
364 {
365 return this.getSuperFrontEndExceptionHandler().isContainedInFrontEndUseCase();
366 }
367
368 /**
369 * Indicates if this action directly targets a "front-end" view, false otherwise.
370 * @see org.andromda.metafacades.uml.FrontEndForward#isEnteringView()
371 */
372 public boolean isEnteringView()
373 {
374 return this.getSuperFrontEndExceptionHandler().isEnteringView();
375 }
376
377 /**
378 * Indicates if this forward (transition) is coming out of a front-end view.
379 * @see org.andromda.metafacades.uml.FrontEndForward#isExitingView()
380 */
381 public boolean isExitingView()
382 {
383 return this.getSuperFrontEndExceptionHandler().isExitingView();
384 }
385
386 /**
387 * Copies all tagged values from the given ModelElementFacade to this model element facade.
388 * @see ModelElementFacade#copyTaggedValues(ModelElementFacade element)
389 */
390 public void copyTaggedValues(ModelElementFacade element)
391 {
392 this.getSuperFrontEndExceptionHandler().copyTaggedValues(element);
393 }
394
395 /**
396 * Finds the tagged value with the specified 'tagName'. In case there are more values the first
397 * one found will be returned.
398 * @see ModelElementFacade#findTaggedValue(String tagName)
399 */
400 public Object findTaggedValue(String tagName)
401 {
402 return this.getSuperFrontEndExceptionHandler().findTaggedValue(tagName);
403 }
404
405 /**
406 * Returns all the values for the tagged value with the specified name. The returned collection
407 * will contains only String instances, or will be empty. Never null.
408 * @see ModelElementFacade#findTaggedValues(String tagName)
409 */
410 public Collection<Object> findTaggedValues(String tagName)
411 {
412 return this.getSuperFrontEndExceptionHandler().findTaggedValues(tagName);
413 }
414
415 /**
416 * Returns the fully qualified name of the model element. The fully qualified name includes
417 * complete package qualified name of the underlying model element. The templates parameter will
418 * be replaced by the correct one given the binding relation of the parameter to this element.
419 * @see ModelElementFacade#getBindedFullyQualifiedName(ModelElementFacade bindedElement)
420 */
421 public String getBindedFullyQualifiedName(ModelElementFacade bindedElement)
422 {
423 return this.getSuperFrontEndExceptionHandler().getBindedFullyQualifiedName(bindedElement);
424 }
425
426 /**
427 * Gets all constraints belonging to the model element.
428 * @see ModelElementFacade#getConstraints()
429 */
430 public Collection<ConstraintFacade> getConstraints()
431 {
432 return this.getSuperFrontEndExceptionHandler().getConstraints();
433 }
434
435 /**
436 * Returns the constraints of the argument kind that have been placed onto this model. Typical
437 * kinds are "inv", "pre" and "post". Other kinds are possible.
438 * @see ModelElementFacade#getConstraints(String kind)
439 */
440 public Collection<ConstraintFacade> getConstraints(String kind)
441 {
442 return this.getSuperFrontEndExceptionHandler().getConstraints(kind);
443 }
444
445 /**
446 * Gets the documentation for the model element, The indent argument is prefixed to each line.
447 * By default this method wraps lines after 64 characters.
448 * This method is equivalent to <code>getDocumentation(indent, 64)</code>.
449 * @see ModelElementFacade#getDocumentation(String indent)
450 */
451 public String getDocumentation(String indent)
452 {
453 return this.getSuperFrontEndExceptionHandler().getDocumentation(indent);
454 }
455
456 /**
457 * This method returns the documentation for this model element, with the lines wrapped after
458 * the specified number of characters, values of less than 1 will indicate no line wrapping is
459 * required. By default paragraphs are returned as HTML.
460 * This method is equivalent to <code>getDocumentation(indent, lineLength, true)</code>.
461 * @see ModelElementFacade#getDocumentation(String indent, int lineLength)
462 */
463 public String getDocumentation(String indent, int lineLength)
464 {
465 return this.getSuperFrontEndExceptionHandler().getDocumentation(indent, lineLength);
466 }
467
468 /**
469 * This method returns the documentation for this model element, with the lines wrapped after
470 * the specified number of characters, values of less than 1 will indicate no line wrapping is
471 * required. HTML style determines if HTML Escaping is applied.
472 * @see ModelElementFacade#getDocumentation(String indent, int lineLength, boolean htmlStyle)
473 */
474 public String getDocumentation(String indent, int lineLength, boolean htmlStyle)
475 {
476 return this.getSuperFrontEndExceptionHandler().getDocumentation(indent, lineLength, htmlStyle);
477 }
478
479 /**
480 * The fully qualified name of this model element.
481 * @see ModelElementFacade#getFullyQualifiedName()
482 */
483 public String getFullyQualifiedName()
484 {
485 return this.getSuperFrontEndExceptionHandler().getFullyQualifiedName();
486 }
487
488 /**
489 * Returns the fully qualified name of the model element. The fully qualified name includes
490 * complete package qualified name of the underlying model element. If modelName is true, then
491 * the original name of the model element (the name contained within the model) will be the name
492 * returned, otherwise a name from a language mapping will be returned.
493 * @see ModelElementFacade#getFullyQualifiedName(boolean modelName)
494 */
495 public String getFullyQualifiedName(boolean modelName)
496 {
497 return this.getSuperFrontEndExceptionHandler().getFullyQualifiedName(modelName);
498 }
499
500 /**
501 * Returns the fully qualified name as a path, the returned value always starts with out a slash
502 * '/'.
503 * @see ModelElementFacade#getFullyQualifiedNamePath()
504 */
505 public String getFullyQualifiedNamePath()
506 {
507 return this.getSuperFrontEndExceptionHandler().getFullyQualifiedNamePath();
508 }
509
510 /**
511 * Gets the unique identifier of the underlying model element.
512 * @see ModelElementFacade#getId()
513 */
514 public String getId()
515 {
516 return this.getSuperFrontEndExceptionHandler().getId();
517 }
518
519 /**
520 * UML2: Retrieves the keywords for this element. Used to modify implementation properties which
521 * are not represented by other properties, i.e. native, transient, volatile, synchronized,
522 * (added annotations) override, deprecated. Can also be used to suppress compiler warnings:
523 * (added annotations) unchecked, fallthrough, path, serial, finally, all. Annotations require
524 * JDK5 compiler level.
525 * @see ModelElementFacade#getKeywords()
526 */
527 public Collection<String> getKeywords()
528 {
529 return this.getSuperFrontEndExceptionHandler().getKeywords();
530 }
531
532 /**
533 * UML2: Retrieves a localized label for this named element.
534 * @see ModelElementFacade#getLabel()
535 */
536 public String getLabel()
537 {
538 return this.getSuperFrontEndExceptionHandler().getLabel();
539 }
540
541 /**
542 * The language mappings that have been set for this model element.
543 * @see ModelElementFacade#getLanguageMappings()
544 */
545 public TypeMappings getLanguageMappings()
546 {
547 return this.getSuperFrontEndExceptionHandler().getLanguageMappings();
548 }
549
550 /**
551 * Return the model containing this model element (multiple models may be loaded and processed
552 * at the same time).
553 * @see ModelElementFacade#getModel()
554 */
555 public ModelFacade getModel()
556 {
557 return this.getSuperFrontEndExceptionHandler().getModel();
558 }
559
560 /**
561 * The name of the model element.
562 * @see ModelElementFacade#getName()
563 */
564 public String getName()
565 {
566 return this.getSuperFrontEndExceptionHandler().getName();
567 }
568
569 /**
570 * Gets the package to which this model element belongs.
571 * @see ModelElementFacade#getPackage()
572 */
573 public ModelElementFacade getPackage()
574 {
575 return this.getSuperFrontEndExceptionHandler().getPackage();
576 }
577
578 /**
579 * The name of this model element's package.
580 * @see ModelElementFacade#getPackageName()
581 */
582 public String getPackageName()
583 {
584 return this.getSuperFrontEndExceptionHandler().getPackageName();
585 }
586
587 /**
588 * Gets the package name (optionally providing the ability to retrieve the model name and not
589 * the mapped name).
590 * @see ModelElementFacade#getPackageName(boolean modelName)
591 */
592 public String getPackageName(boolean modelName)
593 {
594 return this.getSuperFrontEndExceptionHandler().getPackageName(modelName);
595 }
596
597 /**
598 * Returns the package as a path, the returned value always starts with out a slash '/'.
599 * @see ModelElementFacade#getPackagePath()
600 */
601 public String getPackagePath()
602 {
603 return this.getSuperFrontEndExceptionHandler().getPackagePath();
604 }
605
606 /**
607 * UML2: Returns the value of the 'Qualified Name' attribute. A name which allows the
608 * NamedElement to be identified within a hierarchy of nested Namespaces. It is constructed from
609 * the names of the containing namespaces starting at the root of the hierarchy and ending with
610 * the name of the NamedElement itself.
611 * @see ModelElementFacade#getQualifiedName()
612 */
613 public String getQualifiedName()
614 {
615 return this.getSuperFrontEndExceptionHandler().getQualifiedName();
616 }
617
618 /**
619 * Gets the root package for the model element.
620 * @see ModelElementFacade#getRootPackage()
621 */
622 public PackageFacade getRootPackage()
623 {
624 return this.getSuperFrontEndExceptionHandler().getRootPackage();
625 }
626
627 /**
628 * Gets the dependencies for which this model element is the source.
629 * @see ModelElementFacade#getSourceDependencies()
630 */
631 public Collection<DependencyFacade> getSourceDependencies()
632 {
633 return this.getSuperFrontEndExceptionHandler().getSourceDependencies();
634 }
635
636 /**
637 * If this model element is the context of an activity graph, this represents that activity
638 * graph.
639 * @see ModelElementFacade#getStateMachineContext()
640 */
641 public StateMachineFacade getStateMachineContext()
642 {
643 return this.getSuperFrontEndExceptionHandler().getStateMachineContext();
644 }
645
646 /**
647 * The collection of ALL stereotype names for this model element.
648 * @see ModelElementFacade#getStereotypeNames()
649 */
650 public Collection<String> getStereotypeNames()
651 {
652 return this.getSuperFrontEndExceptionHandler().getStereotypeNames();
653 }
654
655 /**
656 * Gets all stereotypes for this model element.
657 * @see ModelElementFacade#getStereotypes()
658 */
659 public Collection<StereotypeFacade> getStereotypes()
660 {
661 return this.getSuperFrontEndExceptionHandler().getStereotypes();
662 }
663
664 /**
665 * Return the TaggedValues associated with this model element, under all stereotypes.
666 * @see ModelElementFacade#getTaggedValues()
667 */
668 public Collection<TaggedValueFacade> getTaggedValues()
669 {
670 return this.getSuperFrontEndExceptionHandler().getTaggedValues();
671 }
672
673 /**
674 * Gets the dependencies for which this model element is the target.
675 * @see ModelElementFacade#getTargetDependencies()
676 */
677 public Collection<DependencyFacade> getTargetDependencies()
678 {
679 return this.getSuperFrontEndExceptionHandler().getTargetDependencies();
680 }
681
682 /**
683 * Get the template parameter for this model element having the parameterName
684 * @see ModelElementFacade#getTemplateParameter(String parameterName)
685 */
686 public Object getTemplateParameter(String parameterName)
687 {
688 return this.getSuperFrontEndExceptionHandler().getTemplateParameter(parameterName);
689 }
690
691 /**
692 * Get the template parameters for this model element
693 * @see ModelElementFacade#getTemplateParameters()
694 */
695 public Collection<TemplateParameterFacade> getTemplateParameters()
696 {
697 return this.getSuperFrontEndExceptionHandler().getTemplateParameters();
698 }
699
700 /**
701 * The visibility (i.e. public, private, protected or package) of the model element, will
702 * attempt a lookup for these values in the language mappings (if any).
703 * @see ModelElementFacade#getVisibility()
704 */
705 public String getVisibility()
706 {
707 return this.getSuperFrontEndExceptionHandler().getVisibility();
708 }
709
710 /**
711 * Returns true if the model element has the exact stereotype (meaning no stereotype inheritance
712 * is taken into account when searching for the stereotype), false otherwise.
713 * @see ModelElementFacade#hasExactStereotype(String stereotypeName)
714 */
715 public boolean hasExactStereotype(String stereotypeName)
716 {
717 return this.getSuperFrontEndExceptionHandler().hasExactStereotype(stereotypeName);
718 }
719
720 /**
721 * Does the UML Element contain the named Keyword? Keywords can be separated by space, comma,
722 * pipe, semicolon, or << >>
723 * @see ModelElementFacade#hasKeyword(String keywordName)
724 */
725 public boolean hasKeyword(String keywordName)
726 {
727 return this.getSuperFrontEndExceptionHandler().hasKeyword(keywordName);
728 }
729
730 /**
731 * Returns true if the model element has the specified stereotype. If the stereotype itself
732 * does not match, then a search will be made up the stereotype inheritance hierarchy, and if
733 * one of the stereotype's ancestors has a matching name this method will return true, false
734 * otherwise.
735 * For example, if we have a certain stereotype called <<exception>> and a model element has a
736 * stereotype called <<applicationException>> which extends <<exception>>, when calling this
737 * method with 'stereotypeName' defined as 'exception' the method would return true since
738 * <<applicationException>> inherits from <<exception>>. If you want to check if the model
739 * element has the exact stereotype, then use the method 'hasExactStereotype' instead.
740 * @see ModelElementFacade#hasStereotype(String stereotypeName)
741 */
742 public boolean hasStereotype(String stereotypeName)
743 {
744 return this.getSuperFrontEndExceptionHandler().hasStereotype(stereotypeName);
745 }
746
747 /**
748 * True if there are target dependencies from this element that are instances of BindingFacade.
749 * Deprecated in UML2: Use TemplateBinding parameters instead of dependencies.
750 * @see ModelElementFacade#isBindingDependenciesPresent()
751 */
752 public boolean isBindingDependenciesPresent()
753 {
754 return this.getSuperFrontEndExceptionHandler().isBindingDependenciesPresent();
755 }
756
757 /**
758 * Indicates if any constraints are present on this model element.
759 * @see ModelElementFacade#isConstraintsPresent()
760 */
761 public boolean isConstraintsPresent()
762 {
763 return this.getSuperFrontEndExceptionHandler().isConstraintsPresent();
764 }
765
766 /**
767 * Indicates if any documentation is present on this model element.
768 * @see ModelElementFacade#isDocumentationPresent()
769 */
770 public boolean isDocumentationPresent()
771 {
772 return this.getSuperFrontEndExceptionHandler().isDocumentationPresent();
773 }
774
775 /**
776 * True if this element name is a reserved word in Java, C#, ANSI or ISO C, C++, JavaScript.
777 * @see ModelElementFacade#isReservedWord()
778 */
779 public boolean isReservedWord()
780 {
781 return this.getSuperFrontEndExceptionHandler().isReservedWord();
782 }
783
784 /**
785 * True is there are template parameters on this model element. For UML2, applies to Class,
786 * Operation, Property, and Parameter.
787 * @see ModelElementFacade#isTemplateParametersPresent()
788 */
789 public boolean isTemplateParametersPresent()
790 {
791 return this.getSuperFrontEndExceptionHandler().isTemplateParametersPresent();
792 }
793
794 /**
795 * True if this element name is a valid identifier name in Java, C#, ANSI or ISO C, C++,
796 * JavaScript. Contains no spaces, special characters etc. Constraint always applied on
797 * Enumerations and Interfaces, optionally applies on other model elements.
798 * @see ModelElementFacade#isValidIdentifierName()
799 */
800 public boolean isValidIdentifierName()
801 {
802 return this.getSuperFrontEndExceptionHandler().isValidIdentifierName();
803 }
804
805 /**
806 * Searches for the constraint with the specified 'name' on this model element, and if found
807 * translates it using the specified 'translation' from a translation library discovered by the
808 * framework.
809 * @see ModelElementFacade#translateConstraint(String name, String translation)
810 */
811 public String translateConstraint(String name, String translation)
812 {
813 return this.getSuperFrontEndExceptionHandler().translateConstraint(name, translation);
814 }
815
816 /**
817 * Translates all constraints belonging to this model element with the given 'translation'.
818 * @see ModelElementFacade#translateConstraints(String translation)
819 */
820 public String[] translateConstraints(String translation)
821 {
822 return this.getSuperFrontEndExceptionHandler().translateConstraints(translation);
823 }
824
825 /**
826 * Translates the constraints of the specified 'kind' belonging to this model element.
827 * @see ModelElementFacade#translateConstraints(String kind, String translation)
828 */
829 public String[] translateConstraints(String kind, String translation)
830 {
831 return this.getSuperFrontEndExceptionHandler().translateConstraints(kind, translation);
832 }
833
834 /**
835 * An action is a named element that is the fundamental unit of executable functionality. The
836 * execution
837 * of an action represents some transformation or processing in the modeled system, be it a
838 * computer
839 * system or otherwise. An action represents a single step within an activity, that is, one that
840 * is not
841 * further decomposed within the activity. An action has pre- and post-conditions.
842 * @see org.andromda.metafacades.uml.TransitionFacade#getEffect()
843 */
844 public ActionFacade getEffect()
845 {
846 return this.getSuperFrontEndExceptionHandler().getEffect();
847 }
848
849 /**
850 * A representation of the model object 'Constraint'. A condition or restriction expressed in
851 * natural
852 * language text or in a machine readable language for the purpose of declaring some of the
853 * semantics
854 * of an element.
855 * @see org.andromda.metafacades.uml.TransitionFacade#getGuard()
856 */
857 public GuardFacade getGuard()
858 {
859 return this.getSuperFrontEndExceptionHandler().getGuard();
860 }
861
862 /**
863 * A representation of the model object 'Vertex'. An abstraction of a node in a state machine
864 * graph. In
865 * general, it can be the source or destination of any number of transitions.
866 * @see org.andromda.metafacades.uml.TransitionFacade#getSource()
867 */
868 public StateVertexFacade getSource()
869 {
870 return this.getSuperFrontEndExceptionHandler().getSource();
871 }
872
873 /**
874 * A representation of the model object 'Vertex'. An abstraction of a node in a state machine
875 * graph. In
876 * general, it can be the source or destination of any number of transitions.
877 * @see org.andromda.metafacades.uml.TransitionFacade#getTarget()
878 */
879 public StateVertexFacade getTarget()
880 {
881 return this.getSuperFrontEndExceptionHandler().getTarget();
882 }
883
884 /**
885 * If a trigger is present on this transition, this event represents that trigger.
886 * @see org.andromda.metafacades.uml.TransitionFacade#getTrigger()
887 */
888 public EventFacade getTrigger()
889 {
890 return this.getSuperFrontEndExceptionHandler().getTrigger();
891 }
892
893 /**
894 * TODO: Model Documentation for
895 * org.andromda.metafacades.uml.TransitionFacade.enteringActionState
896 * @see org.andromda.metafacades.uml.TransitionFacade#isEnteringActionState()
897 */
898 public boolean isEnteringActionState()
899 {
900 return this.getSuperFrontEndExceptionHandler().isEnteringActionState();
901 }
902
903 /**
904 * TODO: Model Documentation for
905 * org.andromda.metafacades.uml.TransitionFacade.enteringDecisionPoint
906 * @see org.andromda.metafacades.uml.TransitionFacade#isEnteringDecisionPoint()
907 */
908 public boolean isEnteringDecisionPoint()
909 {
910 return this.getSuperFrontEndExceptionHandler().isEnteringDecisionPoint();
911 }
912
913 /**
914 * TODO: Model Documentation for
915 * org.andromda.metafacades.uml.TransitionFacade.enteringFinalState
916 * @see org.andromda.metafacades.uml.TransitionFacade#isEnteringFinalState()
917 */
918 public boolean isEnteringFinalState()
919 {
920 return this.getSuperFrontEndExceptionHandler().isEnteringFinalState();
921 }
922
923 /**
924 * TODO: Model Documentation for
925 * org.andromda.metafacades.uml.TransitionFacade.exitingActionState
926 * @see org.andromda.metafacades.uml.TransitionFacade#isExitingActionState()
927 */
928 public boolean isExitingActionState()
929 {
930 return this.getSuperFrontEndExceptionHandler().isExitingActionState();
931 }
932
933 /**
934 * TODO: Model Documentation for
935 * org.andromda.metafacades.uml.TransitionFacade.exitingDecisionPoint
936 * @see org.andromda.metafacades.uml.TransitionFacade#isExitingDecisionPoint()
937 */
938 public boolean isExitingDecisionPoint()
939 {
940 return this.getSuperFrontEndExceptionHandler().isExitingDecisionPoint();
941 }
942
943 /**
944 * TODO: Model Documentation for
945 * org.andromda.metafacades.uml.TransitionFacade.exitingInitialState
946 * @see org.andromda.metafacades.uml.TransitionFacade#isExitingInitialState()
947 */
948 public boolean isExitingInitialState()
949 {
950 return this.getSuperFrontEndExceptionHandler().isExitingInitialState();
951 }
952
953 /**
954 * TODO: Model Documentation for org.andromda.metafacades.uml.TransitionFacade.triggerPresent
955 * @see org.andromda.metafacades.uml.TransitionFacade#isTriggerPresent()
956 */
957 public boolean isTriggerPresent()
958 {
959 return this.getSuperFrontEndExceptionHandler().isTriggerPresent();
960 }
961
962 /**
963 * @see org.andromda.core.metafacade.MetafacadeBase#initialize()
964 */
965 @Override
966 public void initialize()
967 {
968 this.getSuperFrontEndExceptionHandler().initialize();
969 }
970
971 /**
972 * @return Object getSuperFrontEndExceptionHandler().getValidationOwner()
973 * @see org.andromda.core.metafacade.MetafacadeBase#getValidationOwner()
974 */
975 @Override
976 public Object getValidationOwner()
977 {
978 Object owner = this.getSuperFrontEndExceptionHandler().getValidationOwner();
979 return owner;
980 }
981
982 /**
983 * @return String getSuperFrontEndExceptionHandler().getValidationName()
984 * @see org.andromda.core.metafacade.MetafacadeBase#getValidationName()
985 */
986 @Override
987 public String getValidationName()
988 {
989 String name = this.getSuperFrontEndExceptionHandler().getValidationName();
990 return name;
991 }
992
993 /**
994 * @param validationMessages Collection<ModelValidationMessage>
995 * @see org.andromda.core.metafacade.MetafacadeBase#validateInvariants(Collection validationMessages)
996 */
997 @Override
998 public void validateInvariants(Collection<ModelValidationMessage> validationMessages)
999 {
1000 this.getSuperFrontEndExceptionHandler().validateInvariants(validationMessages);
1001 }
1002
1003 /**
1004 * The property that stores the name of the metafacade.
1005 */
1006 private static final String NAME_PROPERTY = "name";
1007 private static final String FQNAME_PROPERTY = "fullyQualifiedName";
1008
1009 /**
1010 * @see Object#toString()
1011 */
1012 @Override
1013 public String toString()
1014 {
1015 final StringBuilder toString = new StringBuilder(this.getClass().getName());
1016 toString.append("[");
1017 try
1018 {
1019 toString.append(Introspector.instance().getProperty(this, FQNAME_PROPERTY));
1020 }
1021 catch (final Throwable tryAgain)
1022 {
1023 try
1024 {
1025 toString.append(Introspector.instance().getProperty(this, NAME_PROPERTY));
1026 }
1027 catch (final Throwable ignore)
1028 {
1029 // - just ignore when the metafacade doesn't have a name or fullyQualifiedName property
1030 }
1031 }
1032 toString.append("]");
1033 return toString.toString();
1034 }
1035 }