1 31 32 package org.opencms.configuration; 33 34 import org.opencms.db.CmsExportPoint; 35 import org.opencms.main.CmsLog; 36 import org.opencms.main.OpenCms; 37 import org.opencms.util.CmsRfsFileViewer; 38 import org.opencms.util.CmsStringUtil; 39 import org.opencms.workplace.CmsWorkplaceManager; 40 import org.opencms.workplace.explorer.CmsExplorerContextMenu; 41 import org.opencms.workplace.explorer.CmsExplorerContextMenuItem; 42 import org.opencms.workplace.explorer.CmsExplorerTypeAccess; 43 import org.opencms.workplace.explorer.CmsExplorerTypeSettings; 44 import org.opencms.workplace.tools.CmsToolManager; 45 import org.opencms.workplace.tools.CmsToolRootHandler; 46 47 import java.util.ArrayList ; 48 import java.util.Arrays ; 49 import java.util.Collections ; 50 import java.util.Iterator ; 51 import java.util.List ; 52 import java.util.Map ; 53 import java.util.Set ; 54 55 import org.apache.commons.digester.Digester; 56 57 import org.dom4j.Element; 58 59 68 public class CmsWorkplaceConfiguration extends A_CmsXmlConfiguration implements I_CmsXmlConfiguration { 69 70 71 public static final String A_AUTOSETNAVIGATION = "autosetnavigation"; 72 73 74 public static final String A_AUTOSETTITLE = "autosettitle"; 75 76 77 public static final String A_PAGE = "page"; 78 79 80 public static final String A_PERMISSIONS = "permissions"; 81 82 83 public static final String A_PRINCIPAL = "principal"; 84 85 86 public static final String A_REFERENCE = "reference"; 87 88 89 public static final String A_RULES = "rules"; 90 91 92 public static final String A_SHOWNAVIGATION = "shownavigation"; 93 94 95 public static final String A_TARGET = "target"; 96 97 98 public static final String CONFIGURATION_DTD_NAME = "opencms-workplace.dtd"; 99 100 101 public static final String DEFAULT_XML_FILE_NAME = "opencms-workplace.xml"; 102 103 104 public static final String N_ACCESSCONTROL = "accesscontrol"; 105 106 107 public static final String N_ACCESSENTRY = "accessentry"; 108 109 110 public static final String N_AUTOLOCK = "autolock"; 111 112 113 public static final String N_BUTTONSTYLE = "buttonstyle"; 114 115 116 public static final String N_CONTEXTMENU = "contextmenu"; 117 118 119 public static final String N_DATECREATED = "show-datecreated"; 120 121 122 public static final String N_DATEEXPIRED = "show-dateexpired"; 123 124 125 public static final String N_DATELASTMODIFIED = "show-datelastmodified"; 126 127 128 public static final String N_DATERELEASED = "show-datereleased"; 129 130 131 public static final String N_DEFAULTACCESSCONTROL = "defaultaccesscontrol"; 132 133 134 public static final String N_DEFAULTLOCALE = "defaultlocale"; 135 136 137 public static final String N_DEFAULTPREFERENCES = "default-preferences"; 138 139 140 public static final String N_DEFAULTPROPERTIES = "defaultproperties"; 141 142 143 public static final String N_DEFAULTPROPERTIESONSTRUCTURE = "defaultpropertiesonstructure"; 144 145 146 public static final String N_DEFAULTPROPERTY = "defaultproperty"; 147 148 149 public static final String N_DIALOGHANDLER = "dialoghandler"; 150 151 152 public static final String N_DIALOGHANDLERS = "dialoghandlers"; 153 154 155 public static final String N_DIALOGSDEFAULTSETTINGS = "dialogs-defaultsettings"; 156 157 158 public static final String N_DIALOGSPREFERENCES = "dialogs-preferences"; 159 160 161 public static final String N_DIRECTEDITPROVIDER = "directeditprovider"; 162 163 164 public static final String N_DIRECTEDITSTYLE = "directeditstyle"; 165 166 167 public static final String N_DIRECTPUBLISH = "directpublish"; 168 169 170 public static final String N_EDITOPTIONS = "editoptions"; 171 172 173 public static final String N_EDITOR = "editor"; 174 175 176 public static final String N_EDITORACTION = "editoraction"; 177 178 179 public static final String N_EDITORGENERALOPTIONS = "editors-generaloptions"; 180 181 182 public static final String N_EDITORHANDLER = "editorhandler"; 183 184 185 public static final String N_EDITORPREFERENCES = "editors-preferences"; 186 187 188 public static final String N_EDITORPREFERREDEDITORS = "editors-preferrededitors"; 189 190 191 public static final String N_ENABLEADVANCEDPROPERTYTABS = "enableadvancedpropertytabs"; 192 193 194 public static final String N_ENABLED = "enabled"; 195 196 197 public static final String N_ENABLEUSERMGMT = "enableusermanagement"; 198 199 200 public static final String N_ENTRIES = "entries"; 201 202 203 public static final String N_ENTRY = "entry"; 204 205 206 public static final String N_EXPANDPERMISSIONSINHERITED = "expand-permissionsinherited"; 207 208 209 public static final String N_EXPANDPERMISSIONSUSER = "expand-permissionsuser"; 210 211 212 public static final String N_EXPLORERDISPLAYOPTIONS = "explorer-displayoptions"; 213 214 215 public static final String N_EXPLORERGENERALOPTIONS = "explorer-generaloptions"; 216 217 218 public static final String N_EXPLORERPREFERENCES = "explorer-preferences"; 219 220 221 public static final String N_EXPLORERTYPE = "explorertype"; 222 223 224 public static final String N_EXPLORERTYPES = "explorertypes"; 225 226 227 public static final String N_FILECOPY = "filecopy"; 228 229 230 public static final String N_FILEDELETION = "filedeletion"; 231 232 233 public static final String N_FILEENCODING = "fileEncoding"; 234 235 236 public static final String N_FILEPATH = "filePath"; 237 238 239 public static final String N_FOLDER = "folder"; 240 241 242 public static final String N_FOLDERCOPY = "foldercopy"; 243 244 245 public static final String N_HELPTEXT = "helptext"; 246 247 248 public static final String N_INFORMROLEMEMBERS = "informrolemembers"; 249 250 251 public static final String N_ISLOGFILE = "isLogfile"; 252 253 254 public static final String N_KEY = "key"; 255 256 257 public static final String N_LABELEDFOLDERS = "labeledfolders"; 258 259 260 public static final String N_LOCALE = "locale"; 261 262 263 public static final String N_LOCALIZEDFOLDERS = "localizedfolders"; 264 265 266 public static final String N_LOCKEDBY = "show-lockedby"; 267 268 269 public static final String N_MAXUPLOADSIZE = "maxfileuploadsize"; 270 271 272 public static final String N_MESSAGEACCEPTED = "message-accepted"; 273 274 275 public static final String N_MESSAGECOMPLETED = "message-completed"; 276 277 278 public static final String N_MESSAGEFORWARDED = "message-forwarded"; 279 280 281 public static final String N_MULTICONTEXTMENU = "multicontextmenu"; 282 283 284 public static final String N_NEWFOLDERCREATEINDEXPAGE = "newfolder-createindexpage"; 285 286 287 public static final String N_NEWFOLDEREDITPROPERTIES = "newfolder-editproperties"; 288 289 290 public static final String N_NEWRESOURCE = "newresource"; 291 292 293 public static final String N_PERMISSIONS = "show-permissions"; 294 295 296 public static final String N_PERMISSIONSINHERITONFOLDER = "permissions-inheritonfolder"; 297 298 299 public static final String N_PROJECT = "project"; 300 301 302 public static final String N_PUBLISHBUTTONAPPEARANCE = "publishbuttonappearance"; 303 304 305 public static final String N_REPORTTYPE = "reporttype"; 306 307 308 public static final String N_RESTRICTEXPLORERVIEW = "restrictexplorerview"; 309 310 311 public static final String N_RFSFILEVIEWESETTINGS = "rfsfileviewsettings"; 312 313 314 public static final String N_ROOT = "root"; 315 316 317 public static final String N_ROOTS = "roots"; 318 319 320 public static final String N_SEPARATOR = "separator"; 321 322 323 public static final String N_SHOWEXPORTSETTINGS = "showexportsettings"; 324 325 326 public static final String N_SHOWLOCK = "showlock"; 327 328 329 public static final String N_SHOWMESSAGES = "showmessages"; 330 331 332 public static final String N_SHOWPROJECTS = "showprojects"; 333 334 335 public static final String N_SIZE = "show-size"; 336 337 338 public static final String N_STARTUPFILTER = "startupfilter"; 339 340 341 public static final String N_STATE = "show-state"; 342 343 344 public static final String N_TITLE = "show-title"; 345 346 347 public static final String N_TOOLMANAGER = "tool-manager"; 348 349 350 public static final String N_TYPE = "show-type"; 351 352 353 public static final String N_UPLOADAPPLET = "uploadapplet"; 354 355 356 public static final String N_URI = "uri"; 357 358 359 public static final String N_USERCREATED = "show-usercreated"; 360 361 362 public static final String N_USERLASTMODIFIED = "show-userlastmodified"; 363 364 365 public static final String N_WINDOWSIZE = "windowSize"; 366 367 368 public static final String N_WORKFLOW = "workflow"; 369 370 371 public static final String N_WORKFLOWDEFAULTSETTINGS = "workflow-defaultsettings"; 372 373 374 public static final String N_WORKFLOWGENERALOPTIONS = "workflow-generaloptions"; 375 376 377 public static final String N_WORKFLOWPREFERENCES = "workflow-preferences"; 378 379 380 public static final String N_WORKPLACE = "workplace"; 381 382 383 public static final String N_WORKPLACEGENERALOPTIONS = "workplace-generaloptions"; 384 385 386 public static final String N_WORKPLACEPREFERENCES = "workplace-preferences"; 387 388 389 public static final String N_WORKPLACESTARTUPSETTINGS = "workplace-startupsettings"; 390 391 392 public static final String N_WORKPLACEVIEW = "workplaceview"; 393 394 395 private CmsWorkplaceManager m_workplaceManager; 396 397 400 public CmsWorkplaceConfiguration() { 401 402 setXmlFileName(DEFAULT_XML_FILE_NAME); 403 if (CmsLog.INIT.isInfoEnabled()) { 404 CmsLog.INIT.info(Messages.get().getBundle().key(Messages.INIT_WORKPLACE_INIT_0)); 405 } 406 } 407 408 413 public static void addExplorerTypeXmlRules(Digester digester) { 414 415 digester.addObjectCreate("*/" + N_EXPLORERTYPE, CmsExplorerTypeSettings.class); 417 digester.addSetNext("*/" + N_EXPLORERTYPE, "addExplorerTypeSetting"); 418 419 digester.addCallMethod("*/" + N_EXPLORERTYPE, "setTypeAttributes", 4); 420 digester.addCallParam("*/" + N_EXPLORERTYPE, 0, A_NAME); 421 digester.addCallParam("*/" + N_EXPLORERTYPE, 1, A_KEY); 422 digester.addCallParam("*/" + N_EXPLORERTYPE, 2, A_ICON); 423 digester.addCallParam("*/" + N_EXPLORERTYPE, 3, A_REFERENCE); 424 425 digester.addCallMethod("*/" + N_EXPLORERTYPE + "/" + N_NEWRESOURCE, "setNewResourceHandlerClassName", 1); 426 digester.addCallParam("*/" + N_EXPLORERTYPE + "/" + N_NEWRESOURCE, 0, A_HANDLER); 427 digester.addCallMethod("*/" + N_EXPLORERTYPE + "/" + N_NEWRESOURCE, "setNewResourceUri", 1); 428 digester.addCallParam("*/" + N_EXPLORERTYPE + "/" + N_NEWRESOURCE, 0, A_URI); 429 digester.addCallMethod("*/" + N_EXPLORERTYPE + "/" + N_NEWRESOURCE, "setNewResourceOrder", 1); 430 digester.addCallParam("*/" + N_EXPLORERTYPE + "/" + N_NEWRESOURCE, 0, A_ORDER); 431 digester.addCallMethod("*/" + N_EXPLORERTYPE + "/" + N_NEWRESOURCE, "setNewResourcePage", 1); 432 digester.addCallParam("*/" + N_EXPLORERTYPE + "/" + N_NEWRESOURCE, 0, A_PAGE); 433 434 digester.addCallMethod("*/" + N_EXPLORERTYPE + "/" + N_NEWRESOURCE, "setAutoSetNavigation", 1); 435 digester.addCallParam("*/" + N_EXPLORERTYPE + "/" + N_NEWRESOURCE, 0, A_AUTOSETNAVIGATION); 436 digester.addCallMethod("*/" + N_EXPLORERTYPE + "/" + N_NEWRESOURCE, "setAutoSetTitle", 1); 437 digester.addCallParam("*/" + N_EXPLORERTYPE + "/" + N_NEWRESOURCE, 0, A_AUTOSETTITLE); 438 439 digester.addObjectCreate("*/" + N_EXPLORERTYPE + "/" + N_ACCESSCONTROL, CmsExplorerTypeAccess.class); 440 digester.addSetNext("*/" + N_EXPLORERTYPE + "/" + N_ACCESSCONTROL, "setAccess"); 441 442 digester.addCallMethod("*/" + N_EXPLORERTYPE + "/" + N_ACCESSCONTROL + "/" + N_ACCESSENTRY, "addAccessEntry", 2); 443 digester.addCallParam("*/" + N_EXPLORERTYPE + "/" + N_ACCESSCONTROL + "/" + N_ACCESSENTRY, 0, A_PRINCIPAL); 444 digester.addCallParam("*/" + N_EXPLORERTYPE + "/" + N_ACCESSCONTROL + "/" + N_ACCESSENTRY, 1, A_PERMISSIONS); 445 446 digester.addCallMethod( 447 "*/" + N_EXPLORERTYPE + "/" + N_EDITOPTIONS + "/" + N_DEFAULTPROPERTIES, 448 "setPropertyDefaults", 449 2); 450 digester.addCallParam("*/" + N_EXPLORERTYPE + "/" + N_EDITOPTIONS + "/" + N_DEFAULTPROPERTIES, 0, A_ENABLED); 451 digester.addCallParam( 452 "*/" + N_EXPLORERTYPE + "/" + N_EDITOPTIONS + "/" + N_DEFAULTPROPERTIES, 453 1, 454 A_SHOWNAVIGATION); 455 456 digester.addCallMethod("*/" 457 + N_EXPLORERTYPE 458 + "/" 459 + N_EDITOPTIONS 460 + "/" 461 + N_DEFAULTPROPERTIES 462 + "/" 463 + N_PROPERTY, "addProperty", 1); 464 digester.addCallParam("*/" 465 + N_EXPLORERTYPE 466 + "/" 467 + N_EDITOPTIONS 468 + "/" 469 + N_DEFAULTPROPERTIES 470 + "/" 471 + N_PROPERTY, 0, A_NAME); 472 473 digester.addCallMethod("*/" 474 + N_EXPLORERTYPE 475 + "/" 476 + N_EDITOPTIONS 477 + "/" 478 + N_DEFAULTPROPERTIES 479 + "/" 480 + N_DEFAULTPROPERTY, "addProperty", 1); 481 digester.addCallParam("*/" 482 + N_EXPLORERTYPE 483 + "/" 484 + N_EDITOPTIONS 485 + "/" 486 + N_DEFAULTPROPERTIES 487 + "/" 488 + N_DEFAULTPROPERTY, 0, A_NAME); 489 490 digester.addCallMethod( 491 "*/" + N_EXPLORERTYPE + "/" + N_EDITOPTIONS + "/" + N_CONTEXTMENU + "/" + N_ENTRY, 492 "addContextMenuEntry", 493 5); 494 digester.addCallParam( 495 "*/" + N_EXPLORERTYPE + "/" + N_EDITOPTIONS + "/" + N_CONTEXTMENU + "/" + N_ENTRY, 496 0, 497 A_KEY); 498 digester.addCallParam( 499 "*/" + N_EXPLORERTYPE + "/" + N_EDITOPTIONS + "/" + N_CONTEXTMENU + "/" + N_ENTRY, 500 1, 501 A_URI); 502 digester.addCallParam( 503 "*/" + N_EXPLORERTYPE + "/" + N_EDITOPTIONS + "/" + N_CONTEXTMENU + "/" + N_ENTRY, 504 2, 505 A_RULES); 506 digester.addCallParam( 507 "*/" + N_EXPLORERTYPE + "/" + N_EDITOPTIONS + "/" + N_CONTEXTMENU + "/" + N_ENTRY, 508 3, 509 A_TARGET); 510 digester.addCallParam( 511 "*/" + N_EXPLORERTYPE + "/" + N_EDITOPTIONS + "/" + N_CONTEXTMENU + "/" + N_ENTRY, 512 4, 513 A_ORDER); 514 515 digester.addCallMethod( 516 "*/" + N_EXPLORERTYPE + "/" + N_EDITOPTIONS + "/" + N_CONTEXTMENU + "/" + N_SEPARATOR, 517 "addContextMenuSeparator", 518 1); 519 digester.addCallParam( 520 "*/" + N_EXPLORERTYPE + "/" + N_EDITOPTIONS + "/" + N_CONTEXTMENU + "/" + N_SEPARATOR, 521 0, 522 A_ORDER); 523 524 digester.addCallMethod("*/" + N_EXPLORERTYPE + "/" + N_EDITOPTIONS + "/" + N_CONTEXTMENU, "createContextMenu"); 525 digester.addCallMethod("*/" + N_EXPLORERTYPE + "/" + N_EDITOPTIONS, "setEditOptions"); 526 } 527 528 535 public static void generateExplorerTypesXml(Element startNode, List explorerTypes, boolean module) { 536 537 CmsExplorerTypeAccess defaultAccess = null; 539 if (OpenCms.getWorkplaceManager() != null) { 540 defaultAccess = OpenCms.getWorkplaceManager().getDefaultAccess(); 541 } 542 543 Iterator i = explorerTypes.iterator(); 544 while (i.hasNext()) { 545 CmsExplorerTypeSettings settings = (CmsExplorerTypeSettings)i.next(); 547 548 if (settings.isAddititionalModuleExplorerType() == module) { 549 Element explorerTypeElement = startNode.addElement(N_EXPLORERTYPE); 550 explorerTypeElement.addAttribute(A_NAME, settings.getName()); 551 explorerTypeElement.addAttribute(A_KEY, settings.getKey()); 552 explorerTypeElement.addAttribute(A_ICON, settings.getIcon()); 553 if (settings.getReference() != null) { 554 explorerTypeElement.addAttribute(A_REFERENCE, settings.getReference()); 555 } 556 Element newResElement = explorerTypeElement.addElement(N_NEWRESOURCE); 558 if (CmsStringUtil.isNotEmpty(settings.getNewResourcePage())) { 559 newResElement.addAttribute(A_PAGE, settings.getNewResourcePage()); 560 } 561 newResElement.addAttribute(A_HANDLER, settings.getNewResourceHandlerClassName()); 562 newResElement.addAttribute(A_URI, settings.getNewResourceUri()); 563 newResElement.addAttribute(A_ORDER, settings.getNewResourceOrder()); 564 newResElement.addAttribute(A_AUTOSETNAVIGATION, String.valueOf(settings.isAutoSetNavigation())); 565 newResElement.addAttribute(A_AUTOSETTITLE, String.valueOf(settings.isAutoSetTitle())); 566 CmsExplorerTypeAccess access = settings.getAccess(); 568 if (access != defaultAccess) { 569 List accessEntries = new ArrayList (access.getAccessEntries().keySet()); 571 Collections.sort(accessEntries); 573 if (accessEntries.size() > 0) { 574 Element accessControlElement = explorerTypeElement.addElement(N_ACCESSCONTROL); 575 Iterator k = accessEntries.iterator(); 576 while (k.hasNext()) { 577 String key = (String )k.next(); 578 String value = (String )settings.getAccess().getAccessEntries().get(key); 579 Element accessEntryElement = accessControlElement.addElement(N_ACCESSENTRY); 580 accessEntryElement.addAttribute(A_PRINCIPAL, key); 581 accessEntryElement.addAttribute(A_PERMISSIONS, value); 582 } 583 } 584 } 585 if (settings.hasEditOptions()) { 587 Element editOptionsElement = explorerTypeElement.addElement(N_EDITOPTIONS); 588 Element defaultPropertiesElement = editOptionsElement.addElement(N_DEFAULTPROPERTIES); 589 defaultPropertiesElement.addAttribute(A_ENABLED, String.valueOf(settings.isPropertiesEnabled())); 590 defaultPropertiesElement.addAttribute(A_SHOWNAVIGATION, String.valueOf(settings.isShowNavigation())); 591 Iterator m = settings.getProperties().iterator(); 592 String propNode = N_PROPERTY; 593 if (module) { 594 propNode = N_DEFAULTPROPERTY; 595 } 596 while (m.hasNext()) { 597 defaultPropertiesElement.addElement(propNode).addAttribute(A_NAME, (String )m.next()); 598 } 599 Element contextMenuElement = editOptionsElement.addElement(N_CONTEXTMENU); 600 m = settings.getContextMenuEntries().iterator(); 601 while (m.hasNext()) { 602 CmsExplorerContextMenuItem item = (CmsExplorerContextMenuItem)m.next(); 603 Element itemElement; 604 if (CmsExplorerContextMenuItem.TYPE_ENTRY.equals(item.getType())) { 605 itemElement = contextMenuElement.addElement(N_ENTRY); 607 itemElement.addAttribute(A_KEY, item.getKey()); 608 itemElement.addAttribute(A_URI, item.getUri()); 609 if (item.getTarget() != null) { 610 itemElement.addAttribute(A_TARGET, item.getTarget()); 611 } 612 itemElement.addAttribute(A_RULES, item.getRules()); 613 } else { 614 itemElement = contextMenuElement.addElement(N_SEPARATOR); 616 } 617 itemElement.addAttribute(A_ORDER, "" + item.getOrder()); 618 } 619 } 620 } 621 } 622 } 623 624 627 public void addXmlDigesterRules(Digester digester) { 628 629 digester.addCallMethod("*/" + N_WORKPLACE, "initializeFinished"); 631 632 digester.addCallMethod( 634 "*/" + I_CmsXmlConfiguration.N_PARAM, 635 I_CmsConfigurationParameterHandler.ADD_PARAMETER_METHOD, 636 2); 637 digester.addCallParam("*/" + I_CmsXmlConfiguration.N_PARAM, 0, I_CmsXmlConfiguration.A_NAME); 638 digester.addCallParam("*/" + I_CmsXmlConfiguration.N_PARAM, 1); 639 640 digester.addObjectCreate("*/" + N_WORKPLACE, CmsWorkplaceManager.class); 642 digester.addSetNext("*/" + N_WORKPLACE, "setWorkplaceManager"); 644 645 digester.addCallMethod("*/" + N_WORKPLACE + "/" + N_DEFAULTLOCALE, "setDefaultLocale", 0); 647 648 digester.addObjectCreate("*/" 649 + N_WORKPLACE 650 + "/" 651 + N_EXPLORERTYPES 652 + "/" 653 + N_DEFAULTACCESSCONTROL 654 + "/" 655 + N_ACCESSCONTROL, CmsExplorerTypeAccess.class); 656 digester.addSetNext("*/" 657 + N_WORKPLACE 658 + "/" 659 + N_EXPLORERTYPES 660 + "/" 661 + N_DEFAULTACCESSCONTROL 662 + "/" 663 + N_ACCESSCONTROL, "setDefaultAccess"); 664 665 digester.addCallMethod("*/" 666 + N_WORKPLACE 667 + "/" 668 + N_EXPLORERTYPES 669 + "/" 670 + N_DEFAULTACCESSCONTROL 671 + "/" 672 + N_ACCESSCONTROL 673 + "/" 674 + N_ACCESSENTRY, "addAccessEntry", 2); 675 digester.addCallParam("*/" 676 + N_WORKPLACE 677 + "/" 678 + N_EXPLORERTYPES 679 + "/" 680 + N_DEFAULTACCESSCONTROL 681 + "/" 682 + N_ACCESSCONTROL 683 + "/" 684 + N_ACCESSENTRY, 0, A_PRINCIPAL); 685 digester.addCallParam("*/" 686 + N_WORKPLACE 687 + "/" 688 + N_EXPLORERTYPES 689 + "/" 690 + N_DEFAULTACCESSCONTROL 691 + "/" 692 + N_ACCESSCONTROL 693 + "/" 694 + N_ACCESSENTRY, 1, A_PERMISSIONS); 695 696 digester.addObjectCreate( 698 "*/" + N_WORKPLACE + "/" + N_EXPLORERTYPES + "/" + N_MULTICONTEXTMENU, 699 CmsExplorerContextMenu.class); 700 digester.addSetNext( 701 "*/" + N_WORKPLACE + "/" + N_EXPLORERTYPES + "/" + N_MULTICONTEXTMENU, 702 "setMultiContextMenu"); 703 704 digester.addCallMethod( 705 "*/" + N_WORKPLACE + "/" + N_EXPLORERTYPES + "/" + N_MULTICONTEXTMENU + "/" + N_ENTRY, 706 "addMenuEntry", 707 5); 708 digester.addCallParam( 709 "*/" + N_WORKPLACE + "/" + N_EXPLORERTYPES + "/" + N_MULTICONTEXTMENU + "/" + N_ENTRY, 710 0, 711 A_KEY); 712 digester.addCallParam( 713 "*/" + N_WORKPLACE + "/" + N_EXPLORERTYPES + "/" + N_MULTICONTEXTMENU + "/" + N_ENTRY, 714 1, 715 A_URI); 716 digester.addCallParam( 717 "*/" + N_WORKPLACE + "/" + N_EXPLORERTYPES + "/" + N_MULTICONTEXTMENU + "/" + N_ENTRY, 718 2, 719 A_RULES); 720 digester.addCallParam( 721 "*/" + N_WORKPLACE + "/" + N_EXPLORERTYPES + "/" + N_MULTICONTEXTMENU + "/" + N_ENTRY, 722 3, 723 A_TARGET); 724 digester.addCallParam( 725 "*/" + N_WORKPLACE + "/" + N_EXPLORERTYPES + "/" + N_MULTICONTEXTMENU + "/" + N_ENTRY, 726 4, 727 A_ORDER); 728 729 digester.addCallMethod("*/" 730 + N_WORKPLACE 731 + "/" 732 + N_EXPLORERTYPES 733 + "/" 734 + N_MULTICONTEXTMENU 735 + "/" 736 + N_SEPARATOR, "addMenuSeparator", 1); 737 digester.addCallParam( 738 "*/" + N_WORKPLACE + "/" + N_EXPLORERTYPES + "/" + N_MULTICONTEXTMENU + "/" + N_SEPARATOR, 739 0, 740 A_ORDER); 741 742 digester.addCallMethod( 744 "*/" + N_WORKPLACE + "/" + N_DEFAULTPROPERTIESONSTRUCTURE, 745 "setDefaultPropertiesOnStructure", 746 0); 747 748 digester.addCallMethod( 750 "*/" + N_WORKPLACE + "/" + N_ENABLEADVANCEDPROPERTYTABS, 751 "setEnableAdvancedPropertyTabs", 752 0); 753 754 digester.addObjectCreate( 756 "*/" + N_WORKPLACE + "/" + N_DIALOGHANDLERS + "/" + N_DIALOGHANDLER, 757 A_CLASS, 758 CmsConfigurationException.class); 759 digester.addSetNext("*/" + N_WORKPLACE + "/" + N_DIALOGHANDLERS + "/" + N_DIALOGHANDLER, "addDialogHandler"); 760 761 digester.addObjectCreate("*/" + N_WORKPLACE + "/" + N_EDITORHANDLER, A_CLASS, CmsConfigurationException.class); 763 digester.addSetNext("*/" + N_WORKPLACE + "/" + N_EDITORHANDLER, "setEditorHandler"); 764 765 digester.addObjectCreate("*/" + N_WORKPLACE + "/" + N_EDITORACTION, A_CLASS, CmsConfigurationException.class); 767 digester.addSetNext("*/" + N_WORKPLACE + "/" + N_EDITORACTION, "setEditorAction"); 768 769 digester.addObjectCreate( 771 "*/" + N_WORKPLACE + "/" + N_DIRECTEDITPROVIDER, 772 A_CLASS, 773 CmsConfigurationException.class); 774 digester.addCallMethod( 775 "*/" + N_WORKPLACE + "/" + N_DIRECTEDITPROVIDER, 776 I_CmsConfigurationParameterHandler.INIT_CONFIGURATION_METHOD); 777 digester.addSetNext("*/" + N_WORKPLACE + "/" + N_DIRECTEDITPROVIDER, "setDirectEditProvider"); 778 779 digester.addCallMethod("*/" + N_WORKPLACE + "/" + N_EXPORTPOINTS + "/" + N_EXPORTPOINT, "addExportPoint", 2); 781 digester.addCallParam("*/" + N_WORKPLACE + "/" + N_EXPORTPOINTS + "/" + N_EXPORTPOINT, 0, A_URI); 782 digester.addCallParam("*/" + N_WORKPLACE + "/" + N_EXPORTPOINTS + "/" + N_EXPORTPOINT, 1, A_DESTINATION); 783 784 digester.addCallMethod("*/" + N_WORKPLACE + "/" + N_AUTOLOCK, "setAutoLock", 0); 786 787 digester.addCallMethod("*/" + N_WORKPLACE + "/" + N_ENABLEUSERMGMT, "setUserManagementEnabled", 0); 789 790 digester.addCallMethod("*/" + N_WORKPLACE + "/" + N_MAXUPLOADSIZE, "setFileMaxUploadSize", 0); 792 793 digester.addCallMethod("*/" + N_WORKPLACE + "/" + N_LABELEDFOLDERS + "/" + N_RESOURCE, "addLabeledFolder", 1); 795 digester.addCallParam("*/" + N_WORKPLACE + "/" + N_LABELEDFOLDERS + "/" + N_RESOURCE, 0, A_URI); 796 797 digester.addCallMethod( 799 "*/" + N_WORKPLACE + "/" + N_LOCALIZEDFOLDERS + "/" + N_RESOURCE, 800 "addLocalizedFolder", 801 1); 802 digester.addCallParam("*/" + N_WORKPLACE + "/" + N_LOCALIZEDFOLDERS + "/" + N_RESOURCE, 0, A_URI); 803 804 digester.addCallMethod("*/" + N_WORKPLACE + "/" + N_WORKFLOW + "/" + N_SHOWMESSAGES, "setWorkflowMessage", 0); 806 807 digester.addObjectCreate("*/" + N_RFSFILEVIEWESETTINGS, CmsRfsFileViewer.class); 809 digester.addBeanPropertySetter("*/" + N_RFSFILEVIEWESETTINGS + "/" + N_FILEPATH); 810 digester.addBeanPropertySetter("*/" + N_RFSFILEVIEWESETTINGS + "/" + N_ENABLED); 811 digester.addBeanPropertySetter("*/" + N_RFSFILEVIEWESETTINGS + "/" + N_FILEENCODING); 812 digester.addBeanPropertySetter("*/" + N_RFSFILEVIEWESETTINGS + "/" + N_ISLOGFILE); 813 digester.addBeanPropertySetter("*/" + N_RFSFILEVIEWESETTINGS + "/" + N_WINDOWSIZE); 814 815 digester.addRule("*/" + N_RFSFILEVIEWESETTINGS, new CmsSetNextRule( 817 "setFileViewSettings", 818 CmsRfsFileViewer.class)); 819 820 addExplorerTypeXmlRules(digester); 822 823 digester.addObjectCreate("*/" + N_WORKPLACE + "/" + N_DEFAULTPREFERENCES, CmsDefaultUserSettings.class); 825 digester.addSetNext("*/" + N_WORKPLACE + "/" + N_DEFAULTPREFERENCES, "setDefaultUserSettings"); 826 827 digester.addCallMethod("*/" 829 + N_WORKPLACE 830 + "/" 831 + N_DEFAULTPREFERENCES 832 + "/" 833 + N_WORKPLACEPREFERENCES 834 + "/" 835 + N_WORKPLACEGENERALOPTIONS 836 + "/" 837 + N_BUTTONSTYLE, "setWorkplaceButtonStyle", 0); 838 digester.addCallMethod("*/" 839 + N_WORKPLACE 840 + "/" 841 + N_DEFAULTPREFERENCES 842 + "/" 843 + N_WORKPLACEPREFERENCES 844 + "/" 845 + N_WORKPLACEGENERALOPTIONS 846 + "/" 847 + N_REPORTTYPE, "setWorkplaceReportType", 0); 848 digester.addCallMethod("*/" 849 + N_WORKPLACE 850 + "/" 851 + N_DEFAULTPREFERENCES 852 + "/" 853 + N_WORKPLACEPREFERENCES 854 + "/" 855 + N_WORKPLACEGENERALOPTIONS 856 + "/" 857 + N_UPLOADAPPLET, "setUploadApplet", 0); 858 digester.addCallMethod("*/" 859 + N_WORKPLACE 860 + "/" 861 + N_DEFAULTPREFERENCES 862 + "/" 863 + N_WORKPLACEPREFERENCES 864 + "/" 865 + N_WORKPLACEGENERALOPTIONS 866 + "/" 867 + N_PUBLISHBUTTONAPPEARANCE, "setPublishButtonAppearance", 0); 868 869 digester.addCallMethod("*/" 871 + N_WORKPLACE 872 + "/" 873 + N_DEFAULTPREFERENCES 874 + "/" 875 + N_WORKPLACEPREFERENCES 876 + "/" 877 + N_WORKPLACEGENERALOPTIONS 878 + "/" 879 + N_NEWFOLDEREDITPROPERTIES, "setNewFolderEditProperties", 0); 880 881 digester.addCallMethod("*/" 882 + N_WORKPLACE 883 + "/" 884 + N_DEFAULTPREFERENCES 885 + "/" 886 + N_WORKPLACEPREFERENCES 887 + "/" 888 + N_WORKPLACEGENERALOPTIONS 889 + "/" 890 + N_NEWFOLDERCREATEINDEXPAGE, "setNewFolderCreateIndexPage", 0); 891 892 digester.addCallMethod("*/" 894 + N_WORKPLACE 895 + "/" 896 + N_DEFAULTPREFERENCES 897 + "/" 898 + N_WORKPLACEPREFERENCES 899 + "/" 900 + N_WORKPLACESTARTUPSETTINGS 901 + "/" 902 + N_LOCALE, "setLocale", 0); 903 digester.addCallMethod("*/" 904 + N_WORKPLACE 905 + "/" 906 + N_DEFAULTPREFERENCES 907 + "/" 908 + N_WORKPLACEPREFERENCES 909 + "/" 910 + N_WORKPLACESTARTUPSETTINGS 911 + "/" 912 + N_PROJECT, "setStartProject", 0); 913 digester.addCallMethod("*/" 914 + N_WORKPLACE 915 + "/" 916 + N_DEFAULTPREFERENCES 917 + "/" 918 + N_WORKPLACEPREFERENCES 919 + "/" 920 + N_WORKPLACESTARTUPSETTINGS 921 + "/" 922 + N_WORKPLACEVIEW, "setStartView", 0); 923 digester.addCallMethod("*/" 924 + N_WORKPLACE 925 + "/" 926 + N_DEFAULTPREFERENCES 927 + "/" 928 + N_WORKPLACEPREFERENCES 929 + "/" 930 + N_WORKPLACESTARTUPSETTINGS 931 + "/" 932 + N_FOLDER, "setStartFolder", 0); 933 digester.addCallMethod("*/" 934 + N_WORKPLACE 935 + "/" 936 + N_DEFAULTPREFERENCES 937 + "/" 938 + N_WORKPLACEPREFERENCES 939 + "/" 940 + N_WORKPLACESTARTUPSETTINGS 941 + "/" 942 + N_SITE, "setStartSite", 0); 943 digester.addCallMethod("*/" 944 + N_WORKPLACE 945 + "/" 946 + N_DEFAULTPREFERENCES 947 + "/" 948 + N_WORKPLACEPREFERENCES 949 + "/" 950 + N_WORKPLACESTARTUPSETTINGS 951 + "/" 952 + N_RESTRICTEXPLORERVIEW, "setRestrictExplorerView", 0); 953 954 digester.addCallMethod("*/" 956 + N_WORKPLACE 957 + "/" 958 + N_DEFAULTPREFERENCES 959 + "/" 960 + N_EXPLORERPREFERENCES 961 + "/" 962 + N_EXPLORERGENERALOPTIONS 963 + "/" 964 + N_BUTTONSTYLE, "setExplorerButtonStyle", 0); 965 digester.addCallMethod("*/" 966 + N_WORKPLACE 967 + "/" 968 + N_DEFAULTPREFERENCES 969 + "/" 970 + N_EXPLORERPREFERENCES 971 + "/" 972 + N_EXPLORERGENERALOPTIONS 973 + "/" 974 + N_ENTRIES, "setExplorerFileEntries", 0); 975 976 digester.addCallMethod("*/" 978 + N_WORKPLACE 979 + "/" 980 + N_DEFAULTPREFERENCES 981 + "/" 982 + N_EXPLORERPREFERENCES 983 + "/" 984 + N_EXPLORERDISPLAYOPTIONS 985 + "/" 986 + N_TITLE, "setShowExplorerFileTitle", 0); 987 digester.addCallMethod("*/" 988 + N_WORKPLACE 989 + "/" 990 + N_DEFAULTPREFERENCES 991 + "/" 992 + N_EXPLORERPREFERENCES 993 + "/" 994 + N_EXPLORERDISPLAYOPTIONS 995 + "/" 996 + N_TYPE, "setShowExplorerFileType", 0); 997 digester.addCallMethod("*/" 998 + N_WORKPLACE 999 + "/" 1000 + N_DEFAULTPREFERENCES 1001 + "/" 1002 + N_EXPLORERPREFERENCES 1003 + "/" 1004 + N_EXPLORERDISPLAYOPTIONS 1005 + "/" 1006 + N_DATELASTMODIFIED, "setShowExplorerFileDateLastModified", 0); 1007 digester.addCallMethod("*/" 1008 + N_WORKPLACE 1009 + "/" 1010 + N_DEFAULTPREFERENCES 1011 + "/" 1012 + N_EXPLORERPREFERENCES 1013 + "/" 1014 + N_EXPLORERDISPLAYOPTIONS 1015 + "/" 1016 + N_DATECREATED, "setShowExplorerFileDateCreated", 0); 1017 digester.addCallMethod("*/" 1018 + N_WORKPLACE 1019 + "/" 1020 + N_DEFAULTPREFERENCES 1021 + "/" 1022 + N_EXPLORERPREFERENCES 1023 + "/" 1024 + N_EXPLORERDISPLAYOPTIONS 1025 + "/" 1026 + N_LOCKEDBY, "setShowExplorerFileLockedBy", 0); 1027 digester.addCallMethod("*/" 1028 + N_WORKPLACE 1029 + "/" 1030 + N_DEFAULTPREFERENCES 1031 + "/" 1032 + N_EXPLORERPREFERENCES 1033 + "/" 1034 + N_EXPLORERDISPLAYOPTIONS 1035 + "/" 1036 + N_PERMISSIONS, "setShowExplorerFilePermissions", 0); 1037 digester.addCallMethod("*/" 1038 + N_WORKPLACE 1039 + "/" 1040 + N_DEFAULTPREFERENCES 1041 + "/" 1042 + N_EXPLORERPREFERENCES 1043 + "/" 1044 + N_EXPLORERDISPLAYOPTIONS 1045 + "/" 1046 + N_SIZE, "setShowExplorerFileSize", 0); 1047 digester.addCallMethod("*/" 1048 + N_WORKPLACE 1049 + "/" 1050 + N_DEFAULTPREFERENCES 1051 + "/" 1052 + N_EXPLORERPREFERENCES 1053 + "/" 1054 + N_EXPLORERDISPLAYOPTIONS 1055 + "/" 1056 + N_STATE, "setShowExplorerFileState", 0); 1057 digester.addCallMethod("*/" 1058 + N_WORKPLACE 1059 + "/" 1060 + N_DEFAULTPREFERENCES 1061 + "/" 1062 + N_EXPLORERPREFERENCES 1063 + "/" 1064 + N_EXPLORERDISPLAYOPTIONS 1065 + "/" 1066 + N_USERLASTMODIFIED, "setShowExplorerFileUserLastModified", 0); 1067 digester.addCallMethod("*/" 1068 + N_WORKPLACE 1069 + "/" 1070 + N_DEFAULTPREFERENCES 1071 + "/" 1072 + N_EXPLORERPREFERENCES 1073 + "/" 1074 + N_EXPLORERDISPLAYOPTIONS 1075 + "/" 1076 + N_USERCREATED, "setShowExplorerFileUserCreated", 0); 1077 digester.addCallMethod("*/" 1078 + N_WORKPLACE 1079 + "/" 1080 + N_DEFAULTPREFERENCES 1081 + "/" 1082 + N_EXPLORERPREFERENCES 1083 + "/" 1084 + N_EXPLORERDISPLAYOPTIONS 1085 + "/" 1086 + N_DATERELEASED, "setShowExplorerFileDateReleased", 0); 1087 digester.addCallMethod("*/" 1088 + N_WORKPLACE 1089 + "/" 1090 + N_DEFAULTPREFERENCES 1091 + "/" 1092 + N_EXPLORERPREFERENCES 1093 + "/" 1094 + N_EXPLORERDISPLAYOPTIONS 1095 + "/" 1096 + N_DATEEXPIRED, "setShowExplorerFileDateExpired", 0); 1097 1098 digester.addCallMethod("*/" 1100 + N_WORKPLACE 1101 + "/" 1102 + N_DEFAULTPREFERENCES 1103 + "/" 1104 + N_DIALOGSPREFERENCES 1105 + "/" 1106 + N_DIALOGSDEFAULTSETTINGS 1107 + "/" 1108 + N_FILECOPY, "setDialogCopyFileMode", 0); 1109 digester.addCallMethod("*/" 1110 + N_WORKPLACE 1111 + "/" 1112 + N_DEFAULTPREFERENCES 1113 + "/" 1114 + N_DIALOGSPREFERENCES 1115 + "/" 1116 + N_DIALOGSDEFAULTSETTINGS 1117 + "/" 1118 + N_FOLDERCOPY, "setDialogCopyFolderMode", 0); 1119 digester.addCallMethod("*/" 1120 + N_WORKPLACE 1121 + "/" 1122 + N_DEFAULTPREFERENCES 1123 + "/" 1124 + N_DIALOGSPREFERENCES 1125 + "/" 1126 + N_DIALOGSDEFAULTSETTINGS 1127 + "/" 1128 + N_FILEDELETION, "setDialogDeleteFileMode", 0); 1129 digester.addCallMethod("*/" 1130 + N_WORKPLACE 1131 + "/" 1132 + N_DEFAULTPREFERENCES 1133 + "/" 1134 + N_DIALOGSPREFERENCES 1135 + "/" 1136 + N_DIALOGSDEFAULTSETTINGS 1137 + "/" 1138 + N_DIRECTPUBLISH, "setDialogPublishSiblings", 0); 1139 digester.addCallMethod("*/" 1140 + N_WORKPLACE 1141 + "/" 1142 + N_DEFAULTPREFERENCES 1143 + "/" 1144 + N_DIALOGSPREFERENCES 1145 + "/" 1146 + N_DIALOGSDEFAULTSETTINGS 1147 + "/" 1148 + N_SHOWLOCK, "setShowLockDialog", 0); 1149 digester.addCallMethod("*/" 1150 + N_WORKPLACE 1151 + "/" 1152 + N_DEFAULTPREFERENCES 1153 + "/" 1154 + N_DIALOGSPREFERENCES 1155 + "/" 1156 + N_DIALOGSDEFAULTSETTINGS 1157 + "/" 1158 + N_SHOWEXPORTSETTINGS, "setShowExportSettingsDialog", 0); 1159 digester.addCallMethod("*/" 1160 + N_WORKPLACE 1161 + "/" 1162 + N_DEFAULTPREFERENCES 1163 + "/" 1164 + N_DIALOGSPREFERENCES 1165 + "/" 1166 + N_DIALOGSDEFAULTSETTINGS 1167 + "/" 1168 + N_PERMISSIONSINHERITONFOLDER, "setDialogPermissionsInheritOnFolder", 0); 1169 digester.addCallMethod("*/" 1170 + N_WORKPLACE 1171 + "/" 1172 + N_DEFAULTPREFERENCES 1173 + "/" 1174 + N_DIALOGSPREFERENCES 1175 + "/" 1176 + N_DIALOGSDEFAULTSETTINGS 1177 + "/" 1178 + N_EXPANDPERMISSIONSINHERITED, "setDialogExpandInheritedPermissions", 0); 1179 digester.addCallMethod("*/" 1180 + N_WORKPLACE 1181 + "/" 1182 + N_DEFAULTPREFERENCES 1183 + "/" 1184 + N_DIALOGSPREFERENCES 1185 + "/" 1186 + N_DIALOGSDEFAULTSETTINGS 1187 + "/" 1188 + N_EXPANDPERMISSIONSUSER, "setDialogExpandUserPermissions", 0); 1189 1190 digester.addCallMethod("*/" 1192 + N_WORKPLACE 1193 + "/" 1194 + N_DEFAULTPREFERENCES 1195 + "/" 1196 + N_EDITORPREFERENCES 1197 + "/" 1198 + N_EDITORGENERALOPTIONS 1199 + "/" 1200 + N_BUTTONSTYLE, "setEditorButtonStyle", 0); 1201 digester.addCallMethod("*/" 1202 + N_WORKPLACE 1203 + "/" 1204 + N_DEFAULTPREFERENCES 1205 + "/" 1206 + N_EDITORPREFERENCES 1207 + "/" 1208 + N_EDITORGENERALOPTIONS 1209 + "/" 1210 + N_DIRECTEDITSTYLE, "setDirectEditButtonStyle", 0); 1211 1212 digester.addCallMethod("*/" 1214 + N_WORKPLACE 1215 + "/" 1216 + N_DEFAULTPREFERENCES 1217 + "/" 1218 + N_EDITORPREFERENCES 1219 + "/" 1220 + N_EDITORPREFERREDEDITORS 1221 + "/" 1222 + N_EDITOR, "setPreferredEditor", 2); 1223 digester.addCallParam("*/" 1224 + N_WORKPLACE 1225 + "/" 1226 + N_DEFAULTPREFERENCES 1227 + "/" 1228 + N_EDITORPREFERENCES 1229 + "/" 1230 + N_EDITORPREFERREDEDITORS 1231 + "/" 1232 + N_EDITOR, 0, A_TYPE); 1233 digester.addCallParam("*/" 1234 + N_WORKPLACE 1235 + "/" 1236 + N_DEFAULTPREFERENCES 1237 + "/" 1238 + N_EDITORPREFERENCES 1239 + "/" 1240 + N_EDITORPREFERREDEDITORS 1241 + "/" 1242 + N_EDITOR, 1, A_VALUE); 1243 1244 digester.addCallMethod("*/" 1246 + N_WORKPLACE 1247 + "/" 1248 + N_DEFAULTPREFERENCES 1249 + "/" 1250 + N_WORKFLOWPREFERENCES 1251 + "/" 1252 + N_WORKFLOWGENERALOPTIONS 1253 + "/" 1254 + N_STARTUPFILTER, "setTaskStartupFilterDefault", 0); 1255 digester.addCallMethod("*/" 1256 + N_WORKPLACE 1257 + "/" 1258 + N_DEFAULTPREFERENCES 1259 + "/" 1260 + N_WORKFLOWPREFERENCES 1261 + "/" 1262 + N_WORKFLOWGENERALOPTIONS 1263 + "/" 1264 + N_SHOWPROJECTS, "setTaskShowAllProjects", 0); 1265 1266 digester.addCallMethod("*/" 1268 + N_WORKPLACE 1269 + "/" 1270 + N_DEFAULTPREFERENCES 1271 + "/" 1272 + N_WORKFLOWPREFERENCES 1273 + "/" 1274 + N_WORKFLOWDEFAULTSETTINGS 1275 + "/" 1276 + N_MESSAGEACCEPTED, "setTaskMessageAccepted", 0); 1277 digester.addCallMethod("*/" 1278 + N_WORKPLACE 1279 + "/" 1280 + N_DEFAULTPREFERENCES 1281 + "/" 1282 + N_WORKFLOWPREFERENCES 1283 + "/" 1284 + N_WORKFLOWDEFAULTSETTINGS 1285 + "/" 1286 + N_MESSAGEFORWARDED, "setTaskMessageForwarded", 0); 1287 digester.addCallMethod("*/" 1288 + N_WORKPLACE 1289 + "/" 1290 + N_DEFAULTPREFERENCES 1291 + "/" 1292 + N_WORKFLOWPREFERENCES 1293 + "/" 1294 + N_WORKFLOWDEFAULTSETTINGS 1295 + "/" 1296 + N_MESSAGECOMPLETED, "setTaskMessageCompleted", 0); 1297 digester.addCallMethod("*/" 1298 + N_WORKPLACE 1299 + "/" 1300 + N_DEFAULTPREFERENCES 1301 + "/" 1302 + N_WORKFLOWPREFERENCES 1303 + "/" 1304 + N_WORKFLOWDEFAULTSETTINGS 1305 + "/" 1306 + N_INFORMROLEMEMBERS, "setTaskMessageMembers", 0); 1307 1308 String rulePath = "*/" + N_TOOLMANAGER; 1310 digester.addObjectCreate(rulePath, CmsToolManager.class); 1311 digester.addSetNext(rulePath, "setToolManager"); 1312 rulePath += "/" + N_ROOTS + "/" + N_ROOT; 1314 digester.addObjectCreate(rulePath, CmsToolRootHandler.class); 1315 digester.addSetNext(rulePath, "addToolRoot"); 1316 digester.addBeanPropertySetter(rulePath + "/" + N_KEY); 1317 digester.addBeanPropertySetter(rulePath + "/" + N_URI); 1318 digester.addBeanPropertySetter(rulePath + "/" + N_NAME); 1319 digester.addBeanPropertySetter(rulePath + "/" + N_HELPTEXT, "helpText"); 1320 } 1321 1322 1325 public Element generateXml(Element parent) { 1326 1327 Element workplaceElement = parent.addElement(N_WORKPLACE); 1329 Iterator i; 1330 1331 workplaceElement.addElement(N_DEFAULTLOCALE).setText(m_workplaceManager.getDefaultLocale().toString()); 1333 1334 Element localizedElement = workplaceElement.addElement(N_LOCALIZEDFOLDERS); 1336 Iterator localizedIterator = m_workplaceManager.getLocalizedFolders().iterator(); 1337 while (localizedIterator.hasNext()) { 1338 localizedElement.addElement(N_RESOURCE).addAttribute(A_URI, (String )localizedIterator.next()); 1340 } 1341 1342 Element dialogElement = workplaceElement.addElement(N_DIALOGHANDLERS); 1344 Map dialogs = m_workplaceManager.getDialogHandler(); 1345 String [] keys = (String [])dialogs.keySet().toArray(new String [0]); 1346 Arrays.sort(keys); 1347 1348 for (int j = 0; j < keys.length; j++) { 1349 String name = keys[j]; 1350 dialogElement.addElement(N_DIALOGHANDLER).addAttribute(A_CLASS, dialogs.get(name).getClass().getName()); 1351 } 1352 1353 workplaceElement.addElement(N_EDITORHANDLER).addAttribute( 1355 A_CLASS, 1356 m_workplaceManager.getEditorHandler().getClass().getName()); 1357 workplaceElement.addElement(N_EDITORACTION).addAttribute( 1358 A_CLASS, 1359 m_workplaceManager.getEditorActionHandler().getClass().getName()); 1360 1361 I_CmsConfigurationParameterHandler deProvider = m_workplaceManager.getDirectEditProvider(); 1362 Element deProviderNode = workplaceElement.addElement(N_DIRECTEDITPROVIDER).addAttribute( 1363 A_CLASS, 1364 deProvider.getClass().getName()); 1365 Map deProviderConfig = deProvider.getConfiguration(); 1366 if (deProviderConfig != null) { 1367 Iterator it = deProviderConfig.entrySet().iterator(); 1368 while (it.hasNext()) { 1369 Map.Entry entry = (Map.Entry )it.next(); 1370 String name = (String )entry.getKey(); 1371 String value = (String )entry.getValue(); 1372 Element paramNode = deProviderNode.addElement(N_PARAM); 1373 paramNode.addAttribute(A_NAME, name); 1374 paramNode.addText(value); 1375 } 1376 } 1377 1378 Element resourceloadersElement = workplaceElement.addElement(N_EXPORTPOINTS); 1380 Set points = m_workplaceManager.getExportPoints(); 1381 i = points.iterator(); 1382 while (i.hasNext()) { 1383 CmsExportPoint point = (CmsExportPoint)i.next(); 1384 resourceloadersElement.addElement(N_EXPORTPOINT).addAttribute(A_URI, point.getUri()).addAttribute( 1385 A_DESTINATION, 1386 point.getConfiguredDestination()); 1387 } 1388 1389 workplaceElement.addElement(N_AUTOLOCK).setText(new Boolean (m_workplaceManager.autoLockResources()).toString()); 1391 workplaceElement.addElement(N_ENABLEUSERMGMT).setText( 1392 new Boolean (m_workplaceManager.showUserGroupIcon()).toString()); 1393 workplaceElement.addElement(N_DEFAULTPROPERTIESONSTRUCTURE).setText( 1394 new Boolean (m_workplaceManager.isDefaultPropertiesOnStructure()).toString()); 1395 workplaceElement.addElement(N_ENABLEADVANCEDPROPERTYTABS).setText( 1396 new Boolean (m_workplaceManager.isEnableAdvancedPropertyTabs()).toString()); 1397 workplaceElement.addElement(N_MAXUPLOADSIZE).setText( 1398 new Integer (m_workplaceManager.getFileMaxUploadSize()).toString()); 1399 1400 Element labeledElement = workplaceElement.addElement(N_LABELEDFOLDERS); 1402 i = m_workplaceManager.getLabelSiteFolders().iterator(); 1403 while (i.hasNext()) { 1404 labeledElement.addElement(N_RESOURCE).addAttribute(A_URI, (String )i.next()); 1405 } 1406 1407 if (m_workplaceManager.isEnableWorkflowMessages()) { 1409 Element workflow = workplaceElement.addElement(N_WORKFLOW); 1410 workflow.addElement(N_SHOWMESSAGES).setText( 1411 new Boolean (m_workplaceManager.isEnableWorkflowMessages()).toString()); 1412 } 1413 1414 CmsRfsFileViewer viewSettings = m_workplaceManager.getFileViewSettings(); 1416 Element fileViewElement = workplaceElement.addElement(N_RFSFILEVIEWESETTINGS); 1417 String filePath = viewSettings.getFilePath(); 1418 if (filePath != null) { 1419 fileViewElement.addElement(N_FILEPATH).setText(filePath); 1420 } 1421 fileViewElement.addElement(N_ENABLED).setText(String.valueOf(viewSettings.isEnabled())); 1422 fileViewElement.addElement(N_FILEENCODING).setText(viewSettings.getFileEncoding()); 1423 fileViewElement.addElement(N_ISLOGFILE).setText(String.valueOf(viewSettings.getIsLogfile())); 1424 fileViewElement.addElement(N_WINDOWSIZE).setText(String.valueOf(viewSettings.getWindowSize())); 1425 1426 Element explorerTypesElement = workplaceElement.addElement(N_EXPLORERTYPES); 1428 List explorerTypes = m_workplaceManager.getExplorerTypeSettings(); 1429 generateExplorerTypesXml(explorerTypesElement, explorerTypes, false); 1430 1431 Element defaultAccessControlElement = explorerTypesElement.addElement(N_DEFAULTACCESSCONTROL); 1433 List accessEntries = new ArrayList (); 1435 CmsExplorerTypeAccess access = m_workplaceManager.getDefaultAccess(); 1437 Iterator iter = access.getAccessEntries().keySet().iterator(); 1438 while (iter.hasNext()) { 1439 accessEntries.add(iter.next()); 1440 } 1441 Collections.sort(accessEntries); 1442 1443 if (accessEntries.size() > 0) { 1444 Element accessControlElement = defaultAccessControlElement.addElement(N_ACCESSCONTROL); 1445 Iterator k = accessEntries.iterator(); 1446 1447 while (k.hasNext()) { 1448 String key = (String )k.next(); 1449 String value = (String )m_workplaceManager.getDefaultAccess().getAccessEntries().get(key); 1450 Element accessEntryElement = accessControlElement.addElement(N_ACCESSENTRY); 1451 accessEntryElement.addAttribute(A_PRINCIPAL, key); 1452 accessEntryElement.addAttribute(A_PERMISSIONS, value); 1453 } 1454 } 1455 1456 i = m_workplaceManager.getMultiContextMenu().getAllEntries().iterator(); 1458 if (i.hasNext()) { 1459 Element contextMenuElement = explorerTypesElement.addElement(N_MULTICONTEXTMENU); 1461 while (i.hasNext()) { 1462 CmsExplorerContextMenuItem item = (CmsExplorerContextMenuItem)i.next(); 1463 Element itemElement; 1464 if (CmsExplorerContextMenuItem.TYPE_ENTRY.equals(item.getType())) { 1465 itemElement = contextMenuElement.addElement(N_ENTRY); 1467 itemElement.addAttribute(A_KEY, item.getKey()); 1468 itemElement.addAttribute(A_URI, item.getUri()); 1469 if (item.getTarget() != null) { 1470 itemElement.addAttribute(A_TARGET, item.getTarget()); 1471 } 1472 String rules = item.getRules(); 1473 if (CmsStringUtil.isEmptyOrWhitespaceOnly(rules)) { 1474 rules = ""; 1475 } 1476 itemElement.addAttribute(A_RULES, rules); 1477 } else { 1478 itemElement = contextMenuElement.addElement(N_SEPARATOR); 1480 } 1481 itemElement.addAttribute(A_ORDER, "" + item.getOrder()); 1482 } 1483 } 1484 1485 Element defaultPreferences = workplaceElement.addElement(N_DEFAULTPREFERENCES); 1487 Element workplacePreferences = defaultPreferences.addElement(N_WORKPLACEPREFERENCES); 1489 Element workplaceGeneraloptions = workplacePreferences.addElement(N_WORKPLACEGENERALOPTIONS); 1491 workplaceGeneraloptions.addElement(N_BUTTONSTYLE).setText( 1493 m_workplaceManager.getDefaultUserSettings().getWorkplaceButtonStyleString()); 1494 workplaceGeneraloptions.addElement(N_REPORTTYPE).setText( 1496 m_workplaceManager.getDefaultUserSettings().getWorkplaceReportType()); 1497 workplaceGeneraloptions.addElement(N_UPLOADAPPLET).setText( 1499 m_workplaceManager.getDefaultUserSettings().getUploadAppletString()); 1500 if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(m_workplaceManager.getDefaultUserSettings().getPublishButtonAppearance())) { 1502 workplaceGeneraloptions.addElement(N_PUBLISHBUTTONAPPEARANCE).setText( 1503 m_workplaceManager.getDefaultUserSettings().getPublishButtonAppearance()); 1504 } 1505 1506 workplaceGeneraloptions.addElement(N_NEWFOLDEREDITPROPERTIES).setText( 1509 m_workplaceManager.getDefaultUserSettings().getNewFolderEditProperties().toString()); 1510 workplaceGeneraloptions.addElement(N_NEWFOLDERCREATEINDEXPAGE).setText( 1512 m_workplaceManager.getDefaultUserSettings().getNewFolderCreateIndexPage().toString()); 1513 1514 Element workplaceStartupsettings = workplacePreferences.addElement(N_WORKPLACESTARTUPSETTINGS); 1516 workplaceStartupsettings.addElement(N_LOCALE).setText( 1518 m_workplaceManager.getDefaultUserSettings().getLocale().toString()); 1519 workplaceStartupsettings.addElement(N_PROJECT).setText( 1521 m_workplaceManager.getDefaultUserSettings().getStartProject()); 1522 workplaceStartupsettings.addElement(N_WORKPLACEVIEW).setText( 1524 m_workplaceManager.getDefaultUserSettings().getStartView()); 1525 workplaceStartupsettings.addElement(N_FOLDER).setText( 1527 m_workplaceManager.getDefaultUserSettings().getStartFolder()); 1528 workplaceStartupsettings.addElement(N_SITE).setText(m_workplaceManager.getDefaultUserSettings().getStartSite()); 1530 workplaceStartupsettings.addElement(N_RESTRICTEXPLORERVIEW).setText( 1532 m_workplaceManager.getDefaultUserSettings().getRestrictExplorerViewString()); 1533 1534 Element explorerPreferences = defaultPreferences.addElement(N_EXPLORERPREFERENCES); 1536 Element explorerGeneraloptions = explorerPreferences.addElement(N_EXPLORERGENERALOPTIONS); 1538 explorerGeneraloptions.addElement(N_BUTTONSTYLE).setText( 1540 m_workplaceManager.getDefaultUserSettings().getExplorerButtonStyleString()); 1541 explorerGeneraloptions.addElement(N_ENTRIES).setText( 1543 "" + m_workplaceManager.getDefaultUserSettings().getExplorerFileEntries()); 1544 Element explorerDisplayoptions = explorerPreferences.addElement(N_EXPLORERDISPLAYOPTIONS); 1546 explorerDisplayoptions.addElement(N_TITLE).setText( 1548 m_workplaceManager.getDefaultUserSettings().getShowExplorerFileTitle()); 1549 explorerDisplayoptions.addElement(N_TYPE).setText( 1551 m_workplaceManager.getDefaultUserSettings().getShowExplorerFileType()); 1552 explorerDisplayoptions.addElement(N_DATELASTMODIFIED).setText( 1554 m_workplaceManager.getDefaultUserSettings().getShowExplorerFileDateLastModified()); 1555 explorerDisplayoptions.addElement(N_DATECREATED).setText( 1557 m_workplaceManager.getDefaultUserSettings().getShowExplorerFileDateCreated()); 1558 explorerDisplayoptions.addElement(N_LOCKEDBY).setText( 1560 m_workplaceManager.getDefaultUserSettings().getShowExplorerFileLockedBy()); 1561 explorerDisplayoptions.addElement(N_PERMISSIONS).setText( 1563 m_workplaceManager.getDefaultUserSettings().getShowExplorerFilePermissions()); 1564 explorerDisplayoptions.addElement(N_SIZE).setText( 1566 m_workplaceManager.getDefaultUserSettings().getShowExplorerFileSize()); 1567 explorerDisplayoptions.addElement(N_STATE).setText( 1569 m_workplaceManager.getDefaultUserSettings().getShowExplorerFileState()); 1570 explorerDisplayoptions.addElement(N_USERLASTMODIFIED).setText( 1572 m_workplaceManager.getDefaultUserSettings().getShowExplorerFileUserLastModified()); 1573 explorerDisplayoptions.addElement(N_USERCREATED).setText( 1575 m_workplaceManager.getDefaultUserSettings().getShowExplorerFileUserCreated()); 1576 explorerDisplayoptions.addElement(N_DATERELEASED).setText( 1578 m_workplaceManager.getDefaultUserSettings().getShowExplorerFileDateReleased()); 1579 explorerDisplayoptions.addElement(N_DATEEXPIRED).setText( 1581 m_workplaceManager.getDefaultUserSettings().getShowExplorerFileDateExpired()); 1582 1583 Element dialogPreferences = defaultPreferences.addElement(N_DIALOGSPREFERENCES); 1585 Element dialogDefaultSettings = dialogPreferences.addElement(N_DIALOGSDEFAULTSETTINGS); 1587 dialogDefaultSettings.addElement(N_FILECOPY).setText( 1589 m_workplaceManager.getDefaultUserSettings().getDialogCopyFileModeString()); 1590 dialogDefaultSettings.addElement(N_FOLDERCOPY).setText( 1592 m_workplaceManager.getDefaultUserSettings().getDialogCopyFolderModeString()); 1593 dialogDefaultSettings.addElement(N_FILEDELETION).setText( 1595 m_workplaceManager.getDefaultUserSettings().getDialogDeleteFileModeString()); 1596 dialogDefaultSettings.addElement(N_DIRECTPUBLISH).setText( 1598 m_workplaceManager.getDefaultUserSettings().getDialogPublishSiblingsString()); 1599 dialogDefaultSettings.addElement(N_SHOWLOCK).setText( 1601 m_workplaceManager.getDefaultUserSettings().getDialogShowLockString()); 1602 dialogDefaultSettings.addElement(N_SHOWEXPORTSETTINGS).setText( 1604 m_workplaceManager.getDefaultUserSettings().getDialogShowExportSettingsString()); 1605 dialogDefaultSettings.addElement(N_EXPANDPERMISSIONSUSER).setText( 1607 m_workplaceManager.getDefaultUserSettings().getDialogExpandUserPermissionsString()); 1608 dialogDefaultSettings.addElement(N_EXPANDPERMISSIONSINHERITED).setText( 1610 m_workplaceManager.getDefaultUserSettings().getDialogExpandInheritedPermissionsString()); 1611 dialogDefaultSettings.addElement(N_PERMISSIONSINHERITONFOLDER).setText( 1613 m_workplaceManager.getDefaultUserSettings().getDialogPermissionsInheritOnFolderString()); 1614 1615 Element editorsPreferences = defaultPreferences.addElement(N_EDITORPREFERENCES); 1617 Element editorGeneraloptions = editorsPreferences.addElement(N_EDITORGENERALOPTIONS); 1619 editorGeneraloptions.addElement(N_BUTTONSTYLE).setText( 1621 m_workplaceManager.getDefaultUserSettings().getEditorButtonStyleString()); 1622 editorGeneraloptions.addElement(N_DIRECTEDITSTYLE).setText( 1624 m_workplaceManager.getDefaultUserSettings().getDirectEditButtonStyleString()); 1625 Element editorPreferrededitors = editorsPreferences.addElement(N_EDITORPREFERREDEDITORS); 1627 Iterator editors = m_workplaceManager.getDefaultUserSettings().getEditorSettings().keySet().iterator(); 1629 while (editors.hasNext()) { 1630 String type = (String )editors.next(); 1631 String value = m_workplaceManager.getDefaultUserSettings().getPreferredEditor(type); 1632 Element editor = editorPreferrededitors.addElement(N_EDITOR); 1633 editor.addAttribute(A_TYPE, type); 1634 editor.addAttribute(A_VALUE, value); 1635 } 1636 1637 Element workflowPreferences = defaultPreferences.addElement(N_WORKFLOWPREFERENCES); 1639 Element workflowGeneraloptions = workflowPreferences.addElement(N_WORKFLOWGENERALOPTIONS); 1641 workflowGeneraloptions.addElement(N_STARTUPFILTER).setText( 1643 m_workplaceManager.getDefaultUserSettings().getTaskStartupFilterDefault()); 1644 workflowGeneraloptions.addElement(N_SHOWPROJECTS).setText( 1646 m_workplaceManager.getDefaultUserSettings().getTaskShowAllProjectsString()); 1647 Element workflowDefaultsettings = workflowPreferences.addElement(N_WORKFLOWDEFAULTSETTINGS); 1649 workflowDefaultsettings.addElement(N_MESSAGEACCEPTED).setText( 1651 m_workplaceManager.getDefaultUserSettings().getTaskMessageAcceptedString()); 1652 workflowDefaultsettings.addElement(N_MESSAGEFORWARDED).setText( 1654 m_workplaceManager.getDefaultUserSettings().getTaskMessageForwardedString()); 1655 workflowDefaultsettings.addElement(N_MESSAGECOMPLETED).setText( 1657 m_workplaceManager.getDefaultUserSettings().getTaskMessageCompletedString()); 1658 workflowDefaultsettings.addElement(N_INFORMROLEMEMBERS).setText( 1660 m_workplaceManager.getDefaultUserSettings().getTaskMessageMembersString()); 1661 1662 Element toolManagerElement = workplaceElement.addElement(N_TOOLMANAGER); 1663 Element rootsElement = toolManagerElement.addElement(N_ROOTS); 1664 Iterator it = m_workplaceManager.getToolManager().getToolRoots().iterator(); 1665 while (it.hasNext()) { 1666 CmsToolRootHandler root = (CmsToolRootHandler)it.next(); 1667 Element rootElement = rootsElement.addElement(N_ROOT); 1668 rootElement.addElement(N_KEY).addText(root.getKey()); 1669 rootElement.addElement(N_URI).addText(root.getUri()); 1670 rootElement.addElement(N_NAME).addText(root.getName()); 1671 rootElement.addElement(N_HELPTEXT).addText(root.getHelpText()); 1672 } 1673 1674 return workplaceElement; 1676 } 1677 1678 1681 public String getDtdFilename() { 1682 1683 return CONFIGURATION_DTD_NAME; 1684 } 1685 1686 1691 public CmsWorkplaceManager getWorkplaceManager() { 1692 1693 return m_workplaceManager; 1694 } 1695 1696 1699 public void initializeFinished() { 1700 1701 if (CmsLog.INIT.isInfoEnabled()) { 1702 CmsLog.INIT.info(Messages.get().getBundle().key(Messages.INIT_WORKPLACE_FINISHED_0)); 1703 } 1704 } 1705 1706 1711 public void setWorkplaceManager(CmsWorkplaceManager manager) { 1712 1713 m_workplaceManager = manager; 1714 if (CmsLog.INIT.isInfoEnabled()) { 1715 CmsLog.INIT.info(Messages.get().getBundle().key(Messages.INIT_WORKPLACE_INIT_FINISHED_0)); 1716 } 1717 } 1718} | Popular Tags |