1
2
3
4 package org.andromda.cartridges.spring.metafacades;
5
6 /***
7 * MetafacadeLogic for org.andromda.cartridges.spring.metafacades.SpringServiceOperation
8 *
9 * @see org.andromda.cartridges.spring.metafacades.SpringServiceOperation
10 */
11 public abstract class SpringServiceOperationLogic
12 extends org.andromda.core.metafacade.MetafacadeBase
13 implements org.andromda.cartridges.spring.metafacades.SpringServiceOperation
14 {
15
16 protected Object metaObject;
17
18 public SpringServiceOperationLogic(Object metaObject, String context)
19 {
20 super(metaObject, getContext(context));
21 this.superServiceOperation =
22 (org.andromda.metafacades.uml.ServiceOperation)
23 org.andromda.core.metafacade.MetafacadeFactory.getInstance().createFacadeImpl(
24 "org.andromda.metafacades.uml.ServiceOperation",
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.spring.metafacades.SpringServiceOperation";
38 }
39 return context;
40 }
41
42 private org.andromda.metafacades.uml.ServiceOperation superServiceOperation;
43 private boolean superServiceOperationInitialized = false;
44
45 /***
46 * Gets the org.andromda.metafacades.uml.ServiceOperation parent instance.
47 */
48 private org.andromda.metafacades.uml.ServiceOperation getSuperServiceOperation()
49 {
50 if (!this.superServiceOperationInitialized)
51 {
52 ((org.andromda.core.metafacade.MetafacadeBase)superServiceOperation).setMetafacadeContext(this.getMetafacadeContext());
53 this.superServiceOperationInitialized = true;
54 }
55 return superServiceOperation;
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.superServiceOperationInitialized)
68 {
69 ((org.andromda.core.metafacade.MetafacadeBase)superServiceOperation).resetMetafacadeContext(context);
70 }
71 }
72 }
73
74 /***
75 * @see org.andromda.cartridges.spring.metafacades.SpringServiceOperation
76 */
77 public boolean isSpringServiceOperationMetaType()
78 {
79 return true;
80 }
81
82
83
84 /***
85 * @see org.andromda.cartridges.spring.metafacades.SpringServiceOperation#isWebserviceExposed()
86 */
87 protected abstract boolean handleIsWebserviceExposed();
88
89 private void handleIsWebserviceExposed1aPreCondition()
90 {
91 }
92
93 private void handleIsWebserviceExposed1aPostCondition()
94 {
95 }
96
97 private boolean __webserviceExposed1a;
98 private boolean __webserviceExposed1aSet = false;
99
100 public final boolean isWebserviceExposed()
101 {
102 boolean webserviceExposed1a = this.__webserviceExposed1a;
103 if (!this.__webserviceExposed1aSet)
104 {
105 handleIsWebserviceExposed1aPreCondition();
106 webserviceExposed1a = handleIsWebserviceExposed();
107 handleIsWebserviceExposed1aPostCondition();
108 this.__webserviceExposed1a = webserviceExposed1a;
109 if (isMetafacadePropertyCachingEnabled())
110 {
111 this.__webserviceExposed1aSet = true;
112 }
113 }
114 return webserviceExposed1a;
115 }
116
117 /***
118 * @see org.andromda.cartridges.spring.metafacades.SpringServiceOperation#getImplementationName()
119 */
120 protected abstract java.lang.String handleGetImplementationName();
121
122 private void handleGetImplementationName2aPreCondition()
123 {
124 }
125
126 private void handleGetImplementationName2aPostCondition()
127 {
128 }
129
130 private java.lang.String __implementationName2a;
131 private boolean __implementationName2aSet = false;
132
133 public final java.lang.String getImplementationName()
134 {
135 java.lang.String implementationName2a = this.__implementationName2a;
136 if (!this.__implementationName2aSet)
137 {
138 handleGetImplementationName2aPreCondition();
139 implementationName2a = handleGetImplementationName();
140 handleGetImplementationName2aPostCondition();
141 this.__implementationName2a = implementationName2a;
142 if (isMetafacadePropertyCachingEnabled())
143 {
144 this.__implementationName2aSet = true;
145 }
146 }
147 return implementationName2a;
148 }
149
150 /***
151 * @see org.andromda.cartridges.spring.metafacades.SpringServiceOperation#getImplementationSignature()
152 */
153 protected abstract java.lang.String handleGetImplementationSignature();
154
155 private void handleGetImplementationSignature3aPreCondition()
156 {
157 }
158
159 private void handleGetImplementationSignature3aPostCondition()
160 {
161 }
162
163 private java.lang.String __implementationSignature3a;
164 private boolean __implementationSignature3aSet = false;
165
166 public final java.lang.String getImplementationSignature()
167 {
168 java.lang.String implementationSignature3a = this.__implementationSignature3a;
169 if (!this.__implementationSignature3aSet)
170 {
171 handleGetImplementationSignature3aPreCondition();
172 implementationSignature3a = handleGetImplementationSignature();
173 handleGetImplementationSignature3aPostCondition();
174 this.__implementationSignature3a = implementationSignature3a;
175 if (isMetafacadePropertyCachingEnabled())
176 {
177 this.__implementationSignature3aSet = true;
178 }
179 }
180 return implementationSignature3a;
181 }
182
183 /***
184 * @see org.andromda.cartridges.spring.metafacades.SpringServiceOperation#getImplementationCall()
185 */
186 protected abstract java.lang.String handleGetImplementationCall();
187
188 private void handleGetImplementationCall4aPreCondition()
189 {
190 }
191
192 private void handleGetImplementationCall4aPostCondition()
193 {
194 }
195
196 private java.lang.String __implementationCall4a;
197 private boolean __implementationCall4aSet = false;
198
199 public final java.lang.String getImplementationCall()
200 {
201 java.lang.String implementationCall4a = this.__implementationCall4a;
202 if (!this.__implementationCall4aSet)
203 {
204 handleGetImplementationCall4aPreCondition();
205 implementationCall4a = handleGetImplementationCall();
206 handleGetImplementationCall4aPostCondition();
207 this.__implementationCall4a = implementationCall4a;
208 if (isMetafacadePropertyCachingEnabled())
209 {
210 this.__implementationCall4aSet = true;
211 }
212 }
213 return implementationCall4a;
214 }
215
216 /***
217 * @see org.andromda.cartridges.spring.metafacades.SpringServiceOperation#getEjbTransactionType()
218 */
219 protected abstract java.lang.String handleGetEjbTransactionType();
220
221 private void handleGetEjbTransactionType5aPreCondition()
222 {
223 }
224
225 private void handleGetEjbTransactionType5aPostCondition()
226 {
227 }
228
229 private java.lang.String __ejbTransactionType5a;
230 private boolean __ejbTransactionType5aSet = false;
231
232 public final java.lang.String getEjbTransactionType()
233 {
234 java.lang.String ejbTransactionType5a = this.__ejbTransactionType5a;
235 if (!this.__ejbTransactionType5aSet)
236 {
237 handleGetEjbTransactionType5aPreCondition();
238 ejbTransactionType5a = handleGetEjbTransactionType();
239 handleGetEjbTransactionType5aPostCondition();
240 this.__ejbTransactionType5a = ejbTransactionType5a;
241 if (isMetafacadePropertyCachingEnabled())
242 {
243 this.__ejbTransactionType5aSet = true;
244 }
245 }
246 return ejbTransactionType5a;
247 }
248
249 /***
250 * @see org.andromda.cartridges.spring.metafacades.SpringServiceOperation#getTransactionType()
251 */
252 protected abstract java.lang.String handleGetTransactionType();
253
254 private void handleGetTransactionType6aPreCondition()
255 {
256 }
257
258 private void handleGetTransactionType6aPostCondition()
259 {
260 }
261
262 private java.lang.String __transactionType6a;
263 private boolean __transactionType6aSet = false;
264
265 public final java.lang.String getTransactionType()
266 {
267 java.lang.String transactionType6a = this.__transactionType6a;
268 if (!this.__transactionType6aSet)
269 {
270 handleGetTransactionType6aPreCondition();
271 transactionType6a = handleGetTransactionType();
272 handleGetTransactionType6aPostCondition();
273 this.__transactionType6a = transactionType6a;
274 if (isMetafacadePropertyCachingEnabled())
275 {
276 this.__transactionType6aSet = true;
277 }
278 }
279 return transactionType6a;
280 }
281
282 /***
283 * @see org.andromda.cartridges.spring.metafacades.SpringServiceOperation#getThrowsClause()
284 */
285 protected abstract java.lang.String handleGetThrowsClause();
286
287 private void handleGetThrowsClause7aPreCondition()
288 {
289 }
290
291 private void handleGetThrowsClause7aPostCondition()
292 {
293 }
294
295 private java.lang.String __throwsClause7a;
296 private boolean __throwsClause7aSet = false;
297
298 public final java.lang.String getThrowsClause()
299 {
300 java.lang.String throwsClause7a = this.__throwsClause7a;
301 if (!this.__throwsClause7aSet)
302 {
303 handleGetThrowsClause7aPreCondition();
304 throwsClause7a = handleGetThrowsClause();
305 handleGetThrowsClause7aPostCondition();
306 this.__throwsClause7a = throwsClause7a;
307 if (isMetafacadePropertyCachingEnabled())
308 {
309 this.__throwsClause7aSet = true;
310 }
311 }
312 return throwsClause7a;
313 }
314
315
316
317 protected abstract java.lang.String handleGetThrowsClause(java.lang.String initialExceptions);
318
319 private void handleGetThrowsClause1oPreCondition()
320 {
321 }
322
323 private void handleGetThrowsClause1oPostCondition()
324 {
325 }
326
327 public java.lang.String getThrowsClause(java.lang.String initialExceptions)
328 {
329 handleGetThrowsClause1oPreCondition();
330 java.lang.String returnValue = handleGetThrowsClause(initialExceptions);
331 handleGetThrowsClause1oPostCondition();
332 return returnValue;
333 }
334
335
336
337 /***
338 * @see org.andromda.metafacades.uml.ServiceOperation
339 */
340 public boolean isServiceOperationMetaType()
341 {
342 return true;
343 }
344
345 /***
346 * @see org.andromda.metafacades.uml.OperationFacade
347 */
348 public boolean isOperationFacadeMetaType()
349 {
350 return true;
351 }
352
353 /***
354 * @see org.andromda.metafacades.uml.ModelElementFacade
355 */
356 public boolean isModelElementFacadeMetaType()
357 {
358 return true;
359 }
360
361
362
363 public void copyTaggedValues(org.andromda.metafacades.uml.ModelElementFacade element)
364 {
365 this.getSuperServiceOperation().copyTaggedValues(element);
366 }
367
368
369 public java.lang.Object findTaggedValue(java.lang.String tagName)
370 {
371 return this.getSuperServiceOperation().findTaggedValue(tagName);
372 }
373
374
375 public java.util.Collection findTaggedValues(java.lang.String tagName)
376 {
377 return this.getSuperServiceOperation().findTaggedValues(tagName);
378 }
379
380
381 public java.util.Collection getConstraints()
382 {
383 return this.getSuperServiceOperation().getConstraints();
384 }
385
386
387 public java.util.Collection getConstraints(java.lang.String kind)
388 {
389 return this.getSuperServiceOperation().getConstraints(kind);
390 }
391
392
393 public java.lang.String getDocumentation(java.lang.String indent, int lineLength)
394 {
395 return this.getSuperServiceOperation().getDocumentation(indent, lineLength);
396 }
397
398
399 public java.lang.String getDocumentation(java.lang.String indent, int lineLength, boolean htmlStyle)
400 {
401 return this.getSuperServiceOperation().getDocumentation(indent, lineLength, htmlStyle);
402 }
403
404
405 public java.lang.String getDocumentation(java.lang.String indent)
406 {
407 return this.getSuperServiceOperation().getDocumentation(indent);
408 }
409
410
411 public java.lang.String getFullyQualifiedName(boolean modelName)
412 {
413 return this.getSuperServiceOperation().getFullyQualifiedName(modelName);
414 }
415
416
417 public java.lang.String getFullyQualifiedName()
418 {
419 return this.getSuperServiceOperation().getFullyQualifiedName();
420 }
421
422
423 public java.lang.String getFullyQualifiedNamePath()
424 {
425 return this.getSuperServiceOperation().getFullyQualifiedNamePath();
426 }
427
428
429 public java.lang.String getId()
430 {
431 return this.getSuperServiceOperation().getId();
432 }
433
434
435 public org.andromda.metafacades.uml.TypeMappings getLanguageMappings()
436 {
437 return this.getSuperServiceOperation().getLanguageMappings();
438 }
439
440
441 public org.andromda.metafacades.uml.ModelFacade getModel()
442 {
443 return this.getSuperServiceOperation().getModel();
444 }
445
446
447 public java.lang.String getName()
448 {
449 return this.getSuperServiceOperation().getName();
450 }
451
452
453 public org.andromda.metafacades.uml.ModelElementFacade getPackage()
454 {
455 return this.getSuperServiceOperation().getPackage();
456 }
457
458
459 public java.lang.String getPackageName(boolean modelName)
460 {
461 return this.getSuperServiceOperation().getPackageName(modelName);
462 }
463
464
465 public java.lang.String getPackageName()
466 {
467 return this.getSuperServiceOperation().getPackageName();
468 }
469
470
471 public java.lang.String getPackagePath()
472 {
473 return this.getSuperServiceOperation().getPackagePath();
474 }
475
476
477 public org.andromda.metafacades.uml.PackageFacade getRootPackage()
478 {
479 return this.getSuperServiceOperation().getRootPackage();
480 }
481
482
483 public java.util.Collection getSourceDependencies()
484 {
485 return this.getSuperServiceOperation().getSourceDependencies();
486 }
487
488
489 public org.andromda.metafacades.uml.StateMachineFacade getStateMachineContext()
490 {
491 return this.getSuperServiceOperation().getStateMachineContext();
492 }
493
494
495 public java.util.Collection getStereotypeNames()
496 {
497 return this.getSuperServiceOperation().getStereotypeNames();
498 }
499
500
501 public java.util.Collection getStereotypes()
502 {
503 return this.getSuperServiceOperation().getStereotypes();
504 }
505
506
507 public java.util.Collection getTaggedValues()
508 {
509 return this.getSuperServiceOperation().getTaggedValues();
510 }
511
512
513 public java.util.Collection getTargetDependencies()
514 {
515 return this.getSuperServiceOperation().getTargetDependencies();
516 }
517
518
519 public java.lang.Object getTemplateParameter(java.lang.String parameterName)
520 {
521 return this.getSuperServiceOperation().getTemplateParameter(parameterName);
522 }
523
524
525 public java.util.Collection getTemplateParameters()
526 {
527 return this.getSuperServiceOperation().getTemplateParameters();
528 }
529
530
531 public java.lang.String getVisibility()
532 {
533 return this.getSuperServiceOperation().getVisibility();
534 }
535
536
537 public boolean hasExactStereotype(java.lang.String stereotypeName)
538 {
539 return this.getSuperServiceOperation().hasExactStereotype(stereotypeName);
540 }
541
542
543 public boolean hasStereotype(java.lang.String stereotypeName)
544 {
545 return this.getSuperServiceOperation().hasStereotype(stereotypeName);
546 }
547
548
549 public boolean isBindingDependenciesPresent()
550 {
551 return this.getSuperServiceOperation().isBindingDependenciesPresent();
552 }
553
554
555 public boolean isConstraintsPresent()
556 {
557 return this.getSuperServiceOperation().isConstraintsPresent();
558 }
559
560
561 public boolean isTemplateParametersPresent()
562 {
563 return this.getSuperServiceOperation().isTemplateParametersPresent();
564 }
565
566
567 public java.lang.String translateConstraint(java.lang.String name, java.lang.String translation)
568 {
569 return this.getSuperServiceOperation().translateConstraint(name, translation);
570 }
571
572
573 public java.lang.String[] translateConstraints(java.lang.String translation)
574 {
575 return this.getSuperServiceOperation().translateConstraints(translation);
576 }
577
578
579 public java.lang.String[] translateConstraints(java.lang.String kind, java.lang.String translation)
580 {
581 return this.getSuperServiceOperation().translateConstraints(kind, translation);
582 }
583
584
585 public org.andromda.metafacades.uml.ParameterFacade findParameter(java.lang.String name)
586 {
587 return this.getSuperServiceOperation().findParameter(name);
588 }
589
590
591 public java.lang.Object findTaggedValue(java.lang.String name, boolean follow)
592 {
593 return this.getSuperServiceOperation().findTaggedValue(name, follow);
594 }
595
596
597 public java.lang.String getArgumentNames()
598 {
599 return this.getSuperServiceOperation().getArgumentNames();
600 }
601
602
603 public java.lang.String getArgumentTypeNames()
604 {
605 return this.getSuperServiceOperation().getArgumentTypeNames();
606 }
607
608
609 public java.util.Collection getArguments()
610 {
611 return this.getSuperServiceOperation().getArguments();
612 }
613
614
615 public java.lang.String getCall()
616 {
617 return this.getSuperServiceOperation().getCall();
618 }
619
620
621 public java.lang.String getConcurrency()
622 {
623 return this.getSuperServiceOperation().getConcurrency();
624 }
625
626
627 public java.lang.String getExceptionList(java.lang.String initialExceptions)
628 {
629 return this.getSuperServiceOperation().getExceptionList(initialExceptions);
630 }
631
632
633 public java.lang.String getExceptionList()
634 {
635 return this.getSuperServiceOperation().getExceptionList();
636 }
637
638
639 public java.util.Collection getExceptions()
640 {
641 return this.getSuperServiceOperation().getExceptions();
642 }
643
644
645 public int getLower()
646 {
647 return this.getSuperServiceOperation().getLower();
648 }
649
650
651 public org.andromda.metafacades.uml.OperationFacade getOverriddenOperation()
652 {
653 return this.getSuperServiceOperation().getOverriddenOperation();
654 }
655
656
657 public org.andromda.metafacades.uml.ClassifierFacade getOwner()
658 {
659 return this.getSuperServiceOperation().getOwner();
660 }
661
662
663 public java.util.Collection getParameters()
664 {
665 return this.getSuperServiceOperation().getParameters();
666 }
667
668
669 public java.lang.String getPostconditionName()
670 {
671 return this.getSuperServiceOperation().getPostconditionName();
672 }
673
674
675 public java.util.Collection getPostconditions()
676 {
677 return this.getSuperServiceOperation().getPostconditions();
678 }
679
680
681 public java.lang.String getPreconditionCall()
682 {
683 return this.getSuperServiceOperation().getPreconditionCall();
684 }
685
686
687 public java.lang.String getPreconditionName()
688 {
689 return this.getSuperServiceOperation().getPreconditionName();
690 }
691
692
693 public java.lang.String getPreconditionSignature()
694 {
695 return this.getSuperServiceOperation().getPreconditionSignature();
696 }
697
698
699 public java.util.Collection getPreconditions()
700 {
701 return this.getSuperServiceOperation().getPreconditions();
702 }
703
704
705 public org.andromda.metafacades.uml.ParameterFacade getReturnParameter()
706 {
707 return this.getSuperServiceOperation().getReturnParameter();
708 }
709
710
711 public org.andromda.metafacades.uml.ClassifierFacade getReturnType()
712 {
713 return this.getSuperServiceOperation().getReturnType();
714 }
715
716
717 public java.lang.String getSignature(boolean withArgumentNames)
718 {
719 return this.getSuperServiceOperation().getSignature(withArgumentNames);
720 }
721
722
723 public java.lang.String getSignature()
724 {
725 return this.getSuperServiceOperation().getSignature();
726 }
727
728
729 public java.lang.String getSignature(java.lang.String argumentModifier)
730 {
731 return this.getSuperServiceOperation().getSignature(argumentModifier);
732 }
733
734
735 public java.lang.String getTypedArgumentList(java.lang.String modifier)
736 {
737 return this.getSuperServiceOperation().getTypedArgumentList(modifier);
738 }
739
740
741 public java.lang.String getTypedArgumentList()
742 {
743 return this.getSuperServiceOperation().getTypedArgumentList();
744 }
745
746
747 public int getUpper()
748 {
749 return this.getSuperServiceOperation().getUpper();
750 }
751
752
753 public boolean isAbstract()
754 {
755 return this.getSuperServiceOperation().isAbstract();
756 }
757
758
759 public boolean isExceptionsPresent()
760 {
761 return this.getSuperServiceOperation().isExceptionsPresent();
762 }
763
764
765 public boolean isOverriding()
766 {
767 return this.getSuperServiceOperation().isOverriding();
768 }
769
770
771 public boolean isPostconditionsPresent()
772 {
773 return this.getSuperServiceOperation().isPostconditionsPresent();
774 }
775
776
777 public boolean isPreconditionsPresent()
778 {
779 return this.getSuperServiceOperation().isPreconditionsPresent();
780 }
781
782
783 public boolean isQuery()
784 {
785 return this.getSuperServiceOperation().isQuery();
786 }
787
788
789 public boolean isReturnTypePresent()
790 {
791 return this.getSuperServiceOperation().isReturnTypePresent();
792 }
793
794
795 public boolean isStatic()
796 {
797 return this.getSuperServiceOperation().isStatic();
798 }
799
800
801 public java.util.Collection getRoles()
802 {
803 return this.getSuperServiceOperation().getRoles();
804 }
805
806
807 public org.andromda.metafacades.uml.Service getService()
808 {
809 return this.getSuperServiceOperation().getService();
810 }
811
812 /***
813 * @see org.andromda.core.metafacade.MetafacadeBase#initialize()
814 */
815 public void initialize()
816 {
817 this.getSuperServiceOperation().initialize();
818 }
819
820 /***
821 * @see org.andromda.core.metafacade.MetafacadeBase#getValidationOwner()
822 */
823 public Object getValidationOwner()
824 {
825 Object owner = this.getSuperServiceOperation().getValidationOwner();
826 return owner;
827 }
828
829 /***
830 * @see org.andromda.core.metafacade.MetafacadeBase#getValidationName()
831 */
832 public String getValidationName()
833 {
834 String name = this.getSuperServiceOperation().getValidationName();
835 return name;
836 }
837
838 /***
839 * @see org.andromda.core.metafacade.MetafacadeBase#validateInvariants(java.util.Collection)
840 */
841 public void validateInvariants(java.util.Collection validationMessages)
842 {
843 this.getSuperServiceOperation().validateInvariants(validationMessages);
844 }
845
846 /***
847 * The property that stores the name of the metafacade.
848 */
849 private static final String NAME_PROPERTY = "name";
850
851 /***
852 * @see java.lang.Object#toString()
853 */
854 public String toString()
855 {
856 final StringBuffer toString = new StringBuffer(this.getClass().getName());
857 toString.append("[");
858 try
859 {
860 toString.append(org.andromda.core.common.Introspector.instance().getProperty(this, NAME_PROPERTY));
861 }
862 catch (final Throwable throwable)
863 {
864
865 }
866 toString.append("]");
867 return toString.toString();
868 }
869 }