1 // license-header java merge-point
2 //
3 // Attention: generated code (by MetafacadeLogic.vsl) - do not modify!
4 //
5 package org.andromda.cartridges.jbpm.metafacades;
6
7 import java.util.Collection;
8 import org.andromda.core.common.Introspector;
9 import org.andromda.core.metafacade.MetafacadeBase;
10 import org.andromda.core.metafacade.MetafacadeFactory;
11 import org.andromda.core.metafacade.ModelValidationMessage;
12 import org.andromda.metafacades.uml.ClassifierFacade;
13 import org.andromda.metafacades.uml.ConstraintFacade;
14 import org.andromda.metafacades.uml.DependencyFacade;
15 import org.andromda.metafacades.uml.ModelElementFacade;
16 import org.andromda.metafacades.uml.ModelFacade;
17 import org.andromda.metafacades.uml.OperationFacade;
18 import org.andromda.metafacades.uml.PackageFacade;
19 import org.andromda.metafacades.uml.ParameterFacade;
20 import org.andromda.metafacades.uml.StateMachineFacade;
21 import org.andromda.metafacades.uml.StereotypeFacade;
22 import org.andromda.metafacades.uml.TaggedValueFacade;
23 import org.andromda.metafacades.uml.TemplateParameterFacade;
24 import org.andromda.metafacades.uml.TypeMappings;
25
26 /**
27 * TODO: Model Documentation for org.andromda.cartridges.jbpm.metafacades.JBpmHandler
28 * MetafacadeLogic for JBpmHandler
29 *
30 * @see JBpmHandler
31 */
32 public abstract class JBpmHandlerLogic
33 extends MetafacadeBase
34 implements JBpmHandler
35 {
36 /**
37 * The underlying UML object
38 * @see Object
39 */
40 protected Object metaObject;
41
42 /** Create Metafacade implementation instance using the MetafacadeFactory from the context
43 * @param metaObjectIn
44 * @param context
45 */
46 protected JBpmHandlerLogic(Object metaObjectIn, String context)
47 {
48 super(metaObjectIn, getContext(context));
49 this.superOperationFacade =
50 (OperationFacade)
51 MetafacadeFactory.getInstance().createFacadeImpl(
52 "org.andromda.metafacades.uml.OperationFacade",
53 metaObjectIn,
54 getContext(context));
55 this.metaObject = metaObjectIn;
56 }
57
58 /**
59 * Gets the context for this metafacade logic instance.
60 * @param context String. Set to JBpmHandler if null
61 * @return context String
62 */
63 private static String getContext(String context)
64 {
65 if (context == null)
66 {
67 context = "org.andromda.cartridges.jbpm.metafacades.JBpmHandler";
68 }
69 return context;
70 }
71
72 private OperationFacade superOperationFacade;
73 private boolean superOperationFacadeInitialized = false;
74
75 /**
76 * Gets the OperationFacade parent instance.
77 * @return this.superOperationFacade OperationFacade
78 */
79 private OperationFacade getSuperOperationFacade()
80 {
81 if (!this.superOperationFacadeInitialized)
82 {
83 ((MetafacadeBase)this.superOperationFacade).setMetafacadeContext(this.getMetafacadeContext());
84 this.superOperationFacadeInitialized = true;
85 }
86 return this.superOperationFacade;
87 }
88
89 /** Reset context only for non-root metafacades
90 * @param context
91 * @see org.andromda.core.metafacade.MetafacadeBase#resetMetafacadeContext(String context)
92 */
93 @Override
94 public void resetMetafacadeContext(String context)
95 {
96 if (!this.contextRoot) // reset context only for non-root metafacades
97 {
98 context = getContext(context); // to have same value as in original constructor call
99 setMetafacadeContext (context);
100 if (this.superOperationFacadeInitialized)
101 {
102 ((MetafacadeBase)this.superOperationFacade).resetMetafacadeContext(context);
103 }
104 }
105 }
106
107 /**
108 * @return boolean true always
109 * @see JBpmHandler
110 */
111 public boolean isJBpmHandlerMetaType()
112 {
113 return true;
114 }
115
116 // --------------- attributes ---------------------
117
118 /**
119 * @see org.andromda.cartridges.jbpm.metafacades.JBpmHandler#isAssignmentHandler()
120 * @return boolean
121 */
122 protected abstract boolean handleIsAssignmentHandler();
123
124 private boolean __assignmentHandler1a;
125 private boolean __assignmentHandler1aSet = false;
126
127 /**
128 * TODO: Model Documentation for
129 * org.andromda.cartridges.jbpm.metafacades.JBpmHandler.assignmentHandler
130 * @return (boolean)handleIsAssignmentHandler()
131 */
132 public final boolean isAssignmentHandler()
133 {
134 boolean assignmentHandler1a = this.__assignmentHandler1a;
135 if (!this.__assignmentHandler1aSet)
136 {
137 // assignmentHandler has no pre constraints
138 assignmentHandler1a = handleIsAssignmentHandler();
139 // assignmentHandler has no post constraints
140 this.__assignmentHandler1a = assignmentHandler1a;
141 if (isMetafacadePropertyCachingEnabled())
142 {
143 this.__assignmentHandler1aSet = true;
144 }
145 }
146 return assignmentHandler1a;
147 }
148
149 /**
150 * @see org.andromda.cartridges.jbpm.metafacades.JBpmHandler#isActionHandler()
151 * @return boolean
152 */
153 protected abstract boolean handleIsActionHandler();
154
155 private boolean __actionHandler2a;
156 private boolean __actionHandler2aSet = false;
157
158 /**
159 * TODO: Model Documentation for
160 * org.andromda.cartridges.jbpm.metafacades.JBpmHandler.actionHandler
161 * @return (boolean)handleIsActionHandler()
162 */
163 public final boolean isActionHandler()
164 {
165 boolean actionHandler2a = this.__actionHandler2a;
166 if (!this.__actionHandler2aSet)
167 {
168 // actionHandler has no pre constraints
169 actionHandler2a = handleIsActionHandler();
170 // actionHandler has no post constraints
171 this.__actionHandler2a = actionHandler2a;
172 if (isMetafacadePropertyCachingEnabled())
173 {
174 this.__actionHandler2aSet = true;
175 }
176 }
177 return actionHandler2a;
178 }
179
180 /**
181 * @see org.andromda.cartridges.jbpm.metafacades.JBpmHandler#isContainedInBusinessProcess()
182 * @return boolean
183 */
184 protected abstract boolean handleIsContainedInBusinessProcess();
185
186 private boolean __containedInBusinessProcess3a;
187 private boolean __containedInBusinessProcess3aSet = false;
188
189 /**
190 * True if this element is part of a business process usecase.
191 * @return (boolean)handleIsContainedInBusinessProcess()
192 */
193 public final boolean isContainedInBusinessProcess()
194 {
195 boolean containedInBusinessProcess3a = this.__containedInBusinessProcess3a;
196 if (!this.__containedInBusinessProcess3aSet)
197 {
198 // containedInBusinessProcess has no pre constraints
199 containedInBusinessProcess3a = handleIsContainedInBusinessProcess();
200 // containedInBusinessProcess has no post constraints
201 this.__containedInBusinessProcess3a = containedInBusinessProcess3a;
202 if (isMetafacadePropertyCachingEnabled())
203 {
204 this.__containedInBusinessProcess3aSet = true;
205 }
206 }
207 return containedInBusinessProcess3a;
208 }
209
210 /**
211 * @see org.andromda.cartridges.jbpm.metafacades.JBpmHandler#getHandlerPackageName()
212 * @return String
213 */
214 protected abstract String handleGetHandlerPackageName();
215
216 private String __handlerPackageName4a;
217 private boolean __handlerPackageName4aSet = false;
218
219 /**
220 * TODO: Model Documentation for
221 * org.andromda.cartridges.jbpm.metafacades.JBpmHandler.handlerPackageName
222 * @return (String)handleGetHandlerPackageName()
223 */
224 public final String getHandlerPackageName()
225 {
226 String handlerPackageName4a = this.__handlerPackageName4a;
227 if (!this.__handlerPackageName4aSet)
228 {
229 // handlerPackageName has no pre constraints
230 handlerPackageName4a = handleGetHandlerPackageName();
231 // handlerPackageName has no post constraints
232 this.__handlerPackageName4a = handlerPackageName4a;
233 if (isMetafacadePropertyCachingEnabled())
234 {
235 this.__handlerPackageName4aSet = true;
236 }
237 }
238 return handlerPackageName4a;
239 }
240
241 /**
242 * @see org.andromda.cartridges.jbpm.metafacades.JBpmHandler#getHandlerFullPath()
243 * @return String
244 */
245 protected abstract String handleGetHandlerFullPath();
246
247 private String __handlerFullPath5a;
248 private boolean __handlerFullPath5aSet = false;
249
250 /**
251 * TODO: Model Documentation for
252 * org.andromda.cartridges.jbpm.metafacades.JBpmHandler.handlerFullPath
253 * @return (String)handleGetHandlerFullPath()
254 */
255 public final String getHandlerFullPath()
256 {
257 String handlerFullPath5a = this.__handlerFullPath5a;
258 if (!this.__handlerFullPath5aSet)
259 {
260 // handlerFullPath has no pre constraints
261 handlerFullPath5a = handleGetHandlerFullPath();
262 // handlerFullPath has no post constraints
263 this.__handlerFullPath5a = handlerFullPath5a;
264 if (isMetafacadePropertyCachingEnabled())
265 {
266 this.__handlerFullPath5aSet = true;
267 }
268 }
269 return handlerFullPath5a;
270 }
271
272 /**
273 * @see org.andromda.cartridges.jbpm.metafacades.JBpmHandler#getHandlerClassName()
274 * @return String
275 */
276 protected abstract String handleGetHandlerClassName();
277
278 private String __handlerClassName6a;
279 private boolean __handlerClassName6aSet = false;
280
281 /**
282 * TODO: Model Documentation for
283 * org.andromda.cartridges.jbpm.metafacades.JBpmHandler.handlerClassName
284 * @return (String)handleGetHandlerClassName()
285 */
286 public final String getHandlerClassName()
287 {
288 String handlerClassName6a = this.__handlerClassName6a;
289 if (!this.__handlerClassName6aSet)
290 {
291 // handlerClassName has no pre constraints
292 handlerClassName6a = handleGetHandlerClassName();
293 // handlerClassName has no post constraints
294 this.__handlerClassName6a = handlerClassName6a;
295 if (isMetafacadePropertyCachingEnabled())
296 {
297 this.__handlerClassName6aSet = true;
298 }
299 }
300 return handlerClassName6a;
301 }
302
303 /**
304 * @see org.andromda.cartridges.jbpm.metafacades.JBpmHandler#getClazz()
305 * @return String
306 */
307 protected abstract String handleGetClazz();
308
309 private String __clazz7a;
310 private boolean __clazz7aSet = false;
311
312 /**
313 * TODO: Model Documentation for org.andromda.cartridges.jbpm.metafacades.JBpmHandler.clazz
314 * @return (String)handleGetClazz()
315 */
316 public final String getClazz()
317 {
318 String clazz7a = this.__clazz7a;
319 if (!this.__clazz7aSet)
320 {
321 // clazz has no pre constraints
322 clazz7a = handleGetClazz();
323 // clazz has no post constraints
324 this.__clazz7a = clazz7a;
325 if (isMetafacadePropertyCachingEnabled())
326 {
327 this.__clazz7aSet = true;
328 }
329 }
330 return clazz7a;
331 }
332
333 /**
334 * @return true
335 * @see OperationFacade
336 */
337 public boolean isOperationFacadeMetaType()
338 {
339 return true;
340 }
341
342 /**
343 * @return true
344 * @see ModelElementFacade
345 */
346 public boolean isModelElementFacadeMetaType()
347 {
348 return true;
349 }
350
351 // ----------- delegates to OperationFacade ------------
352 /**
353 * Copies all tagged values from the given ModelElementFacade to this model element facade.
354 * @see ModelElementFacade#copyTaggedValues(ModelElementFacade element)
355 */
356 public void copyTaggedValues(ModelElementFacade element)
357 {
358 this.getSuperOperationFacade().copyTaggedValues(element);
359 }
360
361 /**
362 * Finds the tagged value with the specified 'tagName'. In case there are more values the first
363 * one found will be returned.
364 * @see ModelElementFacade#findTaggedValue(String tagName)
365 */
366 public Object findTaggedValue(String tagName)
367 {
368 return this.getSuperOperationFacade().findTaggedValue(tagName);
369 }
370
371 /**
372 * Returns all the values for the tagged value with the specified name. The returned collection
373 * will contains only String instances, or will be empty. Never null.
374 * @see ModelElementFacade#findTaggedValues(String tagName)
375 */
376 public Collection<Object> findTaggedValues(String tagName)
377 {
378 return this.getSuperOperationFacade().findTaggedValues(tagName);
379 }
380
381 /**
382 * Returns the fully qualified name of the model element. The fully qualified name includes
383 * complete package qualified name of the underlying model element. The templates parameter will
384 * be replaced by the correct one given the binding relation of the parameter to this element.
385 * @see ModelElementFacade#getBindedFullyQualifiedName(ModelElementFacade bindedElement)
386 */
387 public String getBindedFullyQualifiedName(ModelElementFacade bindedElement)
388 {
389 return this.getSuperOperationFacade().getBindedFullyQualifiedName(bindedElement);
390 }
391
392 /**
393 * Gets all constraints belonging to the model element.
394 * @see ModelElementFacade#getConstraints()
395 */
396 public Collection<ConstraintFacade> getConstraints()
397 {
398 return this.getSuperOperationFacade().getConstraints();
399 }
400
401 /**
402 * Returns the constraints of the argument kind that have been placed onto this model. Typical
403 * kinds are "inv", "pre" and "post". Other kinds are possible.
404 * @see ModelElementFacade#getConstraints(String kind)
405 */
406 public Collection<ConstraintFacade> getConstraints(String kind)
407 {
408 return this.getSuperOperationFacade().getConstraints(kind);
409 }
410
411 /**
412 * Gets the documentation for the model element, The indent argument is prefixed to each line.
413 * By default this method wraps lines after 64 characters.
414 * This method is equivalent to <code>getDocumentation(indent, 64)</code>.
415 * @see ModelElementFacade#getDocumentation(String indent)
416 */
417 public String getDocumentation(String indent)
418 {
419 return this.getSuperOperationFacade().getDocumentation(indent);
420 }
421
422 /**
423 * This method returns the documentation for this model element, with the lines wrapped after
424 * the specified number of characters, values of less than 1 will indicate no line wrapping is
425 * required. By default paragraphs are returned as HTML.
426 * This method is equivalent to <code>getDocumentation(indent, lineLength, true)</code>.
427 * @see ModelElementFacade#getDocumentation(String indent, int lineLength)
428 */
429 public String getDocumentation(String indent, int lineLength)
430 {
431 return this.getSuperOperationFacade().getDocumentation(indent, lineLength);
432 }
433
434 /**
435 * This method returns the documentation for this model element, with the lines wrapped after
436 * the specified number of characters, values of less than 1 will indicate no line wrapping is
437 * required. HTML style determines if HTML Escaping is applied.
438 * @see ModelElementFacade#getDocumentation(String indent, int lineLength, boolean htmlStyle)
439 */
440 public String getDocumentation(String indent, int lineLength, boolean htmlStyle)
441 {
442 return this.getSuperOperationFacade().getDocumentation(indent, lineLength, htmlStyle);
443 }
444
445 /**
446 * The fully qualified name of this model element.
447 * @see ModelElementFacade#getFullyQualifiedName()
448 */
449 public String getFullyQualifiedName()
450 {
451 return this.getSuperOperationFacade().getFullyQualifiedName();
452 }
453
454 /**
455 * Returns the fully qualified name of the model element. The fully qualified name includes
456 * complete package qualified name of the underlying model element. If modelName is true, then
457 * the original name of the model element (the name contained within the model) will be the name
458 * returned, otherwise a name from a language mapping will be returned.
459 * @see ModelElementFacade#getFullyQualifiedName(boolean modelName)
460 */
461 public String getFullyQualifiedName(boolean modelName)
462 {
463 return this.getSuperOperationFacade().getFullyQualifiedName(modelName);
464 }
465
466 /**
467 * Returns the fully qualified name as a path, the returned value always starts with out a slash
468 * '/'.
469 * @see ModelElementFacade#getFullyQualifiedNamePath()
470 */
471 public String getFullyQualifiedNamePath()
472 {
473 return this.getSuperOperationFacade().getFullyQualifiedNamePath();
474 }
475
476 /**
477 * Gets the unique identifier of the underlying model element.
478 * @see ModelElementFacade#getId()
479 */
480 public String getId()
481 {
482 return this.getSuperOperationFacade().getId();
483 }
484
485 /**
486 * UML2: Retrieves the keywords for this element. Used to modify implementation properties which
487 * are not represented by other properties, i.e. native, transient, volatile, synchronized,
488 * (added annotations) override, deprecated. Can also be used to suppress compiler warnings:
489 * (added annotations) unchecked, fallthrough, path, serial, finally, all. Annotations require
490 * JDK5 compiler level.
491 * @see ModelElementFacade#getKeywords()
492 */
493 public Collection<String> getKeywords()
494 {
495 return this.getSuperOperationFacade().getKeywords();
496 }
497
498 /**
499 * UML2: Retrieves a localized label for this named element.
500 * @see ModelElementFacade#getLabel()
501 */
502 public String getLabel()
503 {
504 return this.getSuperOperationFacade().getLabel();
505 }
506
507 /**
508 * The language mappings that have been set for this model element.
509 * @see ModelElementFacade#getLanguageMappings()
510 */
511 public TypeMappings getLanguageMappings()
512 {
513 return this.getSuperOperationFacade().getLanguageMappings();
514 }
515
516 /**
517 * Return the model containing this model element (multiple models may be loaded and processed
518 * at the same time).
519 * @see ModelElementFacade#getModel()
520 */
521 public ModelFacade getModel()
522 {
523 return this.getSuperOperationFacade().getModel();
524 }
525
526 /**
527 * The name of the model element.
528 * @see ModelElementFacade#getName()
529 */
530 public String getName()
531 {
532 return this.getSuperOperationFacade().getName();
533 }
534
535 /**
536 * Gets the package to which this model element belongs.
537 * @see ModelElementFacade#getPackage()
538 */
539 public ModelElementFacade getPackage()
540 {
541 return this.getSuperOperationFacade().getPackage();
542 }
543
544 /**
545 * The name of this model element's package.
546 * @see ModelElementFacade#getPackageName()
547 */
548 public String getPackageName()
549 {
550 return this.getSuperOperationFacade().getPackageName();
551 }
552
553 /**
554 * Gets the package name (optionally providing the ability to retrieve the model name and not
555 * the mapped name).
556 * @see ModelElementFacade#getPackageName(boolean modelName)
557 */
558 public String getPackageName(boolean modelName)
559 {
560 return this.getSuperOperationFacade().getPackageName(modelName);
561 }
562
563 /**
564 * Returns the package as a path, the returned value always starts with out a slash '/'.
565 * @see ModelElementFacade#getPackagePath()
566 */
567 public String getPackagePath()
568 {
569 return this.getSuperOperationFacade().getPackagePath();
570 }
571
572 /**
573 * UML2: Returns the value of the 'Qualified Name' attribute. A name which allows the
574 * NamedElement to be identified within a hierarchy of nested Namespaces. It is constructed from
575 * the names of the containing namespaces starting at the root of the hierarchy and ending with
576 * the name of the NamedElement itself.
577 * @see ModelElementFacade#getQualifiedName()
578 */
579 public String getQualifiedName()
580 {
581 return this.getSuperOperationFacade().getQualifiedName();
582 }
583
584 /**
585 * Gets the root package for the model element.
586 * @see ModelElementFacade#getRootPackage()
587 */
588 public PackageFacade getRootPackage()
589 {
590 return this.getSuperOperationFacade().getRootPackage();
591 }
592
593 /**
594 * Gets the dependencies for which this model element is the source.
595 * @see ModelElementFacade#getSourceDependencies()
596 */
597 public Collection<DependencyFacade> getSourceDependencies()
598 {
599 return this.getSuperOperationFacade().getSourceDependencies();
600 }
601
602 /**
603 * If this model element is the context of an activity graph, this represents that activity
604 * graph.
605 * @see ModelElementFacade#getStateMachineContext()
606 */
607 public StateMachineFacade getStateMachineContext()
608 {
609 return this.getSuperOperationFacade().getStateMachineContext();
610 }
611
612 /**
613 * The collection of ALL stereotype names for this model element.
614 * @see ModelElementFacade#getStereotypeNames()
615 */
616 public Collection<String> getStereotypeNames()
617 {
618 return this.getSuperOperationFacade().getStereotypeNames();
619 }
620
621 /**
622 * Gets all stereotypes for this model element.
623 * @see ModelElementFacade#getStereotypes()
624 */
625 public Collection<StereotypeFacade> getStereotypes()
626 {
627 return this.getSuperOperationFacade().getStereotypes();
628 }
629
630 /**
631 * Return the TaggedValues associated with this model element, under all stereotypes.
632 * @see ModelElementFacade#getTaggedValues()
633 */
634 public Collection<TaggedValueFacade> getTaggedValues()
635 {
636 return this.getSuperOperationFacade().getTaggedValues();
637 }
638
639 /**
640 * Gets the dependencies for which this model element is the target.
641 * @see ModelElementFacade#getTargetDependencies()
642 */
643 public Collection<DependencyFacade> getTargetDependencies()
644 {
645 return this.getSuperOperationFacade().getTargetDependencies();
646 }
647
648 /**
649 * Get the template parameter for this model element having the parameterName
650 * @see ModelElementFacade#getTemplateParameter(String parameterName)
651 */
652 public Object getTemplateParameter(String parameterName)
653 {
654 return this.getSuperOperationFacade().getTemplateParameter(parameterName);
655 }
656
657 /**
658 * Get the template parameters for this model element
659 * @see ModelElementFacade#getTemplateParameters()
660 */
661 public Collection<TemplateParameterFacade> getTemplateParameters()
662 {
663 return this.getSuperOperationFacade().getTemplateParameters();
664 }
665
666 /**
667 * The visibility (i.e. public, private, protected or package) of the model element, will
668 * attempt a lookup for these values in the language mappings (if any).
669 * @see ModelElementFacade#getVisibility()
670 */
671 public String getVisibility()
672 {
673 return this.getSuperOperationFacade().getVisibility();
674 }
675
676 /**
677 * Returns true if the model element has the exact stereotype (meaning no stereotype inheritance
678 * is taken into account when searching for the stereotype), false otherwise.
679 * @see ModelElementFacade#hasExactStereotype(String stereotypeName)
680 */
681 public boolean hasExactStereotype(String stereotypeName)
682 {
683 return this.getSuperOperationFacade().hasExactStereotype(stereotypeName);
684 }
685
686 /**
687 * Does the UML Element contain the named Keyword? Keywords can be separated by space, comma,
688 * pipe, semicolon, or << >>
689 * @see ModelElementFacade#hasKeyword(String keywordName)
690 */
691 public boolean hasKeyword(String keywordName)
692 {
693 return this.getSuperOperationFacade().hasKeyword(keywordName);
694 }
695
696 /**
697 * Returns true if the model element has the specified stereotype. If the stereotype itself
698 * does not match, then a search will be made up the stereotype inheritance hierarchy, and if
699 * one of the stereotype's ancestors has a matching name this method will return true, false
700 * otherwise.
701 * For example, if we have a certain stereotype called <<exception>> and a model element has a
702 * stereotype called <<applicationException>> which extends <<exception>>, when calling this
703 * method with 'stereotypeName' defined as 'exception' the method would return true since
704 * <<applicationException>> inherits from <<exception>>. If you want to check if the model
705 * element has the exact stereotype, then use the method 'hasExactStereotype' instead.
706 * @see ModelElementFacade#hasStereotype(String stereotypeName)
707 */
708 public boolean hasStereotype(String stereotypeName)
709 {
710 return this.getSuperOperationFacade().hasStereotype(stereotypeName);
711 }
712
713 /**
714 * True if there are target dependencies from this element that are instances of BindingFacade.
715 * Deprecated in UML2: Use TemplateBinding parameters instead of dependencies.
716 * @see ModelElementFacade#isBindingDependenciesPresent()
717 */
718 public boolean isBindingDependenciesPresent()
719 {
720 return this.getSuperOperationFacade().isBindingDependenciesPresent();
721 }
722
723 /**
724 * Indicates if any constraints are present on this model element.
725 * @see ModelElementFacade#isConstraintsPresent()
726 */
727 public boolean isConstraintsPresent()
728 {
729 return this.getSuperOperationFacade().isConstraintsPresent();
730 }
731
732 /**
733 * Indicates if any documentation is present on this model element.
734 * @see ModelElementFacade#isDocumentationPresent()
735 */
736 public boolean isDocumentationPresent()
737 {
738 return this.getSuperOperationFacade().isDocumentationPresent();
739 }
740
741 /**
742 * True if this element name is a reserved word in Java, C#, ANSI or ISO C, C++, JavaScript.
743 * @see ModelElementFacade#isReservedWord()
744 */
745 public boolean isReservedWord()
746 {
747 return this.getSuperOperationFacade().isReservedWord();
748 }
749
750 /**
751 * True is there are template parameters on this model element. For UML2, applies to Class,
752 * Operation, Property, and Parameter.
753 * @see ModelElementFacade#isTemplateParametersPresent()
754 */
755 public boolean isTemplateParametersPresent()
756 {
757 return this.getSuperOperationFacade().isTemplateParametersPresent();
758 }
759
760 /**
761 * True if this element name is a valid identifier name in Java, C#, ANSI or ISO C, C++,
762 * JavaScript. Contains no spaces, special characters etc. Constraint always applied on
763 * Enumerations and Interfaces, optionally applies on other model elements.
764 * @see ModelElementFacade#isValidIdentifierName()
765 */
766 public boolean isValidIdentifierName()
767 {
768 return this.getSuperOperationFacade().isValidIdentifierName();
769 }
770
771 /**
772 * Searches for the constraint with the specified 'name' on this model element, and if found
773 * translates it using the specified 'translation' from a translation library discovered by the
774 * framework.
775 * @see ModelElementFacade#translateConstraint(String name, String translation)
776 */
777 public String translateConstraint(String name, String translation)
778 {
779 return this.getSuperOperationFacade().translateConstraint(name, translation);
780 }
781
782 /**
783 * Translates all constraints belonging to this model element with the given 'translation'.
784 * @see ModelElementFacade#translateConstraints(String translation)
785 */
786 public String[] translateConstraints(String translation)
787 {
788 return this.getSuperOperationFacade().translateConstraints(translation);
789 }
790
791 /**
792 * Translates the constraints of the specified 'kind' belonging to this model element.
793 * @see ModelElementFacade#translateConstraints(String kind, String translation)
794 */
795 public String[] translateConstraints(String kind, String translation)
796 {
797 return this.getSuperOperationFacade().translateConstraints(kind, translation);
798 }
799
800 /**
801 * Finds the parameter on this operation having the given name, if no parameter is found, null
802 * is returned instead.
803 * @see OperationFacade#findParameter(String name)
804 */
805 public ParameterFacade findParameter(String name)
806 {
807 return this.getSuperOperationFacade().findParameter(name);
808 }
809
810 /**
811 * Searches the given feature for the specified tag.
812 * If the follow boolean is set to true then the search will continue from the class operation
813 * to the class itself and then up the class hierarchy.
814 * @see OperationFacade#findTaggedValue(String name, boolean follow)
815 */
816 public Object findTaggedValue(String name, boolean follow)
817 {
818 return this.getSuperOperationFacade().findTaggedValue(name, follow);
819 }
820
821 /**
822 * A comma separated list of all argument names.
823 * @see OperationFacade#getArgumentNames()
824 */
825 public String getArgumentNames()
826 {
827 return this.getSuperOperationFacade().getArgumentNames();
828 }
829
830 /**
831 * A comma separated list of all types of each argument, in order.
832 * @see OperationFacade#getArgumentTypeNames()
833 */
834 public String getArgumentTypeNames()
835 {
836 return this.getSuperOperationFacade().getArgumentTypeNames();
837 }
838
839 /**
840 * Specification of an argument used to pass information into or out of an invocation of a
841 * behavioral
842 * feature. Parameters are allowed to be treated as connectable elements. Parameters have
843 * support for
844 * streaming, exceptions, and parameter sets.
845 * @see OperationFacade#getArguments()
846 */
847 public Collection<ParameterFacade> getArguments()
848 {
849 return this.getSuperOperationFacade().getArguments();
850 }
851
852 /**
853 * Constructs the operation call with the operation name
854 * @see OperationFacade#getCall()
855 */
856 public String getCall()
857 {
858 return this.getSuperOperationFacade().getCall();
859 }
860
861 /**
862 * Returns the concurrency modifier for this operation (i.e. concurrent, guarded or sequential)
863 * of the model element, will attempt a lookup for these values in the language mappings (if
864 * any).
865 * @see OperationFacade#getConcurrency()
866 */
867 public String getConcurrency()
868 {
869 return this.getSuperOperationFacade().getConcurrency();
870 }
871
872 /**
873 * A comma separated list containing all exceptions that this operation throws. Exceptions are
874 * determined through dependencies that have the target element stereotyped as <<Exception>>.
875 * @see OperationFacade#getExceptionList()
876 */
877 public String getExceptionList()
878 {
879 return this.getSuperOperationFacade().getExceptionList();
880 }
881
882 /**
883 * Returns a comma separated list of exceptions appended to the comma separated list of fully
884 * qualified 'initialException' classes passed in to this method.
885 * @see OperationFacade#getExceptionList(String initialExceptions)
886 */
887 public String getExceptionList(String initialExceptions)
888 {
889 return this.getSuperOperationFacade().getExceptionList(initialExceptions);
890 }
891
892 /**
893 * A collection of all exceptions thrown by this operation.
894 * @see OperationFacade#getExceptions()
895 */
896 public Collection<ModelElementFacade> getExceptions()
897 {
898 return this.getSuperOperationFacade().getExceptions();
899 }
900
901 /**
902 * Return Type with multiplicity taken into account. UML14 does not allow multiplicity *.
903 * @see OperationFacade#getGetterSetterReturnTypeName()
904 */
905 public String getGetterSetterReturnTypeName()
906 {
907 return this.getSuperOperationFacade().getGetterSetterReturnTypeName();
908 }
909
910 /**
911 * the lower value for the multiplicity
912 * -only applicable for UML2
913 * @see OperationFacade#getLower()
914 */
915 public int getLower()
916 {
917 return this.getSuperOperationFacade().getLower();
918 }
919
920 /**
921 * Returns the operation method body determined from UML sequence diagrams or other UML sources.
922 * @see OperationFacade#getMethodBody()
923 */
924 public String getMethodBody()
925 {
926 return this.getSuperOperationFacade().getMethodBody();
927 }
928
929 /**
930 * The operation this operation overrides, null if this operation is not overriding.
931 * @see OperationFacade#getOverriddenOperation()
932 */
933 public OperationFacade getOverriddenOperation()
934 {
935 return this.getSuperOperationFacade().getOverriddenOperation();
936 }
937
938 /**
939 * Gets the owner of this operation
940 * @see OperationFacade#getOwner()
941 */
942 public ClassifierFacade getOwner()
943 {
944 return this.getSuperOperationFacade().getOwner();
945 }
946
947 /**
948 * Return all parameters for the operation, including the return parameter.
949 * @see OperationFacade#getParameters()
950 */
951 public Collection<ParameterFacade> getParameters()
952 {
953 return this.getSuperOperationFacade().getParameters();
954 }
955
956 /**
957 * The name of the operation that handles postcondition constraints.
958 * @see OperationFacade#getPostconditionName()
959 */
960 public String getPostconditionName()
961 {
962 return this.getSuperOperationFacade().getPostconditionName();
963 }
964
965 /**
966 * The postcondition constraints belonging to this operation.
967 * @see OperationFacade#getPostconditions()
968 */
969 public Collection<ConstraintFacade> getPostconditions()
970 {
971 return this.getSuperOperationFacade().getPostconditions();
972 }
973
974 /**
975 * The call to the precondition operation.
976 * @see OperationFacade#getPreconditionCall()
977 */
978 public String getPreconditionCall()
979 {
980 return this.getSuperOperationFacade().getPreconditionCall();
981 }
982
983 /**
984 * The name of the operation that handles precondition constraints.
985 * @see OperationFacade#getPreconditionName()
986 */
987 public String getPreconditionName()
988 {
989 return this.getSuperOperationFacade().getPreconditionName();
990 }
991
992 /**
993 * The signature of the precondition operation.
994 * @see OperationFacade#getPreconditionSignature()
995 */
996 public String getPreconditionSignature()
997 {
998 return this.getSuperOperationFacade().getPreconditionSignature();
999 }
1000
1001 /**
1002 * The precondition constraints belonging to this operation.
1003 * @see OperationFacade#getPreconditions()
1004 */
1005 public Collection<ConstraintFacade> getPreconditions()
1006 {
1007 return this.getSuperOperationFacade().getPreconditions();
1008 }
1009
1010 /**
1011 * (UML2 Only). Get the actual return parameter (which may have stereotypes etc).
1012 * @see OperationFacade#getReturnParameter()
1013 */
1014 public ParameterFacade getReturnParameter()
1015 {
1016 return this.getSuperOperationFacade().getReturnParameter();
1017 }
1018
1019 /**
1020 * The operation return type parameter.
1021 * @see OperationFacade#getReturnType()
1022 */
1023 public ClassifierFacade getReturnType()
1024 {
1025 return this.getSuperOperationFacade().getReturnType();
1026 }
1027
1028 /**
1029 * Return the operation signature, including public/protested abstract returnType name plus
1030 * argument type and name
1031 * @see OperationFacade#getSignature()
1032 */
1033 public String getSignature()
1034 {
1035 return this.getSuperOperationFacade().getSignature();
1036 }
1037
1038 /**
1039 * Returns the signature of the operation and optionally appends the argument names (if
1040 * withArgumentNames is true), otherwise returns the signature with just the types alone in the
1041 * signature.
1042 * @see OperationFacade#getSignature(boolean withArgumentNames)
1043 */
1044 public String getSignature(boolean withArgumentNames)
1045 {
1046 return this.getSuperOperationFacade().getSignature(withArgumentNames);
1047 }
1048
1049 /**
1050 * Returns the signature of the operation and optionally appends the given 'argumentModifier' to
1051 * each argument.
1052 * @see OperationFacade#getSignature(String argumentModifier)
1053 */
1054 public String getSignature(String argumentModifier)
1055 {
1056 return this.getSuperOperationFacade().getSignature(argumentModifier);
1057 }
1058
1059 /**
1060 * A comma-separated parameter list (type and name of each parameter) of an operation.
1061 * @see OperationFacade#getTypedArgumentList()
1062 */
1063 public String getTypedArgumentList()
1064 {
1065 return this.getSuperOperationFacade().getTypedArgumentList();
1066 }
1067
1068 /**
1069 * A comma-separated parameter list (type and name of each parameter) of an operation with an
1070 * optional modifier (i.e final) before each parameter.
1071 * @see OperationFacade#getTypedArgumentList(String modifier)
1072 */
1073 public String getTypedArgumentList(String modifier)
1074 {
1075 return this.getSuperOperationFacade().getTypedArgumentList(modifier);
1076 }
1077
1078 /**
1079 * the upper value for the multiplicity (will be -1 for *)
1080 * - only applicable for UML2
1081 * @see OperationFacade#getUpper()
1082 */
1083 public int getUpper()
1084 {
1085 return this.getSuperOperationFacade().getUpper();
1086 }
1087
1088 /**
1089 * True is the operation is abstract.
1090 * @see OperationFacade#isAbstract()
1091 */
1092 public boolean isAbstract()
1093 {
1094 return this.getSuperOperationFacade().isAbstract();
1095 }
1096
1097 /**
1098 * True if the operation has (i.e. throws any exceptions) false otherwise.
1099 * @see OperationFacade#isExceptionsPresent()
1100 */
1101 public boolean isExceptionsPresent()
1102 {
1103 return this.getSuperOperationFacade().isExceptionsPresent();
1104 }
1105
1106 /**
1107 * IsLeaf property in the operation. If true, operation is final, cannot be extended or
1108 * implemented by a descendant. Default=false.
1109 * @see OperationFacade#isLeaf()
1110 */
1111 public boolean isLeaf()
1112 {
1113 return this.getSuperOperationFacade().isLeaf();
1114 }
1115
1116 /**
1117 * UML2 only. If the return type parameter multiplicity>1 OR the operation multiplicity>1.
1118 * Default=false.
1119 * @see OperationFacade#isMany()
1120 */
1121 public boolean isMany()
1122 {
1123 return this.getSuperOperationFacade().isMany();
1124 }
1125
1126 /**
1127 * UML2 only: If isMany (Collection type returned), is the type unique within the collection.
1128 * Unique+Ordered determines CollectionType implementation of return result. Default=false.
1129 * @see OperationFacade#isOrdered()
1130 */
1131 public boolean isOrdered()
1132 {
1133 return this.getSuperOperationFacade().isOrdered();
1134 }
1135
1136 /**
1137 * True if this operation overrides an operation defined in an ancestor class. An operation
1138 * overrides when the names of the operations as well as the types of the arguments are equal.
1139 * The return type may be different and is, as well as any exceptions, ignored.
1140 * @see OperationFacade#isOverriding()
1141 */
1142 public boolean isOverriding()
1143 {
1144 return this.getSuperOperationFacade().isOverriding();
1145 }
1146
1147 /**
1148 * Whether any postcondition constraints are present on this operation.
1149 * @see OperationFacade#isPostconditionsPresent()
1150 */
1151 public boolean isPostconditionsPresent()
1152 {
1153 return this.getSuperOperationFacade().isPostconditionsPresent();
1154 }
1155
1156 /**
1157 * Whether any precondition constraints are present on this operation.
1158 * @see OperationFacade#isPreconditionsPresent()
1159 */
1160 public boolean isPreconditionsPresent()
1161 {
1162 return this.getSuperOperationFacade().isPreconditionsPresent();
1163 }
1164
1165 /**
1166 * Indicates whether or not this operation is a query operation.
1167 * @see OperationFacade#isQuery()
1168 */
1169 public boolean isQuery()
1170 {
1171 return this.getSuperOperationFacade().isQuery();
1172 }
1173
1174 /**
1175 * True/false depending on whether or not the operation has a return type or not (i.e. a return
1176 * type of something other than void).
1177 * @see OperationFacade#isReturnTypePresent()
1178 */
1179 public boolean isReturnTypePresent()
1180 {
1181 return this.getSuperOperationFacade().isReturnTypePresent();
1182 }
1183
1184 /**
1185 * True is the operation is static (only a single instance can be instantiated).
1186 * @see OperationFacade#isStatic()
1187 */
1188 public boolean isStatic()
1189 {
1190 return this.getSuperOperationFacade().isStatic();
1191 }
1192
1193 /**
1194 * UML2 only: for Collection return type, is the type unique within the collection.
1195 * Unique+Ordered determines the returned CollectionType. Default=false.
1196 * @see OperationFacade#isUnique()
1197 */
1198 public boolean isUnique()
1199 {
1200 return this.getSuperOperationFacade().isUnique();
1201 }
1202
1203 /**
1204 * @see org.andromda.core.metafacade.MetafacadeBase#initialize()
1205 */
1206 @Override
1207 public void initialize()
1208 {
1209 this.getSuperOperationFacade().initialize();
1210 }
1211
1212 /**
1213 * @return Object getSuperOperationFacade().getValidationOwner()
1214 * @see org.andromda.core.metafacade.MetafacadeBase#getValidationOwner()
1215 */
1216 @Override
1217 public Object getValidationOwner()
1218 {
1219 Object owner = this.getSuperOperationFacade().getValidationOwner();
1220 return owner;
1221 }
1222
1223 /**
1224 * @return String getSuperOperationFacade().getValidationName()
1225 * @see org.andromda.core.metafacade.MetafacadeBase#getValidationName()
1226 */
1227 @Override
1228 public String getValidationName()
1229 {
1230 String name = this.getSuperOperationFacade().getValidationName();
1231 return name;
1232 }
1233
1234 /**
1235 * @param validationMessages Collection<ModelValidationMessage>
1236 * @see org.andromda.core.metafacade.MetafacadeBase#validateInvariants(Collection validationMessages)
1237 */
1238 @Override
1239 public void validateInvariants(Collection<ModelValidationMessage> validationMessages)
1240 {
1241 this.getSuperOperationFacade().validateInvariants(validationMessages);
1242 }
1243
1244 /**
1245 * The property that stores the name of the metafacade.
1246 */
1247 private static final String NAME_PROPERTY = "name";
1248 private static final String FQNAME_PROPERTY = "fullyQualifiedName";
1249
1250 /**
1251 * @see Object#toString()
1252 */
1253 @Override
1254 public String toString()
1255 {
1256 final StringBuilder toString = new StringBuilder(this.getClass().getName());
1257 toString.append("[");
1258 try
1259 {
1260 toString.append(Introspector.instance().getProperty(this, FQNAME_PROPERTY));
1261 }
1262 catch (final Throwable tryAgain)
1263 {
1264 try
1265 {
1266 toString.append(Introspector.instance().getProperty(this, NAME_PROPERTY));
1267 }
1268 catch (final Throwable ignore)
1269 {
1270 // - just ignore when the metafacade doesn't have a name or fullyQualifiedName property
1271 }
1272 }
1273 toString.append("]");
1274 return toString.toString();
1275 }
1276 }