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.ConstraintFacade;
14 import org.andromda.metafacades.uml.DependencyFacade;
15 import org.andromda.metafacades.uml.FrontEndAction;
16 import org.andromda.metafacades.uml.FrontEndControllerOperation;
17 import org.andromda.metafacades.uml.FrontEndEvent;
18 import org.andromda.metafacades.uml.ModelElementFacade;
19 import org.andromda.metafacades.uml.ModelFacade;
20 import org.andromda.metafacades.uml.PackageFacade;
21 import org.andromda.metafacades.uml.ParameterFacade;
22 import org.andromda.metafacades.uml.StateFacade;
23 import org.andromda.metafacades.uml.StateMachineFacade;
24 import org.andromda.metafacades.uml.StereotypeFacade;
25 import org.andromda.metafacades.uml.TaggedValueFacade;
26 import org.andromda.metafacades.uml.TemplateParameterFacade;
27 import org.andromda.metafacades.uml.TransitionFacade;
28 import org.andromda.metafacades.uml.TypeMappings;
29
30 /**
31 * A front-end JSF even (like the pressing of a button, etc).
32 * MetafacadeLogic for JSFEvent
33 *
34 * @see JSFEvent
35 */
36 public abstract class JSFEventLogic
37 extends MetafacadeBase
38 implements JSFEvent
39 {
40 /**
41 * The underlying UML object
42 * @see Object
43 */
44 protected Object metaObject;
45
46 /** Create Metafacade implementation instance using the MetafacadeFactory from the context
47 * @param metaObjectIn
48 * @param context
49 */
50 protected JSFEventLogic(Object metaObjectIn, String context)
51 {
52 super(metaObjectIn, getContext(context));
53 this.superFrontEndEvent =
54 (FrontEndEvent)
55 MetafacadeFactory.getInstance().createFacadeImpl(
56 "org.andromda.metafacades.uml.FrontEndEvent",
57 metaObjectIn,
58 getContext(context));
59 this.metaObject = metaObjectIn;
60 }
61
62 /**
63 * Gets the context for this metafacade logic instance.
64 * @param context String. Set to JSFEvent if null
65 * @return context String
66 */
67 private static String getContext(String context)
68 {
69 if (context == null)
70 {
71 context = "org.andromda.cartridges.jsf.metafacades.JSFEvent";
72 }
73 return context;
74 }
75
76 private FrontEndEvent superFrontEndEvent;
77 private boolean superFrontEndEventInitialized = false;
78
79 /**
80 * Gets the FrontEndEvent parent instance.
81 * @return this.superFrontEndEvent FrontEndEvent
82 */
83 private FrontEndEvent getSuperFrontEndEvent()
84 {
85 if (!this.superFrontEndEventInitialized)
86 {
87 ((MetafacadeBase)this.superFrontEndEvent).setMetafacadeContext(this.getMetafacadeContext());
88 this.superFrontEndEventInitialized = true;
89 }
90 return this.superFrontEndEvent;
91 }
92
93 /** Reset context only for non-root metafacades
94 * @param context
95 * @see org.andromda.core.metafacade.MetafacadeBase#resetMetafacadeContext(String context)
96 */
97 @Override
98 public void resetMetafacadeContext(String context)
99 {
100 if (!this.contextRoot) // reset context only for non-root metafacades
101 {
102 context = getContext(context); // to have same value as in original constructor call
103 setMetafacadeContext (context);
104 if (this.superFrontEndEventInitialized)
105 {
106 ((MetafacadeBase)this.superFrontEndEvent).resetMetafacadeContext(context);
107 }
108 }
109 }
110
111 /**
112 * @return boolean true always
113 * @see JSFEvent
114 */
115 public boolean isJSFEventMetaType()
116 {
117 return true;
118 }
119
120 // --------------- attributes ---------------------
121
122 /**
123 * @see org.andromda.cartridges.jsf.metafacades.JSFEvent#getMessageKey()
124 * @return String
125 */
126 protected abstract String handleGetMessageKey();
127
128 private String __messageKey1a;
129 private boolean __messageKey1aSet = false;
130
131 /**
132 * The resource message key for this trigger.
133 * @return (String)handleGetMessageKey()
134 */
135 public final String getMessageKey()
136 {
137 String messageKey1a = this.__messageKey1a;
138 if (!this.__messageKey1aSet)
139 {
140 // messageKey has no pre constraints
141 messageKey1a = handleGetMessageKey();
142 // messageKey has no post constraints
143 this.__messageKey1a = messageKey1a;
144 if (isMetafacadePropertyCachingEnabled())
145 {
146 this.__messageKey1aSet = true;
147 }
148 }
149 return messageKey1a;
150 }
151
152 /**
153 * @see org.andromda.cartridges.jsf.metafacades.JSFEvent#getMessageValue()
154 * @return String
155 */
156 protected abstract String handleGetMessageValue();
157
158 private String __messageValue2a;
159 private boolean __messageValue2aSet = false;
160
161 /**
162 * The resource message value for this trigger, this would be the button label or hyperlink
163 * name.
164 * @return (String)handleGetMessageValue()
165 */
166 public final String getMessageValue()
167 {
168 String messageValue2a = this.__messageValue2a;
169 if (!this.__messageValue2aSet)
170 {
171 // messageValue has no pre constraints
172 messageValue2a = handleGetMessageValue();
173 // messageValue has no post constraints
174 this.__messageValue2a = messageValue2a;
175 if (isMetafacadePropertyCachingEnabled())
176 {
177 this.__messageValue2aSet = true;
178 }
179 }
180 return messageValue2a;
181 }
182
183 /**
184 * @see org.andromda.cartridges.jsf.metafacades.JSFEvent#getResetMessageKey()
185 * @return String
186 */
187 protected abstract String handleGetResetMessageKey();
188
189 private String __resetMessageKey3a;
190 private boolean __resetMessageKey3aSet = false;
191
192 /**
193 * The resource message key for the reset button.
194 * @return (String)handleGetResetMessageKey()
195 */
196 public final String getResetMessageKey()
197 {
198 String resetMessageKey3a = this.__resetMessageKey3a;
199 if (!this.__resetMessageKey3aSet)
200 {
201 // resetMessageKey has no pre constraints
202 resetMessageKey3a = handleGetResetMessageKey();
203 // resetMessageKey has no post constraints
204 this.__resetMessageKey3a = resetMessageKey3a;
205 if (isMetafacadePropertyCachingEnabled())
206 {
207 this.__resetMessageKey3aSet = true;
208 }
209 }
210 return resetMessageKey3a;
211 }
212
213 /**
214 * @see org.andromda.cartridges.jsf.metafacades.JSFEvent#getResetMessageValue()
215 * @return String
216 */
217 protected abstract String handleGetResetMessageValue();
218
219 private String __resetMessageValue4a;
220 private boolean __resetMessageValue4aSet = false;
221
222 /**
223 * The default value for the reset button's message.
224 * @return (String)handleGetResetMessageValue()
225 */
226 public final String getResetMessageValue()
227 {
228 String resetMessageValue4a = this.__resetMessageValue4a;
229 if (!this.__resetMessageValue4aSet)
230 {
231 // resetMessageValue has no pre constraints
232 resetMessageValue4a = handleGetResetMessageValue();
233 // resetMessageValue has no post constraints
234 this.__resetMessageValue4a = resetMessageValue4a;
235 if (isMetafacadePropertyCachingEnabled())
236 {
237 this.__resetMessageValue4aSet = true;
238 }
239 }
240 return resetMessageValue4a;
241 }
242
243 /**
244 * @return true
245 * @see FrontEndEvent
246 */
247 public boolean isFrontEndEventMetaType()
248 {
249 return true;
250 }
251
252 /**
253 * @return true
254 * @see org.andromda.metafacades.uml.EventFacade
255 */
256 public boolean isEventFacadeMetaType()
257 {
258 return true;
259 }
260
261 /**
262 * @return true
263 * @see ModelElementFacade
264 */
265 public boolean isModelElementFacadeMetaType()
266 {
267 return true;
268 }
269
270 // ----------- delegates to FrontEndEvent ------------
271 /**
272 * The parameters to this event.
273 * @see org.andromda.metafacades.uml.EventFacade#getParameters()
274 */
275 public Collection<ParameterFacade> getParameters()
276 {
277 return this.getSuperFrontEndEvent().getParameters();
278 }
279
280 /**
281 * If this event is located on an action state, this will represent that state.
282 * @see org.andromda.metafacades.uml.EventFacade#getState()
283 */
284 public StateFacade getState()
285 {
286 return this.getSuperFrontEndEvent().getState();
287 }
288
289 /**
290 * If this event is located on a transition, this represents that transition.
291 * @see org.andromda.metafacades.uml.EventFacade#getTransition()
292 */
293 public TransitionFacade getTransition()
294 {
295 return this.getSuperFrontEndEvent().getTransition();
296 }
297
298 /**
299 * The action which triggers the "front-end" event.
300 * @see FrontEndEvent#getAction()
301 */
302 public FrontEndAction getAction()
303 {
304 return this.getSuperFrontEndEvent().getAction();
305 }
306
307 /**
308 * The call to the controller for this front-end event (if any).
309 * @see FrontEndEvent#getControllerCall()
310 */
311 public FrontEndControllerOperation getControllerCall()
312 {
313 return this.getSuperFrontEndEvent().getControllerCall();
314 }
315
316 /**
317 * Gets all controller operation calls for the front-end event.
318 * @see FrontEndEvent#getControllerCalls()
319 */
320 public List<FrontEndControllerOperation> getControllerCalls()
321 {
322 return this.getSuperFrontEndEvent().getControllerCalls();
323 }
324
325 /**
326 * Indicates whether or not this front end event is contained within a FrontEndUseCase.
327 * @see FrontEndEvent#isContainedInFrontEndUseCase()
328 */
329 public boolean isContainedInFrontEndUseCase()
330 {
331 return this.getSuperFrontEndEvent().isContainedInFrontEndUseCase();
332 }
333
334 /**
335 * Copies all tagged values from the given ModelElementFacade to this model element facade.
336 * @see ModelElementFacade#copyTaggedValues(ModelElementFacade element)
337 */
338 public void copyTaggedValues(ModelElementFacade element)
339 {
340 this.getSuperFrontEndEvent().copyTaggedValues(element);
341 }
342
343 /**
344 * Finds the tagged value with the specified 'tagName'. In case there are more values the first
345 * one found will be returned.
346 * @see ModelElementFacade#findTaggedValue(String tagName)
347 */
348 public Object findTaggedValue(String tagName)
349 {
350 return this.getSuperFrontEndEvent().findTaggedValue(tagName);
351 }
352
353 /**
354 * Returns all the values for the tagged value with the specified name. The returned collection
355 * will contains only String instances, or will be empty. Never null.
356 * @see ModelElementFacade#findTaggedValues(String tagName)
357 */
358 public Collection<Object> findTaggedValues(String tagName)
359 {
360 return this.getSuperFrontEndEvent().findTaggedValues(tagName);
361 }
362
363 /**
364 * Returns the fully qualified name of the model element. The fully qualified name includes
365 * complete package qualified name of the underlying model element. The templates parameter will
366 * be replaced by the correct one given the binding relation of the parameter to this element.
367 * @see ModelElementFacade#getBindedFullyQualifiedName(ModelElementFacade bindedElement)
368 */
369 public String getBindedFullyQualifiedName(ModelElementFacade bindedElement)
370 {
371 return this.getSuperFrontEndEvent().getBindedFullyQualifiedName(bindedElement);
372 }
373
374 /**
375 * Gets all constraints belonging to the model element.
376 * @see ModelElementFacade#getConstraints()
377 */
378 public Collection<ConstraintFacade> getConstraints()
379 {
380 return this.getSuperFrontEndEvent().getConstraints();
381 }
382
383 /**
384 * Returns the constraints of the argument kind that have been placed onto this model. Typical
385 * kinds are "inv", "pre" and "post". Other kinds are possible.
386 * @see ModelElementFacade#getConstraints(String kind)
387 */
388 public Collection<ConstraintFacade> getConstraints(String kind)
389 {
390 return this.getSuperFrontEndEvent().getConstraints(kind);
391 }
392
393 /**
394 * Gets the documentation for the model element, The indent argument is prefixed to each line.
395 * By default this method wraps lines after 64 characters.
396 * This method is equivalent to <code>getDocumentation(indent, 64)</code>.
397 * @see ModelElementFacade#getDocumentation(String indent)
398 */
399 public String getDocumentation(String indent)
400 {
401 return this.getSuperFrontEndEvent().getDocumentation(indent);
402 }
403
404 /**
405 * This method returns the documentation for this model element, with the lines wrapped after
406 * the specified number of characters, values of less than 1 will indicate no line wrapping is
407 * required. By default paragraphs are returned as HTML.
408 * This method is equivalent to <code>getDocumentation(indent, lineLength, true)</code>.
409 * @see ModelElementFacade#getDocumentation(String indent, int lineLength)
410 */
411 public String getDocumentation(String indent, int lineLength)
412 {
413 return this.getSuperFrontEndEvent().getDocumentation(indent, lineLength);
414 }
415
416 /**
417 * This method returns the documentation for this model element, with the lines wrapped after
418 * the specified number of characters, values of less than 1 will indicate no line wrapping is
419 * required. HTML style determines if HTML Escaping is applied.
420 * @see ModelElementFacade#getDocumentation(String indent, int lineLength, boolean htmlStyle)
421 */
422 public String getDocumentation(String indent, int lineLength, boolean htmlStyle)
423 {
424 return this.getSuperFrontEndEvent().getDocumentation(indent, lineLength, htmlStyle);
425 }
426
427 /**
428 * The fully qualified name of this model element.
429 * @see ModelElementFacade#getFullyQualifiedName()
430 */
431 public String getFullyQualifiedName()
432 {
433 return this.getSuperFrontEndEvent().getFullyQualifiedName();
434 }
435
436 /**
437 * Returns the fully qualified name of the model element. The fully qualified name includes
438 * complete package qualified name of the underlying model element. If modelName is true, then
439 * the original name of the model element (the name contained within the model) will be the name
440 * returned, otherwise a name from a language mapping will be returned.
441 * @see ModelElementFacade#getFullyQualifiedName(boolean modelName)
442 */
443 public String getFullyQualifiedName(boolean modelName)
444 {
445 return this.getSuperFrontEndEvent().getFullyQualifiedName(modelName);
446 }
447
448 /**
449 * Returns the fully qualified name as a path, the returned value always starts with out a slash
450 * '/'.
451 * @see ModelElementFacade#getFullyQualifiedNamePath()
452 */
453 public String getFullyQualifiedNamePath()
454 {
455 return this.getSuperFrontEndEvent().getFullyQualifiedNamePath();
456 }
457
458 /**
459 * Gets the unique identifier of the underlying model element.
460 * @see ModelElementFacade#getId()
461 */
462 public String getId()
463 {
464 return this.getSuperFrontEndEvent().getId();
465 }
466
467 /**
468 * UML2: Retrieves the keywords for this element. Used to modify implementation properties which
469 * are not represented by other properties, i.e. native, transient, volatile, synchronized,
470 * (added annotations) override, deprecated. Can also be used to suppress compiler warnings:
471 * (added annotations) unchecked, fallthrough, path, serial, finally, all. Annotations require
472 * JDK5 compiler level.
473 * @see ModelElementFacade#getKeywords()
474 */
475 public Collection<String> getKeywords()
476 {
477 return this.getSuperFrontEndEvent().getKeywords();
478 }
479
480 /**
481 * UML2: Retrieves a localized label for this named element.
482 * @see ModelElementFacade#getLabel()
483 */
484 public String getLabel()
485 {
486 return this.getSuperFrontEndEvent().getLabel();
487 }
488
489 /**
490 * The language mappings that have been set for this model element.
491 * @see ModelElementFacade#getLanguageMappings()
492 */
493 public TypeMappings getLanguageMappings()
494 {
495 return this.getSuperFrontEndEvent().getLanguageMappings();
496 }
497
498 /**
499 * Return the model containing this model element (multiple models may be loaded and processed
500 * at the same time).
501 * @see ModelElementFacade#getModel()
502 */
503 public ModelFacade getModel()
504 {
505 return this.getSuperFrontEndEvent().getModel();
506 }
507
508 /**
509 * The name of the model element.
510 * @see ModelElementFacade#getName()
511 */
512 public String getName()
513 {
514 return this.getSuperFrontEndEvent().getName();
515 }
516
517 /**
518 * Gets the package to which this model element belongs.
519 * @see ModelElementFacade#getPackage()
520 */
521 public ModelElementFacade getPackage()
522 {
523 return this.getSuperFrontEndEvent().getPackage();
524 }
525
526 /**
527 * The name of this model element's package.
528 * @see ModelElementFacade#getPackageName()
529 */
530 public String getPackageName()
531 {
532 return this.getSuperFrontEndEvent().getPackageName();
533 }
534
535 /**
536 * Gets the package name (optionally providing the ability to retrieve the model name and not
537 * the mapped name).
538 * @see ModelElementFacade#getPackageName(boolean modelName)
539 */
540 public String getPackageName(boolean modelName)
541 {
542 return this.getSuperFrontEndEvent().getPackageName(modelName);
543 }
544
545 /**
546 * Returns the package as a path, the returned value always starts with out a slash '/'.
547 * @see ModelElementFacade#getPackagePath()
548 */
549 public String getPackagePath()
550 {
551 return this.getSuperFrontEndEvent().getPackagePath();
552 }
553
554 /**
555 * UML2: Returns the value of the 'Qualified Name' attribute. A name which allows the
556 * NamedElement to be identified within a hierarchy of nested Namespaces. It is constructed from
557 * the names of the containing namespaces starting at the root of the hierarchy and ending with
558 * the name of the NamedElement itself.
559 * @see ModelElementFacade#getQualifiedName()
560 */
561 public String getQualifiedName()
562 {
563 return this.getSuperFrontEndEvent().getQualifiedName();
564 }
565
566 /**
567 * Gets the root package for the model element.
568 * @see ModelElementFacade#getRootPackage()
569 */
570 public PackageFacade getRootPackage()
571 {
572 return this.getSuperFrontEndEvent().getRootPackage();
573 }
574
575 /**
576 * Gets the dependencies for which this model element is the source.
577 * @see ModelElementFacade#getSourceDependencies()
578 */
579 public Collection<DependencyFacade> getSourceDependencies()
580 {
581 return this.getSuperFrontEndEvent().getSourceDependencies();
582 }
583
584 /**
585 * If this model element is the context of an activity graph, this represents that activity
586 * graph.
587 * @see ModelElementFacade#getStateMachineContext()
588 */
589 public StateMachineFacade getStateMachineContext()
590 {
591 return this.getSuperFrontEndEvent().getStateMachineContext();
592 }
593
594 /**
595 * The collection of ALL stereotype names for this model element.
596 * @see ModelElementFacade#getStereotypeNames()
597 */
598 public Collection<String> getStereotypeNames()
599 {
600 return this.getSuperFrontEndEvent().getStereotypeNames();
601 }
602
603 /**
604 * Gets all stereotypes for this model element.
605 * @see ModelElementFacade#getStereotypes()
606 */
607 public Collection<StereotypeFacade> getStereotypes()
608 {
609 return this.getSuperFrontEndEvent().getStereotypes();
610 }
611
612 /**
613 * Return the TaggedValues associated with this model element, under all stereotypes.
614 * @see ModelElementFacade#getTaggedValues()
615 */
616 public Collection<TaggedValueFacade> getTaggedValues()
617 {
618 return this.getSuperFrontEndEvent().getTaggedValues();
619 }
620
621 /**
622 * Gets the dependencies for which this model element is the target.
623 * @see ModelElementFacade#getTargetDependencies()
624 */
625 public Collection<DependencyFacade> getTargetDependencies()
626 {
627 return this.getSuperFrontEndEvent().getTargetDependencies();
628 }
629
630 /**
631 * Get the template parameter for this model element having the parameterName
632 * @see ModelElementFacade#getTemplateParameter(String parameterName)
633 */
634 public Object getTemplateParameter(String parameterName)
635 {
636 return this.getSuperFrontEndEvent().getTemplateParameter(parameterName);
637 }
638
639 /**
640 * Get the template parameters for this model element
641 * @see ModelElementFacade#getTemplateParameters()
642 */
643 public Collection<TemplateParameterFacade> getTemplateParameters()
644 {
645 return this.getSuperFrontEndEvent().getTemplateParameters();
646 }
647
648 /**
649 * The visibility (i.e. public, private, protected or package) of the model element, will
650 * attempt a lookup for these values in the language mappings (if any).
651 * @see ModelElementFacade#getVisibility()
652 */
653 public String getVisibility()
654 {
655 return this.getSuperFrontEndEvent().getVisibility();
656 }
657
658 /**
659 * Returns true if the model element has the exact stereotype (meaning no stereotype inheritance
660 * is taken into account when searching for the stereotype), false otherwise.
661 * @see ModelElementFacade#hasExactStereotype(String stereotypeName)
662 */
663 public boolean hasExactStereotype(String stereotypeName)
664 {
665 return this.getSuperFrontEndEvent().hasExactStereotype(stereotypeName);
666 }
667
668 /**
669 * Does the UML Element contain the named Keyword? Keywords can be separated by space, comma,
670 * pipe, semicolon, or << >>
671 * @see ModelElementFacade#hasKeyword(String keywordName)
672 */
673 public boolean hasKeyword(String keywordName)
674 {
675 return this.getSuperFrontEndEvent().hasKeyword(keywordName);
676 }
677
678 /**
679 * Returns true if the model element has the specified stereotype. If the stereotype itself
680 * does not match, then a search will be made up the stereotype inheritance hierarchy, and if
681 * one of the stereotype's ancestors has a matching name this method will return true, false
682 * otherwise.
683 * For example, if we have a certain stereotype called <<exception>> and a model element has a
684 * stereotype called <<applicationException>> which extends <<exception>>, when calling this
685 * method with 'stereotypeName' defined as 'exception' the method would return true since
686 * <<applicationException>> inherits from <<exception>>. If you want to check if the model
687 * element has the exact stereotype, then use the method 'hasExactStereotype' instead.
688 * @see ModelElementFacade#hasStereotype(String stereotypeName)
689 */
690 public boolean hasStereotype(String stereotypeName)
691 {
692 return this.getSuperFrontEndEvent().hasStereotype(stereotypeName);
693 }
694
695 /**
696 * True if there are target dependencies from this element that are instances of BindingFacade.
697 * Deprecated in UML2: Use TemplateBinding parameters instead of dependencies.
698 * @see ModelElementFacade#isBindingDependenciesPresent()
699 */
700 public boolean isBindingDependenciesPresent()
701 {
702 return this.getSuperFrontEndEvent().isBindingDependenciesPresent();
703 }
704
705 /**
706 * Indicates if any constraints are present on this model element.
707 * @see ModelElementFacade#isConstraintsPresent()
708 */
709 public boolean isConstraintsPresent()
710 {
711 return this.getSuperFrontEndEvent().isConstraintsPresent();
712 }
713
714 /**
715 * Indicates if any documentation is present on this model element.
716 * @see ModelElementFacade#isDocumentationPresent()
717 */
718 public boolean isDocumentationPresent()
719 {
720 return this.getSuperFrontEndEvent().isDocumentationPresent();
721 }
722
723 /**
724 * True if this element name is a reserved word in Java, C#, ANSI or ISO C, C++, JavaScript.
725 * @see ModelElementFacade#isReservedWord()
726 */
727 public boolean isReservedWord()
728 {
729 return this.getSuperFrontEndEvent().isReservedWord();
730 }
731
732 /**
733 * True is there are template parameters on this model element. For UML2, applies to Class,
734 * Operation, Property, and Parameter.
735 * @see ModelElementFacade#isTemplateParametersPresent()
736 */
737 public boolean isTemplateParametersPresent()
738 {
739 return this.getSuperFrontEndEvent().isTemplateParametersPresent();
740 }
741
742 /**
743 * True if this element name is a valid identifier name in Java, C#, ANSI or ISO C, C++,
744 * JavaScript. Contains no spaces, special characters etc. Constraint always applied on
745 * Enumerations and Interfaces, optionally applies on other model elements.
746 * @see ModelElementFacade#isValidIdentifierName()
747 */
748 public boolean isValidIdentifierName()
749 {
750 return this.getSuperFrontEndEvent().isValidIdentifierName();
751 }
752
753 /**
754 * Searches for the constraint with the specified 'name' on this model element, and if found
755 * translates it using the specified 'translation' from a translation library discovered by the
756 * framework.
757 * @see ModelElementFacade#translateConstraint(String name, String translation)
758 */
759 public String translateConstraint(String name, String translation)
760 {
761 return this.getSuperFrontEndEvent().translateConstraint(name, translation);
762 }
763
764 /**
765 * Translates all constraints belonging to this model element with the given 'translation'.
766 * @see ModelElementFacade#translateConstraints(String translation)
767 */
768 public String[] translateConstraints(String translation)
769 {
770 return this.getSuperFrontEndEvent().translateConstraints(translation);
771 }
772
773 /**
774 * Translates the constraints of the specified 'kind' belonging to this model element.
775 * @see ModelElementFacade#translateConstraints(String kind, String translation)
776 */
777 public String[] translateConstraints(String kind, String translation)
778 {
779 return this.getSuperFrontEndEvent().translateConstraints(kind, translation);
780 }
781
782 /**
783 * @see org.andromda.core.metafacade.MetafacadeBase#initialize()
784 */
785 @Override
786 public void initialize()
787 {
788 this.getSuperFrontEndEvent().initialize();
789 }
790
791 /**
792 * @return Object getSuperFrontEndEvent().getValidationOwner()
793 * @see org.andromda.core.metafacade.MetafacadeBase#getValidationOwner()
794 */
795 @Override
796 public Object getValidationOwner()
797 {
798 Object owner = this.getSuperFrontEndEvent().getValidationOwner();
799 return owner;
800 }
801
802 /**
803 * @return String getSuperFrontEndEvent().getValidationName()
804 * @see org.andromda.core.metafacade.MetafacadeBase#getValidationName()
805 */
806 @Override
807 public String getValidationName()
808 {
809 String name = this.getSuperFrontEndEvent().getValidationName();
810 return name;
811 }
812
813 /**
814 * @param validationMessages Collection<ModelValidationMessage>
815 * @see org.andromda.core.metafacade.MetafacadeBase#validateInvariants(Collection validationMessages)
816 */
817 @Override
818 public void validateInvariants(Collection<ModelValidationMessage> validationMessages)
819 {
820 this.getSuperFrontEndEvent().validateInvariants(validationMessages);
821 }
822
823 /**
824 * The property that stores the name of the metafacade.
825 */
826 private static final String NAME_PROPERTY = "name";
827 private static final String FQNAME_PROPERTY = "fullyQualifiedName";
828
829 /**
830 * @see Object#toString()
831 */
832 @Override
833 public String toString()
834 {
835 final StringBuilder toString = new StringBuilder(this.getClass().getName());
836 toString.append("[");
837 try
838 {
839 toString.append(Introspector.instance().getProperty(this, FQNAME_PROPERTY));
840 }
841 catch (final Throwable tryAgain)
842 {
843 try
844 {
845 toString.append(Introspector.instance().getProperty(this, NAME_PROPERTY));
846 }
847 catch (final Throwable ignore)
848 {
849 // - just ignore when the metafacade doesn't have a name or fullyQualifiedName property
850 }
851 }
852 toString.append("]");
853 return toString.toString();
854 }
855 }