001package org.andromda.cartridges.jsf.metafacades; 002 003import java.util.ArrayList; 004import java.util.Collection; 005import java.util.LinkedHashSet; 006import org.andromda.cartridges.jsf.JSFGlobals; 007import org.andromda.cartridges.jsf.JSFProfile; 008import org.andromda.cartridges.jsf.JSFUtils; 009import org.andromda.metafacades.uml.DependencyFacade; 010import org.andromda.metafacades.uml.ManageableEntityAssociationEnd; 011import org.andromda.metafacades.uml.ManageableEntityAttribute; 012import org.andromda.metafacades.uml.Role; 013import org.andromda.metafacades.uml.UMLMetafacadeProperties; 014import org.andromda.utils.StringUtilsHelper; 015import org.apache.commons.collections.Closure; 016import org.apache.commons.collections.CollectionUtils; 017import org.apache.commons.collections.Predicate; 018import org.apache.commons.collections.Transformer; 019import org.apache.commons.lang.ObjectUtils; 020import org.apache.commons.lang.StringUtils; 021 022/** 023 * MetafacadeLogic implementation for org.andromda.cartridges.jsf.metafacades.JSFManageableEntity. 024 * 025 * @see org.andromda.cartridges.jsf.metafacades.JSFManageableEntity 026 */ 027public class JSFManageableEntityLogicImpl 028 extends JSFManageableEntityLogic 029{ 030 private static final long serialVersionUID = 34L; 031 /** 032 * @param metaObject 033 * @param context 034 */ 035 public JSFManageableEntityLogicImpl(Object metaObject, String context) 036 { 037 super(metaObject, context); 038 } 039 040 /** 041 * @return getName().toLowerCase() + "-crud" 042 * @see org.andromda.cartridges.jsf.metafacades.JSFManageableEntity#getViewName() 043 */ 044 protected String handleGetViewName() 045 { 046 return this.getName().toLowerCase() + "-crud"; 047 } 048 049 /** 050 * @return toResourceMessageKey(this.getName()) + ".view.title" 051 * @see org.andromda.cartridges.jsf.metafacades.JSFManageableEntity#getViewTitleKey() 052 */ 053 protected String handleGetViewTitleKey() 054 { 055 return StringUtilsHelper.toResourceMessageKey(this.getName()) + ".view.title"; 056 } 057 058 /** 059 * @return StringUtilsHelper.toPhrase(getName()) 060 * @see org.andromda.cartridges.jsf.metafacades.JSFManageableEntity#getViewTitleValue() 061 */ 062 protected String handleGetViewTitleValue() 063 { 064 return StringUtilsHelper.toPhrase(getName()); 065 } 066 067 /** 068 * @return "manageableList" 069 * @see org.andromda.cartridges.jsf.metafacades.JSFManageableEntity#getListName() 070 */ 071 protected String handleGetListName() 072 { 073 return "manageableList"; 074 } 075 076 /** 077 * @return getManageablePackageName() + getNamespaceProperty() + this.getFormBeanClassName() 078 * @see org.andromda.cartridges.jsf.metafacades.JSFManageableEntity#getFormBeanType() 079 */ 080 protected String handleGetFormBeanType() 081 { 082 return this.getManageablePackageName() + this.getNamespaceProperty() + this.getFormBeanClassName(); 083 } 084 085 /** 086 * @return formBeanName 087 * @see org.andromda.cartridges.jsf.metafacades.JSFManageableEntity#getFormBeanName() 088 */ 089 protected String handleGetFormBeanName() 090 { 091 final String pattern = ObjectUtils.toString(this.getConfiguredProperty(JSFGlobals.FORM_BEAN_PATTERN)); 092 final String formBeanName = pattern.replaceFirst("\\{0\\}", "manage"); 093 return formBeanName.replaceFirst("\\{1\\}", this.getName()); 094 } 095 096 /** 097 * @return StringUtilsHelper.toResourceMessageKey(this.getName()) + ".exception" 098 * @see org.andromda.cartridges.jsf.metafacades.JSFManageableEntity#getExceptionKey() 099 */ 100 protected String handleGetExceptionKey() 101 { 102 return StringUtilsHelper.toResourceMessageKey(this.getName()) + ".exception"; 103 } 104 105 /** 106 * @return getManageablePackageName() + getNamespaceProperty() + getActionClassName() 107 * @see org.andromda.cartridges.jsf.metafacades.JSFManageableEntity#getActionType() 108 */ 109 protected String handleGetActionType() 110 { 111 return this.getManageablePackageName() + this.getNamespaceProperty() + this.getActionClassName(); 112 } 113 114 /** 115 * @return '/' + StringUtils.replace(this.getActionType(), getNamespaceProperty(), "/") 116 * @see org.andromda.cartridges.jsf.metafacades.JSFManageableEntity#getActionFullPath() 117 */ 118 protected String handleGetActionFullPath() 119 { 120 return '/' + StringUtils.replace(this.getActionType(), this.getNamespaceProperty(), "/"); 121 } 122 123 /** 124 * @return '/' + getName() + "/Manage" 125 * @see org.andromda.cartridges.jsf.metafacades.JSFManageableEntity#getActionPath() 126 */ 127 protected String handleGetActionPath() 128 { 129 return '/' + this.getName() + "/Manage"; 130 } 131 132 /** 133 * @return "Manage" + getName() 134 * @see org.andromda.cartridges.jsf.metafacades.JSFManageableEntity#getActionClassName() 135 */ 136 protected String handleGetActionClassName() 137 { 138 return "Manage" + getName(); 139 } 140 141 /** 142 * @return getViewFullPath() 143 * @see org.andromda.cartridges.jsf.metafacades.JSFManageableEntity#getExceptionPath() 144 */ 145 protected String handleGetExceptionPath() 146 { 147 return this.getViewFullPath(); 148 } 149 150 /** 151 * @return false 152 * @see org.andromda.cartridges.jsf.metafacades.JSFManageableEntity#isPreload() 153 */ 154 protected boolean handleIsPreload() 155 { 156 return false; //TODO think about... 157// return this.isCreate() || this.isRead() || this.isUpdate() || this.isDelete(); 158 } 159 160 /** 161 * @see org.andromda.cartridges.jsf.metafacades.JSFManageableEntityLogic#getManageableIdentifier() 162 */ 163 @Override 164 public org.andromda.metafacades.uml.ManageableEntityAttribute getManageableIdentifier() 165 { 166 return super.getManageableIdentifier(); 167 } 168 169 /** 170 * @return StringUtils.capitalize(this.getFormBeanName()) 171 * @see org.andromda.cartridges.jsf.metafacades.JSFManageableEntity#getFormBeanClassName() 172 */ 173 protected String handleGetFormBeanClassName() 174 { 175 return StringUtils.capitalize(this.getFormBeanName()); 176 } 177 178 /** 179 * @return StringUtils.replace(getFormBeanType(), getNamespaceProperty(), "/") 180 * @see org.andromda.cartridges.jsf.metafacades.JSFManageableEntity#getFormBeanFullPath() 181 */ 182 protected String handleGetFormBeanFullPath() 183 { 184 return StringUtils.replace(this.getFormBeanType(), this.getNamespaceProperty(), "/"); 185 } 186 187 /** 188 * @return "getManageableList" 189 * @see org.andromda.cartridges.jsf.metafacades.JSFManageableEntity#getListGetterName() 190 */ 191 protected String handleGetListGetterName() 192 { 193 return "getManageableList"; 194 } 195 196 /** 197 * @return "setManageableList" 198 * @see org.andromda.cartridges.jsf.metafacades.JSFManageableEntity#getListSetterName() 199 */ 200 protected String handleGetListSetterName() 201 { 202 return "setManageableList"; 203 } 204 205 /** 206 * @return StringUtilsHelper.toResourceMessageKey(this.getName()) 207 * @see org.andromda.cartridges.jsf.metafacades.JSFManageableEntity#getMessageKey() 208 */ 209 protected String handleGetMessageKey() 210 { 211 return StringUtilsHelper.toResourceMessageKey(this.getName()); 212 } 213 214 /** 215 * @return StringUtilsHelper.toPhrase(this.getName()) 216 * @see org.andromda.cartridges.jsf.metafacades.JSFManageableEntity#getMessageValue() 217 */ 218 protected String handleGetMessageValue() 219 { 220 return StringUtilsHelper.toPhrase(this.getName()); 221 } 222 223 /** 224 * @return getMessageKey() + ".online.help" 225 * @see org.andromda.cartridges.jsf.metafacades.JSFManageableEntity#getOnlineHelpKey() 226 */ 227 protected String handleGetOnlineHelpKey() 228 { 229 return this.getMessageKey() + ".online.help"; 230 } 231 232 /** 233 * @return onlineHelpValue 234 * @see org.andromda.cartridges.jsf.metafacades.JSFManageableEntity#getOnlineHelpValue() 235 */ 236 protected String handleGetOnlineHelpValue() 237 { 238 final String value = StringUtilsHelper.toResourceMessage(this.getDocumentation("", 64, false)); 239 return (value == null) ? "No entity documentation has been specified" : value; 240 } 241 242 /** 243 * @return getActionPath() + "Help" 244 * @see org.andromda.cartridges.jsf.metafacades.JSFManageableEntity#getOnlineHelpActionPath() 245 */ 246 protected String handleGetOnlineHelpActionPath() 247 { 248 return this.getActionPath() + "Help"; 249 } 250 251 /** 252 * @return '/' + getManageablePackagePath() + '/' + getName().toLowerCase() + "_help" 253 * @see org.andromda.cartridges.jsf.metafacades.JSFManageableEntity#getOnlineHelpPagePath() 254 */ 255 protected String handleGetOnlineHelpPagePath() 256 { 257 return '/' + this.getManageablePackagePath() + '/' + this.getName().toLowerCase() + "_help"; 258 } 259 260 /** 261 * @return getTableExportTypes().indexOf("none") == -1 262 * @see org.andromda.cartridges.jsf.metafacades.JSFManageableEntity#isTableExportable() 263 */ 264 protected boolean handleIsTableExportable() 265 { 266 return this.getTableExportTypes().indexOf("none") == -1; 267 } 268 269 /** 270 * @return null 271 * @see org.andromda.cartridges.jsf.metafacades.JSFManageableEntity#getTableExportTypes() 272 */ 273 protected String handleGetTableExportTypes() 274 { 275 return null; 276 //TODO a resolver 277// return JSFUtils.getDisplayTagExportTypes( 278// this.findTaggedValues(JSFProfile.TAGGEDVALUE_TABLE_EXPORT), 279// (String)getConfiguredProperty(JSFGlobals.PROPERTY_DEFAULT_TABLE_EXPORT_TYPES) ); 280 } 281 282 /** 283 * @return tableMaxRows 284 * @see org.andromda.cartridges.jsf.metafacades.JSFManageableEntity#getTableMaxRows() 285 */ 286 protected int handleGetTableMaxRows() 287 { 288 final Object taggedValue = this.findTaggedValue(JSFProfile.TAGGEDVALUE_TABLE_MAXROWS); 289 int pageSize; 290 291 try 292 { 293 pageSize = Integer.parseInt(String.valueOf(taggedValue)); 294 } 295 catch (Exception e) 296 { 297 pageSize = JSFProfile.TAGGEDVALUE_TABLE_MAXROWS_DEFAULT_COUNT; 298 } 299 300 return pageSize; 301 } 302 303 /** 304 * @return tableSortable 305 * @see org.andromda.cartridges.jsf.metafacades.JSFManageableEntity#isTableSortable() 306 */ 307 protected boolean handleIsTableSortable() 308 { 309 final Object taggedValue = this.findTaggedValue(JSFProfile.TAGGEDVALUE_TABLE_SORTABLE); 310 return (taggedValue == null) 311 ? JSFProfile.TAGGEDVALUE_TABLE_SORTABLE_DEFAULT_VALUE 312 : Boolean.valueOf(String.valueOf(taggedValue)).booleanValue(); 313 } 314 315 /** 316 * @return controllerType 317 * @see org.andromda.cartridges.jsf.metafacades.JSFManageableEntity#getControllerType() 318 */ 319 protected String handleGetControllerType() 320 { 321 return this.getManageablePackageName() + this.getNamespaceProperty() + this.getControllerName(); 322 } 323 324 /** 325 * @return StringUtils.uncapitalize(this.getName()) + "Controller" 326 * @see org.andromda.cartridges.jsf.metafacades.JSFManageableEntity#getControllerBeanName() 327 */ 328 protected String handleGetControllerBeanName() 329 { 330 return StringUtils.uncapitalize(this.getName()) + "Controller"; 331 } 332 333 /** 334 * @return '/' + StringUtils.replace(getControllerType(), getNamespaceProperty(), "/") 335 * @see org.andromda.cartridges.jsf.metafacades.JSFManageableEntity#getControllerFullPath() 336 */ 337 protected String handleGetControllerFullPath() 338 { 339 return '/' + StringUtils.replace(this.getControllerType(), this.getNamespaceProperty(), "/"); 340 } 341 342 /** 343 * @return getName() + "Controller" 344 * @see org.andromda.cartridges.jsf.metafacades.JSFManageableEntity#getControllerName() 345 */ 346 protected String handleGetControllerName() 347 { 348 return this.getName() + "Controller"; 349 } 350 351 /** 352 * @return getName() + this.getConfiguredProperty(JSFGlobals.CRUD_VALUE_OBJECT_SUFFIX) 353 * @see org.andromda.cartridges.jsf.metafacades.JSFManageableEntity#getValueObjectClassName() 354 */ 355 protected String handleGetValueObjectClassName() 356 { 357 return getName() + this.getConfiguredProperty(JSFGlobals.CRUD_VALUE_OBJECT_SUFFIX); 358 } 359 360 /** 361 * @return formSerialVersionUID 362 * @see org.andromda.cartridges.jsf.metafacades.JSFManageableEntity#getFormSerialVersionUID() 363 */ 364 protected String handleGetFormSerialVersionUID() 365 { 366 final StringBuilder buffer = new StringBuilder(); 367 buffer.append(this.getFormBeanType()); 368 addSerialUIDData(buffer); 369 return JSFUtils.calcSerialVersionUID(buffer); 370 } 371 372 /** 373 * @return actionSerialVersionUID 374 * @see org.andromda.cartridges.jsf.metafacades.JSFManageableEntity#getActionSerialVersionUID() 375 */ 376 protected String handleGetActionSerialVersionUID() 377 { 378 final StringBuilder buffer = new StringBuilder(); 379 buffer.append(this.getActionFullPath()); 380 addSerialUIDData(buffer); 381 return JSFUtils.calcSerialVersionUID(buffer); 382 } 383 384 /** 385 * @return populatorName 386 * @see org.andromda.cartridges.jsf.metafacades.JSFManageableEntity#getPopulatorName() 387 */ 388 protected String handleGetPopulatorName() 389 { 390 return ObjectUtils.toString(this.getConfiguredProperty(JSFGlobals.VIEW_POPULATOR_PATTERN)).replaceAll( 391 "\\{0\\}", 392 StringUtilsHelper.upperCamelCaseName(this.getFormBeanClassName())); 393 } 394 395 /** 396 * @return '/' + StringUtils.replace(getPopulatorType(), getNamespaceProperty(), "/") 397 * @see org.andromda.cartridges.jsf.metafacades.JSFManageableEntity#getPopulatorFullPath() 398 */ 399 protected String handleGetPopulatorFullPath() 400 { 401 return '/' + StringUtils.replace(this.getPopulatorType(), this.getNamespaceProperty(), "/"); 402 } 403 404 /** 405 * @return getManageablePackageName() + getNamespaceProperty() + getPopulatorName() 406 * @see org.andromda.cartridges.jsf.metafacades.JSFManageableEntity#getPopulatorType() 407 */ 408 protected String handleGetPopulatorType() 409 { 410 return this.getManageablePackageName() + this.getNamespaceProperty() + this.getPopulatorName(); 411 } 412 413 /** 414 * @return '/' + getManageablePackagePath() + '/' + getViewName() 415 * @see org.andromda.cartridges.jsf.metafacades.JSFManageableEntity#getViewFullPath() 416 */ 417 protected String handleGetViewFullPath() 418 { 419 return '/' + this.getManageablePackagePath() + '/' + this.getViewName(); 420 } 421 422 /** 423 * @return '/' + getManageablePackagePath() + '/' + getName().toLowerCase() + "-ods-export" 424 * @see org.andromda.cartridges.jsf.metafacades.JSFManageableEntity#getViewFullPath() 425 */ 426 protected String handleGetOdsExportFullPath() 427 { 428 return '/' + this.getManageablePackagePath() + '/' + this.getName().toLowerCase()+"-ods-export"; 429 } 430 431 /** 432 * @return isValidationRequired 433 * @see org.andromda.cartridges.jsf.metafacades.JSFManageableEntity#isValidationRequired() 434 */ 435 protected boolean handleIsValidationRequired() 436 { 437 for (final ManageableEntityAttribute attribute : this.getManageableAttributes()) 438 { 439 if(attribute instanceof JSFManageableEntityAttribute) 440 { 441 final JSFManageableEntityAttribute jsfAttribute = (JSFManageableEntityAttribute)attribute; 442 if (jsfAttribute.isValidationRequired()) 443 { 444 return true; 445 } 446 } 447 } 448 return false; 449 } 450 451 /** 452 * @return searchFormBeanName 453 * @see org.andromda.cartridges.jsf.metafacades.JSFManageableEntity#getSearchFormBeanName() 454 */ 455 protected String handleGetSearchFormBeanName() 456 { 457 final String pattern = ObjectUtils.toString(this.getConfiguredProperty(JSFGlobals.FORM_BEAN_PATTERN)); 458 final String formBeanName = pattern.replaceFirst("\\{0\\}", "manage"); 459 return formBeanName.replaceFirst("\\{1\\}",this.getName() + "Search"); 460 } 461 462 /** 463 * @return searchFormBeanType 464 * @see org.andromda.cartridges.jsf.metafacades.JSFManageableEntity#getSearchFormBeanType() 465 */ 466 protected String handleGetSearchFormBeanType() 467 { 468 return this.getManageablePackageName() + this.getNamespaceProperty() + this.getSearchFormBeanClassName(); 469 } 470 471 /** 472 * @return searchFormBeanFullPath 473 * @see org.andromda.cartridges.jsf.metafacades.JSFManageableEntity#getSearchFormBeanFullPath() 474 */ 475 protected String handleGetSearchFormBeanFullPath() 476 { 477 return StringUtils.replace(this.getSearchFormBeanType(), this.getNamespaceProperty(), "/"); 478 } 479 480 /** 481 * @return StringUtils.capitalize(this.getSearchFormBeanName()) 482 * @see org.andromda.cartridges.jsf.metafacades.JSFManageableEntity#getSearchFormBeanClassName() 483 */ 484 protected String handleGetSearchFormBeanClassName() 485 { 486 return StringUtils.capitalize(this.getSearchFormBeanName()); 487 } 488 489 /** 490 * @return manageableSearchAttributes 491 * @see org.andromda.cartridges.jsf.metafacades.JSFManageableEntity#getManageableSearchAttributes() 492 */ 493 protected Collection<JSFManageableEntityAttribute> handleGetManageableSearchAttributes() 494 { 495 final Collection<JSFManageableEntityAttribute> coll = new ArrayList<JSFManageableEntityAttribute>(); 496 for(final ManageableEntityAttribute attribute : getManageableAttributes()) 497 { 498 if(attribute instanceof JSFManageableEntityAttribute) 499 { 500 final JSFManageableEntityAttribute attr=(JSFManageableEntityAttribute)attribute; 501 if(!attr.isHidden()) 502 coll.add(attr); 503 } 504 } 505 return coll; 506 } 507 508 /** 509 * @return getManageableAssociationEnds() 510 * @see org.andromda.cartridges.jsf.metafacades.JSFManageableEntity#getManageableSearchAssociationEnds() 511 */ 512 protected Collection<ManageableEntityAssociationEnd> handleGetManageableSearchAssociationEnds() 513 { 514 return getManageableAssociationEnds(); 515 } 516 517 /** 518 * @param element 519 * @return isSearchable 520 * @see org.andromda.cartridges.jsf.metafacades.JSFManageableEntity#isSearchable(Object) 521 */ 522 protected boolean handleIsSearchable(Object element) 523 { 524// if(element instanceof JSFManageableEntityAttribute) 525// return getManageableSearchAttributes().contains(element); 526// else 527// return getManageableSearchAssociationEnds().contains(element); 528 529 //TODO corrigir 530 531 if(element instanceof JSFManageableEntityAttribute) 532 { 533 return !((JSFManageableEntityAttribute)element).isHidden(); 534 } 535 else 536 { 537 return true; 538 } 539 } 540 541 /** 542 * @return the configured property denoting the character sequence to use for the separation of namespaces 543 */ 544 private String getNamespaceProperty() 545 { 546 return (String)this.getConfiguredProperty(UMLMetafacadeProperties.NAMESPACE_SEPARATOR); 547 } 548 549 private void addSerialUIDData(StringBuilder buffer) 550 { 551 for (final ManageableEntityAttribute attribute : this.getManageableAttributes()) 552 { 553 buffer.append(attribute.getName()); 554 } 555 for (final ManageableEntityAssociationEnd end : this.getManageableAssociationEnds()) 556 { 557 buffer.append(end.getName()); 558 } 559 } 560 561 /** 562 * @return allRoles 563 * @see org.andromda.cartridges.jsf.metafacades.JSFManageableEntity#getRoles() 564 */ 565 protected Collection handleGetRoles() 566 { 567 //copied form the Service <<Metafacade>> 568 final Collection roles = new ArrayList(this.getTargetDependencies()); 569 CollectionUtils.filter(roles, new Predicate() 570 { 571 public boolean evaluate(final Object object) 572 { 573 DependencyFacade dependency = (DependencyFacade)object; 574 return dependency != null && dependency.getSourceElement() instanceof Role; 575 } 576 }); 577 CollectionUtils.transform(roles, new Transformer() 578 { 579 public Object transform(final Object object) 580 { 581 return ((DependencyFacade)object).getSourceElement(); 582 } 583 }); 584 final Collection allRoles = new LinkedHashSet(roles); 585 // add all roles which are generalizations of this one 586 CollectionUtils.forAllDo(roles, new Closure() 587 { 588 public void execute(final Object object) 589 { 590 allRoles.addAll(((Role)object).getAllSpecializations()); 591 } 592 }); 593 return allRoles; 594 } 595 596 /** 597 * @return actionRoles 598 * @see org.andromda.cartridges.jsf.metafacades.JSFManageableEntity#getActionRoles() 599 */ 600 protected String handleGetActionRoles() 601 { 602 //copied from JSFUseCaseLogicImpl 603 final StringBuilder rolesBuffer = new StringBuilder(); 604 boolean first = true; 605 for (final Role role : this.getRoles()) 606 { 607 if (first) 608 { 609 first = false; 610 } 611 else 612 { 613 rolesBuffer.append(','); 614 } 615 rolesBuffer.append(role.getName()); 616 } 617 return rolesBuffer.toString(); 618 } 619 620 /** 621 * @return needsFileUpload 622 * @see org.andromda.cartridges.jsf.metafacades.JSFManageableEntity#isNeedsFileUpload() 623 */ 624 protected boolean handleIsNeedsFileUpload() 625 { 626 for (final ManageableEntityAttribute attribute : this.getManageableAttributes()) 627 { 628 if(attribute instanceof JSFManageableEntityAttribute) 629 { 630 final JSFManageableEntityAttribute jsfAttribute = (JSFManageableEntityAttribute)attribute; 631 if(jsfAttribute.isNeedsFileUpload()) 632 { 633 return true; 634 } 635 } 636 } 637 return false; 638 } 639 640 /** 641 * @return needsUserInterface 642 * @see org.andromda.cartridges.jsf.metafacades.JSFManageableEntity#isNeedsUserInterface() 643 */ 644 protected boolean handleIsNeedsUserInterface() 645 { 646 for (final ManageableEntityAttribute attribute : this.getManageableAttributes()) 647 { 648 if(attribute instanceof JSFManageableEntityAttribute) 649 { 650 final JSFManageableEntityAttribute jsfAttribute = (JSFManageableEntityAttribute)attribute; 651 if(!jsfAttribute.isHidden()) 652 { 653 return true; 654 } 655 } 656 } 657 for (final ManageableEntityAssociationEnd associationEnd : this.getManageableAssociationEnds()) 658 { 659 if(associationEnd instanceof JSFManageableEntityAssociationEnd) 660 { 661 final JSFManageableEntityAssociationEnd jsfAssociationEnd = (JSFManageableEntityAssociationEnd)associationEnd; 662 if(!jsfAssociationEnd.isDisplay()) 663 { 664 return true; 665 } 666 } 667 } 668 return false; 669 } 670 671 /** 672 * @return converterClassName 673 * @see org.andromda.cartridges.jsf.metafacades.JSFManageableEntity#getConverterClassName 674 */ 675 public String handleGetConverterClassName() 676 { 677 return StringUtils.replace( 678 ObjectUtils.toString(this.getConfiguredProperty(JSFGlobals.CONVERTER_PATTERN)), 679 "{0}", 680 this.getName()); 681 } 682 683 /** 684 * @return converterType 685 * @see org.andromda.cartridges.jsf.metafacades.JSFManageableEntity#getConverterType 686 */ 687 public String handleGetConverterType() 688 { 689 return this.getManageablePackageName() + this.getNamespaceProperty() + this.getConverterClassName(); 690 } 691 692 /** 693 * @return converterFullPath 694 * @see org.andromda.cartridges.jsf.metafacades.JSFManageableEntity#getConverterFullPath 695 */ 696 public String handleGetConverterFullPath() 697 { 698 return StringUtils.replace(this.getConverterType(), this.getNamespaceProperty(), "/"); 699 } 700}