1
2
3
4 package org.andromda.cartridges.meta.metafacades;
5
6 /***
7 * MetafacadeLogic for org.andromda.cartridges.meta.metafacades.MetafacadeOperation
8 *
9 * @see org.andromda.cartridges.meta.metafacades.MetafacadeOperation
10 */
11 public abstract class MetafacadeOperationLogic
12 extends org.andromda.core.metafacade.MetafacadeBase
13 implements org.andromda.cartridges.meta.metafacades.MetafacadeOperation
14 {
15
16 protected Object metaObject;
17
18 public MetafacadeOperationLogic(Object metaObject, String context)
19 {
20 super(metaObject, getContext(context));
21 this.superOperationFacade =
22 (org.andromda.metafacades.uml.OperationFacade)
23 org.andromda.core.metafacade.MetafacadeFactory.getInstance().createFacadeImpl(
24 "org.andromda.metafacades.uml.OperationFacade",
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.meta.metafacades.MetafacadeOperation";
38 }
39 return context;
40 }
41
42 private org.andromda.metafacades.uml.OperationFacade superOperationFacade;
43 private boolean superOperationFacadeInitialized = false;
44
45 /***
46 * Gets the org.andromda.metafacades.uml.OperationFacade parent instance.
47 */
48 private org.andromda.metafacades.uml.OperationFacade getSuperOperationFacade()
49 {
50 if (!this.superOperationFacadeInitialized)
51 {
52 ((org.andromda.core.metafacade.MetafacadeBase)superOperationFacade).setMetafacadeContext(this.getMetafacadeContext());
53 this.superOperationFacadeInitialized = true;
54 }
55 return superOperationFacade;
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.superOperationFacadeInitialized)
68 {
69 ((org.andromda.core.metafacade.MetafacadeBase)superOperationFacade).resetMetafacadeContext(context);
70 }
71 }
72 }
73
74 /***
75 * @see org.andromda.cartridges.meta.metafacades.MetafacadeOperation
76 */
77 public boolean isMetafacadeOperationMetaType()
78 {
79 return true;
80 }
81
82
83
84 /***
85 * @see org.andromda.cartridges.meta.metafacades.MetafacadeOperation#getImplementationName()
86 */
87 protected abstract java.lang.String handleGetImplementationName();
88
89 private void handleGetImplementationName1aPreCondition()
90 {
91 }
92
93 private void handleGetImplementationName1aPostCondition()
94 {
95 }
96
97 private java.lang.String __implementationName1a;
98 private boolean __implementationName1aSet = false;
99
100 public final java.lang.String getImplementationName()
101 {
102 java.lang.String implementationName1a = this.__implementationName1a;
103 if (!this.__implementationName1aSet)
104 {
105 handleGetImplementationName1aPreCondition();
106 implementationName1a = handleGetImplementationName();
107 handleGetImplementationName1aPostCondition();
108 this.__implementationName1a = implementationName1a;
109 if (isMetafacadePropertyCachingEnabled())
110 {
111 this.__implementationName1aSet = true;
112 }
113 }
114 return implementationName1a;
115 }
116
117 /***
118 * @see org.andromda.metafacades.uml.OperationFacade
119 */
120 public boolean isOperationFacadeMetaType()
121 {
122 return true;
123 }
124
125 /***
126 * @see org.andromda.metafacades.uml.ModelElementFacade
127 */
128 public boolean isModelElementFacadeMetaType()
129 {
130 return true;
131 }
132
133
134
135 public void copyTaggedValues(org.andromda.metafacades.uml.ModelElementFacade element)
136 {
137 this.getSuperOperationFacade().copyTaggedValues(element);
138 }
139
140
141 public java.lang.Object findTaggedValue(java.lang.String tagName)
142 {
143 return this.getSuperOperationFacade().findTaggedValue(tagName);
144 }
145
146
147 public java.util.Collection findTaggedValues(java.lang.String tagName)
148 {
149 return this.getSuperOperationFacade().findTaggedValues(tagName);
150 }
151
152
153 public java.util.Collection getConstraints()
154 {
155 return this.getSuperOperationFacade().getConstraints();
156 }
157
158
159 public java.util.Collection getConstraints(java.lang.String kind)
160 {
161 return this.getSuperOperationFacade().getConstraints(kind);
162 }
163
164
165 public java.lang.String getDocumentation(java.lang.String indent, int lineLength)
166 {
167 return this.getSuperOperationFacade().getDocumentation(indent, lineLength);
168 }
169
170
171 public java.lang.String getDocumentation(java.lang.String indent, int lineLength, boolean htmlStyle)
172 {
173 return this.getSuperOperationFacade().getDocumentation(indent, lineLength, htmlStyle);
174 }
175
176
177 public java.lang.String getDocumentation(java.lang.String indent)
178 {
179 return this.getSuperOperationFacade().getDocumentation(indent);
180 }
181
182
183 public java.lang.String getFullyQualifiedName(boolean modelName)
184 {
185 return this.getSuperOperationFacade().getFullyQualifiedName(modelName);
186 }
187
188
189 public java.lang.String getFullyQualifiedName()
190 {
191 return this.getSuperOperationFacade().getFullyQualifiedName();
192 }
193
194
195 public java.lang.String getFullyQualifiedNamePath()
196 {
197 return this.getSuperOperationFacade().getFullyQualifiedNamePath();
198 }
199
200
201 public java.lang.String getId()
202 {
203 return this.getSuperOperationFacade().getId();
204 }
205
206
207 public org.andromda.metafacades.uml.TypeMappings getLanguageMappings()
208 {
209 return this.getSuperOperationFacade().getLanguageMappings();
210 }
211
212
213 public org.andromda.metafacades.uml.ModelFacade getModel()
214 {
215 return this.getSuperOperationFacade().getModel();
216 }
217
218
219 public java.lang.String getName()
220 {
221 return this.getSuperOperationFacade().getName();
222 }
223
224
225 public org.andromda.metafacades.uml.ModelElementFacade getPackage()
226 {
227 return this.getSuperOperationFacade().getPackage();
228 }
229
230
231 public java.lang.String getPackageName(boolean modelName)
232 {
233 return this.getSuperOperationFacade().getPackageName(modelName);
234 }
235
236
237 public java.lang.String getPackageName()
238 {
239 return this.getSuperOperationFacade().getPackageName();
240 }
241
242
243 public java.lang.String getPackagePath()
244 {
245 return this.getSuperOperationFacade().getPackagePath();
246 }
247
248
249 public org.andromda.metafacades.uml.PackageFacade getRootPackage()
250 {
251 return this.getSuperOperationFacade().getRootPackage();
252 }
253
254
255 public java.util.Collection getSourceDependencies()
256 {
257 return this.getSuperOperationFacade().getSourceDependencies();
258 }
259
260
261 public org.andromda.metafacades.uml.StateMachineFacade getStateMachineContext()
262 {
263 return this.getSuperOperationFacade().getStateMachineContext();
264 }
265
266
267 public java.util.Collection getStereotypeNames()
268 {
269 return this.getSuperOperationFacade().getStereotypeNames();
270 }
271
272
273 public java.util.Collection getStereotypes()
274 {
275 return this.getSuperOperationFacade().getStereotypes();
276 }
277
278
279 public java.util.Collection getTaggedValues()
280 {
281 return this.getSuperOperationFacade().getTaggedValues();
282 }
283
284
285 public java.util.Collection getTargetDependencies()
286 {
287 return this.getSuperOperationFacade().getTargetDependencies();
288 }
289
290
291 public java.lang.Object getTemplateParameter(java.lang.String parameterName)
292 {
293 return this.getSuperOperationFacade().getTemplateParameter(parameterName);
294 }
295
296
297 public java.util.Collection getTemplateParameters()
298 {
299 return this.getSuperOperationFacade().getTemplateParameters();
300 }
301
302
303 public java.lang.String getVisibility()
304 {
305 return this.getSuperOperationFacade().getVisibility();
306 }
307
308
309 public boolean hasExactStereotype(java.lang.String stereotypeName)
310 {
311 return this.getSuperOperationFacade().hasExactStereotype(stereotypeName);
312 }
313
314
315 public boolean hasStereotype(java.lang.String stereotypeName)
316 {
317 return this.getSuperOperationFacade().hasStereotype(stereotypeName);
318 }
319
320
321 public boolean isBindingDependenciesPresent()
322 {
323 return this.getSuperOperationFacade().isBindingDependenciesPresent();
324 }
325
326
327 public boolean isConstraintsPresent()
328 {
329 return this.getSuperOperationFacade().isConstraintsPresent();
330 }
331
332
333 public boolean isTemplateParametersPresent()
334 {
335 return this.getSuperOperationFacade().isTemplateParametersPresent();
336 }
337
338
339 public java.lang.String translateConstraint(java.lang.String name, java.lang.String translation)
340 {
341 return this.getSuperOperationFacade().translateConstraint(name, translation);
342 }
343
344
345 public java.lang.String[] translateConstraints(java.lang.String translation)
346 {
347 return this.getSuperOperationFacade().translateConstraints(translation);
348 }
349
350
351 public java.lang.String[] translateConstraints(java.lang.String kind, java.lang.String translation)
352 {
353 return this.getSuperOperationFacade().translateConstraints(kind, translation);
354 }
355
356
357 public org.andromda.metafacades.uml.ParameterFacade findParameter(java.lang.String name)
358 {
359 return this.getSuperOperationFacade().findParameter(name);
360 }
361
362
363 public java.lang.Object findTaggedValue(java.lang.String name, boolean follow)
364 {
365 return this.getSuperOperationFacade().findTaggedValue(name, follow);
366 }
367
368
369 public java.lang.String getArgumentNames()
370 {
371 return this.getSuperOperationFacade().getArgumentNames();
372 }
373
374
375 public java.lang.String getArgumentTypeNames()
376 {
377 return this.getSuperOperationFacade().getArgumentTypeNames();
378 }
379
380
381 public java.util.Collection getArguments()
382 {
383 return this.getSuperOperationFacade().getArguments();
384 }
385
386
387 public java.lang.String getCall()
388 {
389 return this.getSuperOperationFacade().getCall();
390 }
391
392
393 public java.lang.String getConcurrency()
394 {
395 return this.getSuperOperationFacade().getConcurrency();
396 }
397
398
399 public java.lang.String getExceptionList(java.lang.String initialExceptions)
400 {
401 return this.getSuperOperationFacade().getExceptionList(initialExceptions);
402 }
403
404
405 public java.lang.String getExceptionList()
406 {
407 return this.getSuperOperationFacade().getExceptionList();
408 }
409
410
411 public java.util.Collection getExceptions()
412 {
413 return this.getSuperOperationFacade().getExceptions();
414 }
415
416
417 public int getLower()
418 {
419 return this.getSuperOperationFacade().getLower();
420 }
421
422
423 public org.andromda.metafacades.uml.OperationFacade getOverriddenOperation()
424 {
425 return this.getSuperOperationFacade().getOverriddenOperation();
426 }
427
428
429 public org.andromda.metafacades.uml.ClassifierFacade getOwner()
430 {
431 return this.getSuperOperationFacade().getOwner();
432 }
433
434
435 public java.util.Collection getParameters()
436 {
437 return this.getSuperOperationFacade().getParameters();
438 }
439
440
441 public java.lang.String getPostconditionName()
442 {
443 return this.getSuperOperationFacade().getPostconditionName();
444 }
445
446
447 public java.util.Collection getPostconditions()
448 {
449 return this.getSuperOperationFacade().getPostconditions();
450 }
451
452
453 public java.lang.String getPreconditionCall()
454 {
455 return this.getSuperOperationFacade().getPreconditionCall();
456 }
457
458
459 public java.lang.String getPreconditionName()
460 {
461 return this.getSuperOperationFacade().getPreconditionName();
462 }
463
464
465 public java.lang.String getPreconditionSignature()
466 {
467 return this.getSuperOperationFacade().getPreconditionSignature();
468 }
469
470
471 public java.util.Collection getPreconditions()
472 {
473 return this.getSuperOperationFacade().getPreconditions();
474 }
475
476
477 public org.andromda.metafacades.uml.ParameterFacade getReturnParameter()
478 {
479 return this.getSuperOperationFacade().getReturnParameter();
480 }
481
482
483 public org.andromda.metafacades.uml.ClassifierFacade getReturnType()
484 {
485 return this.getSuperOperationFacade().getReturnType();
486 }
487
488
489 public java.lang.String getSignature(boolean withArgumentNames)
490 {
491 return this.getSuperOperationFacade().getSignature(withArgumentNames);
492 }
493
494
495 public java.lang.String getSignature()
496 {
497 return this.getSuperOperationFacade().getSignature();
498 }
499
500
501 public java.lang.String getSignature(java.lang.String argumentModifier)
502 {
503 return this.getSuperOperationFacade().getSignature(argumentModifier);
504 }
505
506
507 public java.lang.String getTypedArgumentList(java.lang.String modifier)
508 {
509 return this.getSuperOperationFacade().getTypedArgumentList(modifier);
510 }
511
512
513 public java.lang.String getTypedArgumentList()
514 {
515 return this.getSuperOperationFacade().getTypedArgumentList();
516 }
517
518
519 public int getUpper()
520 {
521 return this.getSuperOperationFacade().getUpper();
522 }
523
524
525 public boolean isAbstract()
526 {
527 return this.getSuperOperationFacade().isAbstract();
528 }
529
530
531 public boolean isExceptionsPresent()
532 {
533 return this.getSuperOperationFacade().isExceptionsPresent();
534 }
535
536
537 public boolean isOverriding()
538 {
539 return this.getSuperOperationFacade().isOverriding();
540 }
541
542
543 public boolean isPostconditionsPresent()
544 {
545 return this.getSuperOperationFacade().isPostconditionsPresent();
546 }
547
548
549 public boolean isPreconditionsPresent()
550 {
551 return this.getSuperOperationFacade().isPreconditionsPresent();
552 }
553
554
555 public boolean isQuery()
556 {
557 return this.getSuperOperationFacade().isQuery();
558 }
559
560
561 public boolean isReturnTypePresent()
562 {
563 return this.getSuperOperationFacade().isReturnTypePresent();
564 }
565
566
567 public boolean isStatic()
568 {
569 return this.getSuperOperationFacade().isStatic();
570 }
571
572 /***
573 * @see org.andromda.core.metafacade.MetafacadeBase#initialize()
574 */
575 public void initialize()
576 {
577 this.getSuperOperationFacade().initialize();
578 }
579
580 /***
581 * @see org.andromda.core.metafacade.MetafacadeBase#getValidationOwner()
582 */
583 public Object getValidationOwner()
584 {
585 Object owner = this.getSuperOperationFacade().getValidationOwner();
586 return owner;
587 }
588
589 /***
590 * @see org.andromda.core.metafacade.MetafacadeBase#getValidationName()
591 */
592 public String getValidationName()
593 {
594 String name = this.getSuperOperationFacade().getValidationName();
595 return name;
596 }
597
598 /***
599 * @see org.andromda.core.metafacade.MetafacadeBase#validateInvariants(java.util.Collection)
600 */
601 public void validateInvariants(java.util.Collection validationMessages)
602 {
603 this.getSuperOperationFacade().validateInvariants(validationMessages);
604 }
605
606 /***
607 * The property that stores the name of the metafacade.
608 */
609 private static final String NAME_PROPERTY = "name";
610
611 /***
612 * @see java.lang.Object#toString()
613 */
614 public String toString()
615 {
616 final StringBuffer toString = new StringBuffer(this.getClass().getName());
617 toString.append("[");
618 try
619 {
620 toString.append(org.andromda.core.common.Introspector.instance().getProperty(this, NAME_PROPERTY));
621 }
622 catch (final Throwable throwable)
623 {
624
625 }
626 toString.append("]");
627 return toString.toString();
628 }
629 }