1
2
3
4
5 package org.andromda.cartridges.jsf.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.jsf.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 public final boolean isNeedsFileUpload()
664 {
665 boolean needsFileUpload18a = this.__needsFileUpload18a;
666 if (!this.__needsFileUpload18aSet)
667 {
668
669 needsFileUpload18a = handleIsNeedsFileUpload();
670
671 this.__needsFileUpload18a = needsFileUpload18a;
672 if (isMetafacadePropertyCachingEnabled())
673 {
674 this.__needsFileUpload18aSet = true;
675 }
676 }
677 return needsFileUpload18a;
678 }
679
680
681
682 private List<JSFForward> __getForwards1r;
683 private boolean __getForwards1rSet = false;
684
685
686
687
688
689 public final List<JSFForward> getForwards()
690 {
691 List<JSFForward> getForwards1r = this.__getForwards1r;
692 if (!this.__getForwards1rSet)
693 {
694
695 List result = handleGetForwards();
696 List shieldedResult = this.shieldedElements(result);
697 try
698 {
699 getForwards1r = (List<JSFForward>)shieldedResult;
700 }
701 catch (ClassCastException ex)
702 {
703
704 JSFViewLogic.logger.warn("incorrect metafacade cast for JSFViewLogic.getForwards List<JSFForward> " + result + ": " + shieldedResult);
705 }
706
707 this.__getForwards1r = getForwards1r;
708 if (isMetafacadePropertyCachingEnabled())
709 {
710 this.__getForwards1rSet = true;
711 }
712 }
713 return getForwards1r;
714 }
715
716
717
718
719
720 protected abstract List handleGetForwards();
721
722
723
724
725
726 public final List<JSFParameter> getBackingValueVariables()
727 {
728 List<JSFParameter> getBackingValueVariables2r = null;
729
730 List result = handleGetBackingValueVariables();
731 List shieldedResult = this.shieldedElements(result);
732 try
733 {
734 getBackingValueVariables2r = (List<JSFParameter>)shieldedResult;
735 }
736 catch (ClassCastException ex)
737 {
738
739 JSFViewLogic.logger.warn("incorrect metafacade cast for JSFViewLogic.getBackingValueVariables List<JSFParameter> " + result + ": " + shieldedResult);
740 }
741
742 return getBackingValueVariables2r;
743 }
744
745
746
747
748
749 protected abstract List handleGetBackingValueVariables();
750
751 private List<JSFAction> __getFormActions3r;
752 private boolean __getFormActions3rSet = false;
753
754
755
756
757
758 public final List<JSFAction> getFormActions()
759 {
760 List<JSFAction> getFormActions3r = this.__getFormActions3r;
761 if (!this.__getFormActions3rSet)
762 {
763
764 List result = handleGetFormActions();
765 List shieldedResult = this.shieldedElements(result);
766 try
767 {
768 getFormActions3r = (List<JSFAction>)shieldedResult;
769 }
770 catch (ClassCastException ex)
771 {
772
773 JSFViewLogic.logger.warn("incorrect metafacade cast for JSFViewLogic.getFormActions List<JSFAction> " + result + ": " + shieldedResult);
774 }
775
776 this.__getFormActions3r = getFormActions3r;
777 if (isMetafacadePropertyCachingEnabled())
778 {
779 this.__getFormActions3rSet = true;
780 }
781 }
782 return getFormActions3r;
783 }
784
785
786
787
788
789 protected abstract List handleGetFormActions();
790
791 private List<JSFAction> __getActionForwards4r;
792 private boolean __getActionForwards4rSet = false;
793
794
795
796
797
798 public final List<JSFAction> getActionForwards()
799 {
800 List<JSFAction> getActionForwards4r = this.__getActionForwards4r;
801 if (!this.__getActionForwards4rSet)
802 {
803
804 List result = handleGetActionForwards();
805 List shieldedResult = this.shieldedElements(result);
806 try
807 {
808 getActionForwards4r = (List<JSFAction>)shieldedResult;
809 }
810 catch (ClassCastException ex)
811 {
812
813 JSFViewLogic.logger.warn("incorrect metafacade cast for JSFViewLogic.getActionForwards List<JSFAction> " + result + ": " + shieldedResult);
814 }
815
816 this.__getActionForwards4r = getActionForwards4r;
817 if (isMetafacadePropertyCachingEnabled())
818 {
819 this.__getActionForwards4rSet = true;
820 }
821 }
822 return getActionForwards4r;
823 }
824
825
826
827
828
829 protected abstract List handleGetActionForwards();
830
831
832
833
834
835 public boolean isFrontEndViewMetaType()
836 {
837 return true;
838 }
839
840
841
842
843
844 public boolean isFrontEndActionStateMetaType()
845 {
846 return true;
847 }
848
849
850
851
852
853 public boolean isActionStateFacadeMetaType()
854 {
855 return true;
856 }
857
858
859
860
861
862 public boolean isStateFacadeMetaType()
863 {
864 return true;
865 }
866
867
868
869
870
871 public boolean isStateVertexFacadeMetaType()
872 {
873 return true;
874 }
875
876
877
878
879
880 public boolean isModelElementFacadeMetaType()
881 {
882 return true;
883 }
884
885
886
887
888
889
890 public ActionFacade getEntry()
891 {
892 return this.getSuperFrontEndView().getEntry();
893 }
894
895
896
897
898
899 public String getActionMethodName()
900 {
901 return this.getSuperFrontEndView().getActionMethodName();
902 }
903
904
905
906
907
908 public List<FrontEndAction> getContainerActions()
909 {
910 return this.getSuperFrontEndView().getContainerActions();
911 }
912
913
914
915
916
917 public List<OperationFacade> getControllerCalls()
918 {
919 return this.getSuperFrontEndView().getControllerCalls();
920 }
921
922
923
924
925
926 public List<FrontEndExceptionHandler> getExceptions()
927 {
928 return this.getSuperFrontEndView().getExceptions();
929 }
930
931
932
933
934
935
936 public FrontEndForward getForward()
937 {
938 return this.getSuperFrontEndView().getForward();
939 }
940
941
942
943
944
945 public List<OperationFacade> getServiceCalls()
946 {
947 return this.getSuperFrontEndView().getServiceCalls();
948 }
949
950
951
952
953
954 public boolean isContainedInFrontEndUseCase()
955 {
956 return this.getSuperFrontEndView().isContainedInFrontEndUseCase();
957 }
958
959
960
961
962
963
964 public boolean isServerSide()
965 {
966 return this.getSuperFrontEndView().isServerSide();
967 }
968
969
970
971
972
973 public List<FrontEndAction> getActions()
974 {
975 return this.getSuperFrontEndView().getActions();
976 }
977
978
979
980
981
982 public List<FrontEndParameter> getAllActionParameters()
983 {
984 return this.getSuperFrontEndView().getAllActionParameters();
985 }
986
987
988
989
990
991 public List<FrontEndParameter> getAllFormFields()
992 {
993 return this.getSuperFrontEndView().getAllFormFields();
994 }
995
996
997
998
999
1000 public List<FrontEndParameter> getTables()
1001 {
1002 return this.getSuperFrontEndView().getTables();
1003 }
1004
1005
1006
1007
1008
1009 public FrontEndUseCase getUseCase()
1010 {
1011 return this.getSuperFrontEndView().getUseCase();
1012 }
1013
1014
1015
1016
1017
1018
1019 public List<FrontEndParameter> getVariables()
1020 {
1021 return this.getSuperFrontEndView().getVariables();
1022 }
1023
1024
1025
1026
1027
1028 public boolean isFrontEndView()
1029 {
1030 return this.getSuperFrontEndView().isFrontEndView();
1031 }
1032
1033
1034
1035
1036
1037 public void copyTaggedValues(ModelElementFacade element)
1038 {
1039 this.getSuperFrontEndView().copyTaggedValues(element);
1040 }
1041
1042
1043
1044
1045
1046
1047 public Object findTaggedValue(String tagName)
1048 {
1049 return this.getSuperFrontEndView().findTaggedValue(tagName);
1050 }
1051
1052
1053
1054
1055
1056
1057 public Collection<Object> findTaggedValues(String tagName)
1058 {
1059 return this.getSuperFrontEndView().findTaggedValues(tagName);
1060 }
1061
1062
1063
1064
1065
1066
1067
1068 public String getBindedFullyQualifiedName(ModelElementFacade bindedElement)
1069 {
1070 return this.getSuperFrontEndView().getBindedFullyQualifiedName(bindedElement);
1071 }
1072
1073
1074
1075
1076
1077 public Collection<ConstraintFacade> getConstraints()
1078 {
1079 return this.getSuperFrontEndView().getConstraints();
1080 }
1081
1082
1083
1084
1085
1086
1087 public Collection<ConstraintFacade> getConstraints(String kind)
1088 {
1089 return this.getSuperFrontEndView().getConstraints(kind);
1090 }
1091
1092
1093
1094
1095
1096
1097
1098 public String getDocumentation(String indent)
1099 {
1100 return this.getSuperFrontEndView().getDocumentation(indent);
1101 }
1102
1103
1104
1105
1106
1107
1108
1109
1110 public String getDocumentation(String indent, int lineLength)
1111 {
1112 return this.getSuperFrontEndView().getDocumentation(indent, lineLength);
1113 }
1114
1115
1116
1117
1118
1119
1120
1121 public String getDocumentation(String indent, int lineLength, boolean htmlStyle)
1122 {
1123 return this.getSuperFrontEndView().getDocumentation(indent, lineLength, htmlStyle);
1124 }
1125
1126
1127
1128
1129
1130 public String getFullyQualifiedName()
1131 {
1132 return this.getSuperFrontEndView().getFullyQualifiedName();
1133 }
1134
1135
1136
1137
1138
1139
1140
1141
1142 public String getFullyQualifiedName(boolean modelName)
1143 {
1144 return this.getSuperFrontEndView().getFullyQualifiedName(modelName);
1145 }
1146
1147
1148
1149
1150
1151
1152 public String getFullyQualifiedNamePath()
1153 {
1154 return this.getSuperFrontEndView().getFullyQualifiedNamePath();
1155 }
1156
1157
1158
1159
1160
1161 public String getId()
1162 {
1163 return this.getSuperFrontEndView().getId();
1164 }
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174 public Collection<String> getKeywords()
1175 {
1176 return this.getSuperFrontEndView().getKeywords();
1177 }
1178
1179
1180
1181
1182
1183 public String getLabel()
1184 {
1185 return this.getSuperFrontEndView().getLabel();
1186 }
1187
1188
1189
1190
1191
1192 public TypeMappings getLanguageMappings()
1193 {
1194 return this.getSuperFrontEndView().getLanguageMappings();
1195 }
1196
1197
1198
1199
1200
1201
1202 public ModelFacade getModel()
1203 {
1204 return this.getSuperFrontEndView().getModel();
1205 }
1206
1207
1208
1209
1210
1211 public String getName()
1212 {
1213 return this.getSuperFrontEndView().getName();
1214 }
1215
1216
1217
1218
1219
1220 public ModelElementFacade getPackage()
1221 {
1222 return this.getSuperFrontEndView().getPackage();
1223 }
1224
1225
1226
1227
1228
1229 public String getPackageName()
1230 {
1231 return this.getSuperFrontEndView().getPackageName();
1232 }
1233
1234
1235
1236
1237
1238
1239 public String getPackageName(boolean modelName)
1240 {
1241 return this.getSuperFrontEndView().getPackageName(modelName);
1242 }
1243
1244
1245
1246
1247
1248 public String getPackagePath()
1249 {
1250 return this.getSuperFrontEndView().getPackagePath();
1251 }
1252
1253
1254
1255
1256
1257
1258
1259
1260 public String getQualifiedName()
1261 {
1262 return this.getSuperFrontEndView().getQualifiedName();
1263 }
1264
1265
1266
1267
1268
1269 public PackageFacade getRootPackage()
1270 {
1271 return this.getSuperFrontEndView().getRootPackage();
1272 }
1273
1274
1275
1276
1277
1278 public Collection<DependencyFacade> getSourceDependencies()
1279 {
1280 return this.getSuperFrontEndView().getSourceDependencies();
1281 }
1282
1283
1284
1285
1286
1287
1288 public StateMachineFacade getStateMachineContext()
1289 {
1290 return this.getSuperFrontEndView().getStateMachineContext();
1291 }
1292
1293
1294
1295
1296
1297 public Collection<String> getStereotypeNames()
1298 {
1299 return this.getSuperFrontEndView().getStereotypeNames();
1300 }
1301
1302
1303
1304
1305
1306 public Collection<StereotypeFacade> getStereotypes()
1307 {
1308 return this.getSuperFrontEndView().getStereotypes();
1309 }
1310
1311
1312
1313
1314
1315 public Collection<TaggedValueFacade> getTaggedValues()
1316 {
1317 return this.getSuperFrontEndView().getTaggedValues();
1318 }
1319
1320
1321
1322
1323
1324 public Collection<DependencyFacade> getTargetDependencies()
1325 {
1326 return this.getSuperFrontEndView().getTargetDependencies();
1327 }
1328
1329
1330
1331
1332
1333 public Object getTemplateParameter(String parameterName)
1334 {
1335 return this.getSuperFrontEndView().getTemplateParameter(parameterName);
1336 }
1337
1338
1339
1340
1341
1342 public Collection<TemplateParameterFacade> getTemplateParameters()
1343 {
1344 return this.getSuperFrontEndView().getTemplateParameters();
1345 }
1346
1347
1348
1349
1350
1351
1352 public String getVisibility()
1353 {
1354 return this.getSuperFrontEndView().getVisibility();
1355 }
1356
1357
1358
1359
1360
1361
1362 public boolean hasExactStereotype(String stereotypeName)
1363 {
1364 return this.getSuperFrontEndView().hasExactStereotype(stereotypeName);
1365 }
1366
1367
1368
1369
1370
1371
1372 public boolean hasKeyword(String keywordName)
1373 {
1374 return this.getSuperFrontEndView().hasKeyword(keywordName);
1375 }
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389 public boolean hasStereotype(String stereotypeName)
1390 {
1391 return this.getSuperFrontEndView().hasStereotype(stereotypeName);
1392 }
1393
1394
1395
1396
1397
1398
1399 public boolean isBindingDependenciesPresent()
1400 {
1401 return this.getSuperFrontEndView().isBindingDependenciesPresent();
1402 }
1403
1404
1405
1406
1407
1408 public boolean isConstraintsPresent()
1409 {
1410 return this.getSuperFrontEndView().isConstraintsPresent();
1411 }
1412
1413
1414
1415
1416
1417 public boolean isDocumentationPresent()
1418 {
1419 return this.getSuperFrontEndView().isDocumentationPresent();
1420 }
1421
1422
1423
1424
1425
1426 public boolean isReservedWord()
1427 {
1428 return this.getSuperFrontEndView().isReservedWord();
1429 }
1430
1431
1432
1433
1434
1435
1436 public boolean isTemplateParametersPresent()
1437 {
1438 return this.getSuperFrontEndView().isTemplateParametersPresent();
1439 }
1440
1441
1442
1443
1444
1445
1446
1447 public boolean isValidIdentifierName()
1448 {
1449 return this.getSuperFrontEndView().isValidIdentifierName();
1450 }
1451
1452
1453
1454
1455
1456
1457
1458 public String translateConstraint(String name, String translation)
1459 {
1460 return this.getSuperFrontEndView().translateConstraint(name, translation);
1461 }
1462
1463
1464
1465
1466
1467 public String[] translateConstraints(String translation)
1468 {
1469 return this.getSuperFrontEndView().translateConstraints(translation);
1470 }
1471
1472
1473
1474
1475
1476 public String[] translateConstraints(String kind, String translation)
1477 {
1478 return this.getSuperFrontEndView().translateConstraints(kind, translation);
1479 }
1480
1481
1482
1483
1484
1485 public Collection<EventFacade> getDeferrableEvents()
1486 {
1487 return this.getSuperFrontEndView().getDeferrableEvents();
1488 }
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501 public StateFacade getContainer()
1502 {
1503 return this.getSuperFrontEndView().getContainer();
1504 }
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514 public Collection<TransitionFacade> getIncomings()
1515 {
1516 return this.getSuperFrontEndView().getIncomings();
1517 }
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527 public Collection<TransitionFacade> getOutgoings()
1528 {
1529 return this.getSuperFrontEndView().getOutgoings();
1530 }
1531
1532
1533
1534
1535
1536 public PartitionFacade getPartition()
1537 {
1538 return this.getSuperFrontEndView().getPartition();
1539 }
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552 public StateMachineFacade getStateMachine()
1553 {
1554 return this.getSuperFrontEndView().getStateMachine();
1555 }
1556
1557
1558
1559
1560 @Override
1561 public void initialize()
1562 {
1563 this.getSuperFrontEndView().initialize();
1564 }
1565
1566
1567
1568
1569
1570 @Override
1571 public Object getValidationOwner()
1572 {
1573 Object owner = this.getSuperFrontEndView().getValidationOwner();
1574 return owner;
1575 }
1576
1577
1578
1579
1580
1581 @Override
1582 public String getValidationName()
1583 {
1584 String name = this.getSuperFrontEndView().getValidationName();
1585 return name;
1586 }
1587
1588
1589
1590
1591
1592
1593
1594
1595 @Override
1596 public void validateInvariants(Collection<ModelValidationMessage> validationMessages)
1597 {
1598 this.getSuperFrontEndView().validateInvariants(validationMessages);
1599 try
1600 {
1601 final Object contextElement = this.THIS();
1602 boolean constraintValid = OCLResultEnsurer.ensure(OCLCollections.isUnique(OCLIntrospector.invoke(contextElement,"actions"),new Transformer(){public Object transform(Object object){return OCLIntrospector.invoke(object,"name");}}));
1603 if (!constraintValid)
1604 {
1605 validationMessages.add(
1606 new ModelValidationMessage(
1607 (MetafacadeBase)contextElement ,
1608 "org::andromda::cartridges::jsf::metafacades::JSFView::duplicate view action names not allowed",
1609 "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."));
1610 }
1611 }
1612 catch (Throwable th)
1613 {
1614 Throwable cause = th.getCause();
1615 int depth = 0;
1616 while (cause != null && depth < 7)
1617 {
1618 th = cause;
1619 depth++;
1620 }
1621 logger.error("Error validating constraint 'org::andromda::cartridges::jsf::metafacades::JSFView::duplicate view action names not allowed' ON "
1622 + this.THIS().toString() + ": " + th.getMessage(), th);
1623 }
1624 }
1625
1626
1627
1628
1629 private static final String NAME_PROPERTY = "name";
1630 private static final String FQNAME_PROPERTY = "fullyQualifiedName";
1631
1632
1633
1634
1635 @Override
1636 public String toString()
1637 {
1638 final StringBuilder toString = new StringBuilder(this.getClass().getName());
1639 toString.append("[");
1640 try
1641 {
1642 toString.append(Introspector.instance().getProperty(this, FQNAME_PROPERTY));
1643 }
1644 catch (final Throwable tryAgain)
1645 {
1646 try
1647 {
1648 toString.append(Introspector.instance().getProperty(this, NAME_PROPERTY));
1649 }
1650 catch (final Throwable ignore)
1651 {
1652
1653 }
1654 }
1655 toString.append("]");
1656 return toString.toString();
1657 }
1658 }