1
2
3
4 package org.andromda.cartridges.bpm4struts.metafacades;
5
6 /***
7 * MetafacadeLogic for org.andromda.cartridges.bpm4struts.metafacades.StrutsBackendService
8 *
9 * @see org.andromda.cartridges.bpm4struts.metafacades.StrutsBackendService
10 */
11 public abstract class StrutsBackendServiceLogic
12 extends org.andromda.core.metafacade.MetafacadeBase
13 implements org.andromda.cartridges.bpm4struts.metafacades.StrutsBackendService
14 {
15
16 protected Object metaObject;
17
18 public StrutsBackendServiceLogic(Object metaObject, String context)
19 {
20 super(metaObject, getContext(context));
21 this.superService =
22 (org.andromda.metafacades.uml.Service)
23 org.andromda.core.metafacade.MetafacadeFactory.getInstance().createFacadeImpl(
24 "org.andromda.metafacades.uml.Service",
25 metaObject,
26 getContext(context));
27 this.metaObject = metaObject;
28 }
29
30 /***
31 * Gets the context for this metafacade logic instance.
32 */
33 private static String getContext(String context)
34 {
35 if (context == null)
36 {
37 context = "org.andromda.cartridges.bpm4struts.metafacades.StrutsBackendService";
38 }
39 return context;
40 }
41
42 private org.andromda.metafacades.uml.Service superService;
43 private boolean superServiceInitialized = false;
44
45 /***
46 * Gets the org.andromda.metafacades.uml.Service parent instance.
47 */
48 private org.andromda.metafacades.uml.Service getSuperService()
49 {
50 if (!this.superServiceInitialized)
51 {
52 ((org.andromda.core.metafacade.MetafacadeBase)superService).setMetafacadeContext(this.getMetafacadeContext());
53 this.superServiceInitialized = true;
54 }
55 return superService;
56 }
57
58 /***
59 * @see org.andromda.core.metafacade.MetafacadeBase
60 */
61 public void resetMetafacadeContext(String context)
62 {
63 if (!this.contextRoot)
64 {
65 context = getContext(context);
66 setMetafacadeContext (context);
67 if (this.superServiceInitialized)
68 {
69 ((org.andromda.core.metafacade.MetafacadeBase)superService).resetMetafacadeContext(context);
70 }
71 }
72 }
73
74 /***
75 * @see org.andromda.cartridges.bpm4struts.metafacades.StrutsBackendService
76 */
77 public boolean isStrutsBackendServiceMetaType()
78 {
79 return true;
80 }
81
82
83
84 /***
85 * @see org.andromda.cartridges.bpm4struts.metafacades.StrutsBackendService#getAccessorImplementation()
86 */
87 protected abstract java.lang.String handleGetAccessorImplementation();
88
89 private void handleGetAccessorImplementation1aPreCondition()
90 {
91 }
92
93 private void handleGetAccessorImplementation1aPostCondition()
94 {
95 }
96
97 private java.lang.String __accessorImplementation1a;
98 private boolean __accessorImplementation1aSet = false;
99
100 public final java.lang.String getAccessorImplementation()
101 {
102 java.lang.String accessorImplementation1a = this.__accessorImplementation1a;
103 if (!this.__accessorImplementation1aSet)
104 {
105 handleGetAccessorImplementation1aPreCondition();
106 accessorImplementation1a = handleGetAccessorImplementation();
107 handleGetAccessorImplementation1aPostCondition();
108 this.__accessorImplementation1a = accessorImplementation1a;
109 if (isMetafacadePropertyCachingEnabled())
110 {
111 this.__accessorImplementation1aSet = true;
112 }
113 }
114 return accessorImplementation1a;
115 }
116
117 /***
118 * @see org.andromda.metafacades.uml.Service
119 */
120 public boolean isServiceMetaType()
121 {
122 return true;
123 }
124
125 /***
126 * @see org.andromda.metafacades.uml.ClassifierFacade
127 */
128 public boolean isClassifierFacadeMetaType()
129 {
130 return true;
131 }
132
133 /***
134 * @see org.andromda.metafacades.uml.GeneralizableElementFacade
135 */
136 public boolean isGeneralizableElementFacadeMetaType()
137 {
138 return true;
139 }
140
141 /***
142 * @see org.andromda.metafacades.uml.ModelElementFacade
143 */
144 public boolean isModelElementFacadeMetaType()
145 {
146 return true;
147 }
148
149
150
151 public org.andromda.metafacades.uml.AttributeFacade findAttribute(java.lang.String name)
152 {
153 return this.getSuperService().findAttribute(name);
154 }
155
156
157 public java.util.Collection getAbstractions()
158 {
159 return this.getSuperService().getAbstractions();
160 }
161
162
163 public java.util.Collection getAllAssociatedClasses()
164 {
165 return this.getSuperService().getAllAssociatedClasses();
166 }
167
168
169 public java.util.Collection getAllProperties()
170 {
171 return this.getSuperService().getAllProperties();
172 }
173
174
175 public java.util.Collection getAllRequiredConstructorParameters()
176 {
177 return this.getSuperService().getAllRequiredConstructorParameters();
178 }
179
180
181 public org.andromda.metafacades.uml.ClassifierFacade getArray()
182 {
183 return this.getSuperService().getArray();
184 }
185
186
187 public java.lang.String getArrayName()
188 {
189 return this.getSuperService().getArrayName();
190 }
191
192
193 public java.util.Collection getAssociatedClasses()
194 {
195 return this.getSuperService().getAssociatedClasses();
196 }
197
198
199 public java.util.List getAssociationEnds()
200 {
201 return this.getSuperService().getAssociationEnds();
202 }
203
204
205 public java.util.Collection getAttributes(boolean follow)
206 {
207 return this.getSuperService().getAttributes(follow);
208 }
209
210
211 public java.util.Collection getAttributes()
212 {
213 return this.getSuperService().getAttributes();
214 }
215
216
217 public java.lang.String getFullyQualifiedArrayName()
218 {
219 return this.getSuperService().getFullyQualifiedArrayName();
220 }
221
222
223 public java.util.Collection getImplementationOperations()
224 {
225 return this.getSuperService().getImplementationOperations();
226 }
227
228
229 public java.lang.String getImplementedInterfaceList()
230 {
231 return this.getSuperService().getImplementedInterfaceList();
232 }
233
234
235 public java.util.Collection getInstanceAttributes()
236 {
237 return this.getSuperService().getInstanceAttributes();
238 }
239
240
241 public java.util.Collection getInstanceOperations()
242 {
243 return this.getSuperService().getInstanceOperations();
244 }
245
246
247 public java.util.Collection getInterfaceAbstractions()
248 {
249 return this.getSuperService().getInterfaceAbstractions();
250 }
251
252
253 public java.lang.String getJavaNullString()
254 {
255 return this.getSuperService().getJavaNullString();
256 }
257
258
259 public java.util.Collection getNavigableConnectingEnds()
260 {
261 return this.getSuperService().getNavigableConnectingEnds();
262 }
263
264
265 public java.util.Collection getNavigableConnectingEnds(boolean follow)
266 {
267 return this.getSuperService().getNavigableConnectingEnds(follow);
268 }
269
270
271 public org.andromda.metafacades.uml.ClassifierFacade getNonArray()
272 {
273 return this.getSuperService().getNonArray();
274 }
275
276
277 public java.lang.String getOperationCallFromAttributes()
278 {
279 return this.getSuperService().getOperationCallFromAttributes();
280 }
281
282
283 public java.util.Collection getOperations()
284 {
285 return this.getSuperService().getOperations();
286 }
287
288
289 public java.util.Collection getProperties(boolean follow)
290 {
291 return this.getSuperService().getProperties(follow);
292 }
293
294
295 public java.util.Collection getProperties()
296 {
297 return this.getSuperService().getProperties();
298 }
299
300
301 public java.util.Collection getRequiredConstructorParameters()
302 {
303 return this.getSuperService().getRequiredConstructorParameters();
304 }
305
306
307 public java.lang.Long getSerialVersionUID()
308 {
309 return this.getSuperService().getSerialVersionUID();
310 }
311
312
313 public java.util.Collection getStaticAttributes()
314 {
315 return this.getSuperService().getStaticAttributes();
316 }
317
318
319 public java.util.Collection getStaticOperations()
320 {
321 return this.getSuperService().getStaticOperations();
322 }
323
324
325 public org.andromda.metafacades.uml.ClassifierFacade getSuperClass()
326 {
327 return this.getSuperService().getSuperClass();
328 }
329
330
331 public java.lang.String getWrapperName()
332 {
333 return this.getSuperService().getWrapperName();
334 }
335
336
337 public boolean isAbstract()
338 {
339 return this.getSuperService().isAbstract();
340 }
341
342
343 public boolean isArrayType()
344 {
345 return this.getSuperService().isArrayType();
346 }
347
348
349 public boolean isAssociationClass()
350 {
351 return this.getSuperService().isAssociationClass();
352 }
353
354
355 public boolean isBlobType()
356 {
357 return this.getSuperService().isBlobType();
358 }
359
360
361 public boolean isBooleanType()
362 {
363 return this.getSuperService().isBooleanType();
364 }
365
366
367 public boolean isClobType()
368 {
369 return this.getSuperService().isClobType();
370 }
371
372
373 public boolean isCollectionType()
374 {
375 return this.getSuperService().isCollectionType();
376 }
377
378
379 public boolean isDataType()
380 {
381 return this.getSuperService().isDataType();
382 }
383
384
385 public boolean isDateType()
386 {
387 return this.getSuperService().isDateType();
388 }
389
390
391 public boolean isEnumeration()
392 {
393 return this.getSuperService().isEnumeration();
394 }
395
396
397 public boolean isFileType()
398 {
399 return this.getSuperService().isFileType();
400 }
401
402
403 public boolean isInterface()
404 {
405 return this.getSuperService().isInterface();
406 }
407
408
409 public boolean isLeaf()
410 {
411 return this.getSuperService().isLeaf();
412 }
413
414
415 public boolean isListType()
416 {
417 return this.getSuperService().isListType();
418 }
419
420
421 public boolean isMapType()
422 {
423 return this.getSuperService().isMapType();
424 }
425
426
427 public boolean isPrimitive()
428 {
429 return this.getSuperService().isPrimitive();
430 }
431
432
433 public boolean isSetType()
434 {
435 return this.getSuperService().isSetType();
436 }
437
438
439 public boolean isStringType()
440 {
441 return this.getSuperService().isStringType();
442 }
443
444
445 public boolean isTimeType()
446 {
447 return this.getSuperService().isTimeType();
448 }
449
450
451 public java.lang.Object findTaggedValue(java.lang.String tagName, boolean follow)
452 {
453 return this.getSuperService().findTaggedValue(tagName, follow);
454 }
455
456
457 public java.util.Collection getAllGeneralizations()
458 {
459 return this.getSuperService().getAllGeneralizations();
460 }
461
462
463 public java.util.Collection getAllSpecializations()
464 {
465 return this.getSuperService().getAllSpecializations();
466 }
467
468
469 public org.andromda.metafacades.uml.GeneralizableElementFacade getGeneralization()
470 {
471 return this.getSuperService().getGeneralization();
472 }
473
474
475 public java.util.Collection getGeneralizationLinks()
476 {
477 return this.getSuperService().getGeneralizationLinks();
478 }
479
480
481 public java.lang.String getGeneralizationList()
482 {
483 return this.getSuperService().getGeneralizationList();
484 }
485
486
487 public org.andromda.metafacades.uml.GeneralizableElementFacade getGeneralizationRoot()
488 {
489 return this.getSuperService().getGeneralizationRoot();
490 }
491
492
493 public java.util.Collection getGeneralizations()
494 {
495 return this.getSuperService().getGeneralizations();
496 }
497
498
499 public java.util.Collection getSpecializations()
500 {
501 return this.getSuperService().getSpecializations();
502 }
503
504
505 public void copyTaggedValues(org.andromda.metafacades.uml.ModelElementFacade element)
506 {
507 this.getSuperService().copyTaggedValues(element);
508 }
509
510
511 public java.lang.Object findTaggedValue(java.lang.String tagName)
512 {
513 return this.getSuperService().findTaggedValue(tagName);
514 }
515
516
517 public java.util.Collection findTaggedValues(java.lang.String tagName)
518 {
519 return this.getSuperService().findTaggedValues(tagName);
520 }
521
522
523 public java.util.Collection getConstraints(java.lang.String kind)
524 {
525 return this.getSuperService().getConstraints(kind);
526 }
527
528
529 public java.util.Collection getConstraints()
530 {
531 return this.getSuperService().getConstraints();
532 }
533
534
535 public java.lang.String getDocumentation(java.lang.String indent, int lineLength)
536 {
537 return this.getSuperService().getDocumentation(indent, lineLength);
538 }
539
540
541 public java.lang.String getDocumentation(java.lang.String indent, int lineLength, boolean htmlStyle)
542 {
543 return this.getSuperService().getDocumentation(indent, lineLength, htmlStyle);
544 }
545
546
547 public java.lang.String getDocumentation(java.lang.String indent)
548 {
549 return this.getSuperService().getDocumentation(indent);
550 }
551
552
553 public java.lang.String getFullyQualifiedName(boolean modelName)
554 {
555 return this.getSuperService().getFullyQualifiedName(modelName);
556 }
557
558
559 public java.lang.String getFullyQualifiedName()
560 {
561 return this.getSuperService().getFullyQualifiedName();
562 }
563
564
565 public java.lang.String getFullyQualifiedNamePath()
566 {
567 return this.getSuperService().getFullyQualifiedNamePath();
568 }
569
570
571 public java.lang.String getId()
572 {
573 return this.getSuperService().getId();
574 }
575
576
577 public org.andromda.metafacades.uml.TypeMappings getLanguageMappings()
578 {
579 return this.getSuperService().getLanguageMappings();
580 }
581
582
583 public org.andromda.metafacades.uml.ModelFacade getModel()
584 {
585 return this.getSuperService().getModel();
586 }
587
588
589 public java.lang.String getName()
590 {
591 return this.getSuperService().getName();
592 }
593
594
595 public org.andromda.metafacades.uml.ModelElementFacade getPackage()
596 {
597 return this.getSuperService().getPackage();
598 }
599
600
601 public java.lang.String getPackageName()
602 {
603 return this.getSuperService().getPackageName();
604 }
605
606
607 public java.lang.String getPackageName(boolean modelName)
608 {
609 return this.getSuperService().getPackageName(modelName);
610 }
611
612
613 public java.lang.String getPackagePath()
614 {
615 return this.getSuperService().getPackagePath();
616 }
617
618
619 public org.andromda.metafacades.uml.PackageFacade getRootPackage()
620 {
621 return this.getSuperService().getRootPackage();
622 }
623
624
625 public java.util.Collection getSourceDependencies()
626 {
627 return this.getSuperService().getSourceDependencies();
628 }
629
630
631 public org.andromda.metafacades.uml.StateMachineFacade getStateMachineContext()
632 {
633 return this.getSuperService().getStateMachineContext();
634 }
635
636
637 public java.util.Collection getStereotypeNames()
638 {
639 return this.getSuperService().getStereotypeNames();
640 }
641
642
643 public java.util.Collection getStereotypes()
644 {
645 return this.getSuperService().getStereotypes();
646 }
647
648
649 public java.util.Collection getTaggedValues()
650 {
651 return this.getSuperService().getTaggedValues();
652 }
653
654
655 public java.util.Collection getTargetDependencies()
656 {
657 return this.getSuperService().getTargetDependencies();
658 }
659
660
661 public java.lang.Object getTemplateParameter(java.lang.String parameterName)
662 {
663 return this.getSuperService().getTemplateParameter(parameterName);
664 }
665
666
667 public java.util.Collection getTemplateParameters()
668 {
669 return this.getSuperService().getTemplateParameters();
670 }
671
672
673 public java.lang.String getVisibility()
674 {
675 return this.getSuperService().getVisibility();
676 }
677
678
679 public boolean hasExactStereotype(java.lang.String stereotypeName)
680 {
681 return this.getSuperService().hasExactStereotype(stereotypeName);
682 }
683
684
685 public boolean hasStereotype(java.lang.String stereotypeName)
686 {
687 return this.getSuperService().hasStereotype(stereotypeName);
688 }
689
690
691 public boolean isBindingDependenciesPresent()
692 {
693 return this.getSuperService().isBindingDependenciesPresent();
694 }
695
696
697 public boolean isConstraintsPresent()
698 {
699 return this.getSuperService().isConstraintsPresent();
700 }
701
702
703 public boolean isTemplateParametersPresent()
704 {
705 return this.getSuperService().isTemplateParametersPresent();
706 }
707
708
709 public java.lang.String translateConstraint(java.lang.String name, java.lang.String translation)
710 {
711 return this.getSuperService().translateConstraint(name, translation);
712 }
713
714
715 public java.lang.String[] translateConstraints(java.lang.String translation)
716 {
717 return this.getSuperService().translateConstraints(translation);
718 }
719
720
721 public java.lang.String[] translateConstraints(java.lang.String kind, java.lang.String translation)
722 {
723 return this.getSuperService().translateConstraints(kind, translation);
724 }
725
726
727 public java.util.Collection getAllRoles()
728 {
729 return this.getSuperService().getAllRoles();
730 }
731
732
733 public java.util.Collection getAllServiceReferences()
734 {
735 return this.getSuperService().getAllServiceReferences();
736 }
737
738
739 public java.util.Collection getEntityReferences()
740 {
741 return this.getSuperService().getEntityReferences();
742 }
743
744
745 public java.util.Collection getRoles()
746 {
747 return this.getSuperService().getRoles();
748 }
749
750
751 public java.util.Collection getServiceReferences()
752 {
753 return this.getSuperService().getServiceReferences();
754 }
755
756 /***
757 * @see org.andromda.core.metafacade.MetafacadeBase#initialize()
758 */
759 public void initialize()
760 {
761 this.getSuperService().initialize();
762 }
763
764 /***
765 * @see org.andromda.core.metafacade.MetafacadeBase#getValidationOwner()
766 */
767 public Object getValidationOwner()
768 {
769 Object owner = this.getSuperService().getValidationOwner();
770 return owner;
771 }
772
773 /***
774 * @see org.andromda.core.metafacade.MetafacadeBase#getValidationName()
775 */
776 public String getValidationName()
777 {
778 String name = this.getSuperService().getValidationName();
779 return name;
780 }
781
782 /***
783 * @see org.andromda.core.metafacade.MetafacadeBase#validateInvariants(java.util.Collection)
784 */
785 public void validateInvariants(java.util.Collection validationMessages)
786 {
787 this.getSuperService().validateInvariants(validationMessages);
788 }
789
790 /***
791 * The property that stores the name of the metafacade.
792 */
793 private static final String NAME_PROPERTY = "name";
794
795 /***
796 * @see java.lang.Object#toString()
797 */
798 public String toString()
799 {
800 final StringBuffer toString = new StringBuffer(this.getClass().getName());
801 toString.append("[");
802 try
803 {
804 toString.append(org.andromda.core.common.Introspector.instance().getProperty(this, NAME_PROPERTY));
805 }
806 catch (final Throwable throwable)
807 {
808
809 }
810 toString.append("]");
811 return toString.toString();
812 }
813 }