001// license-header java merge-point
002//
003// Attention: generated code (by MetafacadeLogic.vsl) - do not modify!
004//
005package org.andromda.cartridges.jsf2.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.ActionFacade;
014import org.andromda.metafacades.uml.ConstraintFacade;
015import org.andromda.metafacades.uml.DependencyFacade;
016import org.andromda.metafacades.uml.EventFacade;
017import org.andromda.metafacades.uml.FrontEndAction;
018import org.andromda.metafacades.uml.FrontEndExceptionHandler;
019import org.andromda.metafacades.uml.FrontEndForward;
020import org.andromda.metafacades.uml.FrontEndParameter;
021import org.andromda.metafacades.uml.FrontEndUseCase;
022import org.andromda.metafacades.uml.FrontEndView;
023import org.andromda.metafacades.uml.ModelElementFacade;
024import org.andromda.metafacades.uml.ModelFacade;
025import org.andromda.metafacades.uml.OperationFacade;
026import org.andromda.metafacades.uml.PackageFacade;
027import org.andromda.metafacades.uml.PartitionFacade;
028import org.andromda.metafacades.uml.StateFacade;
029import org.andromda.metafacades.uml.StateMachineFacade;
030import org.andromda.metafacades.uml.StereotypeFacade;
031import org.andromda.metafacades.uml.TaggedValueFacade;
032import org.andromda.metafacades.uml.TemplateParameterFacade;
033import org.andromda.metafacades.uml.TransitionFacade;
034import org.andromda.metafacades.uml.TypeMappings;
035import org.andromda.translation.ocl.validation.OCLCollections;
036import org.andromda.translation.ocl.validation.OCLIntrospector;
037import org.andromda.translation.ocl.validation.OCLResultEnsurer;
038import org.apache.commons.collections.Transformer;
039import org.apache.log4j.Logger;
040
041/**
042 * Represents a JSF view for a front-end application.
043 * MetafacadeLogic for JSFView
044 *
045 * @see JSFView
046 */
047public abstract class JSFViewLogic
048    extends MetafacadeBase
049    implements JSFView
050{
051    /**
052     * The underlying UML object
053     * @see Object
054     */
055    protected Object metaObject;
056
057    /** Create Metafacade implementation instance using the MetafacadeFactory from the context
058     * @param metaObjectIn
059     * @param context
060     */
061    protected JSFViewLogic(Object metaObjectIn, String context)
062    {
063        super(metaObjectIn, getContext(context));
064        this.superFrontEndView =
065           (FrontEndView)
066            MetafacadeFactory.getInstance().createFacadeImpl(
067                    "org.andromda.metafacades.uml.FrontEndView",
068                    metaObjectIn,
069                    getContext(context));
070        this.metaObject = metaObjectIn;
071    }
072
073    /**
074     * The logger instance.
075     */
076    private static final Logger logger = Logger.getLogger(JSFViewLogic.class);
077
078    /**
079     * Gets the context for this metafacade logic instance.
080     * @param context String. Set to JSFView if null
081     * @return context String
082     */
083    private static String getContext(String context)
084    {
085        if (context == null)
086        {
087            context = "org.andromda.cartridges.jsf2.metafacades.JSFView";
088        }
089        return context;
090    }
091
092    private FrontEndView superFrontEndView;
093    private boolean superFrontEndViewInitialized = false;
094
095    /**
096     * Gets the FrontEndView parent instance.
097     * @return this.superFrontEndView FrontEndView
098     */
099    private FrontEndView getSuperFrontEndView()
100    {
101        if (!this.superFrontEndViewInitialized)
102        {
103            ((MetafacadeBase)this.superFrontEndView).setMetafacadeContext(this.getMetafacadeContext());
104            this.superFrontEndViewInitialized = true;
105        }
106        return this.superFrontEndView;
107    }
108
109    /** Reset context only for non-root metafacades
110     * @param context
111     * @see MetafacadeBase#resetMetafacadeContext(String context)
112     */
113    @Override
114    public void resetMetafacadeContext(String context)
115    {
116        if (!this.contextRoot) // reset context only for non-root metafacades
117        {
118            context = getContext(context);  // to have same value as in original constructor call
119            setMetafacadeContext (context);
120            if (this.superFrontEndViewInitialized)
121            {
122                ((MetafacadeBase)this.superFrontEndView).resetMetafacadeContext(context);
123            }
124        }
125    }
126
127    /**
128     * @return boolean true always
129     * @see JSFView
130     */
131    public boolean isJSFViewMetaType()
132    {
133        return true;
134    }
135
136    // --------------- attributes ---------------------
137
138   /**
139    * @see org.andromda.cartridges.jsf2.metafacades.JSFView#getPath()
140    * @return String
141    */
142    protected abstract String handleGetPath();
143
144    private String __path1a;
145    private boolean __path1aSet = false;
146
147    /**
148     * The full path of the view resources (i.e. the JSP page).
149     * @return (String)handleGetPath()
150     */
151    public final String getPath()
152    {
153        String path1a = this.__path1a;
154        if (!this.__path1aSet)
155        {
156            // path has no pre constraints
157            path1a = handleGetPath();
158            // path has no post constraints
159            this.__path1a = path1a;
160            if (isMetafacadePropertyCachingEnabled())
161            {
162                this.__path1aSet = true;
163            }
164        }
165        return path1a;
166    }
167
168   /**
169    * @see org.andromda.cartridges.jsf2.metafacades.JSFView#getTitleKey()
170    * @return String
171    */
172    protected abstract String handleGetTitleKey();
173
174    private String __titleKey2a;
175    private boolean __titleKey2aSet = false;
176
177    /**
178     * A resource message key suited for the view's title.
179     * @return (String)handleGetTitleKey()
180     */
181    public final String getTitleKey()
182    {
183        String titleKey2a = this.__titleKey2a;
184        if (!this.__titleKey2aSet)
185        {
186            // titleKey has no pre constraints
187            titleKey2a = handleGetTitleKey();
188            // titleKey has no post constraints
189            this.__titleKey2a = titleKey2a;
190            if (isMetafacadePropertyCachingEnabled())
191            {
192                this.__titleKey2aSet = true;
193            }
194        }
195        return titleKey2a;
196    }
197
198   /**
199    * @see org.andromda.cartridges.jsf2.metafacades.JSFView#getTitleValue()
200    * @return String
201    */
202    protected abstract String handleGetTitleValue();
203
204    private String __titleValue3a;
205    private boolean __titleValue3aSet = false;
206
207    /**
208     * A default resource message value suited for the page's title.
209     * @return (String)handleGetTitleValue()
210     */
211    public final String getTitleValue()
212    {
213        String titleValue3a = this.__titleValue3a;
214        if (!this.__titleValue3aSet)
215        {
216            // titleValue has no pre constraints
217            titleValue3a = handleGetTitleValue();
218            // titleValue has no post constraints
219            this.__titleValue3a = titleValue3a;
220            if (isMetafacadePropertyCachingEnabled())
221            {
222                this.__titleValue3aSet = true;
223            }
224        }
225        return titleValue3a;
226    }
227
228   /**
229    * @see org.andromda.cartridges.jsf2.metafacades.JSFView#getMessageKey()
230    * @return String
231    */
232    protected abstract String handleGetMessageKey();
233
234    private String __messageKey4a;
235    private boolean __messageKey4aSet = false;
236
237    /**
238     * The default resource message key for this view.
239     * @return (String)handleGetMessageKey()
240     */
241    public final String getMessageKey()
242    {
243        String messageKey4a = this.__messageKey4a;
244        if (!this.__messageKey4aSet)
245        {
246            // messageKey has no pre constraints
247            messageKey4a = handleGetMessageKey();
248            // messageKey has no post constraints
249            this.__messageKey4a = messageKey4a;
250            if (isMetafacadePropertyCachingEnabled())
251            {
252                this.__messageKey4aSet = true;
253            }
254        }
255        return messageKey4a;
256    }
257
258   /**
259    * @see org.andromda.cartridges.jsf2.metafacades.JSFView#getDocumentationKey()
260    * @return String
261    */
262    protected abstract String handleGetDocumentationKey();
263
264    private String __documentationKey5a;
265    private boolean __documentationKey5aSet = false;
266
267    /**
268     * A resource message key suited for the page's documentation.
269     * @return (String)handleGetDocumentationKey()
270     */
271    public final String getDocumentationKey()
272    {
273        String documentationKey5a = this.__documentationKey5a;
274        if (!this.__documentationKey5aSet)
275        {
276            // documentationKey has no pre constraints
277            documentationKey5a = handleGetDocumentationKey();
278            // documentationKey has no post constraints
279            this.__documentationKey5a = documentationKey5a;
280            if (isMetafacadePropertyCachingEnabled())
281            {
282                this.__documentationKey5aSet = true;
283            }
284        }
285        return documentationKey5a;
286    }
287
288   /**
289    * @see org.andromda.cartridges.jsf2.metafacades.JSFView#getDocumentationValue()
290    * @return String
291    */
292    protected abstract String handleGetDocumentationValue();
293
294    private String __documentationValue6a;
295    private boolean __documentationValue6aSet = false;
296
297    /**
298     * A resource message value suited for the view's documentation.
299     * @return (String)handleGetDocumentationValue()
300     */
301    public final String getDocumentationValue()
302    {
303        String documentationValue6a = this.__documentationValue6a;
304        if (!this.__documentationValue6aSet)
305        {
306            // documentationValue has no pre constraints
307            documentationValue6a = handleGetDocumentationValue();
308            // documentationValue has no post constraints
309            this.__documentationValue6a = documentationValue6a;
310            if (isMetafacadePropertyCachingEnabled())
311            {
312                this.__documentationValue6aSet = true;
313            }
314        }
315        return documentationValue6a;
316    }
317
318   /**
319    * @see org.andromda.cartridges.jsf2.metafacades.JSFView#getMessageValue()
320    * @return String
321    */
322    protected abstract String handleGetMessageValue();
323
324    private String __messageValue7a;
325    private boolean __messageValue7aSet = false;
326
327    /**
328     * A displayable version of this view's name.
329     * @return (String)handleGetMessageValue()
330     */
331    public final String getMessageValue()
332    {
333        String messageValue7a = this.__messageValue7a;
334        if (!this.__messageValue7aSet)
335        {
336            // messageValue has no pre constraints
337            messageValue7a = handleGetMessageValue();
338            // messageValue has no post constraints
339            this.__messageValue7a = messageValue7a;
340            if (isMetafacadePropertyCachingEnabled())
341            {
342                this.__messageValue7aSet = true;
343            }
344        }
345        return messageValue7a;
346    }
347
348   /**
349    * @see org.andromda.cartridges.jsf2.metafacades.JSFView#getFullyQualifiedPopulator()
350    * @return String
351    */
352    protected abstract String handleGetFullyQualifiedPopulator();
353
354    private String __fullyQualifiedPopulator8a;
355    private boolean __fullyQualifiedPopulator8aSet = false;
356
357    /**
358     * The fully qualified name of this view's form populator.
359     * @return (String)handleGetFullyQualifiedPopulator()
360     */
361    public final String getFullyQualifiedPopulator()
362    {
363        String fullyQualifiedPopulator8a = this.__fullyQualifiedPopulator8a;
364        if (!this.__fullyQualifiedPopulator8aSet)
365        {
366            // fullyQualifiedPopulator has no pre constraints
367            fullyQualifiedPopulator8a = handleGetFullyQualifiedPopulator();
368            // fullyQualifiedPopulator has no post constraints
369            this.__fullyQualifiedPopulator8a = fullyQualifiedPopulator8a;
370            if (isMetafacadePropertyCachingEnabled())
371            {
372                this.__fullyQualifiedPopulator8aSet = true;
373            }
374        }
375        return fullyQualifiedPopulator8a;
376    }
377
378   /**
379    * @see org.andromda.cartridges.jsf2.metafacades.JSFView#getPopulator()
380    * @return String
381    */
382    protected abstract String handleGetPopulator();
383
384    private String __populator9a;
385    private boolean __populator9aSet = false;
386
387    /**
388     * The name of the form populator for this view.
389     * @return (String)handleGetPopulator()
390     */
391    public final String getPopulator()
392    {
393        String populator9a = this.__populator9a;
394        if (!this.__populator9aSet)
395        {
396            // populator has no pre constraints
397            populator9a = handleGetPopulator();
398            // populator has no post constraints
399            this.__populator9a = populator9a;
400            if (isMetafacadePropertyCachingEnabled())
401            {
402                this.__populator9aSet = true;
403            }
404        }
405        return populator9a;
406    }
407
408   /**
409    * @see org.andromda.cartridges.jsf2.metafacades.JSFView#getPopulatorPath()
410    * @return String
411    */
412    protected abstract String handleGetPopulatorPath();
413
414    private String __populatorPath10a;
415    private boolean __populatorPath10aSet = false;
416
417    /**
418     * The path to the form populator.
419     * @return (String)handleGetPopulatorPath()
420     */
421    public final String getPopulatorPath()
422    {
423        String populatorPath10a = this.__populatorPath10a;
424        if (!this.__populatorPath10aSet)
425        {
426            // populatorPath has no pre constraints
427            populatorPath10a = handleGetPopulatorPath();
428            // populatorPath has no post constraints
429            this.__populatorPath10a = populatorPath10a;
430            if (isMetafacadePropertyCachingEnabled())
431            {
432                this.__populatorPath10aSet = true;
433            }
434        }
435        return populatorPath10a;
436    }
437
438   /**
439    * @see org.andromda.cartridges.jsf2.metafacades.JSFView#isPopulatorRequired()
440    * @return boolean
441    */
442    protected abstract boolean handleIsPopulatorRequired();
443
444    private boolean __populatorRequired11a;
445    private boolean __populatorRequired11aSet = false;
446
447    /**
448     * Indicates if a populator is required for this view.
449     * @return (boolean)handleIsPopulatorRequired()
450     */
451    public final boolean isPopulatorRequired()
452    {
453        boolean populatorRequired11a = this.__populatorRequired11a;
454        if (!this.__populatorRequired11aSet)
455        {
456            // populatorRequired has no pre constraints
457            populatorRequired11a = handleIsPopulatorRequired();
458            // populatorRequired has no post constraints
459            this.__populatorRequired11a = populatorRequired11a;
460            if (isMetafacadePropertyCachingEnabled())
461            {
462                this.__populatorRequired11aSet = true;
463            }
464        }
465        return populatorRequired11a;
466    }
467
468   /**
469    * @see org.andromda.cartridges.jsf2.metafacades.JSFView#isValidationRequired()
470    * @return boolean
471    */
472    protected abstract boolean handleIsValidationRequired();
473
474    private boolean __validationRequired12a;
475    private boolean __validationRequired12aSet = false;
476
477    /**
478     * Indicates whether or not at least one parameter of an outgoing action in this view requires
479     * validation.
480     * @return (boolean)handleIsValidationRequired()
481     */
482    public final boolean isValidationRequired()
483    {
484        boolean validationRequired12a = this.__validationRequired12a;
485        if (!this.__validationRequired12aSet)
486        {
487            // validationRequired has no pre constraints
488            validationRequired12a = handleIsValidationRequired();
489            // validationRequired has no post constraints
490            this.__validationRequired12a = validationRequired12a;
491            if (isMetafacadePropertyCachingEnabled())
492            {
493                this.__validationRequired12aSet = true;
494            }
495        }
496        return validationRequired12a;
497    }
498
499   /**
500    * @see org.andromda.cartridges.jsf2.metafacades.JSFView#isPopup()
501    * @return boolean
502    */
503    protected abstract boolean handleIsPopup();
504
505    private boolean __popup13a;
506    private boolean __popup13aSet = false;
507
508    /**
509     * Indicates if this view represents a popup.
510     * @return (boolean)handleIsPopup()
511     */
512    public final boolean isPopup()
513    {
514        boolean popup13a = this.__popup13a;
515        if (!this.__popup13aSet)
516        {
517            // popup has no pre constraints
518            popup13a = handleIsPopup();
519            // popup has no post constraints
520            this.__popup13a = popup13a;
521            if (isMetafacadePropertyCachingEnabled())
522            {
523                this.__popup13aSet = true;
524            }
525        }
526        return popup13a;
527    }
528
529   /**
530    * @see org.andromda.cartridges.jsf2.metafacades.JSFView#isNonTableVariablesPresent()
531    * @return boolean
532    */
533    protected abstract boolean handleIsNonTableVariablesPresent();
534
535    private boolean __nonTableVariablesPresent14a;
536    private boolean __nonTableVariablesPresent14aSet = false;
537
538    /**
539     * Indicates whether or not any non-table view variables are present in this view.
540     * @return (boolean)handleIsNonTableVariablesPresent()
541     */
542    public final boolean isNonTableVariablesPresent()
543    {
544        boolean nonTableVariablesPresent14a = this.__nonTableVariablesPresent14a;
545        if (!this.__nonTableVariablesPresent14aSet)
546        {
547            // nonTableVariablesPresent has no pre constraints
548            nonTableVariablesPresent14a = handleIsNonTableVariablesPresent();
549            // nonTableVariablesPresent has no post constraints
550            this.__nonTableVariablesPresent14a = nonTableVariablesPresent14a;
551            if (isMetafacadePropertyCachingEnabled())
552            {
553                this.__nonTableVariablesPresent14aSet = true;
554            }
555        }
556        return nonTableVariablesPresent14a;
557    }
558
559   /**
560    * @see org.andromda.cartridges.jsf2.metafacades.JSFView#isHasNameOfUseCase()
561    * @return boolean
562    */
563    protected abstract boolean handleIsHasNameOfUseCase();
564
565    private boolean __hasNameOfUseCase15a;
566    private boolean __hasNameOfUseCase15aSet = false;
567
568    /**
569     * Indicates whether or not this view has the same name as the use case in which it is
570     * contained.
571     * @return (boolean)handleIsHasNameOfUseCase()
572     */
573    public final boolean isHasNameOfUseCase()
574    {
575        boolean hasNameOfUseCase15a = this.__hasNameOfUseCase15a;
576        if (!this.__hasNameOfUseCase15aSet)
577        {
578            // hasNameOfUseCase has no pre constraints
579            hasNameOfUseCase15a = handleIsHasNameOfUseCase();
580            // hasNameOfUseCase has no post constraints
581            this.__hasNameOfUseCase15a = hasNameOfUseCase15a;
582            if (isMetafacadePropertyCachingEnabled())
583            {
584                this.__hasNameOfUseCase15aSet = true;
585            }
586        }
587        return hasNameOfUseCase15a;
588    }
589
590   /**
591    * @see org.andromda.cartridges.jsf2.metafacades.JSFView#getFormKey()
592    * @return String
593    */
594    protected abstract String handleGetFormKey();
595
596    private String __formKey16a;
597    private boolean __formKey16aSet = false;
598
599    /**
600     * The key that stores the form in which information is passed from one action to another.
601     * @return (String)handleGetFormKey()
602     */
603    public final String getFormKey()
604    {
605        String formKey16a = this.__formKey16a;
606        if (!this.__formKey16aSet)
607        {
608            // formKey has no pre constraints
609            formKey16a = handleGetFormKey();
610            // formKey has no post constraints
611            this.__formKey16a = formKey16a;
612            if (isMetafacadePropertyCachingEnabled())
613            {
614                this.__formKey16aSet = true;
615            }
616        }
617        return formKey16a;
618    }
619
620   /**
621    * @see org.andromda.cartridges.jsf2.metafacades.JSFView#getFromOutcome()
622    * @return String
623    */
624    protected abstract String handleGetFromOutcome();
625
626    private String __fromOutcome17a;
627    private boolean __fromOutcome17aSet = false;
628
629    /**
630     * The name that corresponds to the from-outcome in an navigational rule.
631     * @return (String)handleGetFromOutcome()
632     */
633    public final String getFromOutcome()
634    {
635        String fromOutcome17a = this.__fromOutcome17a;
636        if (!this.__fromOutcome17aSet)
637        {
638            // fromOutcome has no pre constraints
639            fromOutcome17a = handleGetFromOutcome();
640            // fromOutcome has no post constraints
641            this.__fromOutcome17a = fromOutcome17a;
642            if (isMetafacadePropertyCachingEnabled())
643            {
644                this.__fromOutcome17aSet = true;
645            }
646        }
647        return fromOutcome17a;
648    }
649
650   /**
651    * @see org.andromda.cartridges.jsf2.metafacades.JSFView#isNeedsFileUpload()
652    * @return boolean
653    */
654    protected abstract boolean handleIsNeedsFileUpload();
655
656    private boolean __needsFileUpload18a;
657    private boolean __needsFileUpload18aSet = false;
658
659    /**
660     * TODO: Model Documentation for
661     * org.andromda.cartridges.jsf2.metafacades.JSFView.needsFileUpload
662     * @return (boolean)handleIsNeedsFileUpload()
663     */
664    public final boolean isNeedsFileUpload()
665    {
666        boolean needsFileUpload18a = this.__needsFileUpload18a;
667        if (!this.__needsFileUpload18aSet)
668        {
669            // needsFileUpload has no pre constraints
670            needsFileUpload18a = handleIsNeedsFileUpload();
671            // needsFileUpload has no post constraints
672            this.__needsFileUpload18a = needsFileUpload18a;
673            if (isMetafacadePropertyCachingEnabled())
674            {
675                this.__needsFileUpload18aSet = true;
676            }
677        }
678        return needsFileUpload18a;
679    }
680
681   /**
682    * @see org.andromda.cartridges.jsf2.metafacades.JSFView#getFullyQualifiedPageObjectClassPath()
683    * @return String
684    */
685    protected abstract String handleGetFullyQualifiedPageObjectClassPath();
686
687    private String __fullyQualifiedPageObjectClassPath19a;
688    private boolean __fullyQualifiedPageObjectClassPath19aSet = false;
689
690    /**
691     * TODO: Model Documentation for
692     * org.andromda.cartridges.jsf2.metafacades.JSFView.fullyQualifiedPageObjectClassPath
693     * @return (String)handleGetFullyQualifiedPageObjectClassPath()
694     */
695    public final String getFullyQualifiedPageObjectClassPath()
696    {
697        String fullyQualifiedPageObjectClassPath19a = this.__fullyQualifiedPageObjectClassPath19a;
698        if (!this.__fullyQualifiedPageObjectClassPath19aSet)
699        {
700            // fullyQualifiedPageObjectClassPath has no pre constraints
701            fullyQualifiedPageObjectClassPath19a = handleGetFullyQualifiedPageObjectClassPath();
702            // fullyQualifiedPageObjectClassPath has no post constraints
703            this.__fullyQualifiedPageObjectClassPath19a = fullyQualifiedPageObjectClassPath19a;
704            if (isMetafacadePropertyCachingEnabled())
705            {
706                this.__fullyQualifiedPageObjectClassPath19aSet = true;
707            }
708        }
709        return fullyQualifiedPageObjectClassPath19a;
710    }
711
712   /**
713    * @see org.andromda.cartridges.jsf2.metafacades.JSFView#getPageObjectClassName()
714    * @return String
715    */
716    protected abstract String handleGetPageObjectClassName();
717
718    private String __pageObjectClassName20a;
719    private boolean __pageObjectClassName20aSet = false;
720
721    /**
722     * TODO: Model Documentation for
723     * org.andromda.cartridges.jsf2.metafacades.JSFView.pageObjectClassName
724     * @return (String)handleGetPageObjectClassName()
725     */
726    public final String getPageObjectClassName()
727    {
728        String pageObjectClassName20a = this.__pageObjectClassName20a;
729        if (!this.__pageObjectClassName20aSet)
730        {
731            // pageObjectClassName has no pre constraints
732            pageObjectClassName20a = handleGetPageObjectClassName();
733            // pageObjectClassName has no post constraints
734            this.__pageObjectClassName20a = pageObjectClassName20a;
735            if (isMetafacadePropertyCachingEnabled())
736            {
737                this.__pageObjectClassName20aSet = true;
738            }
739        }
740        return pageObjectClassName20a;
741    }
742
743   /**
744    * @see org.andromda.cartridges.jsf2.metafacades.JSFView#getPageObjectBeanName()
745    * @return String
746    */
747    protected abstract String handleGetPageObjectBeanName();
748
749    private String __pageObjectBeanName21a;
750    private boolean __pageObjectBeanName21aSet = false;
751
752    /**
753     * TODO: Model Documentation for
754     * org.andromda.cartridges.jsf2.metafacades.JSFView.pageObjectBeanName
755     * @return (String)handleGetPageObjectBeanName()
756     */
757    public final String getPageObjectBeanName()
758    {
759        String pageObjectBeanName21a = this.__pageObjectBeanName21a;
760        if (!this.__pageObjectBeanName21aSet)
761        {
762            // pageObjectBeanName has no pre constraints
763            pageObjectBeanName21a = handleGetPageObjectBeanName();
764            // pageObjectBeanName has no post constraints
765            this.__pageObjectBeanName21a = pageObjectBeanName21a;
766            if (isMetafacadePropertyCachingEnabled())
767            {
768                this.__pageObjectBeanName21aSet = true;
769            }
770        }
771        return pageObjectBeanName21a;
772    }
773
774   /**
775    * @see org.andromda.cartridges.jsf2.metafacades.JSFView#getFullyQualifiedPageObjectClassName()
776    * @return String
777    */
778    protected abstract String handleGetFullyQualifiedPageObjectClassName();
779
780    private String __fullyQualifiedPageObjectClassName22a;
781    private boolean __fullyQualifiedPageObjectClassName22aSet = false;
782
783    /**
784     * TODO: Model Documentation for
785     * org.andromda.cartridges.jsf2.metafacades.JSFView.fullyQualifiedPageObjectClassName
786     * @return (String)handleGetFullyQualifiedPageObjectClassName()
787     */
788    public final String getFullyQualifiedPageObjectClassName()
789    {
790        String fullyQualifiedPageObjectClassName22a = this.__fullyQualifiedPageObjectClassName22a;
791        if (!this.__fullyQualifiedPageObjectClassName22aSet)
792        {
793            // fullyQualifiedPageObjectClassName has no pre constraints
794            fullyQualifiedPageObjectClassName22a = handleGetFullyQualifiedPageObjectClassName();
795            // fullyQualifiedPageObjectClassName has no post constraints
796            this.__fullyQualifiedPageObjectClassName22a = fullyQualifiedPageObjectClassName22a;
797            if (isMetafacadePropertyCachingEnabled())
798            {
799                this.__fullyQualifiedPageObjectClassName22aSet = true;
800            }
801        }
802        return fullyQualifiedPageObjectClassName22a;
803    }
804
805    // ------------- associations ------------------
806
807    private List<JSFForward> __getForwards1r;
808    private boolean __getForwards1rSet = false;
809
810    /**
811     * Represents a JSF view for a front-end application.
812     * @return (List<JSFForward>)handleGetForwards()
813     */
814    public final List<JSFForward> getForwards()
815    {
816        List<JSFForward> getForwards1r = this.__getForwards1r;
817        if (!this.__getForwards1rSet)
818        {
819            // jSFView has no pre constraints
820            List result = handleGetForwards();
821            List shieldedResult = this.shieldedElements(result);
822            try
823            {
824                getForwards1r = (List<JSFForward>)shieldedResult;
825            }
826            catch (ClassCastException ex)
827            {
828                // Bad things happen if the metafacade type mapping in metafacades.xml is wrong - Warn
829                JSFViewLogic.logger.warn("incorrect metafacade cast for JSFViewLogic.getForwards List<JSFForward> " + result + ": " + shieldedResult);
830            }
831            // jSFView has no post constraints
832            this.__getForwards1r = getForwards1r;
833            if (isMetafacadePropertyCachingEnabled())
834            {
835                this.__getForwards1rSet = true;
836            }
837        }
838        return getForwards1r;
839    }
840
841    /**
842     * UML Specific type is returned in Collection, transformed by shieldedElements to AndroMDA Metafacade type
843     * @return  List
844     */
845    protected abstract List handleGetForwards();
846
847    /**
848     * Represents a JSF view for a front-end application.
849     * @return (List<JSFParameter>)handleGetBackingValueVariables()
850     */
851    public final List<JSFParameter> getBackingValueVariables()
852    {
853        List<JSFParameter> getBackingValueVariables2r = null;
854        // jSFView has no pre constraints
855        List result = handleGetBackingValueVariables();
856        List shieldedResult = this.shieldedElements(result);
857        try
858        {
859            getBackingValueVariables2r = (List<JSFParameter>)shieldedResult;
860        }
861        catch (ClassCastException ex)
862        {
863            // Bad things happen if the metafacade type mapping in metafacades.xml is wrong - Warn
864            JSFViewLogic.logger.warn("incorrect metafacade cast for JSFViewLogic.getBackingValueVariables List<JSFParameter> " + result + ": " + shieldedResult);
865        }
866        // jSFView has no post constraints
867        return getBackingValueVariables2r;
868    }
869
870    /**
871     * UML Specific type is returned in Collection, transformed by shieldedElements to AndroMDA Metafacade type
872     * @return  List
873     */
874    protected abstract List handleGetBackingValueVariables();
875
876    private List<JSFAction> __getFormActions3r;
877    private boolean __getFormActions3rSet = false;
878
879    /**
880     * Represents a JSF view for a front-end application.
881     * @return (List<JSFAction>)handleGetFormActions()
882     */
883    public final List<JSFAction> getFormActions()
884    {
885        List<JSFAction> getFormActions3r = this.__getFormActions3r;
886        if (!this.__getFormActions3rSet)
887        {
888            // jSFView has no pre constraints
889            List result = handleGetFormActions();
890            List shieldedResult = this.shieldedElements(result);
891            try
892            {
893                getFormActions3r = (List<JSFAction>)shieldedResult;
894            }
895            catch (ClassCastException ex)
896            {
897                // Bad things happen if the metafacade type mapping in metafacades.xml is wrong - Warn
898                JSFViewLogic.logger.warn("incorrect metafacade cast for JSFViewLogic.getFormActions List<JSFAction> " + result + ": " + shieldedResult);
899            }
900            // jSFView has no post constraints
901            this.__getFormActions3r = getFormActions3r;
902            if (isMetafacadePropertyCachingEnabled())
903            {
904                this.__getFormActions3rSet = true;
905            }
906        }
907        return getFormActions3r;
908    }
909
910    /**
911     * UML Specific type is returned in Collection, transformed by shieldedElements to AndroMDA Metafacade type
912     * @return  List
913     */
914    protected abstract List handleGetFormActions();
915
916    private List<JSFAction> __getActionForwards4r;
917    private boolean __getActionForwards4rSet = false;
918
919    /**
920     * Represents a JSF view for a front-end application.
921     * @return (List<JSFAction>)handleGetActionForwards()
922     */
923    public final List<JSFAction> getActionForwards()
924    {
925        List<JSFAction> getActionForwards4r = this.__getActionForwards4r;
926        if (!this.__getActionForwards4rSet)
927        {
928            // jSFView has no pre constraints
929            List result = handleGetActionForwards();
930            List shieldedResult = this.shieldedElements(result);
931            try
932            {
933                getActionForwards4r = (List<JSFAction>)shieldedResult;
934            }
935            catch (ClassCastException ex)
936            {
937                // Bad things happen if the metafacade type mapping in metafacades.xml is wrong - Warn
938                JSFViewLogic.logger.warn("incorrect metafacade cast for JSFViewLogic.getActionForwards List<JSFAction> " + result + ": " + shieldedResult);
939            }
940            // jSFView has no post constraints
941            this.__getActionForwards4r = getActionForwards4r;
942            if (isMetafacadePropertyCachingEnabled())
943            {
944                this.__getActionForwards4rSet = true;
945            }
946        }
947        return getActionForwards4r;
948    }
949
950    /**
951     * UML Specific type is returned in Collection, transformed by shieldedElements to AndroMDA Metafacade type
952     * @return  List
953     */
954    protected abstract List handleGetActionForwards();
955
956    /**
957     * @return true
958     * @see FrontEndView
959     */
960    public boolean isFrontEndViewMetaType()
961    {
962        return true;
963    }
964
965    /**
966     * @return true
967     * @see org.andromda.metafacades.uml.FrontEndActionState
968     */
969    public boolean isFrontEndActionStateMetaType()
970    {
971        return true;
972    }
973
974    /**
975     * @return true
976     * @see org.andromda.metafacades.uml.ActionStateFacade
977     */
978    public boolean isActionStateFacadeMetaType()
979    {
980        return true;
981    }
982
983    /**
984     * @return true
985     * @see StateFacade
986     */
987    public boolean isStateFacadeMetaType()
988    {
989        return true;
990    }
991
992    /**
993     * @return true
994     * @see org.andromda.metafacades.uml.StateVertexFacade
995     */
996    public boolean isStateVertexFacadeMetaType()
997    {
998        return true;
999    }
1000
1001    /**
1002     * @return true
1003     * @see ModelElementFacade
1004     */
1005    public boolean isModelElementFacadeMetaType()
1006    {
1007        return true;
1008    }
1009
1010    // ----------- delegates to FrontEndView ------------
1011    /**
1012     * The entry action for this action state (if any).
1013     * @see org.andromda.metafacades.uml.ActionStateFacade#getEntry()
1014     */
1015    public ActionFacade getEntry()
1016    {
1017        return this.getSuperFrontEndView().getEntry();
1018    }
1019
1020    /**
1021     * The method name representing this action state.
1022     * @see org.andromda.metafacades.uml.FrontEndActionState#getActionMethodName()
1023     */
1024    public String getActionMethodName()
1025    {
1026        return this.getSuperFrontEndView().getActionMethodName();
1027    }
1028
1029    /**
1030     * The actions that pass through this action state.
1031     * @see org.andromda.metafacades.uml.FrontEndActionState#getContainerActions()
1032     */
1033    public List<FrontEndAction> getContainerActions()
1034    {
1035        return this.getSuperFrontEndView().getContainerActions();
1036    }
1037
1038    /**
1039     * All calls deferred to the controller by this action state.
1040     * @see org.andromda.metafacades.uml.FrontEndActionState#getControllerCalls()
1041     */
1042    public List<OperationFacade> getControllerCalls()
1043    {
1044        return this.getSuperFrontEndView().getControllerCalls();
1045    }
1046
1047    /**
1048     * All exceptions modelled on this action state.
1049     * @see org.andromda.metafacades.uml.FrontEndActionState#getExceptions()
1050     */
1051    public List<FrontEndExceptionHandler> getExceptions()
1052    {
1053        return this.getSuperFrontEndView().getExceptions();
1054    }
1055
1056    /**
1057     * The next transition, there can be only one transition going out of an action state, otherwise
1058     * decision points should be used (triggers are not supported at the server-side).
1059     * @see org.andromda.metafacades.uml.FrontEndActionState#getForward()
1060     */
1061    public FrontEndForward getForward()
1062    {
1063        return this.getSuperFrontEndView().getForward();
1064    }
1065
1066    /**
1067     * All calls deferred to the services by this action state.
1068     * @see org.andromda.metafacades.uml.FrontEndActionState#getServiceCalls()
1069     */
1070    public List<OperationFacade> getServiceCalls()
1071    {
1072        return this.getSuperFrontEndView().getServiceCalls();
1073    }
1074
1075    /**
1076     * True if this element is contained in a FrontEndUseCase.
1077     * @see org.andromda.metafacades.uml.FrontEndActionState#isContainedInFrontEndUseCase()
1078     */
1079    public boolean isContainedInFrontEndUseCase()
1080    {
1081        return this.getSuperFrontEndView().isContainedInFrontEndUseCase();
1082    }
1083
1084    /**
1085     * Indicates whether or not this front end action state is server side. Pages, for example, are
1086     * also action states but they return control to the client.
1087     * @see org.andromda.metafacades.uml.FrontEndActionState#isServerSide()
1088     */
1089    public boolean isServerSide()
1090    {
1091        return this.getSuperFrontEndView().isServerSide();
1092    }
1093
1094    /**
1095     * All actions that can be triggered on this view.
1096     * @see FrontEndView#getActions()
1097     */
1098    public List<FrontEndAction> getActions()
1099    {
1100        return this.getSuperFrontEndView().getActions();
1101    }
1102
1103    /**
1104     * All parameters for each action going out of this view.
1105     * @see FrontEndView#getAllActionParameters()
1106     */
1107    public List<FrontEndParameter> getAllActionParameters()
1108    {
1109        return this.getSuperFrontEndView().getAllActionParameters();
1110    }
1111
1112    /**
1113     * All fields from all forms on the given view.
1114     * @see FrontEndView#getAllFormFields()
1115     */
1116    public List<FrontEndParameter> getAllFormFields()
1117    {
1118        return this.getSuperFrontEndView().getAllFormFields();
1119    }
1120
1121    /**
1122     * All tables belonging to the front end view.
1123     * @see FrontEndView#getTables()
1124     */
1125    public List<FrontEndParameter> getTables()
1126    {
1127        return this.getSuperFrontEndView().getTables();
1128    }
1129
1130    /**
1131     * The use-case of which this view is a member.
1132     * @see FrontEndView#getUseCase()
1133     */
1134    public FrontEndUseCase getUseCase()
1135    {
1136        return this.getSuperFrontEndView().getUseCase();
1137    }
1138
1139    /**
1140     * All those variables that will be present as variables in the target view. These are the
1141     * trigger parameters on the incoming transitions.
1142     * @see FrontEndView#getVariables()
1143     */
1144    public List<FrontEndParameter> getVariables()
1145    {
1146        return this.getSuperFrontEndView().getVariables();
1147    }
1148
1149    /**
1150     * True if this element carries the FrontEndView stereotype.
1151     * @see FrontEndView#isFrontEndView()
1152     */
1153    public boolean isFrontEndView()
1154    {
1155        return this.getSuperFrontEndView().isFrontEndView();
1156    }
1157
1158    /**
1159     * Copies all tagged values from the given ModelElementFacade to this model element facade.
1160     * @see ModelElementFacade#copyTaggedValues(ModelElementFacade element)
1161     */
1162    public void copyTaggedValues(ModelElementFacade element)
1163    {
1164        this.getSuperFrontEndView().copyTaggedValues(element);
1165    }
1166
1167    /**
1168     * Finds the tagged value with the specified 'tagName'. In case there are more values the first
1169     * one found will be returned.
1170     * @see ModelElementFacade#findTaggedValue(String tagName)
1171     */
1172    public Object findTaggedValue(String tagName)
1173    {
1174        return this.getSuperFrontEndView().findTaggedValue(tagName);
1175    }
1176
1177    /**
1178     * Returns all the values for the tagged value with the specified name. The returned collection
1179     * will contains only String instances, or will be empty. Never null.
1180     * @see ModelElementFacade#findTaggedValues(String tagName)
1181     */
1182    public Collection<Object> findTaggedValues(String tagName)
1183    {
1184        return this.getSuperFrontEndView().findTaggedValues(tagName);
1185    }
1186
1187    /**
1188     * Returns the fully qualified name of the model element. The fully qualified name includes
1189     * complete package qualified name of the underlying model element. The templates parameter will
1190     * be replaced by the correct one given the binding relation of the parameter to this element.
1191     * @see ModelElementFacade#getBindedFullyQualifiedName(ModelElementFacade bindedElement)
1192     */
1193    public String getBindedFullyQualifiedName(ModelElementFacade bindedElement)
1194    {
1195        return this.getSuperFrontEndView().getBindedFullyQualifiedName(bindedElement);
1196    }
1197
1198    /**
1199     * Gets all constraints belonging to the model element.
1200     * @see ModelElementFacade#getConstraints()
1201     */
1202    public Collection<ConstraintFacade> getConstraints()
1203    {
1204        return this.getSuperFrontEndView().getConstraints();
1205    }
1206
1207    /**
1208     * Returns the constraints of the argument kind that have been placed onto this model. Typical
1209     * kinds are "inv", "pre" and "post". Other kinds are possible.
1210     * @see ModelElementFacade#getConstraints(String kind)
1211     */
1212    public Collection<ConstraintFacade> getConstraints(String kind)
1213    {
1214        return this.getSuperFrontEndView().getConstraints(kind);
1215    }
1216
1217    /**
1218     * Gets the documentation for the model element, The indent argument is prefixed to each line.
1219     * By default this method wraps lines after 64 characters.
1220     * This method is equivalent to <code>getDocumentation(indent, 64)</code>.
1221     * @see ModelElementFacade#getDocumentation(String indent)
1222     */
1223    public String getDocumentation(String indent)
1224    {
1225        return this.getSuperFrontEndView().getDocumentation(indent);
1226    }
1227
1228    /**
1229     * This method returns the documentation for this model element, with the lines wrapped after
1230     * the specified number of characters, values of less than 1 will indicate no line wrapping is
1231     * required. By default paragraphs are returned as HTML.
1232     * This method is equivalent to <code>getDocumentation(indent, lineLength, true)</code>.
1233     * @see ModelElementFacade#getDocumentation(String indent, int lineLength)
1234     */
1235    public String getDocumentation(String indent, int lineLength)
1236    {
1237        return this.getSuperFrontEndView().getDocumentation(indent, lineLength);
1238    }
1239
1240    /**
1241     * This method returns the documentation for this model element, with the lines wrapped after
1242     * the specified number of characters, values of less than 1 will indicate no line wrapping is
1243     * required. HTML style determines if HTML Escaping is applied.
1244     * @see ModelElementFacade#getDocumentation(String indent, int lineLength, boolean htmlStyle)
1245     */
1246    public String getDocumentation(String indent, int lineLength, boolean htmlStyle)
1247    {
1248        return this.getSuperFrontEndView().getDocumentation(indent, lineLength, htmlStyle);
1249    }
1250
1251    /**
1252     * The fully qualified name of this model element.
1253     * @see ModelElementFacade#getFullyQualifiedName()
1254     */
1255    public String getFullyQualifiedName()
1256    {
1257        return this.getSuperFrontEndView().getFullyQualifiedName();
1258    }
1259
1260    /**
1261     * Returns the fully qualified name of the model element. The fully qualified name includes
1262     * complete package qualified name of the underlying model element.  If modelName is true, then
1263     * the original name of the model element (the name contained within the model) will be the name
1264     * returned, otherwise a name from a language mapping will be returned.
1265     * @see ModelElementFacade#getFullyQualifiedName(boolean modelName)
1266     */
1267    public String getFullyQualifiedName(boolean modelName)
1268    {
1269        return this.getSuperFrontEndView().getFullyQualifiedName(modelName);
1270    }
1271
1272    /**
1273     * Returns the fully qualified name as a path, the returned value always starts with out a slash
1274     * '/'.
1275     * @see ModelElementFacade#getFullyQualifiedNamePath()
1276     */
1277    public String getFullyQualifiedNamePath()
1278    {
1279        return this.getSuperFrontEndView().getFullyQualifiedNamePath();
1280    }
1281
1282    /**
1283     * Gets the unique identifier of the underlying model element.
1284     * @see ModelElementFacade#getId()
1285     */
1286    public String getId()
1287    {
1288        return this.getSuperFrontEndView().getId();
1289    }
1290
1291    /**
1292     * UML2: Retrieves the keywords for this element. Used to modify implementation properties which
1293     * are not represented by other properties, i.e. native, transient, volatile, synchronized,
1294     * (added annotations) override, deprecated. Can also be used to suppress compiler warnings:
1295     * (added annotations) unchecked, fallthrough, path, serial, finally, all. Annotations require
1296     * JDK5 compiler level.
1297     * @see ModelElementFacade#getKeywords()
1298     */
1299    public Collection<String> getKeywords()
1300    {
1301        return this.getSuperFrontEndView().getKeywords();
1302    }
1303
1304    /**
1305     * UML2: Retrieves a localized label for this named element.
1306     * @see ModelElementFacade#getLabel()
1307     */
1308    public String getLabel()
1309    {
1310        return this.getSuperFrontEndView().getLabel();
1311    }
1312
1313    /**
1314     * The language mappings that have been set for this model element.
1315     * @see ModelElementFacade#getLanguageMappings()
1316     */
1317    public TypeMappings getLanguageMappings()
1318    {
1319        return this.getSuperFrontEndView().getLanguageMappings();
1320    }
1321
1322    /**
1323     * Return the model containing this model element (multiple models may be loaded and processed
1324     * at the same time).
1325     * @see ModelElementFacade#getModel()
1326     */
1327    public ModelFacade getModel()
1328    {
1329        return this.getSuperFrontEndView().getModel();
1330    }
1331
1332    /**
1333     * The name of the model element.
1334     * @see ModelElementFacade#getName()
1335     */
1336    public String getName()
1337    {
1338        return this.getSuperFrontEndView().getName();
1339    }
1340
1341    /**
1342     * Gets the package to which this model element belongs.
1343     * @see ModelElementFacade#getPackage()
1344     */
1345    public ModelElementFacade getPackage()
1346    {
1347        return this.getSuperFrontEndView().getPackage();
1348    }
1349
1350    /**
1351     * The name of this model element's package.
1352     * @see ModelElementFacade#getPackageName()
1353     */
1354    public String getPackageName()
1355    {
1356        return this.getSuperFrontEndView().getPackageName();
1357    }
1358
1359    /**
1360     * Gets the package name (optionally providing the ability to retrieve the model name and not
1361     * the mapped name).
1362     * @see ModelElementFacade#getPackageName(boolean modelName)
1363     */
1364    public String getPackageName(boolean modelName)
1365    {
1366        return this.getSuperFrontEndView().getPackageName(modelName);
1367    }
1368
1369    /**
1370     * Returns the package as a path, the returned value always starts with out a slash '/'.
1371     * @see ModelElementFacade#getPackagePath()
1372     */
1373    public String getPackagePath()
1374    {
1375        return this.getSuperFrontEndView().getPackagePath();
1376    }
1377
1378    /**
1379     * UML2: Returns the value of the 'Qualified Name' attribute. A name which allows the
1380     * NamedElement to be identified within a hierarchy of nested Namespaces. It is constructed from
1381     * the names of the containing namespaces starting at the root of the hierarchy and ending with
1382     * the name of the NamedElement itself.
1383     * @see ModelElementFacade#getQualifiedName()
1384     */
1385    public String getQualifiedName()
1386    {
1387        return this.getSuperFrontEndView().getQualifiedName();
1388    }
1389
1390    /**
1391     * Gets the root package for the model element.
1392     * @see ModelElementFacade#getRootPackage()
1393     */
1394    public PackageFacade getRootPackage()
1395    {
1396        return this.getSuperFrontEndView().getRootPackage();
1397    }
1398
1399    /**
1400     * Gets the dependencies for which this model element is the source.
1401     * @see ModelElementFacade#getSourceDependencies()
1402     */
1403    public Collection<DependencyFacade> getSourceDependencies()
1404    {
1405        return this.getSuperFrontEndView().getSourceDependencies();
1406    }
1407
1408    /**
1409     * If this model element is the context of an activity graph, this represents that activity
1410     * graph.
1411     * @see ModelElementFacade#getStateMachineContext()
1412     */
1413    public StateMachineFacade getStateMachineContext()
1414    {
1415        return this.getSuperFrontEndView().getStateMachineContext();
1416    }
1417
1418    /**
1419     * The collection of ALL stereotype names for this model element.
1420     * @see ModelElementFacade#getStereotypeNames()
1421     */
1422    public Collection<String> getStereotypeNames()
1423    {
1424        return this.getSuperFrontEndView().getStereotypeNames();
1425    }
1426
1427    /**
1428     * Gets all stereotypes for this model element.
1429     * @see ModelElementFacade#getStereotypes()
1430     */
1431    public Collection<StereotypeFacade> getStereotypes()
1432    {
1433        return this.getSuperFrontEndView().getStereotypes();
1434    }
1435
1436    /**
1437     * Return the TaggedValues associated with this model element, under all stereotypes.
1438     * @see ModelElementFacade#getTaggedValues()
1439     */
1440    public Collection<TaggedValueFacade> getTaggedValues()
1441    {
1442        return this.getSuperFrontEndView().getTaggedValues();
1443    }
1444
1445    /**
1446     * Gets the dependencies for which this model element is the target.
1447     * @see ModelElementFacade#getTargetDependencies()
1448     */
1449    public Collection<DependencyFacade> getTargetDependencies()
1450    {
1451        return this.getSuperFrontEndView().getTargetDependencies();
1452    }
1453
1454    /**
1455     * Get the template parameter for this model element having the parameterName
1456     * @see ModelElementFacade#getTemplateParameter(String parameterName)
1457     */
1458    public Object getTemplateParameter(String parameterName)
1459    {
1460        return this.getSuperFrontEndView().getTemplateParameter(parameterName);
1461    }
1462
1463    /**
1464     * Get the template parameters for this model element
1465     * @see ModelElementFacade#getTemplateParameters()
1466     */
1467    public Collection<TemplateParameterFacade> getTemplateParameters()
1468    {
1469        return this.getSuperFrontEndView().getTemplateParameters();
1470    }
1471
1472    /**
1473     * The visibility (i.e. public, private, protected or package) of the model element, will
1474     * attempt a lookup for these values in the language mappings (if any).
1475     * @see ModelElementFacade#getVisibility()
1476     */
1477    public String getVisibility()
1478    {
1479        return this.getSuperFrontEndView().getVisibility();
1480    }
1481
1482    /**
1483     * Returns true if the model element has the exact stereotype (meaning no stereotype inheritance
1484     * is taken into account when searching for the stereotype), false otherwise.
1485     * @see ModelElementFacade#hasExactStereotype(String stereotypeName)
1486     */
1487    public boolean hasExactStereotype(String stereotypeName)
1488    {
1489        return this.getSuperFrontEndView().hasExactStereotype(stereotypeName);
1490    }
1491
1492    /**
1493     * Does the UML Element contain the named Keyword? Keywords can be separated by space, comma,
1494     * pipe, semicolon, or << >>
1495     * @see ModelElementFacade#hasKeyword(String keywordName)
1496     */
1497    public boolean hasKeyword(String keywordName)
1498    {
1499        return this.getSuperFrontEndView().hasKeyword(keywordName);
1500    }
1501
1502    /**
1503     * Returns true if the model element has the specified stereotype.  If the stereotype itself
1504     * does not match, then a search will be made up the stereotype inheritance hierarchy, and if
1505     * one of the stereotype's ancestors has a matching name this method will return true, false
1506     * otherwise.
1507     * For example, if we have a certain stereotype called <<exception>> and a model element has a
1508     * stereotype called <<applicationException>> which extends <<exception>>, when calling this
1509     * method with 'stereotypeName' defined as 'exception' the method would return true since
1510     * <<applicationException>> inherits from <<exception>>.  If you want to check if the model
1511     * element has the exact stereotype, then use the method 'hasExactStereotype' instead.
1512     * @see ModelElementFacade#hasStereotype(String stereotypeName)
1513     */
1514    public boolean hasStereotype(String stereotypeName)
1515    {
1516        return this.getSuperFrontEndView().hasStereotype(stereotypeName);
1517    }
1518
1519    /**
1520     * True if there are target dependencies from this element that are instances of BindingFacade.
1521     * Deprecated in UML2: Use TemplateBinding parameters instead of dependencies.
1522     * @see ModelElementFacade#isBindingDependenciesPresent()
1523     */
1524    public boolean isBindingDependenciesPresent()
1525    {
1526        return this.getSuperFrontEndView().isBindingDependenciesPresent();
1527    }
1528
1529    /**
1530     * Indicates if any constraints are present on this model element.
1531     * @see ModelElementFacade#isConstraintsPresent()
1532     */
1533    public boolean isConstraintsPresent()
1534    {
1535        return this.getSuperFrontEndView().isConstraintsPresent();
1536    }
1537
1538    /**
1539     * Indicates if any documentation is present on this model element.
1540     * @see ModelElementFacade#isDocumentationPresent()
1541     */
1542    public boolean isDocumentationPresent()
1543    {
1544        return this.getSuperFrontEndView().isDocumentationPresent();
1545    }
1546
1547    /**
1548     * True if this element name is a reserved word in Java, C#, ANSI or ISO C, C++, JavaScript.
1549     * @see ModelElementFacade#isReservedWord()
1550     */
1551    public boolean isReservedWord()
1552    {
1553        return this.getSuperFrontEndView().isReservedWord();
1554    }
1555
1556    /**
1557     * True is there are template parameters on this model element. For UML2, applies to Class,
1558     * Operation, Property, and Parameter.
1559     * @see ModelElementFacade#isTemplateParametersPresent()
1560     */
1561    public boolean isTemplateParametersPresent()
1562    {
1563        return this.getSuperFrontEndView().isTemplateParametersPresent();
1564    }
1565
1566    /**
1567     * True if this element name is a valid identifier name in Java, C#, ANSI or ISO C, C++,
1568     * JavaScript. Contains no spaces, special characters etc. Constraint always applied on
1569     * Enumerations and Interfaces, optionally applies on other model elements.
1570     * @see ModelElementFacade#isValidIdentifierName()
1571     */
1572    public boolean isValidIdentifierName()
1573    {
1574        return this.getSuperFrontEndView().isValidIdentifierName();
1575    }
1576
1577    /**
1578     * Searches for the constraint with the specified 'name' on this model element, and if found
1579     * translates it using the specified 'translation' from a translation library discovered by the
1580     * framework.
1581     * @see ModelElementFacade#translateConstraint(String name, String translation)
1582     */
1583    public String translateConstraint(String name, String translation)
1584    {
1585        return this.getSuperFrontEndView().translateConstraint(name, translation);
1586    }
1587
1588    /**
1589     * Translates all constraints belonging to this model element with the given 'translation'.
1590     * @see ModelElementFacade#translateConstraints(String translation)
1591     */
1592    public String[] translateConstraints(String translation)
1593    {
1594        return this.getSuperFrontEndView().translateConstraints(translation);
1595    }
1596
1597    /**
1598     * Translates the constraints of the specified 'kind' belonging to this model element.
1599     * @see ModelElementFacade#translateConstraints(String kind, String translation)
1600     */
1601    public String[] translateConstraints(String kind, String translation)
1602    {
1603        return this.getSuperFrontEndView().translateConstraints(kind, translation);
1604    }
1605
1606    /**
1607     * Events to which is being deferred in this action state.
1608     * @see StateFacade#getDeferrableEvents()
1609     */
1610    public Collection<EventFacade> getDeferrableEvents()
1611    {
1612        return this.getSuperFrontEndView().getDeferrableEvents();
1613    }
1614
1615    /**
1616     * Models a situation during which some (usually implicit) invariant condition holds. The states
1617     * of
1618     * protocol state machines are exposed to the users of their context classifiers. A protocol
1619     * state
1620     * represents an exposed stable situation of its context classifier: when an instance of the
1621     * classifier
1622     * is not processing any operation, users of this instance can always know its state
1623     * configuration.
1624     * @see org.andromda.metafacades.uml.StateVertexFacade#getContainer()
1625     */
1626    public StateFacade getContainer()
1627    {
1628        return this.getSuperFrontEndView().getContainer();
1629    }
1630
1631    /**
1632     * A directed relationship between a source vertex and a target vertex. It may be part of a
1633     * compound
1634     * transition, which takes the state machine from one state configuration to another,
1635     * representing the
1636     * complete response of the state machine to an occurrence of an event of a particular type.
1637     * @see org.andromda.metafacades.uml.StateVertexFacade#getIncomings()
1638     */
1639    public Collection<TransitionFacade> getIncomings()
1640    {
1641        return this.getSuperFrontEndView().getIncomings();
1642    }
1643
1644    /**
1645     * A directed relationship between a source vertex and a target vertex. It may be part of a
1646     * compound
1647     * transition, which takes the state machine from one state configuration to another,
1648     * representing the
1649     * complete response of the state machine to an occurrence of an event of a particular type.
1650     * @see org.andromda.metafacades.uml.StateVertexFacade#getOutgoings()
1651     */
1652    public Collection<TransitionFacade> getOutgoings()
1653    {
1654        return this.getSuperFrontEndView().getOutgoings();
1655    }
1656
1657    /**
1658     * The partition (if any) to which this vertex belongs.
1659     * @see org.andromda.metafacades.uml.StateVertexFacade#getPartition()
1660     */
1661    public PartitionFacade getPartition()
1662    {
1663        return this.getSuperFrontEndView().getPartition();
1664    }
1665
1666    /**
1667     * State machines can be used to express the behavior of part of a system. Behavior is modeled
1668     * as a
1669     * traversal of a graph of state nodes interconnected by one or more joined transition arcs that
1670     * are
1671     * triggered by the dispatching of series of (event) occurrences. During this traversal, the
1672     * state
1673     * machine executes a series of activities associated with various elements of the state
1674     * machine.
1675     * @see org.andromda.metafacades.uml.StateVertexFacade#getStateMachine()
1676     */
1677    public StateMachineFacade getStateMachine()
1678    {
1679        return this.getSuperFrontEndView().getStateMachine();
1680    }
1681
1682    /**
1683     * @see MetafacadeBase#initialize()
1684     */
1685    @Override
1686    public void initialize()
1687    {
1688        this.getSuperFrontEndView().initialize();
1689    }
1690
1691    /**
1692     * @return Object getSuperFrontEndView().getValidationOwner()
1693     * @see MetafacadeBase#getValidationOwner()
1694     */
1695    @Override
1696    public Object getValidationOwner()
1697    {
1698        Object owner = this.getSuperFrontEndView().getValidationOwner();
1699        return owner;
1700    }
1701
1702    /**
1703     * @return String getSuperFrontEndView().getValidationName()
1704     * @see MetafacadeBase#getValidationName()
1705     */
1706    @Override
1707    public String getValidationName()
1708    {
1709        String name = this.getSuperFrontEndView().getValidationName();
1710        return name;
1711    }
1712
1713    /**
1714     * <p><b>Constraint:</b> org::andromda::cartridges::jsf2::metafacades::JSFView::duplicate view action names not allowed</p>
1715     * <p><b>Error:</b> Each view must contain actions which each have a unique name, this view has actions with duplicate names or names that cause an action name to be duplicated in faces-config.xml.</p>
1716     * <p><b>OCL:</b> context JSFView inv: actions->isUnique(name)</p>
1717     * @param validationMessages Collection<ModelValidationMessage>
1718     * @see MetafacadeBase#validateInvariants(Collection validationMessages)
1719     */
1720    @Override
1721    public void validateInvariants(Collection<ModelValidationMessage> validationMessages)
1722    {
1723        this.getSuperFrontEndView().validateInvariants(validationMessages);
1724        try
1725        {
1726            final Object contextElement = this.THIS();
1727            boolean constraintValid = OCLResultEnsurer.ensure(OCLCollections.isUnique(OCLIntrospector.invoke(contextElement,"actions"),new Transformer(){public Object transform(Object object){return OCLIntrospector.invoke(object,"name");}}));
1728            if (!constraintValid)
1729            {
1730                validationMessages.add(
1731                    new ModelValidationMessage(
1732                        (MetafacadeBase)contextElement ,
1733                        "org::andromda::cartridges::jsf2::metafacades::JSFView::duplicate view action names not allowed",
1734                        "Each view must contain actions which each have a unique name, this view has actions with duplicate names or names that cause an action name to be duplicated in faces-config.xml."));
1735            }
1736        }
1737        catch (Throwable th)
1738        {
1739            Throwable cause = th.getCause();
1740            int depth = 0; // Some throwables have infinite recursion
1741            while (cause != null && depth < 7)
1742            {
1743                th = cause;
1744                depth++;
1745            }
1746            logger.error("Error validating constraint 'org::andromda::cartridges::jsf2::metafacades::JSFView::duplicate view action names not allowed' ON "
1747                + this.THIS().toString() + ": " + th.getMessage(), th);
1748        }
1749    }
1750
1751    /**
1752     * The property that stores the name of the metafacade.
1753     */
1754    private static final String NAME_PROPERTY = "name";
1755    private static final String FQNAME_PROPERTY = "fullyQualifiedName";
1756
1757    /**
1758     * @see Object#toString()
1759     */
1760    @Override
1761    public String toString()
1762    {
1763        final StringBuilder toString = new StringBuilder(this.getClass().getName());
1764        toString.append("[");
1765        try
1766        {
1767            toString.append(Introspector.instance().getProperty(this, FQNAME_PROPERTY));
1768        }
1769        catch (final Throwable tryAgain)
1770        {
1771            try
1772            {
1773                toString.append(Introspector.instance().getProperty(this, NAME_PROPERTY));
1774            }
1775            catch (final Throwable ignore)
1776            {
1777                // - just ignore when the metafacade doesn't have a name or fullyQualifiedName property
1778            }
1779        }
1780        toString.append("]");
1781        return toString.toString();
1782    }
1783}