001// license-header java merge-point
002//
003// Attention: generated code (by MetafacadeLogic.vsl) - do not modify!
004//
005package org.andromda.cartridges.bpm4struts.metafacades;
006
007import java.util.Collection;
008import java.util.List;
009import org.andromda.core.common.Introspector;
010import org.andromda.core.metafacade.MetafacadeBase;
011import org.andromda.core.metafacade.MetafacadeFactory;
012import org.andromda.core.metafacade.ModelValidationMessage;
013import org.andromda.metafacades.uml.ClassifierFacade;
014import org.andromda.metafacades.uml.ConstraintFacade;
015import org.andromda.metafacades.uml.DependencyFacade;
016import org.andromda.metafacades.uml.FrontEndAction;
017import org.andromda.metafacades.uml.FrontEndActivityGraph;
018import org.andromda.metafacades.uml.FrontEndControllerOperation;
019import org.andromda.metafacades.uml.FrontEndParameter;
020import org.andromda.metafacades.uml.ModelElementFacade;
021import org.andromda.metafacades.uml.ModelFacade;
022import org.andromda.metafacades.uml.OperationFacade;
023import org.andromda.metafacades.uml.PackageFacade;
024import org.andromda.metafacades.uml.ParameterFacade;
025import org.andromda.metafacades.uml.ServiceOperation;
026import org.andromda.metafacades.uml.StateMachineFacade;
027import org.andromda.metafacades.uml.StereotypeFacade;
028import org.andromda.metafacades.uml.TaggedValueFacade;
029import org.andromda.metafacades.uml.TemplateParameterFacade;
030import org.andromda.metafacades.uml.TypeMappings;
031import org.andromda.translation.ocl.validation.OCLCollections;
032import org.andromda.translation.ocl.validation.OCLIntrospector;
033import org.andromda.translation.ocl.validation.OCLResultEnsurer;
034import org.apache.log4j.Logger;
035
036/**
037 * TODO: Model Documentation for
038 * org.andromda.cartridges.bpm4struts.metafacades.StrutsControllerOperation
039 * MetafacadeLogic for StrutsControllerOperation
040 *
041 * @see StrutsControllerOperation
042 */
043public abstract class StrutsControllerOperationLogic
044    extends MetafacadeBase
045    implements StrutsControllerOperation
046{
047    /**
048     * The underlying UML object
049     * @see Object
050     */
051    protected Object metaObject;
052
053    /** Create Metafacade implementation instance using the MetafacadeFactory from the context
054     * @param metaObjectIn
055     * @param context
056     */
057    protected StrutsControllerOperationLogic(Object metaObjectIn, String context)
058    {
059        super(metaObjectIn, getContext(context));
060        this.superFrontEndControllerOperation =
061           (FrontEndControllerOperation)
062            MetafacadeFactory.getInstance().createFacadeImpl(
063                    "org.andromda.metafacades.uml.FrontEndControllerOperation",
064                    metaObjectIn,
065                    getContext(context));
066        this.metaObject = metaObjectIn;
067    }
068
069    /**
070     * The logger instance.
071     */
072    private static final Logger logger = Logger.getLogger(StrutsControllerOperationLogic.class);
073
074    /**
075     * Gets the context for this metafacade logic instance.
076     * @param context String. Set to StrutsControllerOperation if null
077     * @return context String
078     */
079    private static String getContext(String context)
080    {
081        if (context == null)
082        {
083            context = "org.andromda.cartridges.bpm4struts.metafacades.StrutsControllerOperation";
084        }
085        return context;
086    }
087
088    private FrontEndControllerOperation superFrontEndControllerOperation;
089    private boolean superFrontEndControllerOperationInitialized = false;
090
091    /**
092     * Gets the FrontEndControllerOperation parent instance.
093     * @return this.superFrontEndControllerOperation FrontEndControllerOperation
094     */
095    private FrontEndControllerOperation getSuperFrontEndControllerOperation()
096    {
097        if (!this.superFrontEndControllerOperationInitialized)
098        {
099            ((MetafacadeBase)this.superFrontEndControllerOperation).setMetafacadeContext(this.getMetafacadeContext());
100            this.superFrontEndControllerOperationInitialized = true;
101        }
102        return this.superFrontEndControllerOperation;
103    }
104
105    /** Reset context only for non-root metafacades
106     * @param context
107     * @see MetafacadeBase#resetMetafacadeContext(String context)
108     */
109    @Override
110    public void resetMetafacadeContext(String context)
111    {
112        if (!this.contextRoot) // reset context only for non-root metafacades
113        {
114            context = getContext(context);  // to have same value as in original constructor call
115            setMetafacadeContext (context);
116            if (this.superFrontEndControllerOperationInitialized)
117            {
118                ((MetafacadeBase)this.superFrontEndControllerOperation).resetMetafacadeContext(context);
119            }
120        }
121    }
122
123    /**
124     * @return boolean true always
125     * @see StrutsControllerOperation
126     */
127    public boolean isStrutsControllerOperationMetaType()
128    {
129        return true;
130    }
131
132    // --------------- attributes ---------------------
133
134   /**
135    * @see org.andromda.cartridges.bpm4struts.metafacades.StrutsControllerOperation#getInterfaceName()
136    * @return String
137    */
138    protected abstract String handleGetInterfaceName();
139
140    private String __interfaceName1a;
141    private boolean __interfaceName1aSet = false;
142
143    /**
144     * The name of the interface used for forms that correspond to the calling of this operation (we
145     * need to pass the form to the controller, but many forms/actions my be deferring to this
146     * operation, this way we can aggregate them).
147     * @return (String)handleGetInterfaceName()
148     */
149    public final String getInterfaceName()
150    {
151        String interfaceName1a = this.__interfaceName1a;
152        if (!this.__interfaceName1aSet)
153        {
154            // interfaceName has no pre constraints
155            interfaceName1a = handleGetInterfaceName();
156            // interfaceName has no post constraints
157            this.__interfaceName1a = interfaceName1a;
158            if (isMetafacadePropertyCachingEnabled())
159            {
160                this.__interfaceName1aSet = true;
161            }
162        }
163        return interfaceName1a;
164    }
165
166   /**
167    * @see org.andromda.cartridges.bpm4struts.metafacades.StrutsControllerOperation#getInterfacePackageName()
168    * @return String
169    */
170    protected abstract String handleGetInterfacePackageName();
171
172    private String __interfacePackageName2a;
173    private boolean __interfacePackageName2aSet = false;
174
175    /**
176     * The package of the interface used for forms that correspond to the calling of this operation
177     * (we need to pass the form to the controller, but many forms/actions my be deferring to this
178     * operation, this way we can aggregate them).
179     * @return (String)handleGetInterfacePackageName()
180     */
181    public final String getInterfacePackageName()
182    {
183        String interfacePackageName2a = this.__interfacePackageName2a;
184        if (!this.__interfacePackageName2aSet)
185        {
186            // interfacePackageName has no pre constraints
187            interfacePackageName2a = handleGetInterfacePackageName();
188            // interfacePackageName has no post constraints
189            this.__interfacePackageName2a = interfacePackageName2a;
190            if (isMetafacadePropertyCachingEnabled())
191            {
192                this.__interfacePackageName2aSet = true;
193            }
194        }
195        return interfacePackageName2a;
196    }
197
198   /**
199    * @see org.andromda.cartridges.bpm4struts.metafacades.StrutsControllerOperation#getInterfaceFullPath()
200    * @return String
201    */
202    protected abstract String handleGetInterfaceFullPath();
203
204    private String __interfaceFullPath3a;
205    private boolean __interfaceFullPath3aSet = false;
206
207    /**
208     * The package of the interface converted to a file-system compatible format.
209     * @return (String)handleGetInterfaceFullPath()
210     */
211    public final String getInterfaceFullPath()
212    {
213        String interfaceFullPath3a = this.__interfaceFullPath3a;
214        if (!this.__interfaceFullPath3aSet)
215        {
216            // interfaceFullPath has no pre constraints
217            interfaceFullPath3a = handleGetInterfaceFullPath();
218            // interfaceFullPath has no post constraints
219            this.__interfaceFullPath3a = interfaceFullPath3a;
220            if (isMetafacadePropertyCachingEnabled())
221            {
222                this.__interfaceFullPath3aSet = true;
223            }
224        }
225        return interfaceFullPath3a;
226    }
227
228   /**
229    * @see org.andromda.cartridges.bpm4struts.metafacades.StrutsControllerOperation#getInterfaceType()
230    * @return String
231    */
232    protected abstract String handleGetInterfaceType();
233
234    private String __interfaceType4a;
235    private boolean __interfaceType4aSet = false;
236
237    /**
238     * The fully qualified name of the interface.
239     * @return (String)handleGetInterfaceType()
240     */
241    public final String getInterfaceType()
242    {
243        String interfaceType4a = this.__interfaceType4a;
244        if (!this.__interfaceType4aSet)
245        {
246            // interfaceType has no pre constraints
247            interfaceType4a = handleGetInterfaceType();
248            // interfaceType has no post constraints
249            this.__interfaceType4a = interfaceType4a;
250            if (isMetafacadePropertyCachingEnabled())
251            {
252                this.__interfaceType4aSet = true;
253            }
254        }
255        return interfaceType4a;
256    }
257
258   /**
259    * @see org.andromda.cartridges.bpm4struts.metafacades.StrutsControllerOperation#isBackEndServiceOperationMatchingParameters()
260    * @return boolean
261    */
262    protected abstract boolean handleIsBackEndServiceOperationMatchingParameters();
263
264    private boolean __backEndServiceOperationMatchingParameters5a;
265    private boolean __backEndServiceOperationMatchingParameters5aSet = false;
266
267    /**
268     * TODO: Model Documentation for
269     * org.andromda.cartridges.bpm4struts.metafacades.StrutsControllerOperation.backEndServiceOperationMatchingParameters
270     * @return (boolean)handleIsBackEndServiceOperationMatchingParameters()
271     */
272    public final boolean isBackEndServiceOperationMatchingParameters()
273    {
274        boolean backEndServiceOperationMatchingParameters5a = this.__backEndServiceOperationMatchingParameters5a;
275        if (!this.__backEndServiceOperationMatchingParameters5aSet)
276        {
277            // backEndServiceOperationMatchingParameters has no pre constraints
278            backEndServiceOperationMatchingParameters5a = handleIsBackEndServiceOperationMatchingParameters();
279            // backEndServiceOperationMatchingParameters has no post constraints
280            this.__backEndServiceOperationMatchingParameters5a = backEndServiceOperationMatchingParameters5a;
281            if (isMetafacadePropertyCachingEnabled())
282            {
283                this.__backEndServiceOperationMatchingParameters5aSet = true;
284            }
285        }
286        return backEndServiceOperationMatchingParameters5a;
287    }
288
289   /**
290    * @see org.andromda.cartridges.bpm4struts.metafacades.StrutsControllerOperation#isCallingBackEnd()
291    * @return boolean
292    */
293    protected abstract boolean handleIsCallingBackEnd();
294
295    private boolean __callingBackEnd6a;
296    private boolean __callingBackEnd6aSet = false;
297
298    /**
299     * If this is true then the backEndServiceOperation property is not null, meaning this operation
300     * is calling a specific backend operation.
301     * @return (boolean)handleIsCallingBackEnd()
302     */
303    public final boolean isCallingBackEnd()
304    {
305        boolean callingBackEnd6a = this.__callingBackEnd6a;
306        if (!this.__callingBackEnd6aSet)
307        {
308            // callingBackEnd has no pre constraints
309            callingBackEnd6a = handleIsCallingBackEnd();
310            // callingBackEnd has no post constraints
311            this.__callingBackEnd6a = callingBackEnd6a;
312            if (isMetafacadePropertyCachingEnabled())
313            {
314                this.__callingBackEnd6aSet = true;
315            }
316        }
317        return callingBackEnd6a;
318    }
319
320    // ------------- associations ------------------
321
322    private StrutsController __getController1r;
323    private boolean __getController1rSet = false;
324
325    /**
326     * TODO: Model Documentation for
327     * org.andromda.cartridges.bpm4struts.metafacades.StrutsControllerOperation
328     * @return (StrutsController)handleGetController()
329     */
330    public final StrutsController getController()
331    {
332        StrutsController getController1r = this.__getController1r;
333        if (!this.__getController1rSet)
334        {
335            // strutsControllerOperation has no pre constraints
336            Object result = handleGetController();
337            MetafacadeBase shieldedResult = this.shieldedElement(result);
338            try
339            {
340                getController1r = (StrutsController)shieldedResult;
341            }
342            catch (ClassCastException ex)
343            {
344                // Bad things happen if the metafacade type mapping in metafacades.xml is wrong - Warn
345                StrutsControllerOperationLogic.logger.warn("incorrect metafacade cast for StrutsControllerOperationLogic.getController StrutsController " + result + ": " + shieldedResult);
346            }
347            // strutsControllerOperation has no post constraints
348            this.__getController1r = getController1r;
349            if (isMetafacadePropertyCachingEnabled())
350            {
351                this.__getController1rSet = true;
352            }
353        }
354        return getController1r;
355    }
356
357    /**
358     * UML Specific type is transformed by shieldedElements to AndroMDA Metafacade type
359     * @return Object
360     */
361    protected abstract Object handleGetController();
362
363    private ServiceOperation __getBackEndServiceOperation2r;
364    private boolean __getBackEndServiceOperation2rSet = false;
365
366    /**
367     * TODO: Model Documentation for
368     * org.andromda.cartridges.bpm4struts.metafacades.StrutsControllerOperation
369     * @return (ServiceOperation)handleGetBackEndServiceOperation()
370     */
371    public final ServiceOperation getBackEndServiceOperation()
372    {
373        ServiceOperation getBackEndServiceOperation2r = this.__getBackEndServiceOperation2r;
374        if (!this.__getBackEndServiceOperation2rSet)
375        {
376            // strutsControllerOperation has no pre constraints
377            Object result = handleGetBackEndServiceOperation();
378            MetafacadeBase shieldedResult = this.shieldedElement(result);
379            try
380            {
381                getBackEndServiceOperation2r = (ServiceOperation)shieldedResult;
382            }
383            catch (ClassCastException ex)
384            {
385                // Bad things happen if the metafacade type mapping in metafacades.xml is wrong - Warn
386                StrutsControllerOperationLogic.logger.warn("incorrect metafacade cast for StrutsControllerOperationLogic.getBackEndServiceOperation ServiceOperation " + result + ": " + shieldedResult);
387            }
388            // strutsControllerOperation has no post constraints
389            this.__getBackEndServiceOperation2r = getBackEndServiceOperation2r;
390            if (isMetafacadePropertyCachingEnabled())
391            {
392                this.__getBackEndServiceOperation2rSet = true;
393            }
394        }
395        return getBackEndServiceOperation2r;
396    }
397
398    /**
399     * UML Specific type is transformed by shieldedElements to AndroMDA Metafacade type
400     * @return Object
401     */
402    protected abstract Object handleGetBackEndServiceOperation();
403
404    /**
405     * @return true
406     * @see FrontEndControllerOperation
407     */
408    public boolean isFrontEndControllerOperationMetaType()
409    {
410        return true;
411    }
412
413    /**
414     * @return true
415     * @see OperationFacade
416     */
417    public boolean isOperationFacadeMetaType()
418    {
419        return true;
420    }
421
422    /**
423     * @return true
424     * @see ModelElementFacade
425     */
426    public boolean isModelElementFacadeMetaType()
427    {
428        return true;
429    }
430
431    // ----------- delegates to FrontEndControllerOperation ------------
432    /**
433     * The activity graph in which this controller operation is used.
434     * @see FrontEndControllerOperation#getActivityGraph()
435     */
436    public FrontEndActivityGraph getActivityGraph()
437    {
438        return this.getSuperFrontEndControllerOperation().getActivityGraph();
439    }
440
441    /**
442     * All those actions that contain at least one front-end action state that is deferring to this
443     * operation.
444     * @see FrontEndControllerOperation#getDeferringActions()
445     */
446    public List<FrontEndAction> getDeferringActions()
447    {
448        return this.getSuperFrontEndControllerOperation().getDeferringActions();
449    }
450
451    /**
452     * The set of fields in the form made up form this controller operation's parameters.
453     * @see FrontEndControllerOperation#getFormFields()
454     */
455    public List<FrontEndParameter> getFormFields()
456    {
457        return this.getSuperFrontEndControllerOperation().getFormFields();
458    }
459
460    /**
461     * For each front-end controller operation argument there must exist a form field for each
462     * action deferring to that operation. This form field must carry the same name and must be of
463     * the same type. True if this is the case, false otherwise.
464     * @see FrontEndControllerOperation#isAllArgumentsHaveFormFields()
465     */
466    public boolean isAllArgumentsHaveFormFields()
467    {
468        return this.getSuperFrontEndControllerOperation().isAllArgumentsHaveFormFields();
469    }
470
471    /**
472     * Indicates if the owner of this operation is a controller.
473     * @see FrontEndControllerOperation#isOwnerIsController()
474     */
475    public boolean isOwnerIsController()
476    {
477        return this.getSuperFrontEndControllerOperation().isOwnerIsController();
478    }
479
480    /**
481     * Copies all tagged values from the given ModelElementFacade to this model element facade.
482     * @see ModelElementFacade#copyTaggedValues(ModelElementFacade element)
483     */
484    public void copyTaggedValues(ModelElementFacade element)
485    {
486        this.getSuperFrontEndControllerOperation().copyTaggedValues(element);
487    }
488
489    /**
490     * Finds the tagged value with the specified 'tagName'. In case there are more values the first
491     * one found will be returned.
492     * @see ModelElementFacade#findTaggedValue(String tagName)
493     */
494    public Object findTaggedValue(String tagName)
495    {
496        return this.getSuperFrontEndControllerOperation().findTaggedValue(tagName);
497    }
498
499    /**
500     * Returns all the values for the tagged value with the specified name. The returned collection
501     * will contains only String instances, or will be empty. Never null.
502     * @see ModelElementFacade#findTaggedValues(String tagName)
503     */
504    public Collection<Object> findTaggedValues(String tagName)
505    {
506        return this.getSuperFrontEndControllerOperation().findTaggedValues(tagName);
507    }
508
509    /**
510     * Returns the fully qualified name of the model element. The fully qualified name includes
511     * complete package qualified name of the underlying model element. The templates parameter will
512     * be replaced by the correct one given the binding relation of the parameter to this element.
513     * @see ModelElementFacade#getBindedFullyQualifiedName(ModelElementFacade bindedElement)
514     */
515    public String getBindedFullyQualifiedName(ModelElementFacade bindedElement)
516    {
517        return this.getSuperFrontEndControllerOperation().getBindedFullyQualifiedName(bindedElement);
518    }
519
520    /**
521     * Gets all constraints belonging to the model element.
522     * @see ModelElementFacade#getConstraints()
523     */
524    public Collection<ConstraintFacade> getConstraints()
525    {
526        return this.getSuperFrontEndControllerOperation().getConstraints();
527    }
528
529    /**
530     * Returns the constraints of the argument kind that have been placed onto this model. Typical
531     * kinds are "inv", "pre" and "post". Other kinds are possible.
532     * @see ModelElementFacade#getConstraints(String kind)
533     */
534    public Collection<ConstraintFacade> getConstraints(String kind)
535    {
536        return this.getSuperFrontEndControllerOperation().getConstraints(kind);
537    }
538
539    /**
540     * Gets the documentation for the model element, The indent argument is prefixed to each line.
541     * By default this method wraps lines after 64 characters.
542     * This method is equivalent to <code>getDocumentation(indent, 64)</code>.
543     * @see ModelElementFacade#getDocumentation(String indent)
544     */
545    public String getDocumentation(String indent)
546    {
547        return this.getSuperFrontEndControllerOperation().getDocumentation(indent);
548    }
549
550    /**
551     * This method returns the documentation for this model element, with the lines wrapped after
552     * the specified number of characters, values of less than 1 will indicate no line wrapping is
553     * required. By default paragraphs are returned as HTML.
554     * This method is equivalent to <code>getDocumentation(indent, lineLength, true)</code>.
555     * @see ModelElementFacade#getDocumentation(String indent, int lineLength)
556     */
557    public String getDocumentation(String indent, int lineLength)
558    {
559        return this.getSuperFrontEndControllerOperation().getDocumentation(indent, lineLength);
560    }
561
562    /**
563     * This method returns the documentation for this model element, with the lines wrapped after
564     * the specified number of characters, values of less than 1 will indicate no line wrapping is
565     * required. HTML style determines if HTML Escaping is applied.
566     * @see ModelElementFacade#getDocumentation(String indent, int lineLength, boolean htmlStyle)
567     */
568    public String getDocumentation(String indent, int lineLength, boolean htmlStyle)
569    {
570        return this.getSuperFrontEndControllerOperation().getDocumentation(indent, lineLength, htmlStyle);
571    }
572
573    /**
574     * The fully qualified name of this model element.
575     * @see ModelElementFacade#getFullyQualifiedName()
576     */
577    public String getFullyQualifiedName()
578    {
579        return this.getSuperFrontEndControllerOperation().getFullyQualifiedName();
580    }
581
582    /**
583     * Returns the fully qualified name of the model element. The fully qualified name includes
584     * complete package qualified name of the underlying model element.  If modelName is true, then
585     * the original name of the model element (the name contained within the model) will be the name
586     * returned, otherwise a name from a language mapping will be returned.
587     * @see ModelElementFacade#getFullyQualifiedName(boolean modelName)
588     */
589    public String getFullyQualifiedName(boolean modelName)
590    {
591        return this.getSuperFrontEndControllerOperation().getFullyQualifiedName(modelName);
592    }
593
594    /**
595     * Returns the fully qualified name as a path, the returned value always starts with out a slash
596     * '/'.
597     * @see ModelElementFacade#getFullyQualifiedNamePath()
598     */
599    public String getFullyQualifiedNamePath()
600    {
601        return this.getSuperFrontEndControllerOperation().getFullyQualifiedNamePath();
602    }
603
604    /**
605     * Gets the unique identifier of the underlying model element.
606     * @see ModelElementFacade#getId()
607     */
608    public String getId()
609    {
610        return this.getSuperFrontEndControllerOperation().getId();
611    }
612
613    /**
614     * UML2: Retrieves the keywords for this element. Used to modify implementation properties which
615     * are not represented by other properties, i.e. native, transient, volatile, synchronized,
616     * (added annotations) override, deprecated. Can also be used to suppress compiler warnings:
617     * (added annotations) unchecked, fallthrough, path, serial, finally, all. Annotations require
618     * JDK5 compiler level.
619     * @see ModelElementFacade#getKeywords()
620     */
621    public Collection<String> getKeywords()
622    {
623        return this.getSuperFrontEndControllerOperation().getKeywords();
624    }
625
626    /**
627     * UML2: Retrieves a localized label for this named element.
628     * @see ModelElementFacade#getLabel()
629     */
630    public String getLabel()
631    {
632        return this.getSuperFrontEndControllerOperation().getLabel();
633    }
634
635    /**
636     * The language mappings that have been set for this model element.
637     * @see ModelElementFacade#getLanguageMappings()
638     */
639    public TypeMappings getLanguageMappings()
640    {
641        return this.getSuperFrontEndControllerOperation().getLanguageMappings();
642    }
643
644    /**
645     * Return the model containing this model element (multiple models may be loaded and processed
646     * at the same time).
647     * @see ModelElementFacade#getModel()
648     */
649    public ModelFacade getModel()
650    {
651        return this.getSuperFrontEndControllerOperation().getModel();
652    }
653
654    /**
655     * The name of the model element.
656     * @see ModelElementFacade#getName()
657     */
658    public String getName()
659    {
660        return this.getSuperFrontEndControllerOperation().getName();
661    }
662
663    /**
664     * Gets the package to which this model element belongs.
665     * @see ModelElementFacade#getPackage()
666     */
667    public ModelElementFacade getPackage()
668    {
669        return this.getSuperFrontEndControllerOperation().getPackage();
670    }
671
672    /**
673     * The name of this model element's package.
674     * @see ModelElementFacade#getPackageName()
675     */
676    public String getPackageName()
677    {
678        return this.getSuperFrontEndControllerOperation().getPackageName();
679    }
680
681    /**
682     * Gets the package name (optionally providing the ability to retrieve the model name and not
683     * the mapped name).
684     * @see ModelElementFacade#getPackageName(boolean modelName)
685     */
686    public String getPackageName(boolean modelName)
687    {
688        return this.getSuperFrontEndControllerOperation().getPackageName(modelName);
689    }
690
691    /**
692     * Returns the package as a path, the returned value always starts with out a slash '/'.
693     * @see ModelElementFacade#getPackagePath()
694     */
695    public String getPackagePath()
696    {
697        return this.getSuperFrontEndControllerOperation().getPackagePath();
698    }
699
700    /**
701     * UML2: Returns the value of the 'Qualified Name' attribute. A name which allows the
702     * NamedElement to be identified within a hierarchy of nested Namespaces. It is constructed from
703     * the names of the containing namespaces starting at the root of the hierarchy and ending with
704     * the name of the NamedElement itself.
705     * @see ModelElementFacade#getQualifiedName()
706     */
707    public String getQualifiedName()
708    {
709        return this.getSuperFrontEndControllerOperation().getQualifiedName();
710    }
711
712    /**
713     * Gets the root package for the model element.
714     * @see ModelElementFacade#getRootPackage()
715     */
716    public PackageFacade getRootPackage()
717    {
718        return this.getSuperFrontEndControllerOperation().getRootPackage();
719    }
720
721    /**
722     * Gets the dependencies for which this model element is the source.
723     * @see ModelElementFacade#getSourceDependencies()
724     */
725    public Collection<DependencyFacade> getSourceDependencies()
726    {
727        return this.getSuperFrontEndControllerOperation().getSourceDependencies();
728    }
729
730    /**
731     * If this model element is the context of an activity graph, this represents that activity
732     * graph.
733     * @see ModelElementFacade#getStateMachineContext()
734     */
735    public StateMachineFacade getStateMachineContext()
736    {
737        return this.getSuperFrontEndControllerOperation().getStateMachineContext();
738    }
739
740    /**
741     * The collection of ALL stereotype names for this model element.
742     * @see ModelElementFacade#getStereotypeNames()
743     */
744    public Collection<String> getStereotypeNames()
745    {
746        return this.getSuperFrontEndControllerOperation().getStereotypeNames();
747    }
748
749    /**
750     * Gets all stereotypes for this model element.
751     * @see ModelElementFacade#getStereotypes()
752     */
753    public Collection<StereotypeFacade> getStereotypes()
754    {
755        return this.getSuperFrontEndControllerOperation().getStereotypes();
756    }
757
758    /**
759     * Return the TaggedValues associated with this model element, under all stereotypes.
760     * @see ModelElementFacade#getTaggedValues()
761     */
762    public Collection<TaggedValueFacade> getTaggedValues()
763    {
764        return this.getSuperFrontEndControllerOperation().getTaggedValues();
765    }
766
767    /**
768     * Gets the dependencies for which this model element is the target.
769     * @see ModelElementFacade#getTargetDependencies()
770     */
771    public Collection<DependencyFacade> getTargetDependencies()
772    {
773        return this.getSuperFrontEndControllerOperation().getTargetDependencies();
774    }
775
776    /**
777     * Get the template parameter for this model element having the parameterName
778     * @see ModelElementFacade#getTemplateParameter(String parameterName)
779     */
780    public Object getTemplateParameter(String parameterName)
781    {
782        return this.getSuperFrontEndControllerOperation().getTemplateParameter(parameterName);
783    }
784
785    /**
786     * Get the template parameters for this model element
787     * @see ModelElementFacade#getTemplateParameters()
788     */
789    public Collection<TemplateParameterFacade> getTemplateParameters()
790    {
791        return this.getSuperFrontEndControllerOperation().getTemplateParameters();
792    }
793
794    /**
795     * The visibility (i.e. public, private, protected or package) of the model element, will
796     * attempt a lookup for these values in the language mappings (if any).
797     * @see ModelElementFacade#getVisibility()
798     */
799    public String getVisibility()
800    {
801        return this.getSuperFrontEndControllerOperation().getVisibility();
802    }
803
804    /**
805     * Returns true if the model element has the exact stereotype (meaning no stereotype inheritance
806     * is taken into account when searching for the stereotype), false otherwise.
807     * @see ModelElementFacade#hasExactStereotype(String stereotypeName)
808     */
809    public boolean hasExactStereotype(String stereotypeName)
810    {
811        return this.getSuperFrontEndControllerOperation().hasExactStereotype(stereotypeName);
812    }
813
814    /**
815     * Does the UML Element contain the named Keyword? Keywords can be separated by space, comma,
816     * pipe, semicolon, or << >>
817     * @see ModelElementFacade#hasKeyword(String keywordName)
818     */
819    public boolean hasKeyword(String keywordName)
820    {
821        return this.getSuperFrontEndControllerOperation().hasKeyword(keywordName);
822    }
823
824    /**
825     * Returns true if the model element has the specified stereotype.  If the stereotype itself
826     * does not match, then a search will be made up the stereotype inheritance hierarchy, and if
827     * one of the stereotype's ancestors has a matching name this method will return true, false
828     * otherwise.
829     * For example, if we have a certain stereotype called <<exception>> and a model element has a
830     * stereotype called <<applicationException>> which extends <<exception>>, when calling this
831     * method with 'stereotypeName' defined as 'exception' the method would return true since
832     * <<applicationException>> inherits from <<exception>>.  If you want to check if the model
833     * element has the exact stereotype, then use the method 'hasExactStereotype' instead.
834     * @see ModelElementFacade#hasStereotype(String stereotypeName)
835     */
836    public boolean hasStereotype(String stereotypeName)
837    {
838        return this.getSuperFrontEndControllerOperation().hasStereotype(stereotypeName);
839    }
840
841    /**
842     * True if there are target dependencies from this element that are instances of BindingFacade.
843     * Deprecated in UML2: Use TemplateBinding parameters instead of dependencies.
844     * @see ModelElementFacade#isBindingDependenciesPresent()
845     */
846    public boolean isBindingDependenciesPresent()
847    {
848        return this.getSuperFrontEndControllerOperation().isBindingDependenciesPresent();
849    }
850
851    /**
852     * Indicates if any constraints are present on this model element.
853     * @see ModelElementFacade#isConstraintsPresent()
854     */
855    public boolean isConstraintsPresent()
856    {
857        return this.getSuperFrontEndControllerOperation().isConstraintsPresent();
858    }
859
860    /**
861     * Indicates if any documentation is present on this model element.
862     * @see ModelElementFacade#isDocumentationPresent()
863     */
864    public boolean isDocumentationPresent()
865    {
866        return this.getSuperFrontEndControllerOperation().isDocumentationPresent();
867    }
868
869    /**
870     * True if this element name is a reserved word in Java, C#, ANSI or ISO C, C++, JavaScript.
871     * @see ModelElementFacade#isReservedWord()
872     */
873    public boolean isReservedWord()
874    {
875        return this.getSuperFrontEndControllerOperation().isReservedWord();
876    }
877
878    /**
879     * True is there are template parameters on this model element. For UML2, applies to Class,
880     * Operation, Property, and Parameter.
881     * @see ModelElementFacade#isTemplateParametersPresent()
882     */
883    public boolean isTemplateParametersPresent()
884    {
885        return this.getSuperFrontEndControllerOperation().isTemplateParametersPresent();
886    }
887
888    /**
889     * True if this element name is a valid identifier name in Java, C#, ANSI or ISO C, C++,
890     * JavaScript. Contains no spaces, special characters etc. Constraint always applied on
891     * Enumerations and Interfaces, optionally applies on other model elements.
892     * @see ModelElementFacade#isValidIdentifierName()
893     */
894    public boolean isValidIdentifierName()
895    {
896        return this.getSuperFrontEndControllerOperation().isValidIdentifierName();
897    }
898
899    /**
900     * Searches for the constraint with the specified 'name' on this model element, and if found
901     * translates it using the specified 'translation' from a translation library discovered by the
902     * framework.
903     * @see ModelElementFacade#translateConstraint(String name, String translation)
904     */
905    public String translateConstraint(String name, String translation)
906    {
907        return this.getSuperFrontEndControllerOperation().translateConstraint(name, translation);
908    }
909
910    /**
911     * Translates all constraints belonging to this model element with the given 'translation'.
912     * @see ModelElementFacade#translateConstraints(String translation)
913     */
914    public String[] translateConstraints(String translation)
915    {
916        return this.getSuperFrontEndControllerOperation().translateConstraints(translation);
917    }
918
919    /**
920     * Translates the constraints of the specified 'kind' belonging to this model element.
921     * @see ModelElementFacade#translateConstraints(String kind, String translation)
922     */
923    public String[] translateConstraints(String kind, String translation)
924    {
925        return this.getSuperFrontEndControllerOperation().translateConstraints(kind, translation);
926    }
927
928    /**
929     * Finds the parameter on this operation having the given name, if no parameter is found, null
930     * is returned instead.
931     * @see OperationFacade#findParameter(String name)
932     */
933    public ParameterFacade findParameter(String name)
934    {
935        return this.getSuperFrontEndControllerOperation().findParameter(name);
936    }
937
938    /**
939     * Searches the given feature for the specified tag.
940     * If the follow boolean is set to true then the search will continue from the class operation
941     * to the class itself and then up the class hierarchy.
942     * @see OperationFacade#findTaggedValue(String name, boolean follow)
943     */
944    public Object findTaggedValue(String name, boolean follow)
945    {
946        return this.getSuperFrontEndControllerOperation().findTaggedValue(name, follow);
947    }
948
949    /**
950     * A comma separated list of all argument names.
951     * @see OperationFacade#getArgumentNames()
952     */
953    public String getArgumentNames()
954    {
955        return this.getSuperFrontEndControllerOperation().getArgumentNames();
956    }
957
958    /**
959     * A comma separated list of all types of each argument, in order.
960     * @see OperationFacade#getArgumentTypeNames()
961     */
962    public String getArgumentTypeNames()
963    {
964        return this.getSuperFrontEndControllerOperation().getArgumentTypeNames();
965    }
966
967    /**
968     * Specification of an argument used to pass information into or out of an invocation of a
969     * behavioral
970     * feature. Parameters are allowed to be treated as connectable elements. Parameters have
971     * support for
972     * streaming, exceptions, and parameter sets.
973     * @see OperationFacade#getArguments()
974     */
975    public Collection<ParameterFacade> getArguments()
976    {
977        return this.getSuperFrontEndControllerOperation().getArguments();
978    }
979
980    /**
981     * Constructs the operation call with the operation name
982     * @see OperationFacade#getCall()
983     */
984    public String getCall()
985    {
986        return this.getSuperFrontEndControllerOperation().getCall();
987    }
988
989    /**
990     * Returns the concurrency modifier for this operation (i.e. concurrent, guarded or sequential)
991     * of the model element, will attempt a lookup for these values in the language mappings (if
992     * any).
993     * @see OperationFacade#getConcurrency()
994     */
995    public String getConcurrency()
996    {
997        return this.getSuperFrontEndControllerOperation().getConcurrency();
998    }
999
1000    /**
1001     * A comma separated list containing all exceptions that this operation throws.  Exceptions are
1002     * determined through dependencies that have the target element stereotyped as <<Exception>>.
1003     * @see OperationFacade#getExceptionList()
1004     */
1005    public String getExceptionList()
1006    {
1007        return this.getSuperFrontEndControllerOperation().getExceptionList();
1008    }
1009
1010    /**
1011     * Returns a comma separated list of exceptions appended to the comma separated list of fully
1012     * qualified 'initialException' classes passed in to this method.
1013     * @see OperationFacade#getExceptionList(String initialExceptions)
1014     */
1015    public String getExceptionList(String initialExceptions)
1016    {
1017        return this.getSuperFrontEndControllerOperation().getExceptionList(initialExceptions);
1018    }
1019
1020    /**
1021     * A collection of all exceptions thrown by this operation.
1022     * @see OperationFacade#getExceptions()
1023     */
1024    public Collection<ModelElementFacade> getExceptions()
1025    {
1026        return this.getSuperFrontEndControllerOperation().getExceptions();
1027    }
1028
1029    /**
1030     * Return Type with multiplicity taken into account. UML14 does not allow multiplicity *.
1031     * @see OperationFacade#getGetterSetterReturnTypeName()
1032     */
1033    public String getGetterSetterReturnTypeName()
1034    {
1035        return this.getSuperFrontEndControllerOperation().getGetterSetterReturnTypeName();
1036    }
1037
1038    /**
1039     * the lower value for the multiplicity
1040     * -only applicable for UML2
1041     * @see OperationFacade#getLower()
1042     */
1043    public int getLower()
1044    {
1045        return this.getSuperFrontEndControllerOperation().getLower();
1046    }
1047
1048    /**
1049     * Returns the operation method body determined from UML sequence diagrams or other UML sources.
1050     * @see OperationFacade#getMethodBody()
1051     */
1052    public String getMethodBody()
1053    {
1054        return this.getSuperFrontEndControllerOperation().getMethodBody();
1055    }
1056
1057    /**
1058     * The operation this operation overrides, null if this operation is not overriding.
1059     * @see OperationFacade#getOverriddenOperation()
1060     */
1061    public OperationFacade getOverriddenOperation()
1062    {
1063        return this.getSuperFrontEndControllerOperation().getOverriddenOperation();
1064    }
1065
1066    /**
1067     * Gets the owner of this operation
1068     * @see OperationFacade#getOwner()
1069     */
1070    public ClassifierFacade getOwner()
1071    {
1072        return this.getSuperFrontEndControllerOperation().getOwner();
1073    }
1074
1075    /**
1076     * Return all parameters for the operation, including the return parameter.
1077     * @see OperationFacade#getParameters()
1078     */
1079    public Collection<ParameterFacade> getParameters()
1080    {
1081        return this.getSuperFrontEndControllerOperation().getParameters();
1082    }
1083
1084    /**
1085     * The name of the operation that handles postcondition constraints.
1086     * @see OperationFacade#getPostconditionName()
1087     */
1088    public String getPostconditionName()
1089    {
1090        return this.getSuperFrontEndControllerOperation().getPostconditionName();
1091    }
1092
1093    /**
1094     * The postcondition constraints belonging to this operation.
1095     * @see OperationFacade#getPostconditions()
1096     */
1097    public Collection<ConstraintFacade> getPostconditions()
1098    {
1099        return this.getSuperFrontEndControllerOperation().getPostconditions();
1100    }
1101
1102    /**
1103     * The call to the precondition operation.
1104     * @see OperationFacade#getPreconditionCall()
1105     */
1106    public String getPreconditionCall()
1107    {
1108        return this.getSuperFrontEndControllerOperation().getPreconditionCall();
1109    }
1110
1111    /**
1112     * The name of the operation that handles precondition constraints.
1113     * @see OperationFacade#getPreconditionName()
1114     */
1115    public String getPreconditionName()
1116    {
1117        return this.getSuperFrontEndControllerOperation().getPreconditionName();
1118    }
1119
1120    /**
1121     * The signature of the precondition operation.
1122     * @see OperationFacade#getPreconditionSignature()
1123     */
1124    public String getPreconditionSignature()
1125    {
1126        return this.getSuperFrontEndControllerOperation().getPreconditionSignature();
1127    }
1128
1129    /**
1130     * The precondition constraints belonging to this operation.
1131     * @see OperationFacade#getPreconditions()
1132     */
1133    public Collection<ConstraintFacade> getPreconditions()
1134    {
1135        return this.getSuperFrontEndControllerOperation().getPreconditions();
1136    }
1137
1138    /**
1139     * (UML2 Only). Get the actual return parameter (which may have stereotypes etc).
1140     * @see OperationFacade#getReturnParameter()
1141     */
1142    public ParameterFacade getReturnParameter()
1143    {
1144        return this.getSuperFrontEndControllerOperation().getReturnParameter();
1145    }
1146
1147    /**
1148     * The operation return type parameter.
1149     * @see OperationFacade#getReturnType()
1150     */
1151    public ClassifierFacade getReturnType()
1152    {
1153        return this.getSuperFrontEndControllerOperation().getReturnType();
1154    }
1155
1156    /**
1157     * Return the operation signature, including public/protested abstract returnType name plus
1158     * argument type and name
1159     * @see OperationFacade#getSignature()
1160     */
1161    public String getSignature()
1162    {
1163        return this.getSuperFrontEndControllerOperation().getSignature();
1164    }
1165
1166    /**
1167     * Returns the signature of the operation and optionally appends the argument names (if
1168     * withArgumentNames is true), otherwise returns the signature with just the types alone in the
1169     * signature.
1170     * @see OperationFacade#getSignature(boolean withArgumentNames)
1171     */
1172    public String getSignature(boolean withArgumentNames)
1173    {
1174        return this.getSuperFrontEndControllerOperation().getSignature(withArgumentNames);
1175    }
1176
1177    /**
1178     * Returns the signature of the operation and optionally appends the given 'argumentModifier' to
1179     * each argument.
1180     * @see OperationFacade#getSignature(String argumentModifier)
1181     */
1182    public String getSignature(String argumentModifier)
1183    {
1184        return this.getSuperFrontEndControllerOperation().getSignature(argumentModifier);
1185    }
1186
1187    /**
1188     * A comma-separated parameter list  (type and name of each parameter) of an operation.
1189     * @see OperationFacade#getTypedArgumentList()
1190     */
1191    public String getTypedArgumentList()
1192    {
1193        return this.getSuperFrontEndControllerOperation().getTypedArgumentList();
1194    }
1195
1196    /**
1197     * A comma-separated parameter list  (type and name of each parameter) of an operation with an
1198     * optional modifier (i.e final) before each parameter.
1199     * @see OperationFacade#getTypedArgumentList(String modifier)
1200     */
1201    public String getTypedArgumentList(String modifier)
1202    {
1203        return this.getSuperFrontEndControllerOperation().getTypedArgumentList(modifier);
1204    }
1205
1206    /**
1207     * the upper value for the multiplicity (will be -1 for *)
1208     * - only applicable for UML2
1209     * @see OperationFacade#getUpper()
1210     */
1211    public int getUpper()
1212    {
1213        return this.getSuperFrontEndControllerOperation().getUpper();
1214    }
1215
1216    /**
1217     * True is the operation is abstract.
1218     * @see OperationFacade#isAbstract()
1219     */
1220    public boolean isAbstract()
1221    {
1222        return this.getSuperFrontEndControllerOperation().isAbstract();
1223    }
1224
1225    /**
1226     * True if the operation has (i.e. throws any exceptions) false otherwise.
1227     * @see OperationFacade#isExceptionsPresent()
1228     */
1229    public boolean isExceptionsPresent()
1230    {
1231        return this.getSuperFrontEndControllerOperation().isExceptionsPresent();
1232    }
1233
1234    /**
1235     * IsLeaf property in the operation. If true, operation is final, cannot be extended or
1236     * implemented by a descendant. Default=false.
1237     * @see OperationFacade#isLeaf()
1238     */
1239    public boolean isLeaf()
1240    {
1241        return this.getSuperFrontEndControllerOperation().isLeaf();
1242    }
1243
1244    /**
1245     * UML2 only. If the return type parameter multiplicity>1 OR the operation multiplicity>1.
1246     * Default=false.
1247     * @see OperationFacade#isMany()
1248     */
1249    public boolean isMany()
1250    {
1251        return this.getSuperFrontEndControllerOperation().isMany();
1252    }
1253
1254    /**
1255     * UML2 only: If isMany (Collection type returned), is the type unique within the collection. 
1256     * Unique+Ordered determines CollectionType implementation of return result. Default=false.
1257     * @see OperationFacade#isOrdered()
1258     */
1259    public boolean isOrdered()
1260    {
1261        return this.getSuperFrontEndControllerOperation().isOrdered();
1262    }
1263
1264    /**
1265     * True if this operation overrides an operation defined in an ancestor class. An operation
1266     * overrides when the names of the operations as well as the types of the arguments are equal.
1267     * The return type may be different and is, as well as any exceptions, ignored.
1268     * @see OperationFacade#isOverriding()
1269     */
1270    public boolean isOverriding()
1271    {
1272        return this.getSuperFrontEndControllerOperation().isOverriding();
1273    }
1274
1275    /**
1276     * Whether any postcondition constraints are present on this operation.
1277     * @see OperationFacade#isPostconditionsPresent()
1278     */
1279    public boolean isPostconditionsPresent()
1280    {
1281        return this.getSuperFrontEndControllerOperation().isPostconditionsPresent();
1282    }
1283
1284    /**
1285     * Whether any precondition constraints are present on this operation.
1286     * @see OperationFacade#isPreconditionsPresent()
1287     */
1288    public boolean isPreconditionsPresent()
1289    {
1290        return this.getSuperFrontEndControllerOperation().isPreconditionsPresent();
1291    }
1292
1293    /**
1294     * Indicates whether or not this operation is a query operation.
1295     * @see OperationFacade#isQuery()
1296     */
1297    public boolean isQuery()
1298    {
1299        return this.getSuperFrontEndControllerOperation().isQuery();
1300    }
1301
1302    /**
1303     * True/false depending on whether or not the operation has a return type or not (i.e. a return
1304     * type of something other than void).
1305     * @see OperationFacade#isReturnTypePresent()
1306     */
1307    public boolean isReturnTypePresent()
1308    {
1309        return this.getSuperFrontEndControllerOperation().isReturnTypePresent();
1310    }
1311
1312    /**
1313     * True is the operation is static (only a single instance can be instantiated).
1314     * @see OperationFacade#isStatic()
1315     */
1316    public boolean isStatic()
1317    {
1318        return this.getSuperFrontEndControllerOperation().isStatic();
1319    }
1320
1321    /**
1322     * UML2 only: for Collection return type, is the type unique within the collection.
1323     * Unique+Ordered determines the returned CollectionType. Default=false.
1324     * @see OperationFacade#isUnique()
1325     */
1326    public boolean isUnique()
1327    {
1328        return this.getSuperFrontEndControllerOperation().isUnique();
1329    }
1330
1331    /**
1332     * @see MetafacadeBase#initialize()
1333     */
1334    @Override
1335    public void initialize()
1336    {
1337        this.getSuperFrontEndControllerOperation().initialize();
1338    }
1339
1340    /**
1341     * @return Object getSuperFrontEndControllerOperation().getValidationOwner()
1342     * @see MetafacadeBase#getValidationOwner()
1343     */
1344    @Override
1345    public Object getValidationOwner()
1346    {
1347        Object owner = this.getSuperFrontEndControllerOperation().getValidationOwner();
1348        return owner;
1349    }
1350
1351    /**
1352     * @return String getSuperFrontEndControllerOperation().getValidationName()
1353     * @see MetafacadeBase#getValidationName()
1354     */
1355    @Override
1356    public String getValidationName()
1357    {
1358        String name = this.getSuperFrontEndControllerOperation().getValidationName();
1359        return name;
1360    }
1361
1362    /**
1363     * <p><b>Constraint:</b> org::andromda::cartridges::bpm4struts::metafacades::StrutsControllerOperation::non-empty controller operation names</p>
1364     * <p><b>Error:</b> Each operation name on a controller must be non-empty.</p>
1365     * <p><b>OCL:</b> context StrutsControllerOperation inv: name->notEmpty()</p>
1366     * <p><b>Constraint:</b> org::andromda::cartridges::bpm4struts::metafacades::StrutsControllerOperation::controller/service operations need matching parameter types and names</p>
1367     * <p><b>Error:</b> If a controller operation delegates to a service operation it is required for them to have the same number of parameters and to have the parameter names and types matching so it is straightforward to pass these on.</p>
1368     * <p><b>OCL:</b> context StrutsControllerOperation inv: backEndServiceOperation->notEmpty() implies backEndServiceOperationMatchingParameters</p>
1369     * @param validationMessages Collection<ModelValidationMessage>
1370     * @see MetafacadeBase#validateInvariants(Collection validationMessages)
1371     */
1372    @Override
1373    public void validateInvariants(Collection<ModelValidationMessage> validationMessages)
1374    {
1375        this.getSuperFrontEndControllerOperation().validateInvariants(validationMessages);
1376        try
1377        {
1378            final Object contextElement = this.THIS();
1379            boolean constraintValid = OCLResultEnsurer.ensure(OCLCollections.notEmpty(OCLIntrospector.invoke(contextElement,"name")));
1380            if (!constraintValid)
1381            {
1382                validationMessages.add(
1383                    new ModelValidationMessage(
1384                        (MetafacadeBase)contextElement ,
1385                        "org::andromda::cartridges::bpm4struts::metafacades::StrutsControllerOperation::non-empty controller operation names",
1386                        "Each operation name on a controller must be non-empty."));
1387            }
1388        }
1389        catch (Throwable th)
1390        {
1391            Throwable cause = th.getCause();
1392            int depth = 0; // Some throwables have infinite recursion
1393            while (cause != null && depth < 7)
1394            {
1395                th = cause;
1396                depth++;
1397            }
1398            logger.error("Error validating constraint 'org::andromda::cartridges::bpm4struts::metafacades::StrutsControllerOperation::non-empty controller operation names' ON "
1399                + this.THIS().toString() + ": " + th.getMessage(), th);
1400        }
1401        try
1402        {
1403            final Object contextElement = this.THIS();
1404            boolean constraintValid = OCLResultEnsurer.ensure((Boolean.valueOf(String.valueOf(OCLCollections.notEmpty(OCLIntrospector.invoke(contextElement,"backEndServiceOperation")))).booleanValue()?Boolean.valueOf(String.valueOf(OCLIntrospector.invoke(contextElement,"backEndServiceOperationMatchingParameters"))).booleanValue():true));
1405            if (!constraintValid)
1406            {
1407                validationMessages.add(
1408                    new ModelValidationMessage(
1409                        (MetafacadeBase)contextElement ,
1410                        "org::andromda::cartridges::bpm4struts::metafacades::StrutsControllerOperation::controller/service operations need matching parameter types and names",
1411                        "If a controller operation delegates to a service operation it is required for them to have the same number of parameters and to have the parameter names and types matching so it is straightforward to pass these on."));
1412            }
1413        }
1414        catch (Throwable th)
1415        {
1416            Throwable cause = th.getCause();
1417            int depth = 0; // Some throwables have infinite recursion
1418            while (cause != null && depth < 7)
1419            {
1420                th = cause;
1421                depth++;
1422            }
1423            logger.error("Error validating constraint 'org::andromda::cartridges::bpm4struts::metafacades::StrutsControllerOperation::controller/service operations need matching parameter types and names' ON "
1424                + this.THIS().toString() + ": " + th.getMessage(), th);
1425        }
1426    }
1427
1428    /**
1429     * The property that stores the name of the metafacade.
1430     */
1431    private static final String NAME_PROPERTY = "name";
1432    private static final String FQNAME_PROPERTY = "fullyQualifiedName";
1433
1434    /**
1435     * @see Object#toString()
1436     */
1437    @Override
1438    public String toString()
1439    {
1440        final StringBuilder toString = new StringBuilder(this.getClass().getName());
1441        toString.append("[");
1442        try
1443        {
1444            toString.append(Introspector.instance().getProperty(this, FQNAME_PROPERTY));
1445        }
1446        catch (final Throwable tryAgain)
1447        {
1448            try
1449            {
1450                toString.append(Introspector.instance().getProperty(this, NAME_PROPERTY));
1451            }
1452            catch (final Throwable ignore)
1453            {
1454                // - just ignore when the metafacade doesn't have a name or fullyQualifiedName property
1455            }
1456        }
1457        toString.append("]");
1458        return toString.toString();
1459    }
1460}