1
2
3
4
5 package org.andromda.cartridges.bpm4struts.metafacades;
6
7 import java.util.Collection;
8 import org.andromda.core.common.Introspector;
9 import org.andromda.core.metafacade.MetafacadeBase;
10 import org.andromda.core.metafacade.MetafacadeFactory;
11 import org.andromda.core.metafacade.ModelValidationMessage;
12 import org.andromda.metafacades.uml.ClassifierFacade;
13 import org.andromda.metafacades.uml.ConstraintFacade;
14 import org.andromda.metafacades.uml.DependencyFacade;
15 import org.andromda.metafacades.uml.EnumerationFacade;
16 import org.andromda.metafacades.uml.ManageableEntityAttribute;
17 import org.andromda.metafacades.uml.ModelElementFacade;
18 import org.andromda.metafacades.uml.ModelFacade;
19 import org.andromda.metafacades.uml.PackageFacade;
20 import org.andromda.metafacades.uml.StateMachineFacade;
21 import org.andromda.metafacades.uml.StereotypeFacade;
22 import org.andromda.metafacades.uml.TaggedValueFacade;
23 import org.andromda.metafacades.uml.TemplateParameterFacade;
24 import org.andromda.metafacades.uml.TypeMappings;
25 import org.andromda.translation.ocl.validation.OCLCollections;
26 import org.andromda.translation.ocl.validation.OCLExpressions;
27 import org.andromda.translation.ocl.validation.OCLIntrospector;
28 import org.andromda.translation.ocl.validation.OCLResultEnsurer;
29 import org.apache.log4j.Logger;
30
31
32
33
34
35
36
37
38 public abstract class StrutsManageableEntityAttributeLogic
39 extends MetafacadeBase
40 implements StrutsManageableEntityAttribute
41 {
42
43
44
45
46 protected Object metaObject;
47
48
49
50
51
52 protected StrutsManageableEntityAttributeLogic(Object metaObjectIn, String context)
53 {
54 super(metaObjectIn, getContext(context));
55 this.superManageableEntityAttribute =
56 (ManageableEntityAttribute)
57 MetafacadeFactory.getInstance().createFacadeImpl(
58 "org.andromda.metafacades.uml.ManageableEntityAttribute",
59 metaObjectIn,
60 getContext(context));
61 this.metaObject = metaObjectIn;
62 }
63
64
65
66
67 private static final Logger logger = Logger.getLogger(StrutsManageableEntityAttributeLogic.class);
68
69
70
71
72
73
74 private static String getContext(String context)
75 {
76 if (context == null)
77 {
78 context = "org.andromda.cartridges.bpm4struts.metafacades.StrutsManageableEntityAttribute";
79 }
80 return context;
81 }
82
83 private ManageableEntityAttribute superManageableEntityAttribute;
84 private boolean superManageableEntityAttributeInitialized = false;
85
86
87
88
89
90 private ManageableEntityAttribute getSuperManageableEntityAttribute()
91 {
92 if (!this.superManageableEntityAttributeInitialized)
93 {
94 ((MetafacadeBase)this.superManageableEntityAttribute).setMetafacadeContext(this.getMetafacadeContext());
95 this.superManageableEntityAttributeInitialized = true;
96 }
97 return this.superManageableEntityAttribute;
98 }
99
100
101
102
103
104 @Override
105 public void resetMetafacadeContext(String context)
106 {
107 if (!this.contextRoot)
108 {
109 context = getContext(context);
110 setMetafacadeContext (context);
111 if (this.superManageableEntityAttributeInitialized)
112 {
113 ((MetafacadeBase)this.superManageableEntityAttribute).resetMetafacadeContext(context);
114 }
115 }
116 }
117
118
119
120
121
122 public boolean isStrutsManageableEntityAttributeMetaType()
123 {
124 return true;
125 }
126
127
128
129
130
131
132
133 protected abstract String handleGetMessageKey();
134
135 private String __messageKey1a;
136 private boolean __messageKey1aSet = false;
137
138
139
140
141
142
143 public final String getMessageKey()
144 {
145 String messageKey1a = this.__messageKey1a;
146 if (!this.__messageKey1aSet)
147 {
148
149 messageKey1a = handleGetMessageKey();
150
151 this.__messageKey1a = messageKey1a;
152 if (isMetafacadePropertyCachingEnabled())
153 {
154 this.__messageKey1aSet = true;
155 }
156 }
157 return messageKey1a;
158 }
159
160
161
162
163
164 protected abstract String handleGetMessageValue();
165
166 private String __messageValue2a;
167 private boolean __messageValue2aSet = false;
168
169
170
171
172
173
174 public final String getMessageValue()
175 {
176 String messageValue2a = this.__messageValue2a;
177 if (!this.__messageValue2aSet)
178 {
179
180 messageValue2a = handleGetMessageValue();
181
182 this.__messageValue2a = messageValue2a;
183 if (isMetafacadePropertyCachingEnabled())
184 {
185 this.__messageValue2aSet = true;
186 }
187 }
188 return messageValue2a;
189 }
190
191
192
193
194
195 protected abstract String handleGetDateFormat();
196
197 private String __dateFormat3a;
198 private boolean __dateFormat3aSet = false;
199
200
201
202
203
204
205 public final String getDateFormat()
206 {
207 String dateFormat3a = this.__dateFormat3a;
208 if (!this.__dateFormat3aSet)
209 {
210
211 dateFormat3a = handleGetDateFormat();
212
213 this.__dateFormat3a = dateFormat3a;
214 if (isMetafacadePropertyCachingEnabled())
215 {
216 this.__dateFormat3aSet = true;
217 }
218 }
219 return dateFormat3a;
220 }
221
222
223
224
225
226 protected abstract boolean handleIsNeedsFileUpload();
227
228 private boolean __needsFileUpload4a;
229 private boolean __needsFileUpload4aSet = false;
230
231
232
233
234
235
236 public final boolean isNeedsFileUpload()
237 {
238 boolean needsFileUpload4a = this.__needsFileUpload4a;
239 if (!this.__needsFileUpload4aSet)
240 {
241
242 needsFileUpload4a = handleIsNeedsFileUpload();
243
244 this.__needsFileUpload4a = needsFileUpload4a;
245 if (isMetafacadePropertyCachingEnabled())
246 {
247 this.__needsFileUpload4aSet = true;
248 }
249 }
250 return needsFileUpload4a;
251 }
252
253
254
255
256
257 protected abstract boolean handleIsHidden();
258
259 private boolean __hidden5a;
260 private boolean __hidden5aSet = false;
261
262
263
264
265
266 public final boolean isHidden()
267 {
268 boolean hidden5a = this.__hidden5a;
269 if (!this.__hidden5aSet)
270 {
271
272 hidden5a = handleIsHidden();
273
274 this.__hidden5a = hidden5a;
275 if (isMetafacadePropertyCachingEnabled())
276 {
277 this.__hidden5aSet = true;
278 }
279 }
280 return hidden5a;
281 }
282
283
284
285
286
287 protected abstract String handleGetWidgetType();
288
289 private String __widgetType6a;
290 private boolean __widgetType6aSet = false;
291
292
293
294
295
296 public final String getWidgetType()
297 {
298 String widgetType6a = this.__widgetType6a;
299 if (!this.__widgetType6aSet)
300 {
301
302 widgetType6a = handleGetWidgetType();
303
304 this.__widgetType6a = widgetType6a;
305 if (isMetafacadePropertyCachingEnabled())
306 {
307 this.__widgetType6aSet = true;
308 }
309 }
310 return widgetType6a;
311 }
312
313
314
315
316
317 protected abstract boolean handleIsStrictDateFormat();
318
319 private boolean __strictDateFormat7a;
320 private boolean __strictDateFormat7aSet = false;
321
322
323
324
325
326 public final boolean isStrictDateFormat()
327 {
328 boolean strictDateFormat7a = this.__strictDateFormat7a;
329 if (!this.__strictDateFormat7aSet)
330 {
331
332 strictDateFormat7a = handleIsStrictDateFormat();
333
334 this.__strictDateFormat7a = strictDateFormat7a;
335 if (isMetafacadePropertyCachingEnabled())
336 {
337 this.__strictDateFormat7aSet = true;
338 }
339 }
340 return strictDateFormat7a;
341 }
342
343
344
345
346
347 protected abstract Integer handleGetFieldRowCount();
348
349 private Integer __fieldRowCount8a;
350 private boolean __fieldRowCount8aSet = false;
351
352
353
354
355
356 public final Integer getFieldRowCount()
357 {
358 Integer fieldRowCount8a = this.__fieldRowCount8a;
359 if (!this.__fieldRowCount8aSet)
360 {
361
362 fieldRowCount8a = handleGetFieldRowCount();
363
364 this.__fieldRowCount8a = fieldRowCount8a;
365 if (isMetafacadePropertyCachingEnabled())
366 {
367 this.__fieldRowCount8aSet = true;
368 }
369 }
370 return fieldRowCount8a;
371 }
372
373
374
375
376
377 protected abstract Integer handleGetFieldColumnCount();
378
379 private Integer __fieldColumnCount9a;
380 private boolean __fieldColumnCount9aSet = false;
381
382
383
384
385
386 public final Integer getFieldColumnCount()
387 {
388 Integer fieldColumnCount9a = this.__fieldColumnCount9a;
389 if (!this.__fieldColumnCount9aSet)
390 {
391
392 fieldColumnCount9a = handleGetFieldColumnCount();
393
394 this.__fieldColumnCount9a = fieldColumnCount9a;
395 if (isMetafacadePropertyCachingEnabled())
396 {
397 this.__fieldColumnCount9aSet = true;
398 }
399 }
400 return fieldColumnCount9a;
401 }
402
403
404
405
406
407 protected abstract boolean handleIsSafeNamePresent();
408
409 private boolean __safeNamePresent10a;
410 private boolean __safeNamePresent10aSet = false;
411
412
413
414
415
416
417 public final boolean isSafeNamePresent()
418 {
419 boolean safeNamePresent10a = this.__safeNamePresent10a;
420 if (!this.__safeNamePresent10aSet)
421 {
422
423 safeNamePresent10a = handleIsSafeNamePresent();
424
425 this.__safeNamePresent10a = safeNamePresent10a;
426 if (isMetafacadePropertyCachingEnabled())
427 {
428 this.__safeNamePresent10aSet = true;
429 }
430 }
431 return safeNamePresent10a;
432 }
433
434
435
436
437
438 protected abstract String handleGetOnlineHelpKey();
439
440 private String __onlineHelpKey11a;
441 private boolean __onlineHelpKey11aSet = false;
442
443
444
445
446
447
448 public final String getOnlineHelpKey()
449 {
450 String onlineHelpKey11a = this.__onlineHelpKey11a;
451 if (!this.__onlineHelpKey11aSet)
452 {
453
454 onlineHelpKey11a = handleGetOnlineHelpKey();
455
456 this.__onlineHelpKey11a = onlineHelpKey11a;
457 if (isMetafacadePropertyCachingEnabled())
458 {
459 this.__onlineHelpKey11aSet = true;
460 }
461 }
462 return onlineHelpKey11a;
463 }
464
465
466
467
468
469 protected abstract String handleGetOnlineHelpValue();
470
471 private String __onlineHelpValue12a;
472 private boolean __onlineHelpValue12aSet = false;
473
474
475
476
477
478
479 public final String getOnlineHelpValue()
480 {
481 String onlineHelpValue12a = this.__onlineHelpValue12a;
482 if (!this.__onlineHelpValue12aSet)
483 {
484
485 onlineHelpValue12a = handleGetOnlineHelpValue();
486
487 this.__onlineHelpValue12a = onlineHelpValue12a;
488 if (isMetafacadePropertyCachingEnabled())
489 {
490 this.__onlineHelpValue12aSet = true;
491 }
492 }
493 return onlineHelpValue12a;
494 }
495
496
497
498
499
500 public boolean isManageableEntityAttributeMetaType()
501 {
502 return true;
503 }
504
505
506
507
508
509 public boolean isEntityAttributeMetaType()
510 {
511 return true;
512 }
513
514
515
516
517
518 public boolean isAttributeFacadeMetaType()
519 {
520 return true;
521 }
522
523
524
525
526
527 public boolean isModelElementFacadeMetaType()
528 {
529 return true;
530 }
531
532
533
534
535
536
537
538
539 public Object findTaggedValue(String name, boolean follow)
540 {
541 return this.getSuperManageableEntityAttribute().findTaggedValue(name, follow);
542 }
543
544
545
546
547
548 public String getDefaultValue()
549 {
550 return this.getSuperManageableEntityAttribute().getDefaultValue();
551 }
552
553
554
555
556
557
558 public EnumerationFacade getEnumeration()
559 {
560 return this.getSuperManageableEntityAttribute().getEnumeration();
561 }
562
563
564
565
566
567 public String getEnumerationLiteralParameters()
568 {
569 return this.getSuperManageableEntityAttribute().getEnumerationLiteralParameters();
570 }
571
572
573
574
575
576
577
578 public String getEnumerationValue()
579 {
580 return this.getSuperManageableEntityAttribute().getEnumerationValue();
581 }
582
583
584
585
586
587 public String getGetterName()
588 {
589 return this.getSuperManageableEntityAttribute().getGetterName();
590 }
591
592
593
594
595
596
597 public String getGetterSetterTypeName()
598 {
599 return this.getSuperManageableEntityAttribute().getGetterSetterTypeName();
600 }
601
602
603
604
605
606
607 public int getLower()
608 {
609 return this.getSuperManageableEntityAttribute().getLower();
610 }
611
612
613
614
615
616 public ClassifierFacade getOwner()
617 {
618 return this.getSuperManageableEntityAttribute().getOwner();
619 }
620
621
622
623
624
625 public String getSetterName()
626 {
627 return this.getSuperManageableEntityAttribute().getSetterName();
628 }
629
630
631
632
633
634 public ClassifierFacade getType()
635 {
636 return this.getSuperManageableEntityAttribute().getType();
637 }
638
639
640
641
642
643
644 public int getUpper()
645 {
646 return this.getSuperManageableEntityAttribute().getUpper();
647 }
648
649
650
651
652
653 public boolean isAddOnly()
654 {
655 return this.getSuperManageableEntityAttribute().isAddOnly();
656 }
657
658
659
660
661
662 public boolean isChangeable()
663 {
664 return this.getSuperManageableEntityAttribute().isChangeable();
665 }
666
667
668
669
670
671 public boolean isDefaultValuePresent()
672 {
673 return this.getSuperManageableEntityAttribute().isDefaultValuePresent();
674 }
675
676
677
678
679
680
681 public boolean isDerived()
682 {
683 return this.getSuperManageableEntityAttribute().isDerived();
684 }
685
686
687
688
689
690 public boolean isEnumerationLiteral()
691 {
692 return this.getSuperManageableEntityAttribute().isEnumerationLiteral();
693 }
694
695
696
697
698
699
700 public boolean isEnumerationLiteralParametersExist()
701 {
702 return this.getSuperManageableEntityAttribute().isEnumerationLiteralParametersExist();
703 }
704
705
706
707
708
709
710 public boolean isEnumerationMember()
711 {
712 return this.getSuperManageableEntityAttribute().isEnumerationMember();
713 }
714
715
716
717
718
719
720 public boolean isLeaf()
721 {
722 return this.getSuperManageableEntityAttribute().isLeaf();
723 }
724
725
726
727
728
729 public boolean isMany()
730 {
731 return this.getSuperManageableEntityAttribute().isMany();
732 }
733
734
735
736
737
738 public boolean isOrdered()
739 {
740 return this.getSuperManageableEntityAttribute().isOrdered();
741 }
742
743
744
745
746
747 public boolean isReadOnly()
748 {
749 return this.getSuperManageableEntityAttribute().isReadOnly();
750 }
751
752
753
754
755
756 public boolean isRequired()
757 {
758 return this.getSuperManageableEntityAttribute().isRequired();
759 }
760
761
762
763
764
765 public boolean isStatic()
766 {
767 return this.getSuperManageableEntityAttribute().isStatic();
768 }
769
770
771
772
773
774
775 public boolean isUnique()
776 {
777 return this.getSuperManageableEntityAttribute().isUnique();
778 }
779
780
781
782
783
784 public String getColumnIndex()
785 {
786 return this.getSuperManageableEntityAttribute().getColumnIndex();
787 }
788
789
790
791
792
793 public String getColumnLength()
794 {
795 return this.getSuperManageableEntityAttribute().getColumnLength();
796 }
797
798
799
800
801
802 public String getColumnName()
803 {
804 return this.getSuperManageableEntityAttribute().getColumnName();
805 }
806
807
808
809
810
811 public TypeMappings getJdbcMappings()
812 {
813 return this.getSuperManageableEntityAttribute().getJdbcMappings();
814 }
815
816
817
818
819
820 public String getJdbcType()
821 {
822 return this.getSuperManageableEntityAttribute().getJdbcType();
823 }
824
825
826
827
828
829 public TypeMappings getSqlMappings()
830 {
831 return this.getSuperManageableEntityAttribute().getSqlMappings();
832 }
833
834
835
836
837
838 public String getSqlType()
839 {
840 return this.getSuperManageableEntityAttribute().getSqlType();
841 }
842
843
844
845
846
847 public String getUniqueGroup()
848 {
849 return this.getSuperManageableEntityAttribute().getUniqueGroup();
850 }
851
852
853
854
855
856 public boolean isIdentifier()
857 {
858 return this.getSuperManageableEntityAttribute().isIdentifier();
859 }
860
861
862
863
864
865 public boolean isTransient()
866 {
867 return this.getSuperManageableEntityAttribute().isTransient();
868 }
869
870
871
872
873
874 public boolean isDisplay()
875 {
876 return this.getSuperManageableEntityAttribute().isDisplay();
877 }
878
879
880
881
882
883
884 public boolean isManageableGetterAvailable()
885 {
886 return this.getSuperManageableEntityAttribute().isManageableGetterAvailable();
887 }
888
889
890
891
892
893 public void copyTaggedValues(ModelElementFacade element)
894 {
895 this.getSuperManageableEntityAttribute().copyTaggedValues(element);
896 }
897
898
899
900
901
902
903 public Object findTaggedValue(String tagName)
904 {
905 return this.getSuperManageableEntityAttribute().findTaggedValue(tagName);
906 }
907
908
909
910
911
912
913 public Collection<Object> findTaggedValues(String tagName)
914 {
915 return this.getSuperManageableEntityAttribute().findTaggedValues(tagName);
916 }
917
918
919
920
921
922
923
924 public String getBindedFullyQualifiedName(ModelElementFacade bindedElement)
925 {
926 return this.getSuperManageableEntityAttribute().getBindedFullyQualifiedName(bindedElement);
927 }
928
929
930
931
932
933 public Collection<ConstraintFacade> getConstraints()
934 {
935 return this.getSuperManageableEntityAttribute().getConstraints();
936 }
937
938
939
940
941
942
943 public Collection<ConstraintFacade> getConstraints(String kind)
944 {
945 return this.getSuperManageableEntityAttribute().getConstraints(kind);
946 }
947
948
949
950
951
952
953
954 public String getDocumentation(String indent)
955 {
956 return this.getSuperManageableEntityAttribute().getDocumentation(indent);
957 }
958
959
960
961
962
963
964
965
966 public String getDocumentation(String indent, int lineLength)
967 {
968 return this.getSuperManageableEntityAttribute().getDocumentation(indent, lineLength);
969 }
970
971
972
973
974
975
976
977 public String getDocumentation(String indent, int lineLength, boolean htmlStyle)
978 {
979 return this.getSuperManageableEntityAttribute().getDocumentation(indent, lineLength, htmlStyle);
980 }
981
982
983
984
985
986 public String getFullyQualifiedName()
987 {
988 return this.getSuperManageableEntityAttribute().getFullyQualifiedName();
989 }
990
991
992
993
994
995
996
997
998 public String getFullyQualifiedName(boolean modelName)
999 {
1000 return this.getSuperManageableEntityAttribute().getFullyQualifiedName(modelName);
1001 }
1002
1003
1004
1005
1006
1007
1008 public String getFullyQualifiedNamePath()
1009 {
1010 return this.getSuperManageableEntityAttribute().getFullyQualifiedNamePath();
1011 }
1012
1013
1014
1015
1016
1017 public String getId()
1018 {
1019 return this.getSuperManageableEntityAttribute().getId();
1020 }
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030 public Collection<String> getKeywords()
1031 {
1032 return this.getSuperManageableEntityAttribute().getKeywords();
1033 }
1034
1035
1036
1037
1038
1039 public String getLabel()
1040 {
1041 return this.getSuperManageableEntityAttribute().getLabel();
1042 }
1043
1044
1045
1046
1047
1048 public TypeMappings getLanguageMappings()
1049 {
1050 return this.getSuperManageableEntityAttribute().getLanguageMappings();
1051 }
1052
1053
1054
1055
1056
1057
1058 public ModelFacade getModel()
1059 {
1060 return this.getSuperManageableEntityAttribute().getModel();
1061 }
1062
1063
1064
1065
1066
1067 public String getName()
1068 {
1069 return this.getSuperManageableEntityAttribute().getName();
1070 }
1071
1072
1073
1074
1075
1076 public ModelElementFacade getPackage()
1077 {
1078 return this.getSuperManageableEntityAttribute().getPackage();
1079 }
1080
1081
1082
1083
1084
1085 public String getPackageName()
1086 {
1087 return this.getSuperManageableEntityAttribute().getPackageName();
1088 }
1089
1090
1091
1092
1093
1094
1095 public String getPackageName(boolean modelName)
1096 {
1097 return this.getSuperManageableEntityAttribute().getPackageName(modelName);
1098 }
1099
1100
1101
1102
1103
1104 public String getPackagePath()
1105 {
1106 return this.getSuperManageableEntityAttribute().getPackagePath();
1107 }
1108
1109
1110
1111
1112
1113
1114
1115
1116 public String getQualifiedName()
1117 {
1118 return this.getSuperManageableEntityAttribute().getQualifiedName();
1119 }
1120
1121
1122
1123
1124
1125 public PackageFacade getRootPackage()
1126 {
1127 return this.getSuperManageableEntityAttribute().getRootPackage();
1128 }
1129
1130
1131
1132
1133
1134 public Collection<DependencyFacade> getSourceDependencies()
1135 {
1136 return this.getSuperManageableEntityAttribute().getSourceDependencies();
1137 }
1138
1139
1140
1141
1142
1143
1144 public StateMachineFacade getStateMachineContext()
1145 {
1146 return this.getSuperManageableEntityAttribute().getStateMachineContext();
1147 }
1148
1149
1150
1151
1152
1153 public Collection<String> getStereotypeNames()
1154 {
1155 return this.getSuperManageableEntityAttribute().getStereotypeNames();
1156 }
1157
1158
1159
1160
1161
1162 public Collection<StereotypeFacade> getStereotypes()
1163 {
1164 return this.getSuperManageableEntityAttribute().getStereotypes();
1165 }
1166
1167
1168
1169
1170
1171 public Collection<TaggedValueFacade> getTaggedValues()
1172 {
1173 return this.getSuperManageableEntityAttribute().getTaggedValues();
1174 }
1175
1176
1177
1178
1179
1180 public Collection<DependencyFacade> getTargetDependencies()
1181 {
1182 return this.getSuperManageableEntityAttribute().getTargetDependencies();
1183 }
1184
1185
1186
1187
1188
1189 public Object getTemplateParameter(String parameterName)
1190 {
1191 return this.getSuperManageableEntityAttribute().getTemplateParameter(parameterName);
1192 }
1193
1194
1195
1196
1197
1198 public Collection<TemplateParameterFacade> getTemplateParameters()
1199 {
1200 return this.getSuperManageableEntityAttribute().getTemplateParameters();
1201 }
1202
1203
1204
1205
1206
1207
1208 public String getVisibility()
1209 {
1210 return this.getSuperManageableEntityAttribute().getVisibility();
1211 }
1212
1213
1214
1215
1216
1217
1218 public boolean hasExactStereotype(String stereotypeName)
1219 {
1220 return this.getSuperManageableEntityAttribute().hasExactStereotype(stereotypeName);
1221 }
1222
1223
1224
1225
1226
1227
1228 public boolean hasKeyword(String keywordName)
1229 {
1230 return this.getSuperManageableEntityAttribute().hasKeyword(keywordName);
1231 }
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245 public boolean hasStereotype(String stereotypeName)
1246 {
1247 return this.getSuperManageableEntityAttribute().hasStereotype(stereotypeName);
1248 }
1249
1250
1251
1252
1253
1254
1255 public boolean isBindingDependenciesPresent()
1256 {
1257 return this.getSuperManageableEntityAttribute().isBindingDependenciesPresent();
1258 }
1259
1260
1261
1262
1263
1264 public boolean isConstraintsPresent()
1265 {
1266 return this.getSuperManageableEntityAttribute().isConstraintsPresent();
1267 }
1268
1269
1270
1271
1272
1273 public boolean isDocumentationPresent()
1274 {
1275 return this.getSuperManageableEntityAttribute().isDocumentationPresent();
1276 }
1277
1278
1279
1280
1281
1282 public boolean isReservedWord()
1283 {
1284 return this.getSuperManageableEntityAttribute().isReservedWord();
1285 }
1286
1287
1288
1289
1290
1291
1292 public boolean isTemplateParametersPresent()
1293 {
1294 return this.getSuperManageableEntityAttribute().isTemplateParametersPresent();
1295 }
1296
1297
1298
1299
1300
1301
1302
1303 public boolean isValidIdentifierName()
1304 {
1305 return this.getSuperManageableEntityAttribute().isValidIdentifierName();
1306 }
1307
1308
1309
1310
1311
1312
1313
1314 public String translateConstraint(String name, String translation)
1315 {
1316 return this.getSuperManageableEntityAttribute().translateConstraint(name, translation);
1317 }
1318
1319
1320
1321
1322
1323 public String[] translateConstraints(String translation)
1324 {
1325 return this.getSuperManageableEntityAttribute().translateConstraints(translation);
1326 }
1327
1328
1329
1330
1331
1332 public String[] translateConstraints(String kind, String translation)
1333 {
1334 return this.getSuperManageableEntityAttribute().translateConstraints(kind, translation);
1335 }
1336
1337
1338
1339
1340 @Override
1341 public void initialize()
1342 {
1343 this.getSuperManageableEntityAttribute().initialize();
1344 }
1345
1346
1347
1348
1349
1350 @Override
1351 public Object getValidationOwner()
1352 {
1353 Object owner = this.getSuperManageableEntityAttribute().getValidationOwner();
1354 return owner;
1355 }
1356
1357
1358
1359
1360
1361 @Override
1362 public String getValidationName()
1363 {
1364 String name = this.getSuperManageableEntityAttribute().getValidationName();
1365 return name;
1366 }
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383 @Override
1384 public void validateInvariants(Collection<ModelValidationMessage> validationMessages)
1385 {
1386 this.getSuperManageableEntityAttribute().validateInvariants(validationMessages);
1387 try
1388 {
1389 final Object contextElement = this.THIS();
1390 boolean constraintValid = OCLResultEnsurer.ensure((Boolean.valueOf(String.valueOf((Boolean.valueOf(String.valueOf(OCLIntrospector.invoke(contextElement,"required"))).booleanValue()&&!(Boolean.valueOf(String.valueOf(OCLIntrospector.invoke(contextElement,"identifier"))).booleanValue()&&Boolean.valueOf(String.valueOf(OCLIntrospector.invoke(contextElement,"owner.dynamicIdentifiersPresent"))).booleanValue())))).booleanValue()?Boolean.valueOf(String.valueOf(!Boolean.valueOf(String.valueOf(OCLIntrospector.invoke(contextElement,"hidden"))).booleanValue())).booleanValue():true));
1391 if (!constraintValid)
1392 {
1393 validationMessages.add(
1394 new ModelValidationMessage(
1395 (MetafacadeBase)contextElement ,
1396 "org::andromda::cartridges::bpm4struts::metafacades::StrutsManageableEntityAttribute::required fields may not be hidden",
1397 "Required fields may not be hidden, unless they are auto-generated identifiers."));
1398 }
1399 }
1400 catch (Throwable th)
1401 {
1402 Throwable cause = th.getCause();
1403 int depth = 0;
1404 while (cause != null && depth < 7)
1405 {
1406 th = cause;
1407 depth++;
1408 }
1409 logger.error("Error validating constraint 'org::andromda::cartridges::bpm4struts::metafacades::StrutsManageableEntityAttribute::required fields may not be hidden' ON "
1410 + this.THIS().toString() + ": " + th.getMessage(), th);
1411 }
1412 try
1413 {
1414 final Object contextElement = this.THIS();
1415 boolean constraintValid = OCLResultEnsurer.ensure((Boolean.valueOf(String.valueOf(OCLCollections.notEmpty(OCLIntrospector.invoke(contextElement,"widgetType")))).booleanValue()?(OCLExpressions.equal(OCLIntrospector.invoke(contextElement,"widgetType"),"text")||OCLExpressions.equal(OCLIntrospector.invoke(contextElement,"widgetType"),"textarea")||OCLExpressions.equal(OCLIntrospector.invoke(contextElement,"widgetType"),"hidden")):true));
1416 if (!constraintValid)
1417 {
1418 validationMessages.add(
1419 new ModelValidationMessage(
1420 (MetafacadeBase)contextElement ,
1421 "org::andromda::cartridges::bpm4struts::metafacades::StrutsManageableEntityAttribute::widget type cannot be arbitrary",
1422 "Only text, textarea and hidden widgets are supported, please select another one or let the cartridge decide by not specifying anything."));
1423 }
1424 }
1425 catch (Throwable th)
1426 {
1427 Throwable cause = th.getCause();
1428 int depth = 0;
1429 while (cause != null && depth < 7)
1430 {
1431 th = cause;
1432 depth++;
1433 }
1434 logger.error("Error validating constraint 'org::andromda::cartridges::bpm4struts::metafacades::StrutsManageableEntityAttribute::widget type cannot be arbitrary' ON "
1435 + this.THIS().toString() + ": " + th.getMessage(), th);
1436 }
1437 try
1438 {
1439 final Object contextElement = this.THIS();
1440 boolean constraintValid = OCLResultEnsurer.ensure(OCLIntrospector.invoke(contextElement,"safeNamePresent"));
1441 if (!constraintValid)
1442 {
1443 validationMessages.add(
1444 new ModelValidationMessage(
1445 (MetafacadeBase)contextElement ,
1446 "org::andromda::cartridges::bpm4struts::metafacades::StrutsManageableEntityAttribute::SAFE NAME - TO BE REMOVED LATER",
1447 "The names you give to fields cannot start with a lowercase character directly followed by a character in uppercase. This is due to a bug in the Jakarta commons library which is used by Struts. The behavior of that library is inconsistent with the reflection API provided by the JDK. Please rename this field or you'll get exceptions when running your web application."));
1448 }
1449 }
1450 catch (Throwable th)
1451 {
1452 Throwable cause = th.getCause();
1453 int depth = 0;
1454 while (cause != null && depth < 7)
1455 {
1456 th = cause;
1457 depth++;
1458 }
1459 logger.error("Error validating constraint 'org::andromda::cartridges::bpm4struts::metafacades::StrutsManageableEntityAttribute::SAFE NAME - TO BE REMOVED LATER' ON "
1460 + this.THIS().toString() + ": " + th.getMessage(), th);
1461 }
1462 }
1463
1464
1465
1466
1467 private static final String NAME_PROPERTY = "name";
1468 private static final String FQNAME_PROPERTY = "fullyQualifiedName";
1469
1470
1471
1472
1473 @Override
1474 public String toString()
1475 {
1476 final StringBuilder toString = new StringBuilder(this.getClass().getName());
1477 toString.append("[");
1478 try
1479 {
1480 toString.append(Introspector.instance().getProperty(this, FQNAME_PROPERTY));
1481 }
1482 catch (final Throwable tryAgain)
1483 {
1484 try
1485 {
1486 toString.append(Introspector.instance().getProperty(this, NAME_PROPERTY));
1487 }
1488 catch (final Throwable ignore)
1489 {
1490
1491 }
1492 }
1493 toString.append("]");
1494 return toString.toString();
1495 }
1496 }