1 // license-header java merge-point
2 //
3 // Attention: generated code (by MetafacadeLogic.vsl) - do not modify!
4 //
5 package org.andromda.cartridges.webservice.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.AssociationEndFacade;
14 import org.andromda.metafacades.uml.AttributeFacade;
15 import org.andromda.metafacades.uml.ClassifierFacade;
16 import org.andromda.metafacades.uml.ConstraintFacade;
17 import org.andromda.metafacades.uml.DependencyFacade;
18 import org.andromda.metafacades.uml.Destination;
19 import org.andromda.metafacades.uml.GeneralizableElementFacade;
20 import org.andromda.metafacades.uml.GeneralizationFacade;
21 import org.andromda.metafacades.uml.ModelElementFacade;
22 import org.andromda.metafacades.uml.ModelFacade;
23 import org.andromda.metafacades.uml.OperationFacade;
24 import org.andromda.metafacades.uml.PackageFacade;
25 import org.andromda.metafacades.uml.Role;
26 import org.andromda.metafacades.uml.Service;
27 import org.andromda.metafacades.uml.StateMachineFacade;
28 import org.andromda.metafacades.uml.StereotypeFacade;
29 import org.andromda.metafacades.uml.TaggedValueFacade;
30 import org.andromda.metafacades.uml.TemplateParameterFacade;
31 import org.andromda.metafacades.uml.TypeMappings;
32 import org.andromda.translation.ocl.validation.OCLCollections;
33 import org.andromda.translation.ocl.validation.OCLIntrospector;
34 import org.andromda.translation.ocl.validation.OCLResultEnsurer;
35 import org.apache.commons.collections.Transformer;
36 import org.apache.log4j.Logger;
37
38 /**
39 * Represents a web service.
40 * MetafacadeLogic for WebService
41 *
42 * @see WebService
43 */
44 public abstract class WebServiceLogic
45 extends MetafacadeBase
46 implements WebService
47 {
48 /**
49 * The underlying UML object
50 * @see Object
51 */
52 protected Object metaObject;
53
54 /** Create Metafacade implementation instance using the MetafacadeFactory from the context
55 * @param metaObjectIn
56 * @param context
57 */
58 protected WebServiceLogic(Object metaObjectIn, String context)
59 {
60 super(metaObjectIn, getContext(context));
61 this.superService =
62 (Service)
63 MetafacadeFactory.getInstance().createFacadeImpl(
64 "org.andromda.metafacades.uml.Service",
65 metaObjectIn,
66 getContext(context));
67 this.metaObject = metaObjectIn;
68 }
69
70 /**
71 * The logger instance.
72 */
73 private static final Logger logger = Logger.getLogger(WebServiceLogic.class);
74
75 /**
76 * Gets the context for this metafacade logic instance.
77 * @param context String. Set to WebService if null
78 * @return context String
79 */
80 private static String getContext(String context)
81 {
82 if (context == null)
83 {
84 context = "org.andromda.cartridges.webservice.metafacades.WebService";
85 }
86 return context;
87 }
88
89 private Service superService;
90 private boolean superServiceInitialized = false;
91
92 /**
93 * Gets the Service parent instance.
94 * @return this.superService Service
95 */
96 private Service getSuperService()
97 {
98 if (!this.superServiceInitialized)
99 {
100 ((MetafacadeBase)this.superService).setMetafacadeContext(this.getMetafacadeContext());
101 this.superServiceInitialized = true;
102 }
103 return this.superService;
104 }
105
106 /** Reset context only for non-root metafacades
107 * @param context
108 * @see MetafacadeBase#resetMetafacadeContext(String context)
109 */
110 @Override
111 public void resetMetafacadeContext(String context)
112 {
113 if (!this.contextRoot) // reset context only for non-root metafacades
114 {
115 context = getContext(context); // to have same value as in original constructor call
116 setMetafacadeContext (context);
117 if (this.superServiceInitialized)
118 {
119 ((MetafacadeBase)this.superService).resetMetafacadeContext(context);
120 }
121 }
122 }
123
124 /**
125 * @return boolean true always
126 * @see WebService
127 */
128 public boolean isWebServiceMetaType()
129 {
130 return true;
131 }
132
133 // --------------- attributes ---------------------
134
135 /**
136 * @see org.andromda.cartridges.webservice.metafacades.WebService#getRpcClassName()
137 * @return String
138 */
139 protected abstract String handleGetRpcClassName();
140
141 private String __rpcClassName1a;
142 private boolean __rpcClassName1aSet = false;
143
144 /**
145 * The name of the RPC implementation class.
146 * @return (String)handleGetRpcClassName()
147 */
148 public final String getRpcClassName()
149 {
150 String rpcClassName1a = this.__rpcClassName1a;
151 if (!this.__rpcClassName1aSet)
152 {
153 // rpcClassName has no pre constraints
154 rpcClassName1a = handleGetRpcClassName();
155 // rpcClassName has no post constraints
156 this.__rpcClassName1a = rpcClassName1a;
157 if (isMetafacadePropertyCachingEnabled())
158 {
159 this.__rpcClassName1aSet = true;
160 }
161 }
162 return rpcClassName1a;
163 }
164
165 /**
166 * @see org.andromda.cartridges.webservice.metafacades.WebService#isSecured()
167 * @return boolean
168 */
169 protected abstract boolean handleIsSecured();
170
171 private boolean __secured2a;
172 private boolean __secured2aSet = false;
173
174 /**
175 * Whether or not this web service is secured (its based on whether or not it has any roles
176 * associated to it).
177 * @return (boolean)handleIsSecured()
178 */
179 public final boolean isSecured()
180 {
181 boolean secured2a = this.__secured2a;
182 if (!this.__secured2aSet)
183 {
184 // secured has no pre constraints
185 secured2a = handleIsSecured();
186 // secured has no post constraints
187 this.__secured2a = secured2a;
188 if (isMetafacadePropertyCachingEnabled())
189 {
190 this.__secured2aSet = true;
191 }
192 }
193 return secured2a;
194 }
195
196 /**
197 * @see org.andromda.cartridges.webservice.metafacades.WebService#getAllowedMethods()
198 * @return String
199 */
200 protected abstract String handleGetAllowedMethods();
201
202 private String __allowedMethods3a;
203 private boolean __allowedMethods3aSet = false;
204
205 /**
206 * Creates a space delimited string containing a name of ALL allowed methods.
207 * @return (String)handleGetAllowedMethods()
208 */
209 public final String getAllowedMethods()
210 {
211 String allowedMethods3a = this.__allowedMethods3a;
212 if (!this.__allowedMethods3aSet)
213 {
214 // allowedMethods has no pre constraints
215 allowedMethods3a = handleGetAllowedMethods();
216 // allowedMethods has no post constraints
217 this.__allowedMethods3a = allowedMethods3a;
218 if (isMetafacadePropertyCachingEnabled())
219 {
220 this.__allowedMethods3aSet = true;
221 }
222 }
223 return allowedMethods3a;
224 }
225
226 /**
227 * @see org.andromda.cartridges.webservice.metafacades.WebService#getWsdlFile()
228 * @return String
229 */
230 protected abstract String handleGetWsdlFile();
231
232 private String __wsdlFile4a;
233 private boolean __wsdlFile4aSet = false;
234
235 /**
236 * The location of the WSDL file for this web service.
237 * @return (String)handleGetWsdlFile()
238 */
239 public final String getWsdlFile()
240 {
241 String wsdlFile4a = this.__wsdlFile4a;
242 if (!this.__wsdlFile4aSet)
243 {
244 // wsdlFile has no pre constraints
245 wsdlFile4a = handleGetWsdlFile();
246 // wsdlFile has no post constraints
247 this.__wsdlFile4a = wsdlFile4a;
248 if (isMetafacadePropertyCachingEnabled())
249 {
250 this.__wsdlFile4aSet = true;
251 }
252 }
253 return wsdlFile4a;
254 }
255
256 /**
257 * @see org.andromda.cartridges.webservice.metafacades.WebService#getUse()
258 * @return String
259 */
260 protected abstract String handleGetUse();
261
262 private String __use5a;
263 private boolean __use5aSet = false;
264
265 /**
266 * The use of items in the binding, either LITERAL or ENCODED.
267 * @return (String)handleGetUse()
268 */
269 public final String getUse()
270 {
271 String use5a = this.__use5a;
272 if (!this.__use5aSet)
273 {
274 // use has no pre constraints
275 use5a = handleGetUse();
276 // use has no post constraints
277 this.__use5a = use5a;
278 if (isMetafacadePropertyCachingEnabled())
279 {
280 this.__use5aSet = true;
281 }
282 }
283 return use5a;
284 }
285
286 /**
287 * @see org.andromda.cartridges.webservice.metafacades.WebService#getStyle()
288 * @return String
289 */
290 protected abstract String handleGetStyle();
291
292 private String __style6a;
293 private boolean __style6aSet = false;
294
295 /**
296 * The style of binding in the generated WSDL, either DOCUMENT, RPC, or WRAPPED.
297 * @return (String)handleGetStyle()
298 */
299 public final String getStyle()
300 {
301 String style6a = this.__style6a;
302 if (!this.__style6aSet)
303 {
304 // style has no pre constraints
305 style6a = handleGetStyle();
306 // style has no post constraints
307 this.__style6a = style6a;
308 if (isMetafacadePropertyCachingEnabled())
309 {
310 this.__style6aSet = true;
311 }
312 }
313 return style6a;
314 }
315
316 /**
317 * @see org.andromda.cartridges.webservice.metafacades.WebService#getNamespace()
318 * @return String
319 */
320 protected abstract String handleGetNamespace();
321
322 private String __namespace7a;
323 private boolean __namespace7aSet = false;
324
325 /**
326 * The name of the namespace to which this web service belongs.
327 * @return (String)handleGetNamespace()
328 */
329 public final String getNamespace()
330 {
331 String namespace7a = this.__namespace7a;
332 if (!this.__namespace7aSet)
333 {
334 // namespace has no pre constraints
335 namespace7a = handleGetNamespace();
336 // namespace has no post constraints
337 this.__namespace7a = namespace7a;
338 if (isMetafacadePropertyCachingEnabled())
339 {
340 this.__namespace7aSet = true;
341 }
342 }
343 return namespace7a;
344 }
345
346 /**
347 * @see org.andromda.cartridges.webservice.metafacades.WebService#getProvider()
348 * @return String
349 */
350 protected abstract String handleGetProvider();
351
352 private String __provider8a;
353 private boolean __provider8aSet = false;
354
355 /**
356 * The provider for this web service. Provider is something like: 'java:RPC', or 'java:EJB' etc.
357 * @return (String)handleGetProvider()
358 */
359 public final String getProvider()
360 {
361 String provider8a = this.__provider8a;
362 if (!this.__provider8aSet)
363 {
364 // provider has no pre constraints
365 provider8a = handleGetProvider();
366 // provider has no post constraints
367 this.__provider8a = provider8a;
368 if (isMetafacadePropertyCachingEnabled())
369 {
370 this.__provider8aSet = true;
371 }
372 }
373 return provider8a;
374 }
375
376 /**
377 * @see org.andromda.cartridges.webservice.metafacades.WebService#getNamespacePrefix()
378 * @return String
379 */
380 protected abstract String handleGetNamespacePrefix();
381
382 private String __namespacePrefix9a;
383 private boolean __namespacePrefix9aSet = false;
384
385 /**
386 * The namespace prefix used for types defined within the generated WSDLs.
387 * @return (String)handleGetNamespacePrefix()
388 */
389 public final String getNamespacePrefix()
390 {
391 String namespacePrefix9a = this.__namespacePrefix9a;
392 if (!this.__namespacePrefix9aSet)
393 {
394 // namespacePrefix has no pre constraints
395 namespacePrefix9a = handleGetNamespacePrefix();
396 // namespacePrefix has no post constraints
397 this.__namespacePrefix9a = namespacePrefix9a;
398 if (isMetafacadePropertyCachingEnabled())
399 {
400 this.__namespacePrefix9aSet = true;
401 }
402 }
403 return namespacePrefix9a;
404 }
405
406 /**
407 * @see org.andromda.cartridges.webservice.metafacades.WebService#getEjbHomeInterface()
408 * @return String
409 */
410 protected abstract String handleGetEjbHomeInterface();
411
412 private String __ejbHomeInterface10a;
413 private boolean __ejbHomeInterface10aSet = false;
414
415 /**
416 * The home interface name for an EJB provider.
417 * @return (String)handleGetEjbHomeInterface()
418 */
419 public final String getEjbHomeInterface()
420 {
421 String ejbHomeInterface10a = this.__ejbHomeInterface10a;
422 if (!this.__ejbHomeInterface10aSet)
423 {
424 // ejbHomeInterface has no pre constraints
425 ejbHomeInterface10a = handleGetEjbHomeInterface();
426 // ejbHomeInterface has no post constraints
427 this.__ejbHomeInterface10a = ejbHomeInterface10a;
428 if (isMetafacadePropertyCachingEnabled())
429 {
430 this.__ejbHomeInterface10aSet = true;
431 }
432 }
433 return ejbHomeInterface10a;
434 }
435
436 /**
437 * @see org.andromda.cartridges.webservice.metafacades.WebService#getEjbInterface()
438 * @return String
439 */
440 protected abstract String handleGetEjbInterface();
441
442 private String __ejbInterface11a;
443 private boolean __ejbInterface11aSet = false;
444
445 /**
446 * The interface name for an EJB provider.
447 * @return (String)handleGetEjbInterface()
448 */
449 public final String getEjbInterface()
450 {
451 String ejbInterface11a = this.__ejbInterface11a;
452 if (!this.__ejbInterface11aSet)
453 {
454 // ejbInterface has no pre constraints
455 ejbInterface11a = handleGetEjbInterface();
456 // ejbInterface has no post constraints
457 this.__ejbInterface11a = ejbInterface11a;
458 if (isMetafacadePropertyCachingEnabled())
459 {
460 this.__ejbInterface11aSet = true;
461 }
462 }
463 return ejbInterface11a;
464 }
465
466 /**
467 * @see org.andromda.cartridges.webservice.metafacades.WebService#getEjbJndiName()
468 * @return String
469 */
470 protected abstract String handleGetEjbJndiName();
471
472 private String __ejbJndiName12a;
473 private boolean __ejbJndiName12aSet = false;
474
475 /**
476 * The JNDI name for the EJB provider (the EJB that provides the functionality behind this web
477 * service).
478 * @return (String)handleGetEjbJndiName()
479 */
480 public final String getEjbJndiName()
481 {
482 String ejbJndiName12a = this.__ejbJndiName12a;
483 if (!this.__ejbJndiName12aSet)
484 {
485 // ejbJndiName has no pre constraints
486 ejbJndiName12a = handleGetEjbJndiName();
487 // ejbJndiName has no post constraints
488 this.__ejbJndiName12a = ejbJndiName12a;
489 if (isMetafacadePropertyCachingEnabled())
490 {
491 this.__ejbJndiName12aSet = true;
492 }
493 }
494 return ejbJndiName12a;
495 }
496
497 /**
498 * @see org.andromda.cartridges.webservice.metafacades.WebService#getQName()
499 * @return String
500 */
501 protected abstract String handleGetQName();
502
503 private String __qName13a;
504 private boolean __qName13aSet = false;
505
506 /**
507 * The QName for this service. Usually it will be the same name as the model element, however
508 * it is possible to specify a prefix to give to this name.
509 * @return (String)handleGetQName()
510 */
511 public final String getQName()
512 {
513 String qName13a = this.__qName13a;
514 if (!this.__qName13aSet)
515 {
516 // qName has no pre constraints
517 qName13a = handleGetQName();
518 // qName has no post constraints
519 this.__qName13a = qName13a;
520 if (isMetafacadePropertyCachingEnabled())
521 {
522 this.__qName13aSet = true;
523 }
524 }
525 return qName13a;
526 }
527
528 /**
529 * @see org.andromda.cartridges.webservice.metafacades.WebService#getTestPackageName()
530 * @return String
531 */
532 protected abstract String handleGetTestPackageName();
533
534 private String __testPackageName14a;
535 private boolean __testPackageName14aSet = false;
536
537 /**
538 * The name of the package to which tests are generated.
539 * @return (String)handleGetTestPackageName()
540 */
541 public final String getTestPackageName()
542 {
543 String testPackageName14a = this.__testPackageName14a;
544 if (!this.__testPackageName14aSet)
545 {
546 // testPackageName has no pre constraints
547 testPackageName14a = handleGetTestPackageName();
548 // testPackageName has no post constraints
549 this.__testPackageName14a = testPackageName14a;
550 if (isMetafacadePropertyCachingEnabled())
551 {
552 this.__testPackageName14aSet = true;
553 }
554 }
555 return testPackageName14a;
556 }
557
558 /**
559 * @see org.andromda.cartridges.webservice.metafacades.WebService#getFullyQualifiedTestName()
560 * @return String
561 */
562 protected abstract String handleGetFullyQualifiedTestName();
563
564 private String __fullyQualifiedTestName15a;
565 private boolean __fullyQualifiedTestName15aSet = false;
566
567 /**
568 * The fully qualified name of a test generated for this web service.
569 * @return (String)handleGetFullyQualifiedTestName()
570 */
571 public final String getFullyQualifiedTestName()
572 {
573 String fullyQualifiedTestName15a = this.__fullyQualifiedTestName15a;
574 if (!this.__fullyQualifiedTestName15aSet)
575 {
576 // fullyQualifiedTestName has no pre constraints
577 fullyQualifiedTestName15a = handleGetFullyQualifiedTestName();
578 // fullyQualifiedTestName has no post constraints
579 this.__fullyQualifiedTestName15a = fullyQualifiedTestName15a;
580 if (isMetafacadePropertyCachingEnabled())
581 {
582 this.__fullyQualifiedTestName15aSet = true;
583 }
584 }
585 return fullyQualifiedTestName15a;
586 }
587
588 /**
589 * @see org.andromda.cartridges.webservice.metafacades.WebService#getTestName()
590 * @return String
591 */
592 protected abstract String handleGetTestName();
593
594 private String __testName16a;
595 private boolean __testName16aSet = false;
596
597 /**
598 * The name of a the test for this web service.
599 * @return (String)handleGetTestName()
600 */
601 public final String getTestName()
602 {
603 String testName16a = this.__testName16a;
604 if (!this.__testName16aSet)
605 {
606 // testName has no pre constraints
607 testName16a = handleGetTestName();
608 // testName has no post constraints
609 this.__testName16a = testName16a;
610 if (isMetafacadePropertyCachingEnabled())
611 {
612 this.__testName16aSet = true;
613 }
614 }
615 return testName16a;
616 }
617
618 /**
619 * @see org.andromda.cartridges.webservice.metafacades.WebService#isWrappedStyle()
620 * @return boolean
621 */
622 protected abstract boolean handleIsWrappedStyle();
623
624 private boolean __wrappedStyle17a;
625 private boolean __wrappedStyle17aSet = false;
626
627 /**
628 * Indicates whether or not this service style is "wrapped".
629 * @return (boolean)handleIsWrappedStyle()
630 */
631 public final boolean isWrappedStyle()
632 {
633 boolean wrappedStyle17a = this.__wrappedStyle17a;
634 if (!this.__wrappedStyle17aSet)
635 {
636 // wrappedStyle has no pre constraints
637 wrappedStyle17a = handleIsWrappedStyle();
638 // wrappedStyle has no post constraints
639 this.__wrappedStyle17a = wrappedStyle17a;
640 if (isMetafacadePropertyCachingEnabled())
641 {
642 this.__wrappedStyle17aSet = true;
643 }
644 }
645 return wrappedStyle17a;
646 }
647
648 /**
649 * @see org.andromda.cartridges.webservice.metafacades.WebService#isDocumentStyle()
650 * @return boolean
651 */
652 protected abstract boolean handleIsDocumentStyle();
653
654 private boolean __documentStyle18a;
655 private boolean __documentStyle18aSet = false;
656
657 /**
658 * Indicates whether or not this service is "document" style.
659 * @return (boolean)handleIsDocumentStyle()
660 */
661 public final boolean isDocumentStyle()
662 {
663 boolean documentStyle18a = this.__documentStyle18a;
664 if (!this.__documentStyle18aSet)
665 {
666 // documentStyle has no pre constraints
667 documentStyle18a = handleIsDocumentStyle();
668 // documentStyle has no post constraints
669 this.__documentStyle18a = documentStyle18a;
670 if (isMetafacadePropertyCachingEnabled())
671 {
672 this.__documentStyle18aSet = true;
673 }
674 }
675 return documentStyle18a;
676 }
677
678 /**
679 * @see org.andromda.cartridges.webservice.metafacades.WebService#isRpcStyle()
680 * @return boolean
681 */
682 protected abstract boolean handleIsRpcStyle();
683
684 private boolean __rpcStyle19a;
685 private boolean __rpcStyle19aSet = false;
686
687 /**
688 * Indicates whether or not this service is "rpc" style.
689 * @return (boolean)handleIsRpcStyle()
690 */
691 public final boolean isRpcStyle()
692 {
693 boolean rpcStyle19a = this.__rpcStyle19a;
694 if (!this.__rpcStyle19aSet)
695 {
696 // rpcStyle has no pre constraints
697 rpcStyle19a = handleIsRpcStyle();
698 // rpcStyle has no post constraints
699 this.__rpcStyle19a = rpcStyle19a;
700 if (isMetafacadePropertyCachingEnabled())
701 {
702 this.__rpcStyle19aSet = true;
703 }
704 }
705 return rpcStyle19a;
706 }
707
708 /**
709 * @see org.andromda.cartridges.webservice.metafacades.WebService#isLiteralUse()
710 * @return boolean
711 */
712 protected abstract boolean handleIsLiteralUse();
713
714 private boolean __literalUse20a;
715 private boolean __literalUse20aSet = false;
716
717 /**
718 * Indicates whether or not this web service has a "literal" use defined.
719 * @return (boolean)handleIsLiteralUse()
720 */
721 public final boolean isLiteralUse()
722 {
723 boolean literalUse20a = this.__literalUse20a;
724 if (!this.__literalUse20aSet)
725 {
726 // literalUse has no pre constraints
727 literalUse20a = handleIsLiteralUse();
728 // literalUse has no post constraints
729 this.__literalUse20a = literalUse20a;
730 if (isMetafacadePropertyCachingEnabled())
731 {
732 this.__literalUse20aSet = true;
733 }
734 }
735 return literalUse20a;
736 }
737
738 /**
739 * @see org.andromda.cartridges.webservice.metafacades.WebService#isEncodedUse()
740 * @return boolean
741 */
742 protected abstract boolean handleIsEncodedUse();
743
744 private boolean __encodedUse21a;
745 private boolean __encodedUse21aSet = false;
746
747 /**
748 * Indicates whether or not this web service has a "encoded" use defined.
749 * @return (boolean)handleIsEncodedUse()
750 */
751 public final boolean isEncodedUse()
752 {
753 boolean encodedUse21a = this.__encodedUse21a;
754 if (!this.__encodedUse21aSet)
755 {
756 // encodedUse has no pre constraints
757 encodedUse21a = handleIsEncodedUse();
758 // encodedUse has no post constraints
759 this.__encodedUse21a = encodedUse21a;
760 if (isMetafacadePropertyCachingEnabled())
761 {
762 this.__encodedUse21aSet = true;
763 }
764 }
765 return encodedUse21a;
766 }
767
768 /**
769 * @see org.andromda.cartridges.webservice.metafacades.WebService#getTestImplementationName()
770 * @return String
771 */
772 protected abstract String handleGetTestImplementationName();
773
774 private String __testImplementationName22a;
775 private boolean __testImplementationName22aSet = false;
776
777 /**
778 * The name for the test implementation class.
779 * @return (String)handleGetTestImplementationName()
780 */
781 public final String getTestImplementationName()
782 {
783 String testImplementationName22a = this.__testImplementationName22a;
784 if (!this.__testImplementationName22aSet)
785 {
786 // testImplementationName has no pre constraints
787 testImplementationName22a = handleGetTestImplementationName();
788 // testImplementationName has no post constraints
789 this.__testImplementationName22a = testImplementationName22a;
790 if (isMetafacadePropertyCachingEnabled())
791 {
792 this.__testImplementationName22aSet = true;
793 }
794 }
795 return testImplementationName22a;
796 }
797
798 /**
799 * @see org.andromda.cartridges.webservice.metafacades.WebService#getFullyQualifiedTestImplementationName()
800 * @return String
801 */
802 protected abstract String handleGetFullyQualifiedTestImplementationName();
803
804 private String __fullyQualifiedTestImplementationName23a;
805 private boolean __fullyQualifiedTestImplementationName23aSet = false;
806
807 /**
808 * The fully qualified name of the test implementation class for this web service.
809 * @return (String)handleGetFullyQualifiedTestImplementationName()
810 */
811 public final String getFullyQualifiedTestImplementationName()
812 {
813 String fullyQualifiedTestImplementationName23a = this.__fullyQualifiedTestImplementationName23a;
814 if (!this.__fullyQualifiedTestImplementationName23aSet)
815 {
816 // fullyQualifiedTestImplementationName has no pre constraints
817 fullyQualifiedTestImplementationName23a = handleGetFullyQualifiedTestImplementationName();
818 // fullyQualifiedTestImplementationName has no post constraints
819 this.__fullyQualifiedTestImplementationName23a = fullyQualifiedTestImplementationName23a;
820 if (isMetafacadePropertyCachingEnabled())
821 {
822 this.__fullyQualifiedTestImplementationName23aSet = true;
823 }
824 }
825 return fullyQualifiedTestImplementationName23a;
826 }
827
828 /**
829 * @see org.andromda.cartridges.webservice.metafacades.WebService#getTypeMappingElements()
830 * @return Collection
831 */
832 protected abstract Collection handleGetTypeMappingElements();
833
834 private Collection __typeMappingElements24a;
835 private boolean __typeMappingElements24aSet = false;
836
837 /**
838 * Returns a collection of all type mappings used by this WebServiceFacade. This consists of
839 * all complex types that the service may take in as a parameter in an operation or returns and
840 * exceptions that this web service throws.
841 * @return (Collection)handleGetTypeMappingElements()
842 */
843 public final Collection getTypeMappingElements()
844 {
845 Collection typeMappingElements24a = this.__typeMappingElements24a;
846 if (!this.__typeMappingElements24aSet)
847 {
848 // typeMappingElements has no pre constraints
849 typeMappingElements24a = handleGetTypeMappingElements();
850 // typeMappingElements has no post constraints
851 this.__typeMappingElements24a = typeMappingElements24a;
852 if (isMetafacadePropertyCachingEnabled())
853 {
854 this.__typeMappingElements24aSet = true;
855 }
856 }
857 return typeMappingElements24a;
858 }
859
860 /**
861 * @see org.andromda.cartridges.webservice.metafacades.WebService#isSimpleBindingMode()
862 * @return boolean
863 */
864 protected abstract boolean handleIsSimpleBindingMode();
865
866 private boolean __simpleBindingMode25a;
867 private boolean __simpleBindingMode25aSet = false;
868
869 /**
870 * Use Jaxb2 XJC simple binding mode
871 * @return (boolean)handleIsSimpleBindingMode()
872 */
873 public final boolean isSimpleBindingMode()
874 {
875 boolean simpleBindingMode25a = this.__simpleBindingMode25a;
876 if (!this.__simpleBindingMode25aSet)
877 {
878 // simpleBindingMode has no pre constraints
879 simpleBindingMode25a = handleIsSimpleBindingMode();
880 // simpleBindingMode has no post constraints
881 this.__simpleBindingMode25a = simpleBindingMode25a;
882 if (isMetafacadePropertyCachingEnabled())
883 {
884 this.__simpleBindingMode25aSet = true;
885 }
886 }
887 return simpleBindingMode25a;
888 }
889
890 /**
891 * @see org.andromda.cartridges.webservice.metafacades.WebService#getXjcArguments()
892 * @return String
893 */
894 protected abstract String handleGetXjcArguments();
895
896 private String __xjcArguments26a;
897 private boolean __xjcArguments26aSet = false;
898
899 /**
900 * Override global default XJC arguments for Jaxb wsdl2java (i.e. add Collection setters,
901 * equals, toString methods).
902 * @return (String)handleGetXjcArguments()
903 */
904 public final String getXjcArguments()
905 {
906 String xjcArguments26a = this.__xjcArguments26a;
907 if (!this.__xjcArguments26aSet)
908 {
909 // xjcArguments has no pre constraints
910 xjcArguments26a = handleGetXjcArguments();
911 // xjcArguments has no post constraints
912 this.__xjcArguments26a = xjcArguments26a;
913 if (isMetafacadePropertyCachingEnabled())
914 {
915 this.__xjcArguments26aSet = true;
916 }
917 }
918 return xjcArguments26a;
919 }
920
921 /**
922 * @see org.andromda.cartridges.webservice.metafacades.WebService#isSchemaValidation()
923 * @return boolean
924 */
925 protected abstract boolean handleIsSchemaValidation();
926
927 private boolean __schemaValidation27a;
928 private boolean __schemaValidation27aSet = false;
929
930 /**
931 * Validate incoming webservice XML against wsdl/xsd schema
932 * @return (boolean)handleIsSchemaValidation()
933 */
934 public final boolean isSchemaValidation()
935 {
936 boolean schemaValidation27a = this.__schemaValidation27a;
937 if (!this.__schemaValidation27aSet)
938 {
939 // schemaValidation has no pre constraints
940 schemaValidation27a = handleIsSchemaValidation();
941 // schemaValidation has no post constraints
942 this.__schemaValidation27a = schemaValidation27a;
943 if (isMetafacadePropertyCachingEnabled())
944 {
945 this.__schemaValidation27aSet = true;
946 }
947 }
948 return schemaValidation27a;
949 }
950
951 /**
952 * @see org.andromda.cartridges.webservice.metafacades.WebService#getRestPath()
953 * @return String
954 */
955 protected abstract String handleGetRestPath();
956
957 private String __restPath28a;
958 private boolean __restPath28aSet = false;
959
960 /**
961 * The URL path for the REST webservice. If unspecified, the lowercase /classname/ is used.
962 * @return (String)handleGetRestPath()
963 */
964 public final String getRestPath()
965 {
966 String restPath28a = this.__restPath28a;
967 if (!this.__restPath28aSet)
968 {
969 // restPath has no pre constraints
970 restPath28a = handleGetRestPath();
971 // restPath has no post constraints
972 this.__restPath28a = restPath28a;
973 if (isMetafacadePropertyCachingEnabled())
974 {
975 this.__restPath28aSet = true;
976 }
977 }
978 return restPath28a;
979 }
980
981 /**
982 * @see org.andromda.cartridges.webservice.metafacades.WebService#getRestContexts()
983 * @return Collection<String>
984 */
985 protected abstract Collection<String> handleGetRestContexts();
986
987 private Collection<String> __restContexts29a;
988 private boolean __restContexts29aSet = false;
989
990 /**
991 * Context used for REST JAX-WS implementation for this service.
992 * @return (Collection<String>)handleGetRestContexts()
993 */
994 public final Collection<String> getRestContexts()
995 {
996 Collection<String> restContexts29a = this.__restContexts29a;
997 if (!this.__restContexts29aSet)
998 {
999 // restContexts has no pre constraints
1000 restContexts29a = handleGetRestContexts();
1001 // restContexts has no post constraints
1002 this.__restContexts29a = restContexts29a;
1003 if (isMetafacadePropertyCachingEnabled())
1004 {
1005 this.__restContexts29aSet = true;
1006 }
1007 }
1008 return restContexts29a;
1009 }
1010
1011 /**
1012 * @see org.andromda.cartridges.webservice.metafacades.WebService#getRestCount()
1013 * @return int
1014 */
1015 protected abstract int handleGetRestCount();
1016
1017 private int __restCount30a;
1018 private boolean __restCount30aSet = false;
1019
1020 /**
1021 * Number of REST JAX-RS service methods in this class. If WebService stereotype rest value is
1022 * true, all methods are REST methods, otherwise this is the count of exposed
1023 * WebServiceOperations with rest value set to true. This is the only required configuration for
1024 * implementing REST services, the rest use intelligent defaults which can be overridden.
1025 * @return (int)handleGetRestCount()
1026 */
1027 public final int getRestCount()
1028 {
1029 int restCount30a = this.__restCount30a;
1030 if (!this.__restCount30aSet)
1031 {
1032 // restCount has no pre constraints
1033 restCount30a = handleGetRestCount();
1034 // restCount has no post constraints
1035 this.__restCount30a = restCount30a;
1036 if (isMetafacadePropertyCachingEnabled())
1037 {
1038 this.__restCount30aSet = true;
1039 }
1040 }
1041 return restCount30a;
1042 }
1043
1044 /**
1045 * @see org.andromda.cartridges.webservice.metafacades.WebService#getRestCacheType()
1046 * @return String
1047 */
1048 protected abstract String handleGetRestCacheType();
1049
1050 private String __restCacheType31a;
1051 private boolean __restCacheType31aSet = false;
1052
1053 /**
1054 * Specified CacheType (none, always, etc) in @CacheType annotation.
1055 * @return (String)handleGetRestCacheType()
1056 */
1057 public final String getRestCacheType()
1058 {
1059 String restCacheType31a = this.__restCacheType31a;
1060 if (!this.__restCacheType31aSet)
1061 {
1062 // restCacheType has no pre constraints
1063 restCacheType31a = handleGetRestCacheType();
1064 // restCacheType has no post constraints
1065 this.__restCacheType31a = restCacheType31a;
1066 if (isMetafacadePropertyCachingEnabled())
1067 {
1068 this.__restCacheType31aSet = true;
1069 }
1070 }
1071 return restCacheType31a;
1072 }
1073
1074 /**
1075 * @see org.andromda.cartridges.webservice.metafacades.WebService#getRestProduces()
1076 * @return String
1077 */
1078 protected abstract String handleGetRestProduces();
1079
1080 private String __restProduces32a;
1081 private boolean __restProduces32aSet = false;
1082
1083 /**
1084 * @Produces(media type) annotation. i.e. json, atom, plain/text, xml.
1085 * @return (String)handleGetRestProduces()
1086 */
1087 public final String getRestProduces()
1088 {
1089 String restProduces32a = this.__restProduces32a;
1090 if (!this.__restProduces32aSet)
1091 {
1092 // restProduces has no pre constraints
1093 restProduces32a = handleGetRestProduces();
1094 // restProduces has no post constraints
1095 this.__restProduces32a = restProduces32a;
1096 if (isMetafacadePropertyCachingEnabled())
1097 {
1098 this.__restProduces32aSet = true;
1099 }
1100 }
1101 return restProduces32a;
1102 }
1103
1104 /**
1105 * @see org.andromda.cartridges.webservice.metafacades.WebService#getRestConsumes()
1106 * @return String
1107 */
1108 protected abstract String handleGetRestConsumes();
1109
1110 private String __restConsumes33a;
1111 private boolean __restConsumes33aSet = false;
1112
1113 /**
1114 * @Consumes(media type) annotation. i.e. json, atom, plain/text, xml.
1115 * @return (String)handleGetRestConsumes()
1116 */
1117 public final String getRestConsumes()
1118 {
1119 String restConsumes33a = this.__restConsumes33a;
1120 if (!this.__restConsumes33aSet)
1121 {
1122 // restConsumes has no pre constraints
1123 restConsumes33a = handleGetRestConsumes();
1124 // restConsumes has no post constraints
1125 this.__restConsumes33a = restConsumes33a;
1126 if (isMetafacadePropertyCachingEnabled())
1127 {
1128 this.__restConsumes33aSet = true;
1129 }
1130 }
1131 return restConsumes33a;
1132 }
1133
1134 /**
1135 * @see org.andromda.cartridges.webservice.metafacades.WebService#getRestProvider()
1136 * @return String
1137 */
1138 protected abstract String handleGetRestProvider();
1139
1140 private String __restProvider34a;
1141 private boolean __restProvider34aSet = false;
1142
1143 /**
1144 * Customized REST @Provider annotation, must be implemented in the generated class.
1145 * @return (String)handleGetRestProvider()
1146 */
1147 public final String getRestProvider()
1148 {
1149 String restProvider34a = this.__restProvider34a;
1150 if (!this.__restProvider34aSet)
1151 {
1152 // restProvider has no pre constraints
1153 restProvider34a = handleGetRestProvider();
1154 // restProvider has no post constraints
1155 this.__restProvider34a = restProvider34a;
1156 if (isMetafacadePropertyCachingEnabled())
1157 {
1158 this.__restProvider34aSet = true;
1159 }
1160 }
1161 return restProvider34a;
1162 }
1163
1164 /**
1165 * @see org.andromda.cartridges.webservice.metafacades.WebService#getRestTarget()
1166 * @return String
1167 */
1168 protected abstract String handleGetRestTarget();
1169
1170 private String __restTarget35a;
1171 private boolean __restTarget35aSet = false;
1172
1173 /**
1174 * Customized target ElementType, default=METHOD.
1175 * @return (String)handleGetRestTarget()
1176 */
1177 public final String getRestTarget()
1178 {
1179 String restTarget35a = this.__restTarget35a;
1180 if (!this.__restTarget35aSet)
1181 {
1182 // restTarget has no pre constraints
1183 restTarget35a = handleGetRestTarget();
1184 // restTarget has no post constraints
1185 this.__restTarget35a = restTarget35a;
1186 if (isMetafacadePropertyCachingEnabled())
1187 {
1188 this.__restTarget35aSet = true;
1189 }
1190 }
1191 return restTarget35a;
1192 }
1193
1194 /**
1195 * @see org.andromda.cartridges.webservice.metafacades.WebService#getRestRetention()
1196 * @return String
1197 */
1198 protected abstract String handleGetRestRetention();
1199
1200 private String __restRetention36a;
1201 private boolean __restRetention36aSet = false;
1202
1203 /**
1204 * Customized RetentionPolicy (default=RUNTIME).
1205 * @return (String)handleGetRestRetention()
1206 */
1207 public final String getRestRetention()
1208 {
1209 String restRetention36a = this.__restRetention36a;
1210 if (!this.__restRetention36aSet)
1211 {
1212 // restRetention has no pre constraints
1213 restRetention36a = handleGetRestRetention();
1214 // restRetention has no post constraints
1215 this.__restRetention36a = restRetention36a;
1216 if (isMetafacadePropertyCachingEnabled())
1217 {
1218 this.__restRetention36aSet = true;
1219 }
1220 }
1221 return restRetention36a;
1222 }
1223
1224 /**
1225 * @see org.andromda.cartridges.webservice.metafacades.WebService#getRestMethod()
1226 * @return String
1227 */
1228 protected abstract String handleGetRestMethod();
1229
1230 private String __restMethod37a;
1231 private boolean __restMethod37aSet = false;
1232
1233 /**
1234 * Customized Http Method implementation.
1235 * @return (String)handleGetRestMethod()
1236 */
1237 public final String getRestMethod()
1238 {
1239 String restMethod37a = this.__restMethod37a;
1240 if (!this.__restMethod37aSet)
1241 {
1242 // restMethod has no pre constraints
1243 restMethod37a = handleGetRestMethod();
1244 // restMethod has no post constraints
1245 this.__restMethod37a = restMethod37a;
1246 if (isMetafacadePropertyCachingEnabled())
1247 {
1248 this.__restMethod37aSet = true;
1249 }
1250 }
1251 return restMethod37a;
1252 }
1253
1254 /**
1255 * @see org.andromda.cartridges.webservice.metafacades.WebService#isRestAtom()
1256 * @return boolean
1257 */
1258 protected abstract boolean handleIsRestAtom();
1259
1260 private boolean __restAtom38a;
1261 private boolean __restAtom38aSet = false;
1262
1263 /**
1264 * If this REST service provides application/atom, or any service operations provide
1265 * application/atom
1266 * @return (boolean)handleIsRestAtom()
1267 */
1268 public final boolean isRestAtom()
1269 {
1270 boolean restAtom38a = this.__restAtom38a;
1271 if (!this.__restAtom38aSet)
1272 {
1273 // restAtom has no pre constraints
1274 restAtom38a = handleIsRestAtom();
1275 // restAtom has no post constraints
1276 this.__restAtom38a = restAtom38a;
1277 if (isMetafacadePropertyCachingEnabled())
1278 {
1279 this.__restAtom38aSet = true;
1280 }
1281 }
1282 return restAtom38a;
1283 }
1284
1285 /**
1286 * @see org.andromda.cartridges.webservice.metafacades.WebService#getJaxwsCount()
1287 * @return int
1288 */
1289 protected abstract int handleGetJaxwsCount();
1290
1291 private int __jaxwsCount39a;
1292 private boolean __jaxwsCount39aSet = false;
1293
1294 /**
1295 * Number of REST JAX-RS service methods in this class. If WebService stereotype rest value is
1296 * true, all methods are REST methods, otherwise this is the count of exposed
1297 * WebServiceOperations with rest value set to true. This is the only required configuration for
1298 * implementing REST services, the rest use intelligent defaults which can be overridden.
1299 * @return (int)handleGetJaxwsCount()
1300 */
1301 public final int getJaxwsCount()
1302 {
1303 int jaxwsCount39a = this.__jaxwsCount39a;
1304 if (!this.__jaxwsCount39aSet)
1305 {
1306 // jaxwsCount has no pre constraints
1307 jaxwsCount39a = handleGetJaxwsCount();
1308 // jaxwsCount has no post constraints
1309 this.__jaxwsCount39a = jaxwsCount39a;
1310 if (isMetafacadePropertyCachingEnabled())
1311 {
1312 this.__jaxwsCount39aSet = true;
1313 }
1314 }
1315 return jaxwsCount39a;
1316 }
1317
1318 // ---------------- business methods ----------------------
1319
1320 /**
1321 * Method to be implemented in descendants
1322 * TODO: Model Documentation for
1323 * org.andromda.cartridges.webservice.metafacades.WebService.getSchemaMappings
1324 * @return TypeMappings
1325 */
1326 protected abstract TypeMappings handleGetSchemaMappings();
1327
1328 /**
1329 * TODO: Model Documentation for
1330 * org.andromda.cartridges.webservice.metafacades.WebService.getSchemaMappings
1331 * @return handleGetSchemaMappings()
1332 */
1333 public TypeMappings getSchemaMappings()
1334 {
1335 // getSchemaMappings has no pre constraints
1336 TypeMappings returnValue = handleGetSchemaMappings();
1337 // getSchemaMappings has no post constraints
1338 return returnValue;
1339 }
1340
1341 /**
1342 * Method to be implemented in descendants
1343 * TODO: Model Documentation for
1344 * org.andromda.cartridges.webservice.metafacades.WebService.getPackageReferences
1345 * @param packageName
1346 * @param follow
1347 * @return Collection
1348 */
1349 protected abstract Collection handleGetPackageReferences(String packageName, boolean follow);
1350
1351 /**
1352 * TODO: Model Documentation for
1353 * org.andromda.cartridges.webservice.metafacades.WebService.getPackageReferences
1354 * @param packageName String
1355 * Package for which to find elements referenced by the web service
1356 * @param follow boolean
1357 * Follow the inheritance hierarchy when determining referenced packages
1358 * @return handleGetPackageReferences(packageName, follow)
1359 */
1360 public Collection getPackageReferences(String packageName, boolean follow)
1361 {
1362 // getPackageReferences has no pre constraints
1363 Collection returnValue = handleGetPackageReferences(packageName, follow);
1364 // getPackageReferences has no post constraints
1365 return returnValue;
1366 }
1367
1368 // ------------- associations ------------------
1369
1370 private Collection<WebServiceOperation> __getAllowedOperations1r;
1371 private boolean __getAllowedOperations1rSet = false;
1372
1373 /**
1374 * Represents a web service.
1375 * @return (Collection<WebServiceOperation>)handleGetAllowedOperations()
1376 */
1377 public final Collection<WebServiceOperation> getAllowedOperations()
1378 {
1379 Collection<WebServiceOperation> getAllowedOperations1r = this.__getAllowedOperations1r;
1380 if (!this.__getAllowedOperations1rSet)
1381 {
1382 // webService has no pre constraints
1383 Collection result = handleGetAllowedOperations();
1384 List shieldedResult = this.shieldedElements(result);
1385 try
1386 {
1387 getAllowedOperations1r = (Collection<WebServiceOperation>)shieldedResult;
1388 }
1389 catch (ClassCastException ex)
1390 {
1391 // Bad things happen if the metafacade type mapping in metafacades.xml is wrong - Warn
1392 WebServiceLogic.logger.warn("incorrect metafacade cast for WebServiceLogic.getAllowedOperations Collection<WebServiceOperation> " + result + ": " + shieldedResult);
1393 }
1394 // webService has no post constraints
1395 this.__getAllowedOperations1r = getAllowedOperations1r;
1396 if (isMetafacadePropertyCachingEnabled())
1397 {
1398 this.__getAllowedOperations1rSet = true;
1399 }
1400 }
1401 return getAllowedOperations1r;
1402 }
1403
1404 /**
1405 * UML Specific type is returned in Collection, transformed by shieldedElements to AndroMDA Metafacade type
1406 * @return Collection
1407 */
1408 protected abstract Collection handleGetAllowedOperations();
1409
1410 /**
1411 * Represents a web service.
1412 * @return (Collection<WSDLType>)handleGetAllowedOperationExceptions()
1413 */
1414 public final Collection<WSDLType> getAllowedOperationExceptions()
1415 {
1416 Collection<WSDLType> getAllowedOperationExceptions2r = null;
1417 // webService has no pre constraints
1418 Collection result = handleGetAllowedOperationExceptions();
1419 List shieldedResult = this.shieldedElements(result);
1420 try
1421 {
1422 getAllowedOperationExceptions2r = (Collection<WSDLType>)shieldedResult;
1423 }
1424 catch (ClassCastException ex)
1425 {
1426 // Bad things happen if the metafacade type mapping in metafacades.xml is wrong - Warn
1427 WebServiceLogic.logger.warn("incorrect metafacade cast for WebServiceLogic.getAllowedOperationExceptions Collection<WSDLType> " + result + ": " + shieldedResult);
1428 }
1429 // webService has no post constraints
1430 return getAllowedOperationExceptions2r;
1431 }
1432
1433 /**
1434 * UML Specific type is returned in Collection, transformed by shieldedElements to AndroMDA Metafacade type
1435 * @return Collection
1436 */
1437 protected abstract Collection handleGetAllowedOperationExceptions();
1438
1439 /**
1440 * @return true
1441 * @see Service
1442 */
1443 public boolean isServiceMetaType()
1444 {
1445 return true;
1446 }
1447
1448 /**
1449 * @return true
1450 * @see ClassifierFacade
1451 */
1452 public boolean isClassifierFacadeMetaType()
1453 {
1454 return true;
1455 }
1456
1457 /**
1458 * @return true
1459 * @see GeneralizableElementFacade
1460 */
1461 public boolean isGeneralizableElementFacadeMetaType()
1462 {
1463 return true;
1464 }
1465
1466 /**
1467 * @return true
1468 * @see ModelElementFacade
1469 */
1470 public boolean isModelElementFacadeMetaType()
1471 {
1472 return true;
1473 }
1474
1475 // ----------- delegates to Service ------------
1476 /**
1477 * Return the attribute which name matches the parameter
1478 * @see ClassifierFacade#findAttribute(String name)
1479 */
1480 public AttributeFacade findAttribute(String name)
1481 {
1482 return this.getSuperService().findAttribute(name);
1483 }
1484
1485 /**
1486 * Those abstraction dependencies for which this classifier is the client.
1487 * @see ClassifierFacade#getAbstractions()
1488 */
1489 public Collection<ClassifierFacade> getAbstractions()
1490 {
1491 return this.getSuperService().getAbstractions();
1492 }
1493
1494 /**
1495 * Lists all classes associated to this one and any ancestor classes (through generalization).
1496 * There will be no duplicates. The order of the elements is predictable.
1497 * @see ClassifierFacade#getAllAssociatedClasses()
1498 */
1499 public Collection<ClassifierFacade> getAllAssociatedClasses()
1500 {
1501 return this.getSuperService().getAllAssociatedClasses();
1502 }
1503
1504 /**
1505 * A collection containing all 'properties' of the classifier and its ancestors. Properties are
1506 * any attributes and navigable connecting association ends.
1507 * @see ClassifierFacade#getAllProperties()
1508 */
1509 public Collection<ModelElementFacade> getAllProperties()
1510 {
1511 return this.getSuperService().getAllProperties();
1512 }
1513
1514 /**
1515 * A collection containing all required and/or read-only 'properties' of the classifier and its
1516 * ancestors. Properties are any attributes and navigable connecting association ends.
1517 * @see ClassifierFacade#getAllRequiredConstructorParameters()
1518 */
1519 public Collection<ModelElementFacade> getAllRequiredConstructorParameters()
1520 {
1521 return this.getSuperService().getAllRequiredConstructorParameters();
1522 }
1523
1524 /**
1525 * Gets the array type for this classifier. If this classifier already represents an array, it
1526 * just returns itself.
1527 * @see ClassifierFacade#getArray()
1528 */
1529 public ClassifierFacade getArray()
1530 {
1531 return this.getSuperService().getArray();
1532 }
1533
1534 /**
1535 * The name of the classifier as an array.
1536 * @see ClassifierFacade#getArrayName()
1537 */
1538 public String getArrayName()
1539 {
1540 return this.getSuperService().getArrayName();
1541 }
1542
1543 /**
1544 * Lists the classes associated to this one, there is no repitition of classes. The order of the
1545 * elements is predictable.
1546 * @see ClassifierFacade#getAssociatedClasses()
1547 */
1548 public Collection<ClassifierFacade> getAssociatedClasses()
1549 {
1550 return this.getSuperService().getAssociatedClasses();
1551 }
1552
1553 /**
1554 * Gets the association ends belonging to a classifier.
1555 * @see ClassifierFacade#getAssociationEnds()
1556 */
1557 public List<AssociationEndFacade> getAssociationEnds()
1558 {
1559 return this.getSuperService().getAssociationEnds();
1560 }
1561
1562 /**
1563 * Gets the attributes that belong to the classifier.
1564 * @see ClassifierFacade#getAttributes()
1565 */
1566 public List<AttributeFacade> getAttributes()
1567 {
1568 return this.getSuperService().getAttributes();
1569 }
1570
1571 /**
1572 * Gets all attributes for the classifier and if 'follow' is true goes up the inheritance
1573 * hierarchy and gets the attributes from the super classes as well.
1574 * @see ClassifierFacade#getAttributes(boolean follow)
1575 */
1576 public List<AttributeFacade> getAttributes(boolean follow)
1577 {
1578 return this.getSuperService().getAttributes(follow);
1579 }
1580
1581 /**
1582 * The fully qualified name of the classifier as an array.
1583 * @see ClassifierFacade#getFullyQualifiedArrayName()
1584 */
1585 public String getFullyQualifiedArrayName()
1586 {
1587 return this.getSuperService().getFullyQualifiedArrayName();
1588 }
1589
1590 /**
1591 * Returns all those operations that could be implemented at this classifier's level. This means
1592 * the operations owned by this classifier as well as any realized interface's operations
1593 * (recursively) in case this classifier itself is not already an interface, or generalized when
1594 * this classifier is an interface.
1595 * @see ClassifierFacade#getImplementationOperations()
1596 */
1597 public Collection<OperationFacade> getImplementationOperations()
1598 {
1599 return this.getSuperService().getImplementationOperations();
1600 }
1601
1602 /**
1603 * A comma separated list of the fully qualified names of all implemented interfaces.
1604 * @see ClassifierFacade#getImplementedInterfaceList()
1605 */
1606 public String getImplementedInterfaceList()
1607 {
1608 return this.getSuperService().getImplementedInterfaceList();
1609 }
1610
1611 /**
1612 * Those attributes that are scoped to an instance of this class.
1613 * @see ClassifierFacade#getInstanceAttributes()
1614 */
1615 public Collection<AttributeFacade> getInstanceAttributes()
1616 {
1617 return this.getSuperService().getInstanceAttributes();
1618 }
1619
1620 /**
1621 * Those operations that are scoped to an instance of this class.
1622 * @see ClassifierFacade#getInstanceOperations()
1623 */
1624 public List<OperationFacade> getInstanceOperations()
1625 {
1626 return this.getSuperService().getInstanceOperations();
1627 }
1628
1629 /**
1630 * Those interfaces that are abstractions of this classifier, this basically means this
1631 * classifier realizes them.
1632 * @see ClassifierFacade#getInterfaceAbstractions()
1633 */
1634 public Collection<ClassifierFacade> getInterfaceAbstractions()
1635 {
1636 return this.getSuperService().getInterfaceAbstractions();
1637 }
1638
1639 /**
1640 * A String representing a new Constructor declaration for this classifier type to be used in a
1641 * Java environment.
1642 * @see ClassifierFacade#getJavaNewString()
1643 */
1644 public String getJavaNewString()
1645 {
1646 return this.getSuperService().getJavaNewString();
1647 }
1648
1649 /**
1650 * A String representing the null-value for this classifier type to be used in a Java
1651 * environment.
1652 * @see ClassifierFacade#getJavaNullString()
1653 */
1654 public String getJavaNullString()
1655 {
1656 return this.getSuperService().getJavaNullString();
1657 }
1658
1659 /**
1660 * The other ends of this classifier's association ends which are navigable.
1661 * @see ClassifierFacade#getNavigableConnectingEnds()
1662 */
1663 public Collection<AssociationEndFacade> getNavigableConnectingEnds()
1664 {
1665 return this.getSuperService().getNavigableConnectingEnds();
1666 }
1667
1668 /**
1669 * Get the other ends of this classifier's association ends which are navigable and if 'follow'
1670 * is true goes up the inheritance hierarchy and gets the super association ends as well.
1671 * @see ClassifierFacade#getNavigableConnectingEnds(boolean follow)
1672 */
1673 public List<AssociationEndFacade> getNavigableConnectingEnds(boolean follow)
1674 {
1675 return this.getSuperService().getNavigableConnectingEnds(follow);
1676 }
1677
1678 /**
1679 * Assuming that the classifier is an array, this will return the non array type of the
1680 * classifier from
1681 * the model. If the classifier is NOT an array, it will just return itself.
1682 * @see ClassifierFacade#getNonArray()
1683 */
1684 public ClassifierFacade getNonArray()
1685 {
1686 return this.getSuperService().getNonArray();
1687 }
1688
1689 /**
1690 * The attributes from this classifier in the form of an operation call (this example would be
1691 * in Java): '(String attributeOne, String attributeTwo). If there were no attributes on the
1692 * classifier, the result would be an empty '()'.
1693 * @see ClassifierFacade#getOperationCallFromAttributes()
1694 */
1695 public String getOperationCallFromAttributes()
1696 {
1697 return this.getSuperService().getOperationCallFromAttributes();
1698 }
1699
1700 /**
1701 * The operations owned by this classifier.
1702 * @see ClassifierFacade#getOperations()
1703 */
1704 public List<OperationFacade> getOperations()
1705 {
1706 return this.getSuperService().getOperations();
1707 }
1708
1709 /**
1710 * A collection containing all 'properties' of the classifier. Properties are any attributes
1711 * and navigable connecting association ends.
1712 * @see ClassifierFacade#getProperties()
1713 */
1714 public List<ModelElementFacade> getProperties()
1715 {
1716 return this.getSuperService().getProperties();
1717 }
1718
1719 /**
1720 * Gets all properties (attributes and navigable association ends) for the classifier and if
1721 * 'follow' is true goes up the inheritance hierarchy and gets the properties from the super
1722 * classes as well.
1723 * @see ClassifierFacade#getProperties(boolean follow)
1724 */
1725 public List getProperties(boolean follow)
1726 {
1727 return this.getSuperService().getProperties(follow);
1728 }
1729
1730 /**
1731 * A collection containing all required and/or read-only 'properties' of the classifier.
1732 * Properties are any attributes and navigable connecting association ends.
1733 * @see ClassifierFacade#getRequiredConstructorParameters()
1734 */
1735 public Collection<ModelElementFacade> getRequiredConstructorParameters()
1736 {
1737 return this.getSuperService().getRequiredConstructorParameters();
1738 }
1739
1740 /**
1741 * Returns the serial version UID of the underlying model element.
1742 * @see ClassifierFacade#getSerialVersionUID()
1743 */
1744 public long getSerialVersionUID()
1745 {
1746 return this.getSuperService().getSerialVersionUID();
1747 }
1748
1749 /**
1750 * Those attributes that are scoped to the definition of this class.
1751 * @see ClassifierFacade#getStaticAttributes()
1752 */
1753 public Collection<AttributeFacade> getStaticAttributes()
1754 {
1755 return this.getSuperService().getStaticAttributes();
1756 }
1757
1758 /**
1759 * Those operations that are scoped to the definition of this class.
1760 * @see ClassifierFacade#getStaticOperations()
1761 */
1762 public List<OperationFacade> getStaticOperations()
1763 {
1764 return this.getSuperService().getStaticOperations();
1765 }
1766
1767 /**
1768 * This class' superclass, returns the generalization if it is a ClassifierFacade, null
1769 * otherwise.
1770 * @see ClassifierFacade#getSuperClass()
1771 */
1772 public ClassifierFacade getSuperClass()
1773 {
1774 return this.getSuperService().getSuperClass();
1775 }
1776
1777 /**
1778 * The wrapper name for this classifier if a mapped type has a defined wrapper class (ie. 'long'
1779 * maps to 'Long'). If the classifier doesn't have a wrapper defined for it, this method will
1780 * return a null. Note that wrapper mappings must be defined for the namespace by defining the
1781 * 'wrapperMappingsUri', this property must point to the location of the mappings file which
1782 * maps the primitives to wrapper types.
1783 * @see ClassifierFacade#getWrapperName()
1784 */
1785 public String getWrapperName()
1786 {
1787 return this.getSuperService().getWrapperName();
1788 }
1789
1790 /**
1791 * Indicates if this classifier is 'abstract'.
1792 * @see ClassifierFacade#isAbstract()
1793 */
1794 public boolean isAbstract()
1795 {
1796 return this.getSuperService().isAbstract();
1797 }
1798
1799 /**
1800 * True if this classifier represents an array type. False otherwise.
1801 * @see ClassifierFacade#isArrayType()
1802 */
1803 public boolean isArrayType()
1804 {
1805 return this.getSuperService().isArrayType();
1806 }
1807
1808 /**
1809 * True if the ClassifierFacade is an AssociationClass.
1810 * @see ClassifierFacade#isAssociationClass()
1811 */
1812 public boolean isAssociationClass()
1813 {
1814 return this.getSuperService().isAssociationClass();
1815 }
1816
1817 /**
1818 * Returns true if this type represents a Blob type.
1819 * @see ClassifierFacade#isBlobType()
1820 */
1821 public boolean isBlobType()
1822 {
1823 return this.getSuperService().isBlobType();
1824 }
1825
1826 /**
1827 * Indicates if this type represents a boolean type or not.
1828 * @see ClassifierFacade#isBooleanType()
1829 */
1830 public boolean isBooleanType()
1831 {
1832 return this.getSuperService().isBooleanType();
1833 }
1834
1835 /**
1836 * Indicates if this type represents a char, Character, or java.lang.Character type or not.
1837 * @see ClassifierFacade#isCharacterType()
1838 */
1839 public boolean isCharacterType()
1840 {
1841 return this.getSuperService().isCharacterType();
1842 }
1843
1844 /**
1845 * Returns true if this type represents a Clob type.
1846 * @see ClassifierFacade#isClobType()
1847 */
1848 public boolean isClobType()
1849 {
1850 return this.getSuperService().isClobType();
1851 }
1852
1853 /**
1854 * True if this classifier represents a collection type. False otherwise.
1855 * @see ClassifierFacade#isCollectionType()
1856 */
1857 public boolean isCollectionType()
1858 {
1859 return this.getSuperService().isCollectionType();
1860 }
1861
1862 /**
1863 * True/false depending on whether or not this classifier represents a datatype. A data type is
1864 * a type whose instances are identified only by their value. A data type may contain attributes
1865 * to support the modeling of structured data types.
1866 * @see ClassifierFacade#isDataType()
1867 */
1868 public boolean isDataType()
1869 {
1870 return this.getSuperService().isDataType();
1871 }
1872
1873 /**
1874 * True when this classifier is a date type.
1875 * @see ClassifierFacade#isDateType()
1876 */
1877 public boolean isDateType()
1878 {
1879 return this.getSuperService().isDateType();
1880 }
1881
1882 /**
1883 * Indicates if this type represents a Double type or not.
1884 * @see ClassifierFacade#isDoubleType()
1885 */
1886 public boolean isDoubleType()
1887 {
1888 return this.getSuperService().isDoubleType();
1889 }
1890
1891 /**
1892 * Indicates whether or not this classifier represents an "EmbeddedValue'.
1893 * @see ClassifierFacade#isEmbeddedValue()
1894 */
1895 public boolean isEmbeddedValue()
1896 {
1897 return this.getSuperService().isEmbeddedValue();
1898 }
1899
1900 /**
1901 * True if this classifier is in fact marked as an enumeration.
1902 * @see ClassifierFacade#isEnumeration()
1903 */
1904 public boolean isEnumeration()
1905 {
1906 return this.getSuperService().isEnumeration();
1907 }
1908
1909 /**
1910 * Returns true if this type represents a 'file' type.
1911 * @see ClassifierFacade#isFileType()
1912 */
1913 public boolean isFileType()
1914 {
1915 return this.getSuperService().isFileType();
1916 }
1917
1918 /**
1919 * Indicates if this type represents a Float type or not.
1920 * @see ClassifierFacade#isFloatType()
1921 */
1922 public boolean isFloatType()
1923 {
1924 return this.getSuperService().isFloatType();
1925 }
1926
1927 /**
1928 * Indicates if this type represents an int or Integer or java.lang.Integer type or not.
1929 * @see ClassifierFacade#isIntegerType()
1930 */
1931 public boolean isIntegerType()
1932 {
1933 return this.getSuperService().isIntegerType();
1934 }
1935
1936 /**
1937 * True/false depending on whether or not this Classifier represents an interface.
1938 * @see ClassifierFacade#isInterface()
1939 */
1940 public boolean isInterface()
1941 {
1942 return this.getSuperService().isInterface();
1943 }
1944
1945 /**
1946 * True if this classifier cannot be extended and represent a leaf in the inheritance tree.
1947 * @see ClassifierFacade#isLeaf()
1948 */
1949 public boolean isLeaf()
1950 {
1951 return this.getSuperService().isLeaf();
1952 }
1953
1954 /**
1955 * True if this classifier represents a list type. False otherwise.
1956 * @see ClassifierFacade#isListType()
1957 */
1958 public boolean isListType()
1959 {
1960 return this.getSuperService().isListType();
1961 }
1962
1963 /**
1964 * Indicates if this type represents a Long type or not.
1965 * @see ClassifierFacade#isLongType()
1966 */
1967 public boolean isLongType()
1968 {
1969 return this.getSuperService().isLongType();
1970 }
1971
1972 /**
1973 * Indicates whether or not this classifier represents a Map type.
1974 * @see ClassifierFacade#isMapType()
1975 */
1976 public boolean isMapType()
1977 {
1978 return this.getSuperService().isMapType();
1979 }
1980
1981 /**
1982 * Indicates whether or not this classifier represents a primitive type.
1983 * @see ClassifierFacade#isPrimitive()
1984 */
1985 public boolean isPrimitive()
1986 {
1987 return this.getSuperService().isPrimitive();
1988 }
1989
1990 /**
1991 * True if this classifier represents a set type. False otherwise.
1992 * @see ClassifierFacade#isSetType()
1993 */
1994 public boolean isSetType()
1995 {
1996 return this.getSuperService().isSetType();
1997 }
1998
1999 /**
2000 * Indicates whether or not this classifier represents a string type.
2001 * @see ClassifierFacade#isStringType()
2002 */
2003 public boolean isStringType()
2004 {
2005 return this.getSuperService().isStringType();
2006 }
2007
2008 /**
2009 * Indicates whether or not this classifier represents a time type.
2010 * @see ClassifierFacade#isTimeType()
2011 */
2012 public boolean isTimeType()
2013 {
2014 return this.getSuperService().isTimeType();
2015 }
2016
2017 /**
2018 * Returns true if this type is a wrapped primitive type.
2019 * @see ClassifierFacade#isWrappedPrimitive()
2020 */
2021 public boolean isWrappedPrimitive()
2022 {
2023 return this.getSuperService().isWrappedPrimitive();
2024 }
2025
2026 /**
2027 * Finds the tagged value optional searching the entire inheritance hierarchy if 'follow' is set
2028 * to true.
2029 * @see GeneralizableElementFacade#findTaggedValue(String tagName, boolean follow)
2030 */
2031 public Object findTaggedValue(String tagName, boolean follow)
2032 {
2033 return this.getSuperService().findTaggedValue(tagName, follow);
2034 }
2035
2036 /**
2037 * All generalizations for this generalizable element, goes up the inheritance tree.
2038 * @see GeneralizableElementFacade#getAllGeneralizations()
2039 */
2040 public Collection<GeneralizableElementFacade> getAllGeneralizations()
2041 {
2042 return this.getSuperService().getAllGeneralizations();
2043 }
2044
2045 /**
2046 * All specializations (travels down the inheritance hierarchy).
2047 * @see GeneralizableElementFacade#getAllSpecializations()
2048 */
2049 public Collection<GeneralizableElementFacade> getAllSpecializations()
2050 {
2051 return this.getSuperService().getAllSpecializations();
2052 }
2053
2054 /**
2055 * Gets the direct generalization for this generalizable element.
2056 * @see GeneralizableElementFacade#getGeneralization()
2057 */
2058 public GeneralizableElementFacade getGeneralization()
2059 {
2060 return this.getSuperService().getGeneralization();
2061 }
2062
2063 /**
2064 * Gets the actual links that this generalization element is part of (it plays either the
2065 * specialization or generalization).
2066 * @see GeneralizableElementFacade#getGeneralizationLinks()
2067 */
2068 public Collection<GeneralizationFacade> getGeneralizationLinks()
2069 {
2070 return this.getSuperService().getGeneralizationLinks();
2071 }
2072
2073 /**
2074 * A comma separated list of the fully qualified names of all generalizations.
2075 * @see GeneralizableElementFacade#getGeneralizationList()
2076 */
2077 public String getGeneralizationList()
2078 {
2079 return this.getSuperService().getGeneralizationList();
2080 }
2081
2082 /**
2083 * The element found when you recursively follow the generalization path up to the root. If an
2084 * element has no generalization itself will be considered the root.
2085 * @see GeneralizableElementFacade#getGeneralizationRoot()
2086 */
2087 public GeneralizableElementFacade getGeneralizationRoot()
2088 {
2089 return this.getSuperService().getGeneralizationRoot();
2090 }
2091
2092 /**
2093 * Return all generalizations (ancestors) from this generalizable element.
2094 * @see GeneralizableElementFacade#getGeneralizations()
2095 */
2096 public Collection<GeneralizableElementFacade> getGeneralizations()
2097 {
2098 return this.getSuperService().getGeneralizations();
2099 }
2100
2101 /**
2102 * Gets the direct specializations (i.e. sub elements) for this generalizatble element.
2103 * @see GeneralizableElementFacade#getSpecializations()
2104 */
2105 public Collection<GeneralizableElementFacade> getSpecializations()
2106 {
2107 return this.getSuperService().getSpecializations();
2108 }
2109
2110 /**
2111 * Copies all tagged values from the given ModelElementFacade to this model element facade.
2112 * @see ModelElementFacade#copyTaggedValues(ModelElementFacade element)
2113 */
2114 public void copyTaggedValues(ModelElementFacade element)
2115 {
2116 this.getSuperService().copyTaggedValues(element);
2117 }
2118
2119 /**
2120 * Finds the tagged value with the specified 'tagName'. In case there are more values the first
2121 * one found will be returned.
2122 * @see ModelElementFacade#findTaggedValue(String tagName)
2123 */
2124 public Object findTaggedValue(String tagName)
2125 {
2126 return this.getSuperService().findTaggedValue(tagName);
2127 }
2128
2129 /**
2130 * Returns all the values for the tagged value with the specified name. The returned collection
2131 * will contains only String instances, or will be empty. Never null.
2132 * @see ModelElementFacade#findTaggedValues(String tagName)
2133 */
2134 public Collection<Object> findTaggedValues(String tagName)
2135 {
2136 return this.getSuperService().findTaggedValues(tagName);
2137 }
2138
2139 /**
2140 * Returns the fully qualified name of the model element. The fully qualified name includes
2141 * complete package qualified name of the underlying model element. The templates parameter will
2142 * be replaced by the correct one given the binding relation of the parameter to this element.
2143 * @see ModelElementFacade#getBindedFullyQualifiedName(ModelElementFacade bindedElement)
2144 */
2145 public String getBindedFullyQualifiedName(ModelElementFacade bindedElement)
2146 {
2147 return this.getSuperService().getBindedFullyQualifiedName(bindedElement);
2148 }
2149
2150 /**
2151 * Gets all constraints belonging to the model element.
2152 * @see ModelElementFacade#getConstraints()
2153 */
2154 public Collection<ConstraintFacade> getConstraints()
2155 {
2156 return this.getSuperService().getConstraints();
2157 }
2158
2159 /**
2160 * Returns the constraints of the argument kind that have been placed onto this model. Typical
2161 * kinds are "inv", "pre" and "post". Other kinds are possible.
2162 * @see ModelElementFacade#getConstraints(String kind)
2163 */
2164 public Collection<ConstraintFacade> getConstraints(String kind)
2165 {
2166 return this.getSuperService().getConstraints(kind);
2167 }
2168
2169 /**
2170 * Gets the documentation for the model element, The indent argument is prefixed to each line.
2171 * By default this method wraps lines after 64 characters.
2172 * This method is equivalent to <code>getDocumentation(indent, 64)</code>.
2173 * @see ModelElementFacade#getDocumentation(String indent)
2174 */
2175 public String getDocumentation(String indent)
2176 {
2177 return this.getSuperService().getDocumentation(indent);
2178 }
2179
2180 /**
2181 * This method returns the documentation for this model element, with the lines wrapped after
2182 * the specified number of characters, values of less than 1 will indicate no line wrapping is
2183 * required. By default paragraphs are returned as HTML.
2184 * This method is equivalent to <code>getDocumentation(indent, lineLength, true)</code>.
2185 * @see ModelElementFacade#getDocumentation(String indent, int lineLength)
2186 */
2187 public String getDocumentation(String indent, int lineLength)
2188 {
2189 return this.getSuperService().getDocumentation(indent, lineLength);
2190 }
2191
2192 /**
2193 * This method returns the documentation for this model element, with the lines wrapped after
2194 * the specified number of characters, values of less than 1 will indicate no line wrapping is
2195 * required. HTML style determines if HTML Escaping is applied.
2196 * @see ModelElementFacade#getDocumentation(String indent, int lineLength, boolean htmlStyle)
2197 */
2198 public String getDocumentation(String indent, int lineLength, boolean htmlStyle)
2199 {
2200 return this.getSuperService().getDocumentation(indent, lineLength, htmlStyle);
2201 }
2202
2203 /**
2204 * The fully qualified name of this model element.
2205 * @see ModelElementFacade#getFullyQualifiedName()
2206 */
2207 public String getFullyQualifiedName()
2208 {
2209 return this.getSuperService().getFullyQualifiedName();
2210 }
2211
2212 /**
2213 * Returns the fully qualified name of the model element. The fully qualified name includes
2214 * complete package qualified name of the underlying model element. If modelName is true, then
2215 * the original name of the model element (the name contained within the model) will be the name
2216 * returned, otherwise a name from a language mapping will be returned.
2217 * @see ModelElementFacade#getFullyQualifiedName(boolean modelName)
2218 */
2219 public String getFullyQualifiedName(boolean modelName)
2220 {
2221 return this.getSuperService().getFullyQualifiedName(modelName);
2222 }
2223
2224 /**
2225 * Returns the fully qualified name as a path, the returned value always starts with out a slash
2226 * '/'.
2227 * @see ModelElementFacade#getFullyQualifiedNamePath()
2228 */
2229 public String getFullyQualifiedNamePath()
2230 {
2231 return this.getSuperService().getFullyQualifiedNamePath();
2232 }
2233
2234 /**
2235 * Gets the unique identifier of the underlying model element.
2236 * @see ModelElementFacade#getId()
2237 */
2238 public String getId()
2239 {
2240 return this.getSuperService().getId();
2241 }
2242
2243 /**
2244 * UML2: Retrieves the keywords for this element. Used to modify implementation properties which
2245 * are not represented by other properties, i.e. native, transient, volatile, synchronized,
2246 * (added annotations) override, deprecated. Can also be used to suppress compiler warnings:
2247 * (added annotations) unchecked, fallthrough, path, serial, finally, all. Annotations require
2248 * JDK5 compiler level.
2249 * @see ModelElementFacade#getKeywords()
2250 */
2251 public Collection<String> getKeywords()
2252 {
2253 return this.getSuperService().getKeywords();
2254 }
2255
2256 /**
2257 * UML2: Retrieves a localized label for this named element.
2258 * @see ModelElementFacade#getLabel()
2259 */
2260 public String getLabel()
2261 {
2262 return this.getSuperService().getLabel();
2263 }
2264
2265 /**
2266 * The language mappings that have been set for this model element.
2267 * @see ModelElementFacade#getLanguageMappings()
2268 */
2269 public TypeMappings getLanguageMappings()
2270 {
2271 return this.getSuperService().getLanguageMappings();
2272 }
2273
2274 /**
2275 * Return the model containing this model element (multiple models may be loaded and processed
2276 * at the same time).
2277 * @see ModelElementFacade#getModel()
2278 */
2279 public ModelFacade getModel()
2280 {
2281 return this.getSuperService().getModel();
2282 }
2283
2284 /**
2285 * The name of the model element.
2286 * @see ModelElementFacade#getName()
2287 */
2288 public String getName()
2289 {
2290 return this.getSuperService().getName();
2291 }
2292
2293 /**
2294 * Gets the package to which this model element belongs.
2295 * @see ModelElementFacade#getPackage()
2296 */
2297 public ModelElementFacade getPackage()
2298 {
2299 return this.getSuperService().getPackage();
2300 }
2301
2302 /**
2303 * The name of this model element's package.
2304 * @see ModelElementFacade#getPackageName()
2305 */
2306 public String getPackageName()
2307 {
2308 return this.getSuperService().getPackageName();
2309 }
2310
2311 /**
2312 * Gets the package name (optionally providing the ability to retrieve the model name and not
2313 * the mapped name).
2314 * @see ModelElementFacade#getPackageName(boolean modelName)
2315 */
2316 public String getPackageName(boolean modelName)
2317 {
2318 return this.getSuperService().getPackageName(modelName);
2319 }
2320
2321 /**
2322 * Returns the package as a path, the returned value always starts with out a slash '/'.
2323 * @see ModelElementFacade#getPackagePath()
2324 */
2325 public String getPackagePath()
2326 {
2327 return this.getSuperService().getPackagePath();
2328 }
2329
2330 /**
2331 * UML2: Returns the value of the 'Qualified Name' attribute. A name which allows the
2332 * NamedElement to be identified within a hierarchy of nested Namespaces. It is constructed from
2333 * the names of the containing namespaces starting at the root of the hierarchy and ending with
2334 * the name of the NamedElement itself.
2335 * @see ModelElementFacade#getQualifiedName()
2336 */
2337 public String getQualifiedName()
2338 {
2339 return this.getSuperService().getQualifiedName();
2340 }
2341
2342 /**
2343 * Gets the root package for the model element.
2344 * @see ModelElementFacade#getRootPackage()
2345 */
2346 public PackageFacade getRootPackage()
2347 {
2348 return this.getSuperService().getRootPackage();
2349 }
2350
2351 /**
2352 * Gets the dependencies for which this model element is the source.
2353 * @see ModelElementFacade#getSourceDependencies()
2354 */
2355 public Collection<DependencyFacade> getSourceDependencies()
2356 {
2357 return this.getSuperService().getSourceDependencies();
2358 }
2359
2360 /**
2361 * If this model element is the context of an activity graph, this represents that activity
2362 * graph.
2363 * @see ModelElementFacade#getStateMachineContext()
2364 */
2365 public StateMachineFacade getStateMachineContext()
2366 {
2367 return this.getSuperService().getStateMachineContext();
2368 }
2369
2370 /**
2371 * The collection of ALL stereotype names for this model element.
2372 * @see ModelElementFacade#getStereotypeNames()
2373 */
2374 public Collection<String> getStereotypeNames()
2375 {
2376 return this.getSuperService().getStereotypeNames();
2377 }
2378
2379 /**
2380 * Gets all stereotypes for this model element.
2381 * @see ModelElementFacade#getStereotypes()
2382 */
2383 public Collection<StereotypeFacade> getStereotypes()
2384 {
2385 return this.getSuperService().getStereotypes();
2386 }
2387
2388 /**
2389 * Return the TaggedValues associated with this model element, under all stereotypes.
2390 * @see ModelElementFacade#getTaggedValues()
2391 */
2392 public Collection<TaggedValueFacade> getTaggedValues()
2393 {
2394 return this.getSuperService().getTaggedValues();
2395 }
2396
2397 /**
2398 * Gets the dependencies for which this model element is the target.
2399 * @see ModelElementFacade#getTargetDependencies()
2400 */
2401 public Collection<DependencyFacade> getTargetDependencies()
2402 {
2403 return this.getSuperService().getTargetDependencies();
2404 }
2405
2406 /**
2407 * Get the template parameter for this model element having the parameterName
2408 * @see ModelElementFacade#getTemplateParameter(String parameterName)
2409 */
2410 public Object getTemplateParameter(String parameterName)
2411 {
2412 return this.getSuperService().getTemplateParameter(parameterName);
2413 }
2414
2415 /**
2416 * Get the template parameters for this model element
2417 * @see ModelElementFacade#getTemplateParameters()
2418 */
2419 public Collection<TemplateParameterFacade> getTemplateParameters()
2420 {
2421 return this.getSuperService().getTemplateParameters();
2422 }
2423
2424 /**
2425 * The visibility (i.e. public, private, protected or package) of the model element, will
2426 * attempt a lookup for these values in the language mappings (if any).
2427 * @see ModelElementFacade#getVisibility()
2428 */
2429 public String getVisibility()
2430 {
2431 return this.getSuperService().getVisibility();
2432 }
2433
2434 /**
2435 * Returns true if the model element has the exact stereotype (meaning no stereotype inheritance
2436 * is taken into account when searching for the stereotype), false otherwise.
2437 * @see ModelElementFacade#hasExactStereotype(String stereotypeName)
2438 */
2439 public boolean hasExactStereotype(String stereotypeName)
2440 {
2441 return this.getSuperService().hasExactStereotype(stereotypeName);
2442 }
2443
2444 /**
2445 * Does the UML Element contain the named Keyword? Keywords can be separated by space, comma,
2446 * pipe, semicolon, or << >>
2447 * @see ModelElementFacade#hasKeyword(String keywordName)
2448 */
2449 public boolean hasKeyword(String keywordName)
2450 {
2451 return this.getSuperService().hasKeyword(keywordName);
2452 }
2453
2454 /**
2455 * Returns true if the model element has the specified stereotype. If the stereotype itself
2456 * does not match, then a search will be made up the stereotype inheritance hierarchy, and if
2457 * one of the stereotype's ancestors has a matching name this method will return true, false
2458 * otherwise.
2459 * For example, if we have a certain stereotype called <<exception>> and a model element has a
2460 * stereotype called <<applicationException>> which extends <<exception>>, when calling this
2461 * method with 'stereotypeName' defined as 'exception' the method would return true since
2462 * <<applicationException>> inherits from <<exception>>. If you want to check if the model
2463 * element has the exact stereotype, then use the method 'hasExactStereotype' instead.
2464 * @see ModelElementFacade#hasStereotype(String stereotypeName)
2465 */
2466 public boolean hasStereotype(String stereotypeName)
2467 {
2468 return this.getSuperService().hasStereotype(stereotypeName);
2469 }
2470
2471 /**
2472 * True if there are target dependencies from this element that are instances of BindingFacade.
2473 * Deprecated in UML2: Use TemplateBinding parameters instead of dependencies.
2474 * @see ModelElementFacade#isBindingDependenciesPresent()
2475 */
2476 public boolean isBindingDependenciesPresent()
2477 {
2478 return this.getSuperService().isBindingDependenciesPresent();
2479 }
2480
2481 /**
2482 * Indicates if any constraints are present on this model element.
2483 * @see ModelElementFacade#isConstraintsPresent()
2484 */
2485 public boolean isConstraintsPresent()
2486 {
2487 return this.getSuperService().isConstraintsPresent();
2488 }
2489
2490 /**
2491 * Indicates if any documentation is present on this model element.
2492 * @see ModelElementFacade#isDocumentationPresent()
2493 */
2494 public boolean isDocumentationPresent()
2495 {
2496 return this.getSuperService().isDocumentationPresent();
2497 }
2498
2499 /**
2500 * True if this element name is a reserved word in Java, C#, ANSI or ISO C, C++, JavaScript.
2501 * @see ModelElementFacade#isReservedWord()
2502 */
2503 public boolean isReservedWord()
2504 {
2505 return this.getSuperService().isReservedWord();
2506 }
2507
2508 /**
2509 * True is there are template parameters on this model element. For UML2, applies to Class,
2510 * Operation, Property, and Parameter.
2511 * @see ModelElementFacade#isTemplateParametersPresent()
2512 */
2513 public boolean isTemplateParametersPresent()
2514 {
2515 return this.getSuperService().isTemplateParametersPresent();
2516 }
2517
2518 /**
2519 * True if this element name is a valid identifier name in Java, C#, ANSI or ISO C, C++,
2520 * JavaScript. Contains no spaces, special characters etc. Constraint always applied on
2521 * Enumerations and Interfaces, optionally applies on other model elements.
2522 * @see ModelElementFacade#isValidIdentifierName()
2523 */
2524 public boolean isValidIdentifierName()
2525 {
2526 return this.getSuperService().isValidIdentifierName();
2527 }
2528
2529 /**
2530 * Searches for the constraint with the specified 'name' on this model element, and if found
2531 * translates it using the specified 'translation' from a translation library discovered by the
2532 * framework.
2533 * @see ModelElementFacade#translateConstraint(String name, String translation)
2534 */
2535 public String translateConstraint(String name, String translation)
2536 {
2537 return this.getSuperService().translateConstraint(name, translation);
2538 }
2539
2540 /**
2541 * Translates all constraints belonging to this model element with the given 'translation'.
2542 * @see ModelElementFacade#translateConstraints(String translation)
2543 */
2544 public String[] translateConstraints(String translation)
2545 {
2546 return this.getSuperService().translateConstraints(translation);
2547 }
2548
2549 /**
2550 * Translates the constraints of the specified 'kind' belonging to this model element.
2551 * @see ModelElementFacade#translateConstraints(String kind, String translation)
2552 */
2553 public String[] translateConstraints(String kind, String translation)
2554 {
2555 return this.getSuperService().translateConstraints(kind, translation);
2556 }
2557
2558 /**
2559 * Returns a collection of all entities this service and its ancestors have a relation to.
2560 * @see Service#getAllEntityReferences()
2561 */
2562 public Collection<DependencyFacade> getAllEntityReferences()
2563 {
2564 return this.getSuperService().getAllEntityReferences();
2565 }
2566
2567 /**
2568 * All messaging destinations that belong to this service and all decendent services.
2569 * @see Service#getAllMessagingDestinations()
2570 */
2571 public Collection<Destination> getAllMessagingDestinations()
2572 {
2573 return this.getSuperService().getAllMessagingDestinations();
2574 }
2575
2576 /**
2577 * All roles associated with the service, this includes both roles that have access to the
2578 * entire service, and any roles that have access to a single operation.
2579 * @see Service#getAllRoles()
2580 */
2581 public Collection<Role> getAllRoles()
2582 {
2583 return this.getSuperService().getAllRoles();
2584 }
2585
2586 /**
2587 * Returns a collection of all services this service and its ancestors have a relation to.
2588 * @see Service#getAllServiceReferences()
2589 */
2590 public Collection<DependencyFacade> getAllServiceReferences()
2591 {
2592 return this.getSuperService().getAllServiceReferences();
2593 }
2594
2595 /**
2596 * References to all entities to which this service has a dependency.
2597 * @see Service#getEntityReferences()
2598 */
2599 public Collection<DependencyFacade> getEntityReferences()
2600 {
2601 return this.getSuperService().getEntityReferences();
2602 }
2603
2604 /**
2605 * All messaging destinations available to this service.
2606 * @see Service#getMessagingDestinations()
2607 */
2608 public Collection<Destination> getMessagingDestinations()
2609 {
2610 return this.getSuperService().getMessagingDestinations();
2611 }
2612
2613 /**
2614 * The roles of the service, these are the actor's that can access this service.
2615 * @see Service#getRoles()
2616 */
2617 public Collection<Role> getRoles()
2618 {
2619 return this.getSuperService().getRoles();
2620 }
2621
2622 /**
2623 * References to all services to which this service has a dependency.
2624 * @see Service#getServiceReferences()
2625 */
2626 public Collection<DependencyFacade> getServiceReferences()
2627 {
2628 return this.getSuperService().getServiceReferences();
2629 }
2630
2631 /**
2632 * @see MetafacadeBase#initialize()
2633 */
2634 @Override
2635 public void initialize()
2636 {
2637 this.getSuperService().initialize();
2638 }
2639
2640 /**
2641 * @return Object getSuperService().getValidationOwner()
2642 * @see MetafacadeBase#getValidationOwner()
2643 */
2644 @Override
2645 public Object getValidationOwner()
2646 {
2647 Object owner = this.getSuperService().getValidationOwner();
2648 return owner;
2649 }
2650
2651 /**
2652 * @return String getSuperService().getValidationName()
2653 * @see MetafacadeBase#getValidationName()
2654 */
2655 @Override
2656 public String getValidationName()
2657 {
2658 String name = this.getSuperService().getValidationName();
2659 return name;
2660 }
2661
2662 /**
2663 * <p><b>Constraint:</b> org::andromda::cartridges::webservice::metafacades::WebService::operation name must be unique</p>
2664 * <p><b>Error:</b> A web service can not have more than one operation with the same name, please check the names of your web service operations.</p>
2665 * <p><b>OCL:</b> context WebService inv : allowedOperations -> isUnique(operationName)</p>
2666 * @param validationMessages Collection<ModelValidationMessage>
2667 * @see MetafacadeBase#validateInvariants(Collection validationMessages)
2668 */
2669 @Override
2670 public void validateInvariants(Collection<ModelValidationMessage> validationMessages)
2671 {
2672 this.getSuperService().validateInvariants(validationMessages);
2673 try
2674 {
2675 final Object contextElement = this.THIS();
2676 boolean constraintValid = OCLResultEnsurer.ensure(OCLCollections.isUnique(OCLIntrospector.invoke(contextElement,"allowedOperations"),new Transformer(){public Object transform(Object object){return OCLIntrospector.invoke(object,"operationName");}}));
2677 if (!constraintValid)
2678 {
2679 validationMessages.add(
2680 new ModelValidationMessage(
2681 (MetafacadeBase)contextElement ,
2682 "org::andromda::cartridges::webservice::metafacades::WebService::operation name must be unique",
2683 "A web service can not have more than one operation with the same name, please check the names of your web service operations."));
2684 }
2685 }
2686 catch (Throwable th)
2687 {
2688 Throwable cause = th.getCause();
2689 int depth = 0; // Some throwables have infinite recursion
2690 while (cause != null && depth < 7)
2691 {
2692 th = cause;
2693 depth++;
2694 }
2695 logger.error("Error validating constraint 'org::andromda::cartridges::webservice::metafacades::WebService::operation name must be unique' ON "
2696 + this.THIS().toString() + ": " + th.getMessage(), th);
2697 }
2698 }
2699
2700 /**
2701 * The property that stores the name of the metafacade.
2702 */
2703 private static final String NAME_PROPERTY = "name";
2704 private static final String FQNAME_PROPERTY = "fullyQualifiedName";
2705
2706 /**
2707 * @see Object#toString()
2708 */
2709 @Override
2710 public String toString()
2711 {
2712 final StringBuilder toString = new StringBuilder(this.getClass().getName());
2713 toString.append("[");
2714 try
2715 {
2716 toString.append(Introspector.instance().getProperty(this, FQNAME_PROPERTY));
2717 }
2718 catch (final Throwable tryAgain)
2719 {
2720 try
2721 {
2722 toString.append(Introspector.instance().getProperty(this, NAME_PROPERTY));
2723 }
2724 catch (final Throwable ignore)
2725 {
2726 // - just ignore when the metafacade doesn't have a name or fullyQualifiedName property
2727 }
2728 }
2729 toString.append("]");
2730 return toString.toString();
2731 }
2732 }