1
2
3
4
5 package org.andromda.cartridges.jsf2.metafacades;
6
7 import java.util.Collection;
8 import java.util.List;
9 import org.andromda.core.common.Introspector;
10 import org.andromda.core.metafacade.MetafacadeBase;
11 import org.andromda.core.metafacade.MetafacadeFactory;
12 import org.andromda.core.metafacade.ModelValidationMessage;
13 import org.andromda.metafacades.uml.ActionFacade;
14 import org.andromda.metafacades.uml.ConstraintFacade;
15 import org.andromda.metafacades.uml.DependencyFacade;
16 import org.andromda.metafacades.uml.EventFacade;
17 import org.andromda.metafacades.uml.FrontEndAction;
18 import org.andromda.metafacades.uml.FrontEndExceptionHandler;
19 import org.andromda.metafacades.uml.FrontEndForward;
20 import org.andromda.metafacades.uml.FrontEndParameter;
21 import org.andromda.metafacades.uml.FrontEndUseCase;
22 import org.andromda.metafacades.uml.FrontEndView;
23 import org.andromda.metafacades.uml.ModelElementFacade;
24 import org.andromda.metafacades.uml.ModelFacade;
25 import org.andromda.metafacades.uml.OperationFacade;
26 import org.andromda.metafacades.uml.PackageFacade;
27 import org.andromda.metafacades.uml.PartitionFacade;
28 import org.andromda.metafacades.uml.StateFacade;
29 import org.andromda.metafacades.uml.StateMachineFacade;
30 import org.andromda.metafacades.uml.StereotypeFacade;
31 import org.andromda.metafacades.uml.TaggedValueFacade;
32 import org.andromda.metafacades.uml.TemplateParameterFacade;
33 import org.andromda.metafacades.uml.TransitionFacade;
34 import org.andromda.metafacades.uml.TypeMappings;
35 import org.andromda.translation.ocl.validation.OCLCollections;
36 import org.andromda.translation.ocl.validation.OCLIntrospector;
37 import org.andromda.translation.ocl.validation.OCLResultEnsurer;
38 import org.apache.commons.collections.Transformer;
39 import org.apache.log4j.Logger;
40
41
42
43
44
45
46
47 public abstract class JSFViewLogic
48 extends MetafacadeBase
49 implements JSFView
50 {
51
52
53
54
55 protected Object metaObject;
56
57
58
59
60
61 protected JSFViewLogic(Object metaObjectIn, String context)
62 {
63 super(metaObjectIn, getContext(context));
64 this.superFrontEndView =
65 (FrontEndView)
66 MetafacadeFactory.getInstance().createFacadeImpl(
67 "org.andromda.metafacades.uml.FrontEndView",
68 metaObjectIn,
69 getContext(context));
70 this.metaObject = metaObjectIn;
71 }
72
73
74
75
76 private static final Logger logger = Logger.getLogger(JSFViewLogic.class);
77
78
79
80
81
82
83 private static String getContext(String context)
84 {
85 if (context == null)
86 {
87 context = "org.andromda.cartridges.jsf2.metafacades.JSFView";
88 }
89 return context;
90 }
91
92 private FrontEndView superFrontEndView;
93 private boolean superFrontEndViewInitialized = false;
94
95
96
97
98
99 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
110
111
112
113 @Override
114 public void resetMetafacadeContext(String context)
115 {
116 if (!this.contextRoot)
117 {
118 context = getContext(context);
119 setMetafacadeContext (context);
120 if (this.superFrontEndViewInitialized)
121 {
122 ((MetafacadeBase)this.superFrontEndView).resetMetafacadeContext(context);
123 }
124 }
125 }
126
127
128
129
130
131 public boolean isJSFViewMetaType()
132 {
133 return true;
134 }
135
136
137
138
139
140
141
142 protected abstract String handleGetPath();
143
144 private String __path1a;
145 private boolean __path1aSet = false;
146
147
148
149
150
151 public final String getPath()
152 {
153 String path1a = this.__path1a;
154 if (!this.__path1aSet)
155 {
156
157 path1a = handleGetPath();
158
159 this.__path1a = path1a;
160 if (isMetafacadePropertyCachingEnabled())
161 {
162 this.__path1aSet = true;
163 }
164 }
165 return path1a;
166 }
167
168
169
170
171
172 protected abstract String handleGetTitleKey();
173
174 private String __titleKey2a;
175 private boolean __titleKey2aSet = false;
176
177
178
179
180
181 public final String getTitleKey()
182 {
183 String titleKey2a = this.__titleKey2a;
184 if (!this.__titleKey2aSet)
185 {
186
187 titleKey2a = handleGetTitleKey();
188
189 this.__titleKey2a = titleKey2a;
190 if (isMetafacadePropertyCachingEnabled())
191 {
192 this.__titleKey2aSet = true;
193 }
194 }
195 return titleKey2a;
196 }
197
198
199
200
201
202 protected abstract String handleGetTitleValue();
203
204 private String __titleValue3a;
205 private boolean __titleValue3aSet = false;
206
207
208
209
210
211 public final String getTitleValue()
212 {
213 String titleValue3a = this.__titleValue3a;
214 if (!this.__titleValue3aSet)
215 {
216
217 titleValue3a = handleGetTitleValue();
218
219 this.__titleValue3a = titleValue3a;
220 if (isMetafacadePropertyCachingEnabled())
221 {
222 this.__titleValue3aSet = true;
223 }
224 }
225 return titleValue3a;
226 }
227
228
229
230
231
232 protected abstract String handleGetMessageKey();
233
234 private String __messageKey4a;
235 private boolean __messageKey4aSet = false;
236
237
238
239
240
241 public final String getMessageKey()
242 {
243 String messageKey4a = this.__messageKey4a;
244 if (!this.__messageKey4aSet)
245 {
246
247 messageKey4a = handleGetMessageKey();
248
249 this.__messageKey4a = messageKey4a;
250 if (isMetafacadePropertyCachingEnabled())
251 {
252 this.__messageKey4aSet = true;
253 }
254 }
255 return messageKey4a;
256 }
257
258
259
260
261
262 protected abstract String handleGetDocumentationKey();
263
264 private String __documentationKey5a;
265 private boolean __documentationKey5aSet = false;
266
267
268
269
270
271 public final String getDocumentationKey()
272 {
273 String documentationKey5a = this.__documentationKey5a;
274 if (!this.__documentationKey5aSet)
275 {
276
277 documentationKey5a = handleGetDocumentationKey();
278
279 this.__documentationKey5a = documentationKey5a;
280 if (isMetafacadePropertyCachingEnabled())
281 {
282 this.__documentationKey5aSet = true;
283 }
284 }
285 return documentationKey5a;
286 }
287
288
289
290
291
292 protected abstract String handleGetDocumentationValue();
293
294 private String __documentationValue6a;
295 private boolean __documentationValue6aSet = false;
296
297
298
299
300
301 public final String getDocumentationValue()
302 {
303 String documentationValue6a = this.__documentationValue6a;
304 if (!this.__documentationValue6aSet)
305 {
306
307 documentationValue6a = handleGetDocumentationValue();
308
309 this.__documentationValue6a = documentationValue6a;
310 if (isMetafacadePropertyCachingEnabled())
311 {
312 this.__documentationValue6aSet = true;
313 }
314 }
315 return documentationValue6a;
316 }
317
318
319
320
321
322 protected abstract String handleGetMessageValue();
323
324 private String __messageValue7a;
325 private boolean __messageValue7aSet = false;
326
327
328
329
330
331 public final String getMessageValue()
332 {
333 String messageValue7a = this.__messageValue7a;
334 if (!this.__messageValue7aSet)
335 {
336
337 messageValue7a = handleGetMessageValue();
338
339 this.__messageValue7a = messageValue7a;
340 if (isMetafacadePropertyCachingEnabled())
341 {
342 this.__messageValue7aSet = true;
343 }
344 }
345 return messageValue7a;
346 }
347
348
349
350
351
352 protected abstract String handleGetFullyQualifiedPopulator();
353
354 private String __fullyQualifiedPopulator8a;
355 private boolean __fullyQualifiedPopulator8aSet = false;
356
357
358
359
360
361 public final String getFullyQualifiedPopulator()
362 {
363 String fullyQualifiedPopulator8a = this.__fullyQualifiedPopulator8a;
364 if (!this.__fullyQualifiedPopulator8aSet)
365 {
366
367 fullyQualifiedPopulator8a = handleGetFullyQualifiedPopulator();
368
369 this.__fullyQualifiedPopulator8a = fullyQualifiedPopulator8a;
370 if (isMetafacadePropertyCachingEnabled())
371 {
372 this.__fullyQualifiedPopulator8aSet = true;
373 }
374 }
375 return fullyQualifiedPopulator8a;
376 }
377
378
379
380
381
382 protected abstract String handleGetPopulator();
383
384 private String __populator9a;
385 private boolean __populator9aSet = false;
386
387
388
389
390
391 public final String getPopulator()
392 {
393 String populator9a = this.__populator9a;
394 if (!this.__populator9aSet)
395 {
396
397 populator9a = handleGetPopulator();
398
399 this.__populator9a = populator9a;
400 if (isMetafacadePropertyCachingEnabled())
401 {
402 this.__populator9aSet = true;
403 }
404 }
405 return populator9a;
406 }
407
408
409
410
411
412 protected abstract String handleGetPopulatorPath();
413
414 private String __populatorPath10a;
415 private boolean __populatorPath10aSet = false;
416
417
418
419
420
421 public final String getPopulatorPath()
422 {
423 String populatorPath10a = this.__populatorPath10a;
424 if (!this.__populatorPath10aSet)
425 {
426
427 populatorPath10a = handleGetPopulatorPath();
428
429 this.__populatorPath10a = populatorPath10a;
430 if (isMetafacadePropertyCachingEnabled())
431 {
432 this.__populatorPath10aSet = true;
433 }
434 }
435 return populatorPath10a;
436 }
437
438
439
440
441
442 protected abstract boolean handleIsPopulatorRequired();
443
444 private boolean __populatorRequired11a;
445 private boolean __populatorRequired11aSet = false;
446
447
448
449
450
451 public final boolean isPopulatorRequired()
452 {
453 boolean populatorRequired11a = this.__populatorRequired11a;
454 if (!this.__populatorRequired11aSet)
455 {
456
457 populatorRequired11a = handleIsPopulatorRequired();
458
459 this.__populatorRequired11a = populatorRequired11a;
460 if (isMetafacadePropertyCachingEnabled())
461 {
462 this.__populatorRequired11aSet = true;
463 }
464 }
465 return populatorRequired11a;
466 }
467
468
469
470
471
472 protected abstract boolean handleIsValidationRequired();
473
474 private boolean __validationRequired12a;
475 private boolean __validationRequired12aSet = false;
476
477
478
479
480
481
482 public final boolean isValidationRequired()
483 {
484 boolean validationRequired12a = this.__validationRequired12a;
485 if (!this.__validationRequired12aSet)
486 {
487
488 validationRequired12a = handleIsValidationRequired();
489
490 this.__validationRequired12a = validationRequired12a;
491 if (isMetafacadePropertyCachingEnabled())
492 {
493 this.__validationRequired12aSet = true;
494 }
495 }
496 return validationRequired12a;
497 }
498
499
500
501
502
503 protected abstract boolean handleIsPopup();
504
505 private boolean __popup13a;
506 private boolean __popup13aSet = false;
507
508
509
510
511
512 public final boolean isPopup()
513 {
514 boolean popup13a = this.__popup13a;
515 if (!this.__popup13aSet)
516 {
517
518 popup13a = handleIsPopup();
519
520 this.__popup13a = popup13a;
521 if (isMetafacadePropertyCachingEnabled())
522 {
523 this.__popup13aSet = true;
524 }
525 }
526 return popup13a;
527 }
528
529
530
531
532
533 protected abstract boolean handleIsNonTableVariablesPresent();
534
535 private boolean __nonTableVariablesPresent14a;
536 private boolean __nonTableVariablesPresent14aSet = false;
537
538
539
540
541
542 public final boolean isNonTableVariablesPresent()
543 {
544 boolean nonTableVariablesPresent14a = this.__nonTableVariablesPresent14a;
545 if (!this.__nonTableVariablesPresent14aSet)
546 {
547
548 nonTableVariablesPresent14a = handleIsNonTableVariablesPresent();
549
550 this.__nonTableVariablesPresent14a = nonTableVariablesPresent14a;
551 if (isMetafacadePropertyCachingEnabled())
552 {
553 this.__nonTableVariablesPresent14aSet = true;
554 }
555 }
556 return nonTableVariablesPresent14a;
557 }
558
559
560
561
562
563 protected abstract boolean handleIsHasNameOfUseCase();
564
565 private boolean __hasNameOfUseCase15a;
566 private boolean __hasNameOfUseCase15aSet = false;
567
568
569
570
571
572
573 public final boolean isHasNameOfUseCase()
574 {
575 boolean hasNameOfUseCase15a = this.__hasNameOfUseCase15a;
576 if (!this.__hasNameOfUseCase15aSet)
577 {
578
579 hasNameOfUseCase15a = handleIsHasNameOfUseCase();
580
581 this.__hasNameOfUseCase15a = hasNameOfUseCase15a;
582 if (isMetafacadePropertyCachingEnabled())
583 {
584 this.__hasNameOfUseCase15aSet = true;
585 }
586 }
587 return hasNameOfUseCase15a;
588 }
589
590
591
592
593
594 protected abstract String handleGetFormKey();
595
596 private String __formKey16a;
597 private boolean __formKey16aSet = false;
598
599
600
601
602
603 public final String getFormKey()
604 {
605 String formKey16a = this.__formKey16a;
606 if (!this.__formKey16aSet)
607 {
608
609 formKey16a = handleGetFormKey();
610
611 this.__formKey16a = formKey16a;
612 if (isMetafacadePropertyCachingEnabled())
613 {
614 this.__formKey16aSet = true;
615 }
616 }
617 return formKey16a;
618 }
619
620
621
622
623
624 protected abstract String handleGetFromOutcome();
625
626 private String __fromOutcome17a;
627 private boolean __fromOutcome17aSet = false;
628
629
630
631
632
633 public final String getFromOutcome()
634 {
635 String fromOutcome17a = this.__fromOutcome17a;
636 if (!this.__fromOutcome17aSet)
637 {
638
639 fromOutcome17a = handleGetFromOutcome();
640
641 this.__fromOutcome17a = fromOutcome17a;
642 if (isMetafacadePropertyCachingEnabled())
643 {
644 this.__fromOutcome17aSet = true;
645 }
646 }
647 return fromOutcome17a;
648 }
649
650
651
652
653
654 protected abstract boolean handleIsNeedsFileUpload();
655
656 private boolean __needsFileUpload18a;
657 private boolean __needsFileUpload18aSet = false;
658
659
660
661
662
663
664 public final boolean isNeedsFileUpload()
665 {
666 boolean needsFileUpload18a = this.__needsFileUpload18a;
667 if (!this.__needsFileUpload18aSet)
668 {
669
670 needsFileUpload18a = handleIsNeedsFileUpload();
671
672 this.__needsFileUpload18a = needsFileUpload18a;
673 if (isMetafacadePropertyCachingEnabled())
674 {
675 this.__needsFileUpload18aSet = true;
676 }
677 }
678 return needsFileUpload18a;
679 }
680
681
682
683
684
685 protected abstract String handleGetFullyQualifiedPageObjectClassPath();
686
687 private String __fullyQualifiedPageObjectClassPath19a;
688 private boolean __fullyQualifiedPageObjectClassPath19aSet = false;
689
690
691
692
693
694
695 public final String getFullyQualifiedPageObjectClassPath()
696 {
697 String fullyQualifiedPageObjectClassPath19a = this.__fullyQualifiedPageObjectClassPath19a;
698 if (!this.__fullyQualifiedPageObjectClassPath19aSet)
699 {
700
701 fullyQualifiedPageObjectClassPath19a = handleGetFullyQualifiedPageObjectClassPath();
702
703 this.__fullyQualifiedPageObjectClassPath19a = fullyQualifiedPageObjectClassPath19a;
704 if (isMetafacadePropertyCachingEnabled())
705 {
706 this.__fullyQualifiedPageObjectClassPath19aSet = true;
707 }
708 }
709 return fullyQualifiedPageObjectClassPath19a;
710 }
711
712
713
714
715
716 protected abstract String handleGetPageObjectClassName();
717
718 private String __pageObjectClassName20a;
719 private boolean __pageObjectClassName20aSet = false;
720
721
722
723
724
725
726 public final String getPageObjectClassName()
727 {
728 String pageObjectClassName20a = this.__pageObjectClassName20a;
729 if (!this.__pageObjectClassName20aSet)
730 {
731
732 pageObjectClassName20a = handleGetPageObjectClassName();
733
734 this.__pageObjectClassName20a = pageObjectClassName20a;
735 if (isMetafacadePropertyCachingEnabled())
736 {
737 this.__pageObjectClassName20aSet = true;
738 }
739 }
740 return pageObjectClassName20a;
741 }
742
743
744
745
746
747 protected abstract String handleGetPageObjectBeanName();
748
749 private String __pageObjectBeanName21a;
750 private boolean __pageObjectBeanName21aSet = false;
751
752
753
754
755
756
757 public final String getPageObjectBeanName()
758 {
759 String pageObjectBeanName21a = this.__pageObjectBeanName21a;
760 if (!this.__pageObjectBeanName21aSet)
761 {
762
763 pageObjectBeanName21a = handleGetPageObjectBeanName();
764
765 this.__pageObjectBeanName21a = pageObjectBeanName21a;
766 if (isMetafacadePropertyCachingEnabled())
767 {
768 this.__pageObjectBeanName21aSet = true;
769 }
770 }
771 return pageObjectBeanName21a;
772 }
773
774
775
776
777
778 protected abstract String handleGetFullyQualifiedPageObjectClassName();
779
780 private String __fullyQualifiedPageObjectClassName22a;
781 private boolean __fullyQualifiedPageObjectClassName22aSet = false;
782
783
784
785
786
787
788 public final String getFullyQualifiedPageObjectClassName()
789 {
790 String fullyQualifiedPageObjectClassName22a = this.__fullyQualifiedPageObjectClassName22a;
791 if (!this.__fullyQualifiedPageObjectClassName22aSet)
792 {
793
794 fullyQualifiedPageObjectClassName22a = handleGetFullyQualifiedPageObjectClassName();
795
796 this.__fullyQualifiedPageObjectClassName22a = fullyQualifiedPageObjectClassName22a;
797 if (isMetafacadePropertyCachingEnabled())
798 {
799 this.__fullyQualifiedPageObjectClassName22aSet = true;
800 }
801 }
802 return fullyQualifiedPageObjectClassName22a;
803 }
804
805
806
807 private List<JSFForward> __getForwards1r;
808 private boolean __getForwards1rSet = false;
809
810
811
812
813
814 public final List<JSFForward> getForwards()
815 {
816 List<JSFForward> getForwards1r = this.__getForwards1r;
817 if (!this.__getForwards1rSet)
818 {
819
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
829 JSFViewLogic.logger.warn("incorrect metafacade cast for JSFViewLogic.getForwards List<JSFForward> " + result + ": " + shieldedResult);
830 }
831
832 this.__getForwards1r = getForwards1r;
833 if (isMetafacadePropertyCachingEnabled())
834 {
835 this.__getForwards1rSet = true;
836 }
837 }
838 return getForwards1r;
839 }
840
841
842
843
844
845 protected abstract List handleGetForwards();
846
847
848
849
850
851 public final List<JSFParameter> getBackingValueVariables()
852 {
853 List<JSFParameter> getBackingValueVariables2r = null;
854
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
864 JSFViewLogic.logger.warn("incorrect metafacade cast for JSFViewLogic.getBackingValueVariables List<JSFParameter> " + result + ": " + shieldedResult);
865 }
866
867 return getBackingValueVariables2r;
868 }
869
870
871
872
873
874 protected abstract List handleGetBackingValueVariables();
875
876 private List<JSFAction> __getFormActions3r;
877 private boolean __getFormActions3rSet = false;
878
879
880
881
882
883 public final List<JSFAction> getFormActions()
884 {
885 List<JSFAction> getFormActions3r = this.__getFormActions3r;
886 if (!this.__getFormActions3rSet)
887 {
888
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
898 JSFViewLogic.logger.warn("incorrect metafacade cast for JSFViewLogic.getFormActions List<JSFAction> " + result + ": " + shieldedResult);
899 }
900
901 this.__getFormActions3r = getFormActions3r;
902 if (isMetafacadePropertyCachingEnabled())
903 {
904 this.__getFormActions3rSet = true;
905 }
906 }
907 return getFormActions3r;
908 }
909
910
911
912
913
914 protected abstract List handleGetFormActions();
915
916 private List<JSFAction> __getActionForwards4r;
917 private boolean __getActionForwards4rSet = false;
918
919
920
921
922
923 public final List<JSFAction> getActionForwards()
924 {
925 List<JSFAction> getActionForwards4r = this.__getActionForwards4r;
926 if (!this.__getActionForwards4rSet)
927 {
928
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
938 JSFViewLogic.logger.warn("incorrect metafacade cast for JSFViewLogic.getActionForwards List<JSFAction> " + result + ": " + shieldedResult);
939 }
940
941 this.__getActionForwards4r = getActionForwards4r;
942 if (isMetafacadePropertyCachingEnabled())
943 {
944 this.__getActionForwards4rSet = true;
945 }
946 }
947 return getActionForwards4r;
948 }
949
950
951
952
953
954 protected abstract List handleGetActionForwards();
955
956
957
958
959
960 public boolean isFrontEndViewMetaType()
961 {
962 return true;
963 }
964
965
966
967
968
969 public boolean isFrontEndActionStateMetaType()
970 {
971 return true;
972 }
973
974
975
976
977
978 public boolean isActionStateFacadeMetaType()
979 {
980 return true;
981 }
982
983
984
985
986
987 public boolean isStateFacadeMetaType()
988 {
989 return true;
990 }
991
992
993
994
995
996 public boolean isStateVertexFacadeMetaType()
997 {
998 return true;
999 }
1000
1001
1002
1003
1004
1005 public boolean isModelElementFacadeMetaType()
1006 {
1007 return true;
1008 }
1009
1010
1011
1012
1013
1014
1015 public ActionFacade getEntry()
1016 {
1017 return this.getSuperFrontEndView().getEntry();
1018 }
1019
1020
1021
1022
1023
1024 public String getActionMethodName()
1025 {
1026 return this.getSuperFrontEndView().getActionMethodName();
1027 }
1028
1029
1030
1031
1032
1033 public List<FrontEndAction> getContainerActions()
1034 {
1035 return this.getSuperFrontEndView().getContainerActions();
1036 }
1037
1038
1039
1040
1041
1042 public List<OperationFacade> getControllerCalls()
1043 {
1044 return this.getSuperFrontEndView().getControllerCalls();
1045 }
1046
1047
1048
1049
1050
1051 public List<FrontEndExceptionHandler> getExceptions()
1052 {
1053 return this.getSuperFrontEndView().getExceptions();
1054 }
1055
1056
1057
1058
1059
1060
1061 public FrontEndForward getForward()
1062 {
1063 return this.getSuperFrontEndView().getForward();
1064 }
1065
1066
1067
1068
1069
1070 public List<OperationFacade> getServiceCalls()
1071 {
1072 return this.getSuperFrontEndView().getServiceCalls();
1073 }
1074
1075
1076
1077
1078
1079 public boolean isContainedInFrontEndUseCase()
1080 {
1081 return this.getSuperFrontEndView().isContainedInFrontEndUseCase();
1082 }
1083
1084
1085
1086
1087
1088
1089 public boolean isServerSide()
1090 {
1091 return this.getSuperFrontEndView().isServerSide();
1092 }
1093
1094
1095
1096
1097
1098 public List<FrontEndAction> getActions()
1099 {
1100 return this.getSuperFrontEndView().getActions();
1101 }
1102
1103
1104
1105
1106
1107 public List<FrontEndParameter> getAllActionParameters()
1108 {
1109 return this.getSuperFrontEndView().getAllActionParameters();
1110 }
1111
1112
1113
1114
1115
1116 public List<FrontEndParameter> getAllFormFields()
1117 {
1118 return this.getSuperFrontEndView().getAllFormFields();
1119 }
1120
1121
1122
1123
1124
1125 public List<FrontEndParameter> getTables()
1126 {
1127 return this.getSuperFrontEndView().getTables();
1128 }
1129
1130
1131
1132
1133
1134 public FrontEndUseCase getUseCase()
1135 {
1136 return this.getSuperFrontEndView().getUseCase();
1137 }
1138
1139
1140
1141
1142
1143
1144 public List<FrontEndParameter> getVariables()
1145 {
1146 return this.getSuperFrontEndView().getVariables();
1147 }
1148
1149
1150
1151
1152
1153 public boolean isFrontEndView()
1154 {
1155 return this.getSuperFrontEndView().isFrontEndView();
1156 }
1157
1158
1159
1160
1161
1162 public void copyTaggedValues(ModelElementFacade element)
1163 {
1164 this.getSuperFrontEndView().copyTaggedValues(element);
1165 }
1166
1167
1168
1169
1170
1171
1172 public Object findTaggedValue(String tagName)
1173 {
1174 return this.getSuperFrontEndView().findTaggedValue(tagName);
1175 }
1176
1177
1178
1179
1180
1181
1182 public Collection<Object> findTaggedValues(String tagName)
1183 {
1184 return this.getSuperFrontEndView().findTaggedValues(tagName);
1185 }
1186
1187
1188
1189
1190
1191
1192
1193 public String getBindedFullyQualifiedName(ModelElementFacade bindedElement)
1194 {
1195 return this.getSuperFrontEndView().getBindedFullyQualifiedName(bindedElement);
1196 }
1197
1198
1199
1200
1201
1202 public Collection<ConstraintFacade> getConstraints()
1203 {
1204 return this.getSuperFrontEndView().getConstraints();
1205 }
1206
1207
1208
1209
1210
1211
1212 public Collection<ConstraintFacade> getConstraints(String kind)
1213 {
1214 return this.getSuperFrontEndView().getConstraints(kind);
1215 }
1216
1217
1218
1219
1220
1221
1222
1223 public String getDocumentation(String indent)
1224 {
1225 return this.getSuperFrontEndView().getDocumentation(indent);
1226 }
1227
1228
1229
1230
1231
1232
1233
1234
1235 public String getDocumentation(String indent, int lineLength)
1236 {
1237 return this.getSuperFrontEndView().getDocumentation(indent, lineLength);
1238 }
1239
1240
1241
1242
1243
1244
1245
1246 public String getDocumentation(String indent, int lineLength, boolean htmlStyle)
1247 {
1248 return this.getSuperFrontEndView().getDocumentation(indent, lineLength, htmlStyle);
1249 }
1250
1251
1252
1253
1254
1255 public String getFullyQualifiedName()
1256 {
1257 return this.getSuperFrontEndView().getFullyQualifiedName();
1258 }
1259
1260
1261
1262
1263
1264
1265
1266
1267 public String getFullyQualifiedName(boolean modelName)
1268 {
1269 return this.getSuperFrontEndView().getFullyQualifiedName(modelName);
1270 }
1271
1272
1273
1274
1275
1276
1277 public String getFullyQualifiedNamePath()
1278 {
1279 return this.getSuperFrontEndView().getFullyQualifiedNamePath();
1280 }
1281
1282
1283
1284
1285
1286 public String getId()
1287 {
1288 return this.getSuperFrontEndView().getId();
1289 }
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299 public Collection<String> getKeywords()
1300 {
1301 return this.getSuperFrontEndView().getKeywords();
1302 }
1303
1304
1305
1306
1307
1308 public String getLabel()
1309 {
1310 return this.getSuperFrontEndView().getLabel();
1311 }
1312
1313
1314
1315
1316
1317 public TypeMappings getLanguageMappings()
1318 {
1319 return this.getSuperFrontEndView().getLanguageMappings();
1320 }
1321
1322
1323
1324
1325
1326
1327 public ModelFacade getModel()
1328 {
1329 return this.getSuperFrontEndView().getModel();
1330 }
1331
1332
1333
1334
1335
1336 public String getName()
1337 {
1338 return this.getSuperFrontEndView().getName();
1339 }
1340
1341
1342
1343
1344
1345 public ModelElementFacade getPackage()
1346 {
1347 return this.getSuperFrontEndView().getPackage();
1348 }
1349
1350
1351
1352
1353
1354 public String getPackageName()
1355 {
1356 return this.getSuperFrontEndView().getPackageName();
1357 }
1358
1359
1360
1361
1362
1363
1364 public String getPackageName(boolean modelName)
1365 {
1366 return this.getSuperFrontEndView().getPackageName(modelName);
1367 }
1368
1369
1370
1371
1372
1373 public String getPackagePath()
1374 {
1375 return this.getSuperFrontEndView().getPackagePath();
1376 }
1377
1378
1379
1380
1381
1382
1383
1384
1385 public String getQualifiedName()
1386 {
1387 return this.getSuperFrontEndView().getQualifiedName();
1388 }
1389
1390
1391
1392
1393
1394 public PackageFacade getRootPackage()
1395 {
1396 return this.getSuperFrontEndView().getRootPackage();
1397 }
1398
1399
1400
1401
1402
1403 public Collection<DependencyFacade> getSourceDependencies()
1404 {
1405 return this.getSuperFrontEndView().getSourceDependencies();
1406 }
1407
1408
1409
1410
1411
1412
1413 public StateMachineFacade getStateMachineContext()
1414 {
1415 return this.getSuperFrontEndView().getStateMachineContext();
1416 }
1417
1418
1419
1420
1421
1422 public Collection<String> getStereotypeNames()
1423 {
1424 return this.getSuperFrontEndView().getStereotypeNames();
1425 }
1426
1427
1428
1429
1430
1431 public Collection<StereotypeFacade> getStereotypes()
1432 {
1433 return this.getSuperFrontEndView().getStereotypes();
1434 }
1435
1436
1437
1438
1439
1440 public Collection<TaggedValueFacade> getTaggedValues()
1441 {
1442 return this.getSuperFrontEndView().getTaggedValues();
1443 }
1444
1445
1446
1447
1448
1449 public Collection<DependencyFacade> getTargetDependencies()
1450 {
1451 return this.getSuperFrontEndView().getTargetDependencies();
1452 }
1453
1454
1455
1456
1457
1458 public Object getTemplateParameter(String parameterName)
1459 {
1460 return this.getSuperFrontEndView().getTemplateParameter(parameterName);
1461 }
1462
1463
1464
1465
1466
1467 public Collection<TemplateParameterFacade> getTemplateParameters()
1468 {
1469 return this.getSuperFrontEndView().getTemplateParameters();
1470 }
1471
1472
1473
1474
1475
1476
1477 public String getVisibility()
1478 {
1479 return this.getSuperFrontEndView().getVisibility();
1480 }
1481
1482
1483
1484
1485
1486
1487 public boolean hasExactStereotype(String stereotypeName)
1488 {
1489 return this.getSuperFrontEndView().hasExactStereotype(stereotypeName);
1490 }
1491
1492
1493
1494
1495
1496
1497 public boolean hasKeyword(String keywordName)
1498 {
1499 return this.getSuperFrontEndView().hasKeyword(keywordName);
1500 }
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514 public boolean hasStereotype(String stereotypeName)
1515 {
1516 return this.getSuperFrontEndView().hasStereotype(stereotypeName);
1517 }
1518
1519
1520
1521
1522
1523
1524 public boolean isBindingDependenciesPresent()
1525 {
1526 return this.getSuperFrontEndView().isBindingDependenciesPresent();
1527 }
1528
1529
1530
1531
1532
1533 public boolean isConstraintsPresent()
1534 {
1535 return this.getSuperFrontEndView().isConstraintsPresent();
1536 }
1537
1538
1539
1540
1541
1542 public boolean isDocumentationPresent()
1543 {
1544 return this.getSuperFrontEndView().isDocumentationPresent();
1545 }
1546
1547
1548
1549
1550
1551 public boolean isReservedWord()
1552 {
1553 return this.getSuperFrontEndView().isReservedWord();
1554 }
1555
1556
1557
1558
1559
1560
1561 public boolean isTemplateParametersPresent()
1562 {
1563 return this.getSuperFrontEndView().isTemplateParametersPresent();
1564 }
1565
1566
1567
1568
1569
1570
1571
1572 public boolean isValidIdentifierName()
1573 {
1574 return this.getSuperFrontEndView().isValidIdentifierName();
1575 }
1576
1577
1578
1579
1580
1581
1582
1583 public String translateConstraint(String name, String translation)
1584 {
1585 return this.getSuperFrontEndView().translateConstraint(name, translation);
1586 }
1587
1588
1589
1590
1591
1592 public String[] translateConstraints(String translation)
1593 {
1594 return this.getSuperFrontEndView().translateConstraints(translation);
1595 }
1596
1597
1598
1599
1600
1601 public String[] translateConstraints(String kind, String translation)
1602 {
1603 return this.getSuperFrontEndView().translateConstraints(kind, translation);
1604 }
1605
1606
1607
1608
1609
1610 public Collection<EventFacade> getDeferrableEvents()
1611 {
1612 return this.getSuperFrontEndView().getDeferrableEvents();
1613 }
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626 public StateFacade getContainer()
1627 {
1628 return this.getSuperFrontEndView().getContainer();
1629 }
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639 public Collection<TransitionFacade> getIncomings()
1640 {
1641 return this.getSuperFrontEndView().getIncomings();
1642 }
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652 public Collection<TransitionFacade> getOutgoings()
1653 {
1654 return this.getSuperFrontEndView().getOutgoings();
1655 }
1656
1657
1658
1659
1660
1661 public PartitionFacade getPartition()
1662 {
1663 return this.getSuperFrontEndView().getPartition();
1664 }
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677 public StateMachineFacade getStateMachine()
1678 {
1679 return this.getSuperFrontEndView().getStateMachine();
1680 }
1681
1682
1683
1684
1685 @Override
1686 public void initialize()
1687 {
1688 this.getSuperFrontEndView().initialize();
1689 }
1690
1691
1692
1693
1694
1695 @Override
1696 public Object getValidationOwner()
1697 {
1698 Object owner = this.getSuperFrontEndView().getValidationOwner();
1699 return owner;
1700 }
1701
1702
1703
1704
1705
1706 @Override
1707 public String getValidationName()
1708 {
1709 String name = this.getSuperFrontEndView().getValidationName();
1710 return name;
1711 }
1712
1713
1714
1715
1716
1717
1718
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;
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
1753
1754 private static final String NAME_PROPERTY = "name";
1755 private static final String FQNAME_PROPERTY = "fullyQualifiedName";
1756
1757
1758
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
1778 }
1779 }
1780 toString.append("]");
1781 return toString.toString();
1782 }
1783 }