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