001// license-header java merge-point 002// 003// Attention: generated code (by MetafacadeLogic.vsl) - do not modify! 004// 005package org.andromda.cartridges.jsf2.metafacades; 006 007import java.util.Collection; 008import java.util.List; 009import org.andromda.core.common.Introspector; 010import org.andromda.core.metafacade.MetafacadeBase; 011import org.andromda.core.metafacade.MetafacadeFactory; 012import org.andromda.core.metafacade.ModelValidationMessage; 013import org.andromda.metafacades.uml.ClassifierFacade; 014import org.andromda.metafacades.uml.ConstraintFacade; 015import org.andromda.metafacades.uml.DependencyFacade; 016import org.andromda.metafacades.uml.FrontEndAction; 017import org.andromda.metafacades.uml.FrontEndActivityGraph; 018import org.andromda.metafacades.uml.FrontEndControllerOperation; 019import org.andromda.metafacades.uml.FrontEndParameter; 020import org.andromda.metafacades.uml.ModelElementFacade; 021import org.andromda.metafacades.uml.ModelFacade; 022import org.andromda.metafacades.uml.OperationFacade; 023import org.andromda.metafacades.uml.PackageFacade; 024import org.andromda.metafacades.uml.ParameterFacade; 025import org.andromda.metafacades.uml.StateMachineFacade; 026import org.andromda.metafacades.uml.StereotypeFacade; 027import org.andromda.metafacades.uml.TaggedValueFacade; 028import org.andromda.metafacades.uml.TemplateParameterFacade; 029import org.andromda.metafacades.uml.TypeMappings; 030 031/** 032 * Represents an operation for a JSF controller. 033 * MetafacadeLogic for JSFControllerOperation 034 * 035 * @see JSFControllerOperation 036 */ 037public abstract class JSFControllerOperationLogic 038 extends MetafacadeBase 039 implements JSFControllerOperation 040{ 041 /** 042 * The underlying UML object 043 * @see Object 044 */ 045 protected Object metaObject; 046 047 /** Create Metafacade implementation instance using the MetafacadeFactory from the context 048 * @param metaObjectIn 049 * @param context 050 */ 051 protected JSFControllerOperationLogic(Object metaObjectIn, String context) 052 { 053 super(metaObjectIn, getContext(context)); 054 this.superFrontEndControllerOperation = 055 (FrontEndControllerOperation) 056 MetafacadeFactory.getInstance().createFacadeImpl( 057 "org.andromda.metafacades.uml.FrontEndControllerOperation", 058 metaObjectIn, 059 getContext(context)); 060 this.metaObject = metaObjectIn; 061 } 062 063 /** 064 * Gets the context for this metafacade logic instance. 065 * @param context String. Set to JSFControllerOperation if null 066 * @return context String 067 */ 068 private static String getContext(String context) 069 { 070 if (context == null) 071 { 072 context = "org.andromda.cartridges.jsf2.metafacades.JSFControllerOperation"; 073 } 074 return context; 075 } 076 077 private FrontEndControllerOperation superFrontEndControllerOperation; 078 private boolean superFrontEndControllerOperationInitialized = false; 079 080 /** 081 * Gets the FrontEndControllerOperation parent instance. 082 * @return this.superFrontEndControllerOperation FrontEndControllerOperation 083 */ 084 private FrontEndControllerOperation getSuperFrontEndControllerOperation() 085 { 086 if (!this.superFrontEndControllerOperationInitialized) 087 { 088 ((MetafacadeBase)this.superFrontEndControllerOperation).setMetafacadeContext(this.getMetafacadeContext()); 089 this.superFrontEndControllerOperationInitialized = true; 090 } 091 return this.superFrontEndControllerOperation; 092 } 093 094 /** Reset context only for non-root metafacades 095 * @param context 096 * @see org.andromda.core.metafacade.MetafacadeBase#resetMetafacadeContext(String context) 097 */ 098 @Override 099 public void resetMetafacadeContext(String context) 100 { 101 if (!this.contextRoot) // reset context only for non-root metafacades 102 { 103 context = getContext(context); // to have same value as in original constructor call 104 setMetafacadeContext (context); 105 if (this.superFrontEndControllerOperationInitialized) 106 { 107 ((MetafacadeBase)this.superFrontEndControllerOperation).resetMetafacadeContext(context); 108 } 109 } 110 } 111 112 /** 113 * @return boolean true always 114 * @see JSFControllerOperation 115 */ 116 public boolean isJSFControllerOperationMetaType() 117 { 118 return true; 119 } 120 121 // --------------- attributes --------------------- 122 123 /** 124 * @see org.andromda.cartridges.jsf2.metafacades.JSFControllerOperation#getFullyQualifiedFormPath() 125 * @return String 126 */ 127 protected abstract String handleGetFullyQualifiedFormPath(); 128 129 private String __fullyQualifiedFormPath1a; 130 private boolean __fullyQualifiedFormPath1aSet = false; 131 132 /** 133 * The fully qualified path of the form file. 134 * @return (String)handleGetFullyQualifiedFormPath() 135 */ 136 public final String getFullyQualifiedFormPath() 137 { 138 String fullyQualifiedFormPath1a = this.__fullyQualifiedFormPath1a; 139 if (!this.__fullyQualifiedFormPath1aSet) 140 { 141 // fullyQualifiedFormPath has no pre constraints 142 fullyQualifiedFormPath1a = handleGetFullyQualifiedFormPath(); 143 // fullyQualifiedFormPath has no post constraints 144 this.__fullyQualifiedFormPath1a = fullyQualifiedFormPath1a; 145 if (isMetafacadePropertyCachingEnabled()) 146 { 147 this.__fullyQualifiedFormPath1aSet = true; 148 } 149 } 150 return fullyQualifiedFormPath1a; 151 } 152 153 /** 154 * @see org.andromda.cartridges.jsf2.metafacades.JSFControllerOperation#getFullyQualifiedFormName() 155 * @return String 156 */ 157 protected abstract String handleGetFullyQualifiedFormName(); 158 159 private String __fullyQualifiedFormName2a; 160 private boolean __fullyQualifiedFormName2aSet = false; 161 162 /** 163 * The fully qualified form name. 164 * @return (String)handleGetFullyQualifiedFormName() 165 */ 166 public final String getFullyQualifiedFormName() 167 { 168 String fullyQualifiedFormName2a = this.__fullyQualifiedFormName2a; 169 if (!this.__fullyQualifiedFormName2aSet) 170 { 171 // fullyQualifiedFormName has no pre constraints 172 fullyQualifiedFormName2a = handleGetFullyQualifiedFormName(); 173 // fullyQualifiedFormName has no post constraints 174 this.__fullyQualifiedFormName2a = fullyQualifiedFormName2a; 175 if (isMetafacadePropertyCachingEnabled()) 176 { 177 this.__fullyQualifiedFormName2aSet = true; 178 } 179 } 180 return fullyQualifiedFormName2a; 181 } 182 183 /** 184 * @see org.andromda.cartridges.jsf2.metafacades.JSFControllerOperation#getFormName() 185 * @return String 186 */ 187 protected abstract String handleGetFormName(); 188 189 private String __formName3a; 190 private boolean __formName3aSet = false; 191 192 /** 193 * The form name the corresponds to this controller operation. 194 * @return (String)handleGetFormName() 195 */ 196 public final String getFormName() 197 { 198 String formName3a = this.__formName3a; 199 if (!this.__formName3aSet) 200 { 201 // formName has no pre constraints 202 formName3a = handleGetFormName(); 203 // formName has no post constraints 204 this.__formName3a = formName3a; 205 if (isMetafacadePropertyCachingEnabled()) 206 { 207 this.__formName3aSet = true; 208 } 209 } 210 return formName3a; 211 } 212 213 /** 214 * @see org.andromda.cartridges.jsf2.metafacades.JSFControllerOperation#getFormCall() 215 * @return String 216 */ 217 protected abstract String handleGetFormCall(); 218 219 private String __formCall4a; 220 private boolean __formCall4aSet = false; 221 222 /** 223 * The operation call that takes the appropriate form as an argument. 224 * @return (String)handleGetFormCall() 225 */ 226 public final String getFormCall() 227 { 228 String formCall4a = this.__formCall4a; 229 if (!this.__formCall4aSet) 230 { 231 // formCall has no pre constraints 232 formCall4a = handleGetFormCall(); 233 // formCall has no post constraints 234 this.__formCall4a = formCall4a; 235 if (isMetafacadePropertyCachingEnabled()) 236 { 237 this.__formCall4aSet = true; 238 } 239 } 240 return formCall4a; 241 } 242 243 /** 244 * @see org.andromda.cartridges.jsf2.metafacades.JSFControllerOperation#getFormSignature() 245 * @return String 246 */ 247 protected abstract String handleGetFormSignature(); 248 249 private String __formSignature5a; 250 private boolean __formSignature5aSet = false; 251 252 /** 253 * The controller operation signature that takes the appropriate form (if this operation has at 254 * least one form field) as an argument. 255 * @return (String)handleGetFormSignature() 256 */ 257 public final String getFormSignature() 258 { 259 String formSignature5a = this.__formSignature5a; 260 if (!this.__formSignature5aSet) 261 { 262 // formSignature has no pre constraints 263 formSignature5a = handleGetFormSignature(); 264 // formSignature has no post constraints 265 this.__formSignature5a = formSignature5a; 266 if (isMetafacadePropertyCachingEnabled()) 267 { 268 this.__formSignature5aSet = true; 269 } 270 } 271 return formSignature5a; 272 } 273 274 /** 275 * @see org.andromda.cartridges.jsf2.metafacades.JSFControllerOperation#getImplementationFormSignature() 276 * @return String 277 */ 278 protected abstract String handleGetImplementationFormSignature(); 279 280 private String __implementationFormSignature6a; 281 private boolean __implementationFormSignature6aSet = false; 282 283 /** 284 * The controller implementation operation signature that takes the appropriate form (if this 285 * operation has at least one form field) as an argument. 286 * @return (String)handleGetImplementationFormSignature() 287 */ 288 public final String getImplementationFormSignature() 289 { 290 String implementationFormSignature6a = this.__implementationFormSignature6a; 291 if (!this.__implementationFormSignature6aSet) 292 { 293 // implementationFormSignature has no pre constraints 294 implementationFormSignature6a = handleGetImplementationFormSignature(); 295 // implementationFormSignature has no post constraints 296 this.__implementationFormSignature6a = implementationFormSignature6a; 297 if (isMetafacadePropertyCachingEnabled()) 298 { 299 this.__implementationFormSignature6aSet = true; 300 } 301 } 302 return implementationFormSignature6a; 303 } 304 305 /** 306 * @return true 307 * @see FrontEndControllerOperation 308 */ 309 public boolean isFrontEndControllerOperationMetaType() 310 { 311 return true; 312 } 313 314 /** 315 * @return true 316 * @see OperationFacade 317 */ 318 public boolean isOperationFacadeMetaType() 319 { 320 return true; 321 } 322 323 /** 324 * @return true 325 * @see ModelElementFacade 326 */ 327 public boolean isModelElementFacadeMetaType() 328 { 329 return true; 330 } 331 332 // ----------- delegates to FrontEndControllerOperation ------------ 333 /** 334 * The activity graph in which this controller operation is used. 335 * @see FrontEndControllerOperation#getActivityGraph() 336 */ 337 public FrontEndActivityGraph getActivityGraph() 338 { 339 return this.getSuperFrontEndControllerOperation().getActivityGraph(); 340 } 341 342 /** 343 * All those actions that contain at least one front-end action state that is deferring to this 344 * operation. 345 * @see FrontEndControllerOperation#getDeferringActions() 346 */ 347 public List<FrontEndAction> getDeferringActions() 348 { 349 return this.getSuperFrontEndControllerOperation().getDeferringActions(); 350 } 351 352 /** 353 * The set of fields in the form made up form this controller operation's parameters. 354 * @see FrontEndControllerOperation#getFormFields() 355 */ 356 public List<FrontEndParameter> getFormFields() 357 { 358 return this.getSuperFrontEndControllerOperation().getFormFields(); 359 } 360 361 /** 362 * For each front-end controller operation argument there must exist a form field for each 363 * action deferring to that operation. This form field must carry the same name and must be of 364 * the same type. True if this is the case, false otherwise. 365 * @see FrontEndControllerOperation#isAllArgumentsHaveFormFields() 366 */ 367 public boolean isAllArgumentsHaveFormFields() 368 { 369 return this.getSuperFrontEndControllerOperation().isAllArgumentsHaveFormFields(); 370 } 371 372 /** 373 * Indicates if the owner of this operation is a controller. 374 * @see FrontEndControllerOperation#isOwnerIsController() 375 */ 376 public boolean isOwnerIsController() 377 { 378 return this.getSuperFrontEndControllerOperation().isOwnerIsController(); 379 } 380 381 /** 382 * Copies all tagged values from the given ModelElementFacade to this model element facade. 383 * @see ModelElementFacade#copyTaggedValues(ModelElementFacade element) 384 */ 385 public void copyTaggedValues(ModelElementFacade element) 386 { 387 this.getSuperFrontEndControllerOperation().copyTaggedValues(element); 388 } 389 390 /** 391 * Finds the tagged value with the specified 'tagName'. In case there are more values the first 392 * one found will be returned. 393 * @see ModelElementFacade#findTaggedValue(String tagName) 394 */ 395 public Object findTaggedValue(String tagName) 396 { 397 return this.getSuperFrontEndControllerOperation().findTaggedValue(tagName); 398 } 399 400 /** 401 * Returns all the values for the tagged value with the specified name. The returned collection 402 * will contains only String instances, or will be empty. Never null. 403 * @see ModelElementFacade#findTaggedValues(String tagName) 404 */ 405 public Collection<Object> findTaggedValues(String tagName) 406 { 407 return this.getSuperFrontEndControllerOperation().findTaggedValues(tagName); 408 } 409 410 /** 411 * Returns the fully qualified name of the model element. The fully qualified name includes 412 * complete package qualified name of the underlying model element. The templates parameter will 413 * be replaced by the correct one given the binding relation of the parameter to this element. 414 * @see ModelElementFacade#getBindedFullyQualifiedName(ModelElementFacade bindedElement) 415 */ 416 public String getBindedFullyQualifiedName(ModelElementFacade bindedElement) 417 { 418 return this.getSuperFrontEndControllerOperation().getBindedFullyQualifiedName(bindedElement); 419 } 420 421 /** 422 * Gets all constraints belonging to the model element. 423 * @see ModelElementFacade#getConstraints() 424 */ 425 public Collection<ConstraintFacade> getConstraints() 426 { 427 return this.getSuperFrontEndControllerOperation().getConstraints(); 428 } 429 430 /** 431 * Returns the constraints of the argument kind that have been placed onto this model. Typical 432 * kinds are "inv", "pre" and "post". Other kinds are possible. 433 * @see ModelElementFacade#getConstraints(String kind) 434 */ 435 public Collection<ConstraintFacade> getConstraints(String kind) 436 { 437 return this.getSuperFrontEndControllerOperation().getConstraints(kind); 438 } 439 440 /** 441 * Gets the documentation for the model element, The indent argument is prefixed to each line. 442 * By default this method wraps lines after 64 characters. 443 * This method is equivalent to <code>getDocumentation(indent, 64)</code>. 444 * @see ModelElementFacade#getDocumentation(String indent) 445 */ 446 public String getDocumentation(String indent) 447 { 448 return this.getSuperFrontEndControllerOperation().getDocumentation(indent); 449 } 450 451 /** 452 * This method returns the documentation for this model element, with the lines wrapped after 453 * the specified number of characters, values of less than 1 will indicate no line wrapping is 454 * required. By default paragraphs are returned as HTML. 455 * This method is equivalent to <code>getDocumentation(indent, lineLength, true)</code>. 456 * @see ModelElementFacade#getDocumentation(String indent, int lineLength) 457 */ 458 public String getDocumentation(String indent, int lineLength) 459 { 460 return this.getSuperFrontEndControllerOperation().getDocumentation(indent, lineLength); 461 } 462 463 /** 464 * This method returns the documentation for this model element, with the lines wrapped after 465 * the specified number of characters, values of less than 1 will indicate no line wrapping is 466 * required. HTML style determines if HTML Escaping is applied. 467 * @see ModelElementFacade#getDocumentation(String indent, int lineLength, boolean htmlStyle) 468 */ 469 public String getDocumentation(String indent, int lineLength, boolean htmlStyle) 470 { 471 return this.getSuperFrontEndControllerOperation().getDocumentation(indent, lineLength, htmlStyle); 472 } 473 474 /** 475 * The fully qualified name of this model element. 476 * @see ModelElementFacade#getFullyQualifiedName() 477 */ 478 public String getFullyQualifiedName() 479 { 480 return this.getSuperFrontEndControllerOperation().getFullyQualifiedName(); 481 } 482 483 /** 484 * Returns the fully qualified name of the model element. The fully qualified name includes 485 * complete package qualified name of the underlying model element. If modelName is true, then 486 * the original name of the model element (the name contained within the model) will be the name 487 * returned, otherwise a name from a language mapping will be returned. 488 * @see ModelElementFacade#getFullyQualifiedName(boolean modelName) 489 */ 490 public String getFullyQualifiedName(boolean modelName) 491 { 492 return this.getSuperFrontEndControllerOperation().getFullyQualifiedName(modelName); 493 } 494 495 /** 496 * Returns the fully qualified name as a path, the returned value always starts with out a slash 497 * '/'. 498 * @see ModelElementFacade#getFullyQualifiedNamePath() 499 */ 500 public String getFullyQualifiedNamePath() 501 { 502 return this.getSuperFrontEndControllerOperation().getFullyQualifiedNamePath(); 503 } 504 505 /** 506 * Gets the unique identifier of the underlying model element. 507 * @see ModelElementFacade#getId() 508 */ 509 public String getId() 510 { 511 return this.getSuperFrontEndControllerOperation().getId(); 512 } 513 514 /** 515 * UML2: Retrieves the keywords for this element. Used to modify implementation properties which 516 * are not represented by other properties, i.e. native, transient, volatile, synchronized, 517 * (added annotations) override, deprecated. Can also be used to suppress compiler warnings: 518 * (added annotations) unchecked, fallthrough, path, serial, finally, all. Annotations require 519 * JDK5 compiler level. 520 * @see ModelElementFacade#getKeywords() 521 */ 522 public Collection<String> getKeywords() 523 { 524 return this.getSuperFrontEndControllerOperation().getKeywords(); 525 } 526 527 /** 528 * UML2: Retrieves a localized label for this named element. 529 * @see ModelElementFacade#getLabel() 530 */ 531 public String getLabel() 532 { 533 return this.getSuperFrontEndControllerOperation().getLabel(); 534 } 535 536 /** 537 * The language mappings that have been set for this model element. 538 * @see ModelElementFacade#getLanguageMappings() 539 */ 540 public TypeMappings getLanguageMappings() 541 { 542 return this.getSuperFrontEndControllerOperation().getLanguageMappings(); 543 } 544 545 /** 546 * Return the model containing this model element (multiple models may be loaded and processed 547 * at the same time). 548 * @see ModelElementFacade#getModel() 549 */ 550 public ModelFacade getModel() 551 { 552 return this.getSuperFrontEndControllerOperation().getModel(); 553 } 554 555 /** 556 * The name of the model element. 557 * @see ModelElementFacade#getName() 558 */ 559 public String getName() 560 { 561 return this.getSuperFrontEndControllerOperation().getName(); 562 } 563 564 /** 565 * Gets the package to which this model element belongs. 566 * @see ModelElementFacade#getPackage() 567 */ 568 public ModelElementFacade getPackage() 569 { 570 return this.getSuperFrontEndControllerOperation().getPackage(); 571 } 572 573 /** 574 * The name of this model element's package. 575 * @see ModelElementFacade#getPackageName() 576 */ 577 public String getPackageName() 578 { 579 return this.getSuperFrontEndControllerOperation().getPackageName(); 580 } 581 582 /** 583 * Gets the package name (optionally providing the ability to retrieve the model name and not 584 * the mapped name). 585 * @see ModelElementFacade#getPackageName(boolean modelName) 586 */ 587 public String getPackageName(boolean modelName) 588 { 589 return this.getSuperFrontEndControllerOperation().getPackageName(modelName); 590 } 591 592 /** 593 * Returns the package as a path, the returned value always starts with out a slash '/'. 594 * @see ModelElementFacade#getPackagePath() 595 */ 596 public String getPackagePath() 597 { 598 return this.getSuperFrontEndControllerOperation().getPackagePath(); 599 } 600 601 /** 602 * UML2: Returns the value of the 'Qualified Name' attribute. A name which allows the 603 * NamedElement to be identified within a hierarchy of nested Namespaces. It is constructed from 604 * the names of the containing namespaces starting at the root of the hierarchy and ending with 605 * the name of the NamedElement itself. 606 * @see ModelElementFacade#getQualifiedName() 607 */ 608 public String getQualifiedName() 609 { 610 return this.getSuperFrontEndControllerOperation().getQualifiedName(); 611 } 612 613 /** 614 * Gets the root package for the model element. 615 * @see ModelElementFacade#getRootPackage() 616 */ 617 public PackageFacade getRootPackage() 618 { 619 return this.getSuperFrontEndControllerOperation().getRootPackage(); 620 } 621 622 /** 623 * Gets the dependencies for which this model element is the source. 624 * @see ModelElementFacade#getSourceDependencies() 625 */ 626 public Collection<DependencyFacade> getSourceDependencies() 627 { 628 return this.getSuperFrontEndControllerOperation().getSourceDependencies(); 629 } 630 631 /** 632 * If this model element is the context of an activity graph, this represents that activity 633 * graph. 634 * @see ModelElementFacade#getStateMachineContext() 635 */ 636 public StateMachineFacade getStateMachineContext() 637 { 638 return this.getSuperFrontEndControllerOperation().getStateMachineContext(); 639 } 640 641 /** 642 * The collection of ALL stereotype names for this model element. 643 * @see ModelElementFacade#getStereotypeNames() 644 */ 645 public Collection<String> getStereotypeNames() 646 { 647 return this.getSuperFrontEndControllerOperation().getStereotypeNames(); 648 } 649 650 /** 651 * Gets all stereotypes for this model element. 652 * @see ModelElementFacade#getStereotypes() 653 */ 654 public Collection<StereotypeFacade> getStereotypes() 655 { 656 return this.getSuperFrontEndControllerOperation().getStereotypes(); 657 } 658 659 /** 660 * Return the TaggedValues associated with this model element, under all stereotypes. 661 * @see ModelElementFacade#getTaggedValues() 662 */ 663 public Collection<TaggedValueFacade> getTaggedValues() 664 { 665 return this.getSuperFrontEndControllerOperation().getTaggedValues(); 666 } 667 668 /** 669 * Gets the dependencies for which this model element is the target. 670 * @see ModelElementFacade#getTargetDependencies() 671 */ 672 public Collection<DependencyFacade> getTargetDependencies() 673 { 674 return this.getSuperFrontEndControllerOperation().getTargetDependencies(); 675 } 676 677 /** 678 * Get the template parameter for this model element having the parameterName 679 * @see ModelElementFacade#getTemplateParameter(String parameterName) 680 */ 681 public Object getTemplateParameter(String parameterName) 682 { 683 return this.getSuperFrontEndControllerOperation().getTemplateParameter(parameterName); 684 } 685 686 /** 687 * Get the template parameters for this model element 688 * @see ModelElementFacade#getTemplateParameters() 689 */ 690 public Collection<TemplateParameterFacade> getTemplateParameters() 691 { 692 return this.getSuperFrontEndControllerOperation().getTemplateParameters(); 693 } 694 695 /** 696 * The visibility (i.e. public, private, protected or package) of the model element, will 697 * attempt a lookup for these values in the language mappings (if any). 698 * @see ModelElementFacade#getVisibility() 699 */ 700 public String getVisibility() 701 { 702 return this.getSuperFrontEndControllerOperation().getVisibility(); 703 } 704 705 /** 706 * Returns true if the model element has the exact stereotype (meaning no stereotype inheritance 707 * is taken into account when searching for the stereotype), false otherwise. 708 * @see ModelElementFacade#hasExactStereotype(String stereotypeName) 709 */ 710 public boolean hasExactStereotype(String stereotypeName) 711 { 712 return this.getSuperFrontEndControllerOperation().hasExactStereotype(stereotypeName); 713 } 714 715 /** 716 * Does the UML Element contain the named Keyword? Keywords can be separated by space, comma, 717 * pipe, semicolon, or << >> 718 * @see ModelElementFacade#hasKeyword(String keywordName) 719 */ 720 public boolean hasKeyword(String keywordName) 721 { 722 return this.getSuperFrontEndControllerOperation().hasKeyword(keywordName); 723 } 724 725 /** 726 * Returns true if the model element has the specified stereotype. If the stereotype itself 727 * does not match, then a search will be made up the stereotype inheritance hierarchy, and if 728 * one of the stereotype's ancestors has a matching name this method will return true, false 729 * otherwise. 730 * For example, if we have a certain stereotype called <<exception>> and a model element has a 731 * stereotype called <<applicationException>> which extends <<exception>>, when calling this 732 * method with 'stereotypeName' defined as 'exception' the method would return true since 733 * <<applicationException>> inherits from <<exception>>. If you want to check if the model 734 * element has the exact stereotype, then use the method 'hasExactStereotype' instead. 735 * @see ModelElementFacade#hasStereotype(String stereotypeName) 736 */ 737 public boolean hasStereotype(String stereotypeName) 738 { 739 return this.getSuperFrontEndControllerOperation().hasStereotype(stereotypeName); 740 } 741 742 /** 743 * True if there are target dependencies from this element that are instances of BindingFacade. 744 * Deprecated in UML2: Use TemplateBinding parameters instead of dependencies. 745 * @see ModelElementFacade#isBindingDependenciesPresent() 746 */ 747 public boolean isBindingDependenciesPresent() 748 { 749 return this.getSuperFrontEndControllerOperation().isBindingDependenciesPresent(); 750 } 751 752 /** 753 * Indicates if any constraints are present on this model element. 754 * @see ModelElementFacade#isConstraintsPresent() 755 */ 756 public boolean isConstraintsPresent() 757 { 758 return this.getSuperFrontEndControllerOperation().isConstraintsPresent(); 759 } 760 761 /** 762 * Indicates if any documentation is present on this model element. 763 * @see ModelElementFacade#isDocumentationPresent() 764 */ 765 public boolean isDocumentationPresent() 766 { 767 return this.getSuperFrontEndControllerOperation().isDocumentationPresent(); 768 } 769 770 /** 771 * True if this element name is a reserved word in Java, C#, ANSI or ISO C, C++, JavaScript. 772 * @see ModelElementFacade#isReservedWord() 773 */ 774 public boolean isReservedWord() 775 { 776 return this.getSuperFrontEndControllerOperation().isReservedWord(); 777 } 778 779 /** 780 * True is there are template parameters on this model element. For UML2, applies to Class, 781 * Operation, Property, and Parameter. 782 * @see ModelElementFacade#isTemplateParametersPresent() 783 */ 784 public boolean isTemplateParametersPresent() 785 { 786 return this.getSuperFrontEndControllerOperation().isTemplateParametersPresent(); 787 } 788 789 /** 790 * True if this element name is a valid identifier name in Java, C#, ANSI or ISO C, C++, 791 * JavaScript. Contains no spaces, special characters etc. Constraint always applied on 792 * Enumerations and Interfaces, optionally applies on other model elements. 793 * @see ModelElementFacade#isValidIdentifierName() 794 */ 795 public boolean isValidIdentifierName() 796 { 797 return this.getSuperFrontEndControllerOperation().isValidIdentifierName(); 798 } 799 800 /** 801 * Searches for the constraint with the specified 'name' on this model element, and if found 802 * translates it using the specified 'translation' from a translation library discovered by the 803 * framework. 804 * @see ModelElementFacade#translateConstraint(String name, String translation) 805 */ 806 public String translateConstraint(String name, String translation) 807 { 808 return this.getSuperFrontEndControllerOperation().translateConstraint(name, translation); 809 } 810 811 /** 812 * Translates all constraints belonging to this model element with the given 'translation'. 813 * @see ModelElementFacade#translateConstraints(String translation) 814 */ 815 public String[] translateConstraints(String translation) 816 { 817 return this.getSuperFrontEndControllerOperation().translateConstraints(translation); 818 } 819 820 /** 821 * Translates the constraints of the specified 'kind' belonging to this model element. 822 * @see ModelElementFacade#translateConstraints(String kind, String translation) 823 */ 824 public String[] translateConstraints(String kind, String translation) 825 { 826 return this.getSuperFrontEndControllerOperation().translateConstraints(kind, translation); 827 } 828 829 /** 830 * Finds the parameter on this operation having the given name, if no parameter is found, null 831 * is returned instead. 832 * @see OperationFacade#findParameter(String name) 833 */ 834 public ParameterFacade findParameter(String name) 835 { 836 return this.getSuperFrontEndControllerOperation().findParameter(name); 837 } 838 839 /** 840 * Searches the given feature for the specified tag. 841 * If the follow boolean is set to true then the search will continue from the class operation 842 * to the class itself and then up the class hierarchy. 843 * @see OperationFacade#findTaggedValue(String name, boolean follow) 844 */ 845 public Object findTaggedValue(String name, boolean follow) 846 { 847 return this.getSuperFrontEndControllerOperation().findTaggedValue(name, follow); 848 } 849 850 /** 851 * A comma separated list of all argument names. 852 * @see OperationFacade#getArgumentNames() 853 */ 854 public String getArgumentNames() 855 { 856 return this.getSuperFrontEndControllerOperation().getArgumentNames(); 857 } 858 859 /** 860 * A comma separated list of all types of each argument, in order. 861 * @see OperationFacade#getArgumentTypeNames() 862 */ 863 public String getArgumentTypeNames() 864 { 865 return this.getSuperFrontEndControllerOperation().getArgumentTypeNames(); 866 } 867 868 /** 869 * Specification of an argument used to pass information into or out of an invocation of a 870 * behavioral 871 * feature. Parameters are allowed to be treated as connectable elements. Parameters have 872 * support for 873 * streaming, exceptions, and parameter sets. 874 * @see OperationFacade#getArguments() 875 */ 876 public Collection<ParameterFacade> getArguments() 877 { 878 return this.getSuperFrontEndControllerOperation().getArguments(); 879 } 880 881 /** 882 * Constructs the operation call with the operation name 883 * @see OperationFacade#getCall() 884 */ 885 public String getCall() 886 { 887 return this.getSuperFrontEndControllerOperation().getCall(); 888 } 889 890 /** 891 * Returns the concurrency modifier for this operation (i.e. concurrent, guarded or sequential) 892 * of the model element, will attempt a lookup for these values in the language mappings (if 893 * any). 894 * @see OperationFacade#getConcurrency() 895 */ 896 public String getConcurrency() 897 { 898 return this.getSuperFrontEndControllerOperation().getConcurrency(); 899 } 900 901 /** 902 * A comma separated list containing all exceptions that this operation throws. Exceptions are 903 * determined through dependencies that have the target element stereotyped as <<Exception>>. 904 * @see OperationFacade#getExceptionList() 905 */ 906 public String getExceptionList() 907 { 908 return this.getSuperFrontEndControllerOperation().getExceptionList(); 909 } 910 911 /** 912 * Returns a comma separated list of exceptions appended to the comma separated list of fully 913 * qualified 'initialException' classes passed in to this method. 914 * @see OperationFacade#getExceptionList(String initialExceptions) 915 */ 916 public String getExceptionList(String initialExceptions) 917 { 918 return this.getSuperFrontEndControllerOperation().getExceptionList(initialExceptions); 919 } 920 921 /** 922 * A collection of all exceptions thrown by this operation. 923 * @see OperationFacade#getExceptions() 924 */ 925 public Collection<ModelElementFacade> getExceptions() 926 { 927 return this.getSuperFrontEndControllerOperation().getExceptions(); 928 } 929 930 /** 931 * Return Type with multiplicity taken into account. UML14 does not allow multiplicity *. 932 * @see OperationFacade#getGetterSetterReturnTypeName() 933 */ 934 public String getGetterSetterReturnTypeName() 935 { 936 return this.getSuperFrontEndControllerOperation().getGetterSetterReturnTypeName(); 937 } 938 939 /** 940 * the lower value for the multiplicity 941 * -only applicable for UML2 942 * @see OperationFacade#getLower() 943 */ 944 public int getLower() 945 { 946 return this.getSuperFrontEndControllerOperation().getLower(); 947 } 948 949 /** 950 * Returns the operation method body determined from UML sequence diagrams or other UML sources. 951 * @see OperationFacade#getMethodBody() 952 */ 953 public String getMethodBody() 954 { 955 return this.getSuperFrontEndControllerOperation().getMethodBody(); 956 } 957 958 /** 959 * The operation this operation overrides, null if this operation is not overriding. 960 * @see OperationFacade#getOverriddenOperation() 961 */ 962 public OperationFacade getOverriddenOperation() 963 { 964 return this.getSuperFrontEndControllerOperation().getOverriddenOperation(); 965 } 966 967 /** 968 * Gets the owner of this operation 969 * @see OperationFacade#getOwner() 970 */ 971 public ClassifierFacade getOwner() 972 { 973 return this.getSuperFrontEndControllerOperation().getOwner(); 974 } 975 976 /** 977 * Return all parameters for the operation, including the return parameter. 978 * @see OperationFacade#getParameters() 979 */ 980 public Collection<ParameterFacade> getParameters() 981 { 982 return this.getSuperFrontEndControllerOperation().getParameters(); 983 } 984 985 /** 986 * The name of the operation that handles postcondition constraints. 987 * @see OperationFacade#getPostconditionName() 988 */ 989 public String getPostconditionName() 990 { 991 return this.getSuperFrontEndControllerOperation().getPostconditionName(); 992 } 993 994 /** 995 * The postcondition constraints belonging to this operation. 996 * @see OperationFacade#getPostconditions() 997 */ 998 public Collection<ConstraintFacade> getPostconditions() 999 { 1000 return this.getSuperFrontEndControllerOperation().getPostconditions(); 1001 } 1002 1003 /** 1004 * The call to the precondition operation. 1005 * @see OperationFacade#getPreconditionCall() 1006 */ 1007 public String getPreconditionCall() 1008 { 1009 return this.getSuperFrontEndControllerOperation().getPreconditionCall(); 1010 } 1011 1012 /** 1013 * The name of the operation that handles precondition constraints. 1014 * @see OperationFacade#getPreconditionName() 1015 */ 1016 public String getPreconditionName() 1017 { 1018 return this.getSuperFrontEndControllerOperation().getPreconditionName(); 1019 } 1020 1021 /** 1022 * The signature of the precondition operation. 1023 * @see OperationFacade#getPreconditionSignature() 1024 */ 1025 public String getPreconditionSignature() 1026 { 1027 return this.getSuperFrontEndControllerOperation().getPreconditionSignature(); 1028 } 1029 1030 /** 1031 * The precondition constraints belonging to this operation. 1032 * @see OperationFacade#getPreconditions() 1033 */ 1034 public Collection<ConstraintFacade> getPreconditions() 1035 { 1036 return this.getSuperFrontEndControllerOperation().getPreconditions(); 1037 } 1038 1039 /** 1040 * (UML2 Only). Get the actual return parameter (which may have stereotypes etc). 1041 * @see OperationFacade#getReturnParameter() 1042 */ 1043 public ParameterFacade getReturnParameter() 1044 { 1045 return this.getSuperFrontEndControllerOperation().getReturnParameter(); 1046 } 1047 1048 /** 1049 * The operation return type parameter. 1050 * @see OperationFacade#getReturnType() 1051 */ 1052 public ClassifierFacade getReturnType() 1053 { 1054 return this.getSuperFrontEndControllerOperation().getReturnType(); 1055 } 1056 1057 /** 1058 * Return the operation signature, including public/protested abstract returnType name plus 1059 * argument type and name 1060 * @see OperationFacade#getSignature() 1061 */ 1062 public String getSignature() 1063 { 1064 return this.getSuperFrontEndControllerOperation().getSignature(); 1065 } 1066 1067 /** 1068 * Returns the signature of the operation and optionally appends the argument names (if 1069 * withArgumentNames is true), otherwise returns the signature with just the types alone in the 1070 * signature. 1071 * @see OperationFacade#getSignature(boolean withArgumentNames) 1072 */ 1073 public String getSignature(boolean withArgumentNames) 1074 { 1075 return this.getSuperFrontEndControllerOperation().getSignature(withArgumentNames); 1076 } 1077 1078 /** 1079 * Returns the signature of the operation and optionally appends the given 'argumentModifier' to 1080 * each argument. 1081 * @see OperationFacade#getSignature(String argumentModifier) 1082 */ 1083 public String getSignature(String argumentModifier) 1084 { 1085 return this.getSuperFrontEndControllerOperation().getSignature(argumentModifier); 1086 } 1087 1088 /** 1089 * A comma-separated parameter list (type and name of each parameter) of an operation. 1090 * @see OperationFacade#getTypedArgumentList() 1091 */ 1092 public String getTypedArgumentList() 1093 { 1094 return this.getSuperFrontEndControllerOperation().getTypedArgumentList(); 1095 } 1096 1097 /** 1098 * A comma-separated parameter list (type and name of each parameter) of an operation with an 1099 * optional modifier (i.e final) before each parameter. 1100 * @see OperationFacade#getTypedArgumentList(String modifier) 1101 */ 1102 public String getTypedArgumentList(String modifier) 1103 { 1104 return this.getSuperFrontEndControllerOperation().getTypedArgumentList(modifier); 1105 } 1106 1107 /** 1108 * the upper value for the multiplicity (will be -1 for *) 1109 * - only applicable for UML2 1110 * @see OperationFacade#getUpper() 1111 */ 1112 public int getUpper() 1113 { 1114 return this.getSuperFrontEndControllerOperation().getUpper(); 1115 } 1116 1117 /** 1118 * True is the operation is abstract. 1119 * @see OperationFacade#isAbstract() 1120 */ 1121 public boolean isAbstract() 1122 { 1123 return this.getSuperFrontEndControllerOperation().isAbstract(); 1124 } 1125 1126 /** 1127 * True if the operation has (i.e. throws any exceptions) false otherwise. 1128 * @see OperationFacade#isExceptionsPresent() 1129 */ 1130 public boolean isExceptionsPresent() 1131 { 1132 return this.getSuperFrontEndControllerOperation().isExceptionsPresent(); 1133 } 1134 1135 /** 1136 * IsLeaf property in the operation. If true, operation is final, cannot be extended or 1137 * implemented by a descendant. Default=false. 1138 * @see OperationFacade#isLeaf() 1139 */ 1140 public boolean isLeaf() 1141 { 1142 return this.getSuperFrontEndControllerOperation().isLeaf(); 1143 } 1144 1145 /** 1146 * UML2 only. If the return type parameter multiplicity>1 OR the operation multiplicity>1. 1147 * Default=false. 1148 * @see OperationFacade#isMany() 1149 */ 1150 public boolean isMany() 1151 { 1152 return this.getSuperFrontEndControllerOperation().isMany(); 1153 } 1154 1155 /** 1156 * UML2 only: If isMany (Collection type returned), is the type unique within the collection. 1157 * Unique+Ordered determines CollectionType implementation of return result. Default=false. 1158 * @see OperationFacade#isOrdered() 1159 */ 1160 public boolean isOrdered() 1161 { 1162 return this.getSuperFrontEndControllerOperation().isOrdered(); 1163 } 1164 1165 /** 1166 * True if this operation overrides an operation defined in an ancestor class. An operation 1167 * overrides when the names of the operations as well as the types of the arguments are equal. 1168 * The return type may be different and is, as well as any exceptions, ignored. 1169 * @see OperationFacade#isOverriding() 1170 */ 1171 public boolean isOverriding() 1172 { 1173 return this.getSuperFrontEndControllerOperation().isOverriding(); 1174 } 1175 1176 /** 1177 * Whether any postcondition constraints are present on this operation. 1178 * @see OperationFacade#isPostconditionsPresent() 1179 */ 1180 public boolean isPostconditionsPresent() 1181 { 1182 return this.getSuperFrontEndControllerOperation().isPostconditionsPresent(); 1183 } 1184 1185 /** 1186 * Whether any precondition constraints are present on this operation. 1187 * @see OperationFacade#isPreconditionsPresent() 1188 */ 1189 public boolean isPreconditionsPresent() 1190 { 1191 return this.getSuperFrontEndControllerOperation().isPreconditionsPresent(); 1192 } 1193 1194 /** 1195 * Indicates whether or not this operation is a query operation. 1196 * @see OperationFacade#isQuery() 1197 */ 1198 public boolean isQuery() 1199 { 1200 return this.getSuperFrontEndControllerOperation().isQuery(); 1201 } 1202 1203 /** 1204 * True/false depending on whether or not the operation has a return type or not (i.e. a return 1205 * type of something other than void). 1206 * @see OperationFacade#isReturnTypePresent() 1207 */ 1208 public boolean isReturnTypePresent() 1209 { 1210 return this.getSuperFrontEndControllerOperation().isReturnTypePresent(); 1211 } 1212 1213 /** 1214 * True is the operation is static (only a single instance can be instantiated). 1215 * @see OperationFacade#isStatic() 1216 */ 1217 public boolean isStatic() 1218 { 1219 return this.getSuperFrontEndControllerOperation().isStatic(); 1220 } 1221 1222 /** 1223 * UML2 only: for Collection return type, is the type unique within the collection. 1224 * Unique+Ordered determines the returned CollectionType. Default=false. 1225 * @see OperationFacade#isUnique() 1226 */ 1227 public boolean isUnique() 1228 { 1229 return this.getSuperFrontEndControllerOperation().isUnique(); 1230 } 1231 1232 /** 1233 * @see org.andromda.core.metafacade.MetafacadeBase#initialize() 1234 */ 1235 @Override 1236 public void initialize() 1237 { 1238 this.getSuperFrontEndControllerOperation().initialize(); 1239 } 1240 1241 /** 1242 * @return Object getSuperFrontEndControllerOperation().getValidationOwner() 1243 * @see org.andromda.core.metafacade.MetafacadeBase#getValidationOwner() 1244 */ 1245 @Override 1246 public Object getValidationOwner() 1247 { 1248 Object owner = this.getSuperFrontEndControllerOperation().getValidationOwner(); 1249 return owner; 1250 } 1251 1252 /** 1253 * @return String getSuperFrontEndControllerOperation().getValidationName() 1254 * @see org.andromda.core.metafacade.MetafacadeBase#getValidationName() 1255 */ 1256 @Override 1257 public String getValidationName() 1258 { 1259 String name = this.getSuperFrontEndControllerOperation().getValidationName(); 1260 return name; 1261 } 1262 1263 /** 1264 * @param validationMessages Collection<ModelValidationMessage> 1265 * @see org.andromda.core.metafacade.MetafacadeBase#validateInvariants(Collection validationMessages) 1266 */ 1267 @Override 1268 public void validateInvariants(Collection<ModelValidationMessage> validationMessages) 1269 { 1270 this.getSuperFrontEndControllerOperation().validateInvariants(validationMessages); 1271 } 1272 1273 /** 1274 * The property that stores the name of the metafacade. 1275 */ 1276 private static final String NAME_PROPERTY = "name"; 1277 private static final String FQNAME_PROPERTY = "fullyQualifiedName"; 1278 1279 /** 1280 * @see Object#toString() 1281 */ 1282 @Override 1283 public String toString() 1284 { 1285 final StringBuilder toString = new StringBuilder(this.getClass().getName()); 1286 toString.append("["); 1287 try 1288 { 1289 toString.append(Introspector.instance().getProperty(this, FQNAME_PROPERTY)); 1290 } 1291 catch (final Throwable tryAgain) 1292 { 1293 try 1294 { 1295 toString.append(Introspector.instance().getProperty(this, NAME_PROPERTY)); 1296 } 1297 catch (final Throwable ignore) 1298 { 1299 // - just ignore when the metafacade doesn't have a name or fullyQualifiedName property 1300 } 1301 } 1302 toString.append("]"); 1303 return toString.toString(); 1304 } 1305}