1 31 32 package org.opencms.db; 33 34 import org.opencms.configuration.CmsWorkplaceConfiguration; 35 import org.opencms.configuration.I_CmsXmlConfiguration; 36 import org.opencms.file.CmsObject; 37 import org.opencms.file.CmsUser; 38 import org.opencms.main.CmsException; 39 import org.opencms.main.OpenCms; 40 import org.opencms.report.I_CmsReport; 41 import org.opencms.synchronize.CmsSynchronizeSettings; 42 import org.opencms.util.CmsStringUtil; 43 import org.opencms.workflow.CmsTaskService; 44 45 import java.util.HashMap ; 46 import java.util.Locale ; 47 import java.util.Map ; 48 49 59 public class CmsUserSettings { 60 61 62 public static final String ADDITIONAL_INFO_CITY = "USER_TOWN"; 64 65 66 public static final String ADDITIONAL_INFO_CONFIRMED_RESOURCES = "ADDITIONAL_INFO_CONFIRMED_RESOURCES"; 67 68 public static final String ADDITIONAL_INFO_COUNTRY = "USER_COUNTRY"; 69 70 71 public static final String ADDITIONAL_INFO_DEFAULTGROUP = "USER_DEFAULTGROUP"; 72 73 74 public static final String ADDITIONAL_INFO_EXPLORERSETTINGS = "USER_EXPLORERSETTINGS"; 75 76 77 public static final String ADDITIONAL_INFO_PREFERENCES = "USER_PREFERENCES"; 78 79 80 public static final String ADDITIONAL_INFO_STARTSETTINGS = "USER_STARTSETTINGS"; 81 82 87 public static final String ADDITIONAL_INFO_TOWN = "USER_TOWN"; 88 89 90 public static final String ADDITIONAL_INFO_ZIPCODE = "USER_ZIPCODE"; 91 92 93 private static final int BUTTONSTYLE_DEFAULT = 1; 94 95 96 private static final int ENTRYS_PER_PAGE_DEFAULT = 50; 97 98 99 public static final int FILELIST_DATE_CREATED = 1024; 100 101 102 public static final int FILELIST_DATE_EXPIRED = 8192; 103 104 105 public static final int FILELIST_DATE_LASTMODIFIED = 4; 106 107 108 public static final int FILELIST_DATE_RELEASED = 4096; 109 110 111 public static final int FILELIST_LOCKEDBY = 256; 112 113 114 public static final int FILELIST_NAME = 512; 115 116 117 public static final int FILELIST_PERMISSIONS = 128; 118 119 120 public static final int FILELIST_SIZE = 8; 121 122 123 public static final int FILELIST_STATE = 16; 124 125 126 public static final int FILELIST_TITLE = 1; 127 128 129 public static final int FILELIST_TYPE = 2; 130 131 132 public static final int FILELIST_USER_CREATED = 32; 133 134 135 public static final int FILELIST_USER_LASTMODIFIED = 2048; 136 137 138 private static final String PREFERENCES = "USERPREFERENCES_"; 139 140 141 private static final String PROJECT_SETTINGS = "PROJECT_SETTINGS"; 142 143 144 private static final String SYNC_SETTINGS = "SYNC_SETTINGS"; 145 146 private boolean m_dialogDirectpublish; 147 148 private boolean m_dialogExpandInheritedPermissions; 149 150 private boolean m_dialogExpandUserPermissions; 151 152 private int m_dialogFileCopy; 153 154 private int m_dialogFileDelete; 155 156 private int m_dialogFolderCopy; 157 158 private boolean m_dialogPermissionsInheritOnFolder; 159 160 private int m_directeditButtonStyle; 161 162 private int m_editorButtonStyle; 163 164 private HashMap m_editorSettings; 165 166 private int m_explorerButtonStyle; 167 168 private int m_explorerFileEntries; 169 170 private int m_explorerSettings; 171 172 private Locale m_locale; 173 174 175 private Boolean m_newFolderCreateIndexPage; 176 177 178 private Boolean m_newFolderEditProperties; 179 180 private String m_project; 181 182 private CmsUserProjectSettings m_projectSettings; 183 184 private String m_publishButtonAppearance; 185 186 private boolean m_restrictExplorerView; 187 188 private boolean m_showExportSettings; 189 190 private boolean m_showLock; 191 192 private String m_startFolder; 193 194 private String m_startSite; 195 196 private CmsSynchronizeSettings m_synchronizeSettings; 197 198 private int m_taskMessages; 199 200 private boolean m_taskShowProjects; 201 202 private String m_taskStartupfilter; 203 204 private boolean m_uploadApplet; 205 206 private CmsUser m_user; 207 208 private String m_view; 209 210 private int m_workplaceButtonStyle; 211 212 private String m_workplaceReportType; 213 214 217 public CmsUserSettings() { 218 219 m_workplaceButtonStyle = BUTTONSTYLE_DEFAULT; 220 m_workplaceReportType = I_CmsReport.REPORT_TYPE_SIMPLE; 221 m_explorerButtonStyle = BUTTONSTYLE_DEFAULT; 222 m_explorerFileEntries = ENTRYS_PER_PAGE_DEFAULT; 223 m_explorerSettings = CmsUserSettings.FILELIST_NAME; 224 m_editorSettings = new HashMap (); 225 m_newFolderCreateIndexPage = Boolean.TRUE; 226 m_newFolderEditProperties = Boolean.TRUE; 227 } 228 229 234 public CmsUserSettings(CmsObject cms) { 235 236 init(cms, cms.getRequestContext().currentUser()); 237 } 238 239 245 public CmsUserSettings(CmsObject cms, CmsUser user) { 246 247 init(cms, user); 248 } 249 250 259 public CmsUserSettings(CmsUser user) { 260 261 init(user); 262 } 263 264 269 public int getDialogCopyFileMode() { 270 271 return m_dialogFileCopy; 272 } 273 274 279 public int getDialogCopyFolderMode() { 280 281 return m_dialogFolderCopy; 282 } 283 284 289 public int getDialogDeleteFileMode() { 290 291 return m_dialogFileDelete; 292 } 293 294 299 public boolean getDialogExpandInheritedPermissions() { 300 301 return m_dialogExpandInheritedPermissions; 302 } 303 304 309 public boolean getDialogExpandUserPermissions() { 310 311 return m_dialogExpandUserPermissions; 312 } 313 314 319 public boolean getDialogPermissionsInheritOnFolder() { 320 321 return m_dialogPermissionsInheritOnFolder; 322 } 323 324 329 public boolean getDialogPublishSiblings() { 330 331 return m_dialogDirectpublish; 332 } 333 334 339 public boolean getDialogShowExportSettings() { 340 341 return m_showExportSettings; 342 } 343 344 349 public boolean getDialogShowLock() { 350 351 return m_showLock; 352 } 353 354 359 public int getDirectEditButtonStyle() { 360 361 return m_directeditButtonStyle; 362 } 363 364 369 public int getEditorButtonStyle() { 370 371 return m_editorButtonStyle; 372 } 373 374 379 public Map getEditorSettings() { 380 381 return m_editorSettings; 382 } 383 384 389 public int getExplorerButtonStyle() { 390 391 return m_explorerButtonStyle; 392 } 393 394 399 public int getExplorerFileEntries() { 400 401 return m_explorerFileEntries; 402 } 403 404 409 public int getExplorerSettings() { 410 411 return m_explorerSettings; 412 } 413 414 419 public Locale getLocale() { 420 421 return m_locale; 422 } 423 424 431 public Boolean getNewFolderCreateIndexPage() { 432 433 return m_newFolderCreateIndexPage; 434 } 435 436 443 public Boolean getNewFolderEditProperties() { 444 445 return m_newFolderEditProperties; 446 } 447 448 454 public String getPreferredEditor(String resourceType) { 455 456 return (String )m_editorSettings.get(resourceType); 457 } 458 459 464 public CmsUserProjectSettings getProjectSettings() { 465 466 return m_projectSettings; 467 } 468 469 474 public String getPublishButtonAppearance() { 475 476 return m_publishButtonAppearance; 477 } 478 479 484 public boolean getRestrictExplorerView() { 485 486 return m_restrictExplorerView; 487 } 488 489 494 public String getStartFolder() { 495 496 return m_startFolder; 497 } 498 499 504 public String getStartProject() { 505 506 return m_project; 507 } 508 509 514 public String getStartSite() { 515 516 return m_startSite; 517 } 518 519 524 public String getStartView() { 525 526 return m_view; 527 } 528 529 534 public CmsSynchronizeSettings getSynchronizeSettings() { 535 536 return m_synchronizeSettings; 537 } 538 539 544 public boolean getTaskMessageAccepted() { 545 546 return ((m_taskMessages & CmsTaskService.TASK_MESSAGES_ACCEPTED) > 0); 547 } 548 549 554 public boolean getTaskMessageCompleted() { 555 556 return ((m_taskMessages & CmsTaskService.TASK_MESSAGES_COMPLETED) > 0); 557 } 558 559 564 public boolean getTaskMessageForwarded() { 565 566 return ((m_taskMessages & CmsTaskService.TASK_MESSAGES_FORWARDED) > 0); 567 } 568 569 574 public boolean getTaskMessageMembers() { 575 576 return ((m_taskMessages & CmsTaskService.TASK_MESSAGES_MEMBERS) > 0); 577 } 578 579 584 public int getTaskMessageValue() { 585 586 return m_taskMessages; 587 } 588 589 594 public boolean getTaskShowAllProjects() { 595 596 return m_taskShowProjects; 597 } 598 599 604 public String getTaskStartupFilter() { 605 606 return m_taskStartupfilter; 607 } 608 609 614 public CmsUser getUser() { 615 616 return m_user; 617 } 618 619 624 public int getWorkplaceButtonStyle() { 625 626 return m_workplaceButtonStyle; 627 } 628 629 634 public String getWorkplaceReportType() { 635 636 return m_workplaceReportType; 637 } 638 639 645 public void init(CmsObject cms, CmsUser user) { 646 647 m_user = user; 648 649 652 try { 654 m_workplaceButtonStyle = ((Integer )m_user.getAdditionalInfo(PREFERENCES 655 + CmsWorkplaceConfiguration.N_WORKPLACEGENERALOPTIONS 656 + CmsWorkplaceConfiguration.N_BUTTONSTYLE)).intValue(); 657 } catch (Throwable t) { 658 m_workplaceButtonStyle = OpenCms.getWorkplaceManager().getDefaultUserSettings().getWorkplaceButtonStyle(); 659 } 660 m_workplaceReportType = ((String )m_user.getAdditionalInfo(PREFERENCES 662 + CmsWorkplaceConfiguration.N_WORKPLACEGENERALOPTIONS 663 + CmsWorkplaceConfiguration.N_REPORTTYPE)); 664 if (m_workplaceReportType == null) { 665 m_workplaceReportType = OpenCms.getWorkplaceManager().getDefaultUserSettings().getWorkplaceReportType(); 666 } 667 try { 669 m_uploadApplet = ((Boolean )m_user.getAdditionalInfo(PREFERENCES 670 + CmsWorkplaceConfiguration.N_WORKPLACEGENERALOPTIONS 671 + CmsWorkplaceConfiguration.N_UPLOADAPPLET)).booleanValue(); 672 } catch (Throwable t) { 673 m_uploadApplet = OpenCms.getWorkplaceManager().getDefaultUserSettings().useUploadApplet(); 674 } 675 m_locale = (Locale )m_user.getAdditionalInfo(PREFERENCES 677 + CmsWorkplaceConfiguration.N_WORKPLACESTARTUPSETTINGS 678 + CmsWorkplaceConfiguration.N_LOCALE); 679 if (m_locale == null) { 680 m_locale = OpenCms.getWorkplaceManager().getDefaultUserSettings().getLocale(); 681 } 682 try { 684 m_project = ((String )m_user.getAdditionalInfo(PREFERENCES 685 + CmsWorkplaceConfiguration.N_WORKPLACESTARTUPSETTINGS 686 + CmsWorkplaceConfiguration.N_PROJECT)); 687 } catch (Throwable t) { 688 m_project = null; 689 } 690 if (m_project == null) { 691 m_project = OpenCms.getWorkplaceManager().getDefaultUserSettings().getStartProject(); 692 } 693 m_view = ((String )m_user.getAdditionalInfo(PREFERENCES 695 + CmsWorkplaceConfiguration.N_WORKPLACESTARTUPSETTINGS 696 + CmsWorkplaceConfiguration.N_WORKPLACEVIEW)); 697 if (m_view == null) { 698 m_view = OpenCms.getWorkplaceManager().getDefaultUserSettings().getStartView(); 699 } 700 try { 702 m_explorerButtonStyle = ((Integer )m_user.getAdditionalInfo(PREFERENCES 703 + CmsWorkplaceConfiguration.N_EXPLORERGENERALOPTIONS 704 + CmsWorkplaceConfiguration.N_BUTTONSTYLE)).intValue(); 705 } catch (Throwable t) { 706 m_explorerButtonStyle = OpenCms.getWorkplaceManager().getDefaultUserSettings().getExplorerButtonStyle(); 707 } 708 try { 710 m_explorerFileEntries = ((Integer )m_user.getAdditionalInfo(PREFERENCES 711 + CmsWorkplaceConfiguration.N_EXPLORERGENERALOPTIONS 712 + CmsWorkplaceConfiguration.N_ENTRIES)).intValue(); 713 } catch (Throwable t) { 714 m_explorerFileEntries = OpenCms.getWorkplaceManager().getDefaultUserSettings().getExplorerFileEntries(); 715 } 716 try { 718 m_explorerSettings = ((Integer )m_user.getAdditionalInfo(PREFERENCES 719 + CmsWorkplaceConfiguration.N_EXPLORERGENERALOPTIONS 720 + CmsWorkplaceConfiguration.N_EXPLORERDISPLAYOPTIONS)).intValue(); 721 } catch (Throwable t) { 722 m_explorerSettings = OpenCms.getWorkplaceManager().getDefaultUserSettings().getExplorerSettings(); 723 } 724 try { 726 m_dialogFileCopy = ((Integer )m_user.getAdditionalInfo(PREFERENCES 727 + CmsWorkplaceConfiguration.N_DIALOGSDEFAULTSETTINGS 728 + CmsWorkplaceConfiguration.N_FILECOPY)).intValue(); 729 } catch (Throwable t) { 730 m_dialogFileCopy = OpenCms.getWorkplaceManager().getDefaultUserSettings().getDialogCopyFileMode(); 731 } 732 try { 734 m_dialogFolderCopy = ((Integer )m_user.getAdditionalInfo(PREFERENCES 735 + CmsWorkplaceConfiguration.N_DIALOGSDEFAULTSETTINGS 736 + CmsWorkplaceConfiguration.N_FOLDERCOPY)).intValue(); 737 } catch (Throwable t) { 738 m_dialogFolderCopy = OpenCms.getWorkplaceManager().getDefaultUserSettings().getDialogCopyFolderMode(); 739 } 740 try { 742 m_dialogFileDelete = ((Integer )m_user.getAdditionalInfo(PREFERENCES 743 + CmsWorkplaceConfiguration.N_DIALOGSDEFAULTSETTINGS 744 + CmsWorkplaceConfiguration.N_FILEDELETION)).intValue(); 745 } catch (Throwable t) { 746 m_dialogFileDelete = OpenCms.getWorkplaceManager().getDefaultUserSettings().getDialogDeleteFileMode(); 747 } 748 try { 750 m_dialogDirectpublish = ((Boolean )m_user.getAdditionalInfo(PREFERENCES 751 + CmsWorkplaceConfiguration.N_DIALOGSDEFAULTSETTINGS 752 + CmsWorkplaceConfiguration.N_DIRECTPUBLISH)).booleanValue(); 753 } catch (Throwable t) { 754 m_dialogDirectpublish = OpenCms.getWorkplaceManager().getDefaultUserSettings().getDialogPublishSiblings(); 755 } 756 try { 758 m_showLock = ((Boolean )m_user.getAdditionalInfo(PREFERENCES 759 + CmsWorkplaceConfiguration.N_DIALOGSDEFAULTSETTINGS 760 + CmsWorkplaceConfiguration.N_SHOWLOCK)).booleanValue(); 761 } catch (Throwable t) { 762 m_showLock = OpenCms.getWorkplaceManager().getDefaultUserSettings().getDialogShowLock(); 763 } 764 try { 766 m_showExportSettings = ((Boolean )m_user.getAdditionalInfo(PREFERENCES 767 + CmsWorkplaceConfiguration.N_DIALOGSDEFAULTSETTINGS 768 + CmsWorkplaceConfiguration.N_SHOWEXPORTSETTINGS)).booleanValue(); 769 } catch (Throwable t) { 770 m_showExportSettings = OpenCms.getWorkplaceManager().getDefaultUserSettings().getDialogShowExportSettings(); 771 } 772 try { 774 m_dialogPermissionsInheritOnFolder = ((Boolean )m_user.getAdditionalInfo(PREFERENCES 775 + CmsWorkplaceConfiguration.N_DIALOGSDEFAULTSETTINGS 776 + CmsWorkplaceConfiguration.N_PERMISSIONSINHERITONFOLDER)).booleanValue(); 777 } catch (Throwable t) { 778 m_dialogPermissionsInheritOnFolder = OpenCms.getWorkplaceManager().getDefaultUserSettings().getDialogPermissionsInheritOnFolder(); 779 } 780 try { 782 m_dialogExpandInheritedPermissions = ((Boolean )m_user.getAdditionalInfo(PREFERENCES 783 + CmsWorkplaceConfiguration.N_DIALOGSDEFAULTSETTINGS 784 + CmsWorkplaceConfiguration.N_EXPANDPERMISSIONSINHERITED)).booleanValue(); 785 } catch (Throwable t) { 786 m_dialogExpandInheritedPermissions = OpenCms.getWorkplaceManager().getDefaultUserSettings().getDialogExpandInheritedPermissions(); 787 } 788 try { 790 m_dialogExpandUserPermissions = ((Boolean )m_user.getAdditionalInfo(PREFERENCES 791 + CmsWorkplaceConfiguration.N_DIALOGSDEFAULTSETTINGS 792 + CmsWorkplaceConfiguration.N_EXPANDPERMISSIONSUSER)).booleanValue(); 793 } catch (Throwable t) { 794 m_dialogExpandUserPermissions = OpenCms.getWorkplaceManager().getDefaultUserSettings().getDialogExpandUserPermissions(); 795 } 796 try { 798 m_editorButtonStyle = ((Integer )m_user.getAdditionalInfo(PREFERENCES 799 + CmsWorkplaceConfiguration.N_EDITORGENERALOPTIONS 800 + CmsWorkplaceConfiguration.N_BUTTONSTYLE)).intValue(); 801 } catch (Throwable t) { 802 m_editorButtonStyle = OpenCms.getWorkplaceManager().getDefaultUserSettings().getEditorButtonStyle(); 803 } 804 try { 806 m_directeditButtonStyle = ((Integer )m_user.getAdditionalInfo(PREFERENCES 807 + CmsWorkplaceConfiguration.N_EDITORGENERALOPTIONS 808 + CmsWorkplaceConfiguration.N_DIRECTEDITSTYLE)).intValue(); 809 } catch (Throwable t) { 810 m_directeditButtonStyle = OpenCms.getWorkplaceManager().getDefaultUserSettings().getDirectEditButtonStyle(); 811 } 812 m_editorSettings = (HashMap )m_user.getAdditionalInfo(PREFERENCES 814 + CmsWorkplaceConfiguration.N_EDITORPREFERREDEDITORS); 815 if (m_editorSettings == null) { 816 m_editorSettings = new HashMap (OpenCms.getWorkplaceManager().getDefaultUserSettings().getEditorSettings()); 817 } 818 m_taskStartupfilter = (String )m_user.getAdditionalInfo(PREFERENCES 820 + CmsWorkplaceConfiguration.N_WORKFLOWGENERALOPTIONS 821 + CmsWorkplaceConfiguration.N_STARTUPFILTER); 822 if (m_taskStartupfilter == null) { 823 m_taskStartupfilter = OpenCms.getWorkplaceManager().getDefaultUserSettings().getTaskStartupFilter(); 824 } 825 try { 827 m_taskShowProjects = ((Boolean )m_user.getAdditionalInfo(PREFERENCES 828 + CmsWorkplaceConfiguration.N_WORKFLOWGENERALOPTIONS 829 + CmsWorkplaceConfiguration.N_SHOWPROJECTS)).booleanValue(); 830 } catch (Throwable t) { 831 m_taskShowProjects = OpenCms.getWorkplaceManager().getDefaultUserSettings().getTaskShowAllProjects(); 832 } 833 try { 835 m_taskMessages = ((Integer )m_user.getAdditionalInfo(PREFERENCES 836 + CmsWorkplaceConfiguration.N_WORKFLOWDEFAULTSETTINGS)).intValue(); 837 } catch (Throwable t) { 838 m_taskMessages = OpenCms.getWorkplaceManager().getDefaultUserSettings().getTaskMessageValue(); 839 } 840 841 m_startSite = ((String )m_user.getAdditionalInfo(PREFERENCES 843 + CmsWorkplaceConfiguration.N_WORKPLACESTARTUPSETTINGS 844 + I_CmsXmlConfiguration.N_SITE)); 845 if (m_startSite == null) { 846 m_startSite = OpenCms.getWorkplaceManager().getDefaultUserSettings().getStartSite(); 847 } 848 m_startFolder = ((String )m_user.getAdditionalInfo(PREFERENCES 850 + CmsWorkplaceConfiguration.N_WORKPLACESTARTUPSETTINGS 851 + CmsWorkplaceConfiguration.N_FOLDER)); 852 if (m_startFolder == null) { 853 m_startFolder = OpenCms.getWorkplaceManager().getDefaultUserSettings().getStartFolder(); 854 } 855 856 try { 858 m_restrictExplorerView = ((Boolean )m_user.getAdditionalInfo(PREFERENCES 859 + CmsWorkplaceConfiguration.N_WORKPLACESTARTUPSETTINGS 860 + CmsWorkplaceConfiguration.N_RESTRICTEXPLORERVIEW)).booleanValue(); 861 } catch (Throwable t) { 862 m_restrictExplorerView = OpenCms.getWorkplaceManager().getDefaultUserSettings().getRestrictExplorerView(); 863 } 864 865 try { 867 m_synchronizeSettings = ((CmsSynchronizeSettings)m_user.getAdditionalInfo(PREFERENCES + SYNC_SETTINGS)); 868 } catch (Throwable t) { 869 m_synchronizeSettings = null; 871 } 872 873 try { 875 m_projectSettings = ((CmsUserProjectSettings)m_user.getAdditionalInfo(PREFERENCES + PROJECT_SETTINGS)); 876 } catch (Throwable t) { 877 m_projectSettings = null; 878 } 879 if (m_projectSettings == null) { 880 m_projectSettings = new CmsUserProjectSettings(); 882 m_projectSettings.setDeleteAfterPublishing(false); 883 try { 884 m_projectSettings.setManagerGroup(cms.readGroup(OpenCms.getDefaultUsers().getGroupProjectmanagers()).getId()); 885 } catch (Exception e) { 886 } 888 try { 889 m_projectSettings.setUserGroup(cms.readGroup(OpenCms.getDefaultUsers().getGroupUsers()).getId()); 890 } catch (Exception e) { 891 } 893 m_projectSettings.setProjectFilesMode(CmsProjectResourcesDisplayMode.ALL_CHANGES); 894 } 895 896 try { 897 save(null); 898 } catch (CmsException e) { 899 } 901 } 902 903 912 public void init(CmsUser user) { 913 914 init(null, user); 915 } 916 917 926 public void save(CmsObject cms) throws CmsException { 927 928 933 if (getWorkplaceButtonStyle() != OpenCms.getWorkplaceManager().getDefaultUserSettings().getWorkplaceButtonStyle()) { 935 m_user.setAdditionalInfo(PREFERENCES 936 + CmsWorkplaceConfiguration.N_WORKPLACEGENERALOPTIONS 937 + CmsWorkplaceConfiguration.N_BUTTONSTYLE, new Integer (getWorkplaceButtonStyle())); 938 } else if (cms != null) { 939 m_user.deleteAdditionalInfo(PREFERENCES 940 + CmsWorkplaceConfiguration.N_WORKPLACEGENERALOPTIONS 941 + CmsWorkplaceConfiguration.N_BUTTONSTYLE); 942 } 943 if (!getWorkplaceReportType().equals( 945 OpenCms.getWorkplaceManager().getDefaultUserSettings().getWorkplaceReportType())) { 946 m_user.setAdditionalInfo(PREFERENCES 947 + CmsWorkplaceConfiguration.N_WORKPLACEGENERALOPTIONS 948 + CmsWorkplaceConfiguration.N_REPORTTYPE, getWorkplaceReportType()); 949 } else if (cms != null) { 950 m_user.deleteAdditionalInfo(PREFERENCES 951 + CmsWorkplaceConfiguration.N_WORKPLACEGENERALOPTIONS 952 + CmsWorkplaceConfiguration.N_REPORTTYPE); 953 } 954 if (useUploadApplet() != OpenCms.getWorkplaceManager().getDefaultUserSettings().useUploadApplet()) { 956 m_user.setAdditionalInfo(PREFERENCES 957 + CmsWorkplaceConfiguration.N_WORKPLACEGENERALOPTIONS 958 + CmsWorkplaceConfiguration.N_UPLOADAPPLET, new Boolean (useUploadApplet())); 959 } else if (cms != null) { 960 m_user.deleteAdditionalInfo(PREFERENCES 961 + CmsWorkplaceConfiguration.N_WORKPLACEGENERALOPTIONS 962 + CmsWorkplaceConfiguration.N_UPLOADAPPLET); 963 } 964 if (!getLocale().equals(OpenCms.getWorkplaceManager().getDefaultUserSettings().getLocale())) { 966 m_user.setAdditionalInfo(PREFERENCES 967 + CmsWorkplaceConfiguration.N_WORKPLACESTARTUPSETTINGS 968 + CmsWorkplaceConfiguration.N_LOCALE, getLocale()); 969 } else if (cms != null) { 970 m_user.deleteAdditionalInfo(PREFERENCES 971 + CmsWorkplaceConfiguration.N_WORKPLACESTARTUPSETTINGS 972 + CmsWorkplaceConfiguration.N_LOCALE); 973 } 974 if (!getStartProject().equals(OpenCms.getWorkplaceManager().getDefaultUserSettings().getStartProject())) { 976 m_user.setAdditionalInfo(PREFERENCES 977 + CmsWorkplaceConfiguration.N_WORKPLACESTARTUPSETTINGS 978 + CmsWorkplaceConfiguration.N_PROJECT, getStartProject()); 979 } else if (cms != null) { 980 m_user.deleteAdditionalInfo(PREFERENCES 981 + CmsWorkplaceConfiguration.N_WORKPLACESTARTUPSETTINGS 982 + CmsWorkplaceConfiguration.N_PROJECT); 983 } 984 if (!getStartView().equals(OpenCms.getWorkplaceManager().getDefaultUserSettings().getStartView())) { 986 m_user.setAdditionalInfo(PREFERENCES 987 + CmsWorkplaceConfiguration.N_WORKPLACESTARTUPSETTINGS 988 + CmsWorkplaceConfiguration.N_WORKPLACEVIEW, getStartView()); 989 } else if (cms != null) { 990 m_user.deleteAdditionalInfo(PREFERENCES 991 + CmsWorkplaceConfiguration.N_WORKPLACESTARTUPSETTINGS 992 + CmsWorkplaceConfiguration.N_WORKPLACEVIEW); 993 } 994 if (getExplorerButtonStyle() != OpenCms.getWorkplaceManager().getDefaultUserSettings().getExplorerButtonStyle()) { 996 m_user.setAdditionalInfo(PREFERENCES 997 + CmsWorkplaceConfiguration.N_EXPLORERGENERALOPTIONS 998 + CmsWorkplaceConfiguration.N_BUTTONSTYLE, new Integer (getExplorerButtonStyle())); 999 } else if (cms != null) { 1000 m_user.deleteAdditionalInfo(PREFERENCES 1001 + CmsWorkplaceConfiguration.N_EXPLORERGENERALOPTIONS 1002 + CmsWorkplaceConfiguration.N_BUTTONSTYLE); 1003 } 1004 if (getExplorerFileEntries() != OpenCms.getWorkplaceManager().getDefaultUserSettings().getExplorerFileEntries()) { 1006 m_user.setAdditionalInfo(PREFERENCES 1007 + CmsWorkplaceConfiguration.N_EXPLORERGENERALOPTIONS 1008 + CmsWorkplaceConfiguration.N_ENTRIES, new Integer (getExplorerFileEntries())); 1009 } else if (cms != null) { 1010 m_user.deleteAdditionalInfo(PREFERENCES 1011 + CmsWorkplaceConfiguration.N_EXPLORERGENERALOPTIONS 1012 + CmsWorkplaceConfiguration.N_ENTRIES); 1013 } 1014 if (getExplorerSettings() != OpenCms.getWorkplaceManager().getDefaultUserSettings().getExplorerSettings()) { 1016 m_user.setAdditionalInfo(PREFERENCES 1017 + CmsWorkplaceConfiguration.N_EXPLORERGENERALOPTIONS 1018 + CmsWorkplaceConfiguration.N_EXPLORERDISPLAYOPTIONS, new Integer (getExplorerSettings())); 1019 } else if (cms != null) { 1020 m_user.deleteAdditionalInfo(PREFERENCES 1021 + CmsWorkplaceConfiguration.N_EXPLORERGENERALOPTIONS 1022 + CmsWorkplaceConfiguration.N_EXPLORERDISPLAYOPTIONS); 1023 } 1024 if (getDialogCopyFileMode() != OpenCms.getWorkplaceManager().getDefaultUserSettings().getDialogCopyFileMode()) { 1026 m_user.setAdditionalInfo(PREFERENCES 1027 + CmsWorkplaceConfiguration.N_DIALOGSDEFAULTSETTINGS 1028 + CmsWorkplaceConfiguration.N_FILECOPY, new Integer (getDialogCopyFileMode())); 1029 } else if (cms != null) { 1030 m_user.deleteAdditionalInfo(PREFERENCES 1031 + CmsWorkplaceConfiguration.N_DIALOGSDEFAULTSETTINGS 1032 + CmsWorkplaceConfiguration.N_FILECOPY); 1033 } 1034 if (getDialogCopyFolderMode() != OpenCms.getWorkplaceManager().getDefaultUserSettings().getDialogCopyFolderMode()) { 1036 m_user.setAdditionalInfo(PREFERENCES 1037 + CmsWorkplaceConfiguration.N_DIALOGSDEFAULTSETTINGS 1038 + CmsWorkplaceConfiguration.N_FOLDERCOPY, new Integer (getDialogCopyFolderMode())); 1039 } else if (cms != null) { 1040 m_user.deleteAdditionalInfo(PREFERENCES 1041 + CmsWorkplaceConfiguration.N_DIALOGSDEFAULTSETTINGS 1042 + CmsWorkplaceConfiguration.N_FOLDERCOPY); 1043 } 1044 if (getDialogDeleteFileMode() != OpenCms.getWorkplaceManager().getDefaultUserSettings().getDialogDeleteFileMode()) { 1046 m_user.setAdditionalInfo(PREFERENCES 1047 + CmsWorkplaceConfiguration.N_DIALOGSDEFAULTSETTINGS 1048 + CmsWorkplaceConfiguration.N_FILEDELETION, new Integer (getDialogDeleteFileMode())); 1049 } else if (cms != null) { 1050 m_user.deleteAdditionalInfo(PREFERENCES 1051 + CmsWorkplaceConfiguration.N_DIALOGSDEFAULTSETTINGS 1052 + CmsWorkplaceConfiguration.N_FILEDELETION); 1053 } 1054 if (getDialogPublishSiblings() != OpenCms.getWorkplaceManager().getDefaultUserSettings().getDialogPublishSiblings()) { 1056 m_user.setAdditionalInfo(PREFERENCES 1057 + CmsWorkplaceConfiguration.N_DIALOGSDEFAULTSETTINGS 1058 + CmsWorkplaceConfiguration.N_DIRECTPUBLISH, new Boolean (getDialogPublishSiblings())); 1059 } else if (cms != null) { 1060 m_user.deleteAdditionalInfo(PREFERENCES 1061 + CmsWorkplaceConfiguration.N_DIALOGSDEFAULTSETTINGS 1062 + CmsWorkplaceConfiguration.N_DIRECTPUBLISH); 1063 } 1064 if (getDialogShowLock() != OpenCms.getWorkplaceManager().getDefaultUserSettings().getDialogShowLock()) { 1066 m_user.setAdditionalInfo(PREFERENCES 1067 + CmsWorkplaceConfiguration.N_DIALOGSDEFAULTSETTINGS 1068 + CmsWorkplaceConfiguration.N_SHOWLOCK, new Boolean (getDialogShowLock())); 1069 } else if (cms != null) { 1070 m_user.deleteAdditionalInfo(PREFERENCES 1071 + CmsWorkplaceConfiguration.N_DIALOGSDEFAULTSETTINGS 1072 + CmsWorkplaceConfiguration.N_SHOWLOCK); 1073 } 1074 if (getDialogPermissionsInheritOnFolder() != OpenCms.getWorkplaceManager().getDefaultUserSettings().getDialogPermissionsInheritOnFolder()) { 1076 m_user.setAdditionalInfo(PREFERENCES 1077 + CmsWorkplaceConfiguration.N_DIALOGSDEFAULTSETTINGS 1078 + CmsWorkplaceConfiguration.N_PERMISSIONSINHERITONFOLDER, new Boolean ( 1079 getDialogPermissionsInheritOnFolder())); 1080 } else if (cms != null) { 1081 m_user.deleteAdditionalInfo(PREFERENCES 1082 + CmsWorkplaceConfiguration.N_DIALOGSDEFAULTSETTINGS 1083 + CmsWorkplaceConfiguration.N_PERMISSIONSINHERITONFOLDER); 1084 } 1085 if (getDialogExpandInheritedPermissions() != OpenCms.getWorkplaceManager().getDefaultUserSettings().getDialogExpandInheritedPermissions()) { 1087 m_user.setAdditionalInfo(PREFERENCES 1088 + CmsWorkplaceConfiguration.N_DIALOGSDEFAULTSETTINGS 1089 + CmsWorkplaceConfiguration.N_EXPANDPERMISSIONSINHERITED, new Boolean ( 1090 getDialogExpandInheritedPermissions())); 1091 } else if (cms != null) { 1092 m_user.deleteAdditionalInfo(PREFERENCES 1093 + CmsWorkplaceConfiguration.N_DIALOGSDEFAULTSETTINGS 1094 + CmsWorkplaceConfiguration.N_EXPANDPERMISSIONSINHERITED); 1095 } 1096 if (getDialogExpandUserPermissions() != OpenCms.getWorkplaceManager().getDefaultUserSettings().getDialogExpandUserPermissions()) { 1098 m_user.setAdditionalInfo(PREFERENCES 1099 + CmsWorkplaceConfiguration.N_DIALOGSDEFAULTSETTINGS 1100 + CmsWorkplaceConfiguration.N_EXPANDPERMISSIONSUSER, new Boolean (getDialogExpandUserPermissions())); 1101 } else if (cms != null) { 1102 m_user.deleteAdditionalInfo(PREFERENCES 1103 + CmsWorkplaceConfiguration.N_DIALOGSDEFAULTSETTINGS 1104 + CmsWorkplaceConfiguration.N_EXPANDPERMISSIONSUSER); 1105 } 1106 if (getEditorButtonStyle() != OpenCms.getWorkplaceManager().getDefaultUserSettings().getEditorButtonStyle()) { 1108 m_user.setAdditionalInfo(PREFERENCES 1109 + CmsWorkplaceConfiguration.N_EDITORGENERALOPTIONS 1110 + CmsWorkplaceConfiguration.N_BUTTONSTYLE, new Integer (getEditorButtonStyle())); 1111 } else if (cms != null) { 1112 m_user.deleteAdditionalInfo(PREFERENCES 1113 + CmsWorkplaceConfiguration.N_EDITORGENERALOPTIONS 1114 + CmsWorkplaceConfiguration.N_BUTTONSTYLE); 1115 } 1116 if (getDirectEditButtonStyle() != OpenCms.getWorkplaceManager().getDefaultUserSettings().getDirectEditButtonStyle()) { 1118 m_user.setAdditionalInfo(PREFERENCES 1119 + CmsWorkplaceConfiguration.N_EDITORGENERALOPTIONS 1120 + CmsWorkplaceConfiguration.N_DIRECTEDITSTYLE, new Integer (getDirectEditButtonStyle())); 1121 } else if (cms != null) { 1122 m_user.deleteAdditionalInfo(PREFERENCES 1123 + CmsWorkplaceConfiguration.N_EDITORGENERALOPTIONS 1124 + CmsWorkplaceConfiguration.N_DIRECTEDITSTYLE); 1125 } 1126 if (m_editorSettings.size() > 0) { 1128 m_user.setAdditionalInfo(PREFERENCES + CmsWorkplaceConfiguration.N_EDITORPREFERREDEDITORS, m_editorSettings); 1129 } else if (cms != null) { 1130 m_user.deleteAdditionalInfo(PREFERENCES + CmsWorkplaceConfiguration.N_EDITORPREFERREDEDITORS); 1131 } 1132 if (!getTaskStartupFilter().equals( 1134 OpenCms.getWorkplaceManager().getDefaultUserSettings().getTaskStartupFilter())) { 1135 m_user.setAdditionalInfo(PREFERENCES 1136 + CmsWorkplaceConfiguration.N_WORKFLOWGENERALOPTIONS 1137 + CmsWorkplaceConfiguration.N_STARTUPFILTER, getTaskStartupFilter()); 1138 } else if (cms != null) { 1139 m_user.deleteAdditionalInfo(PREFERENCES 1140 + CmsWorkplaceConfiguration.N_WORKFLOWGENERALOPTIONS 1141 + CmsWorkplaceConfiguration.N_STARTUPFILTER); 1142 } 1143 if (getTaskShowAllProjects() != OpenCms.getWorkplaceManager().getDefaultUserSettings().getTaskShowAllProjects()) { 1145 m_user.setAdditionalInfo(PREFERENCES 1146 + CmsWorkplaceConfiguration.N_WORKFLOWGENERALOPTIONS 1147 + CmsWorkplaceConfiguration.N_SHOWPROJECTS, new Boolean (getTaskShowAllProjects())); 1148 } else if (cms != null) { 1149 m_user.deleteAdditionalInfo(PREFERENCES 1150 + CmsWorkplaceConfiguration.N_WORKFLOWGENERALOPTIONS 1151 + CmsWorkplaceConfiguration.N_SHOWPROJECTS); 1152 } 1153 if (getTaskMessageValue() != OpenCms.getWorkplaceManager().getDefaultUserSettings().getTaskMessageValue()) { 1155 m_user.setAdditionalInfo(PREFERENCES + CmsWorkplaceConfiguration.N_WORKFLOWDEFAULTSETTINGS, new Integer ( 1156 m_taskMessages)); 1157 } else if (cms != null) { 1158 m_user.deleteAdditionalInfo(PREFERENCES + CmsWorkplaceConfiguration.N_WORKFLOWDEFAULTSETTINGS); 1159 } 1160 1161 if (!getStartSite().equals(OpenCms.getWorkplaceManager().getDefaultUserSettings().getStartSite())) { 1163 m_user.setAdditionalInfo(PREFERENCES 1164 + CmsWorkplaceConfiguration.N_WORKPLACESTARTUPSETTINGS 1165 + I_CmsXmlConfiguration.N_SITE, getStartSite()); 1166 } else if (cms != null) { 1167 m_user.deleteAdditionalInfo(PREFERENCES 1168 + CmsWorkplaceConfiguration.N_WORKPLACESTARTUPSETTINGS 1169 + I_CmsXmlConfiguration.N_SITE); 1170 } 1171 if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(getStartFolder()) 1173 && !getStartFolder().equals(OpenCms.getWorkplaceManager().getDefaultUserSettings().getStartFolder())) { 1174 m_user.setAdditionalInfo(PREFERENCES 1175 + CmsWorkplaceConfiguration.N_WORKPLACESTARTUPSETTINGS 1176 + CmsWorkplaceConfiguration.N_FOLDER, getStartFolder()); 1177 } else if (cms != null) { 1178 m_user.deleteAdditionalInfo(PREFERENCES 1179 + CmsWorkplaceConfiguration.N_WORKPLACESTARTUPSETTINGS 1180 + CmsWorkplaceConfiguration.N_FOLDER); 1181 } 1182 1183 if (getRestrictExplorerView() != OpenCms.getWorkplaceManager().getDefaultUserSettings().getRestrictExplorerView()) { 1185 m_user.setAdditionalInfo(PREFERENCES 1186 + CmsWorkplaceConfiguration.N_WORKPLACESTARTUPSETTINGS 1187 + CmsWorkplaceConfiguration.N_RESTRICTEXPLORERVIEW, new Boolean (getRestrictExplorerView())); 1188 } else if (cms != null) { 1189 m_user.deleteAdditionalInfo(PREFERENCES 1190 + CmsWorkplaceConfiguration.N_WORKPLACESTARTUPSETTINGS 1191 + CmsWorkplaceConfiguration.N_RESTRICTEXPLORERVIEW); 1192 } 1193 1194 if (getSynchronizeSettings() != null) { 1196 m_user.setAdditionalInfo(PREFERENCES + SYNC_SETTINGS, getSynchronizeSettings()); 1197 } else { 1198 m_user.deleteAdditionalInfo(PREFERENCES + SYNC_SETTINGS); 1199 } 1200 1201 if (getProjectSettings() != null) { 1203 m_user.setAdditionalInfo(PREFERENCES + PROJECT_SETTINGS, getProjectSettings()); 1204 } else { 1205 m_user.deleteAdditionalInfo(PREFERENCES + PROJECT_SETTINGS); 1206 } 1207 1208 if (cms != null) { 1210 cms.writeUser(m_user); 1211 } 1212 } 1213 1214 1219 public void setDialogCopyFileMode(int mode) { 1220 1221 m_dialogFileCopy = mode; 1222 } 1223 1224 1229 public void setDialogCopyFolderMode(int mode) { 1230 1231 m_dialogFolderCopy = mode; 1232 } 1233 1234 1239 public void setDialogDeleteFileMode(int mode) { 1240 1241 m_dialogFileDelete = mode; 1242 } 1243 1244 1249 public void setDialogExpandInheritedPermissions(boolean dialogShowInheritedPermissions) { 1250 1251 m_dialogExpandInheritedPermissions = dialogShowInheritedPermissions; 1252 } 1253 1254 1259 public void setDialogExpandUserPermissions(boolean dialogShowUserPermissions) { 1260 1261 m_dialogExpandUserPermissions = dialogShowUserPermissions; 1262 } 1263 1264 1269 public void setDialogPermissionsInheritOnFolder(boolean dialogPermissionsInheritOnFolder) { 1270 1271 m_dialogPermissionsInheritOnFolder = dialogPermissionsInheritOnFolder; 1272 } 1273 1274 1279 public void setDialogPublishSiblings(boolean publishSiblings) { 1280 1281 m_dialogDirectpublish = publishSiblings; 1282 } 1283 1284 1289 public void setDialogShowExportSettings(boolean show) { 1290 1291 m_showExportSettings = show; 1292 } 1293 1294 1299 public void setDialogShowLock(boolean show) { 1300 1301 m_showLock = show; 1302 } 1303 1304 1309 public void setDirectEditButtonStyle(int style) { 1310 1311 m_directeditButtonStyle = style; 1312 } 1313 1314 1319 public void setEditorButtonStyle(int style) { 1320 1321 m_editorButtonStyle = style; 1322 } 1323 1324 1329 public void setEditorSettings(Map settings) { 1330 1331 m_editorSettings = new HashMap (settings); 1332 } 1333 1334 1339 public void setExplorerButtonStyle(int style) { 1340 1341 m_explorerButtonStyle = style; 1342 } 1343 1344 1349 public void setExplorerFileEntries(int entries) { 1350 1351 m_explorerFileEntries = entries; 1352 } 1353 1354 1360 private void setExplorerSetting(boolean set, int setting) { 1361 1362 if (set) { 1363 m_explorerSettings |= setting; 1364 } else { 1365 m_explorerSettings &= ~setting; 1366 } 1367 } 1368 1369 1374 public void setExplorerSettings(int settings) { 1375 1376 m_explorerSettings = settings; 1377 } 1378 1379 1384 public void setLocale(Locale locale) { 1385 1386 m_locale = locale; 1387 } 1388 1389 1396 public void setNewFolderCreateIndexPage(Boolean setting) { 1397 1398 m_newFolderCreateIndexPage = setting; 1399 } 1400 1401 1408 public void setNewFolderEditPropertes(Boolean setting) { 1409 1410 m_newFolderEditProperties = setting; 1411 } 1412 1413 1419 public void setPreferredEditor(String resourceType, String editorUri) { 1420 1421 if (editorUri == null) { 1422 m_editorSettings.remove(resourceType); 1423 } 1424 m_editorSettings.put(resourceType, editorUri); 1425 } 1426 1427 1432 public void setProjectSettings(CmsUserProjectSettings projectSettings) { 1433 1434 m_projectSettings = projectSettings; 1435 } 1436 1437 1442 public void setPublishButtonAppearance(String publishButtonAppearance) { 1443 1444 m_publishButtonAppearance = publishButtonAppearance; 1445 } 1446 1447 1452 public void setRestrictExplorerView(boolean restrict) { 1453 1454 m_restrictExplorerView = restrict; 1455 } 1456 1457 1462 public void setShowExplorerFileDateCreated(boolean show) { 1463 1464 setExplorerSetting(show, CmsUserSettings.FILELIST_DATE_CREATED); 1465 } 1466 1467 1472 public void setShowExplorerFileDateExpired(boolean show) { 1473 1474 setExplorerSetting(show, CmsUserSettings.FILELIST_DATE_EXPIRED); 1475 } 1476 1477 1482 public void setShowExplorerFileDateLastModified(boolean show) { 1483 1484 setExplorerSetting(show, CmsUserSettings.FILELIST_DATE_LASTMODIFIED); 1485 } 1486 1487 1492 public void setShowExplorerFileDateReleased(boolean show) { 1493 1494 setExplorerSetting(show, CmsUserSettings.FILELIST_DATE_RELEASED); 1495 } 1496 1497 1502 public void setShowExplorerFileLockedBy(boolean show) { 1503 1504 setExplorerSetting(show, CmsUserSettings.FILELIST_LOCKEDBY); 1505 } 1506 1507 1512 public void setShowExplorerFilePermissions(boolean show) { 1513 1514 setExplorerSetting(show, CmsUserSettings.FILELIST_PERMISSIONS); 1515 } 1516 1517 1522 public void setShowExplorerFileSize(boolean show) { 1523 1524 setExplorerSetting(show, CmsUserSettings.FILELIST_SIZE); 1525 } 1526 1527 1532 public void setShowExplorerFileState(boolean show) { 1533 1534 setExplorerSetting(show, CmsUserSettings.FILELIST_STATE); 1535 } 1536 1537 1542 public void setShowExplorerFileTitle(boolean show) { 1543 1544 setExplorerSetting(show, CmsUserSettings.FILELIST_TITLE); 1545 } 1546 1547 1552 public void setShowExplorerFileType(boolean show) { 1553 1554 setExplorerSetting(show, CmsUserSettings.FILELIST_TYPE); 1555 } 1556 1557 1562 public void setShowExplorerFileUserCreated(boolean show) { 1563 1564 setExplorerSetting(show, CmsUserSettings.FILELIST_USER_CREATED); 1565 } 1566 1567 1572 public void setShowExplorerFileUserLastModified(boolean show) { 1573 1574 setExplorerSetting(show, CmsUserSettings.FILELIST_USER_LASTMODIFIED); 1575 } 1576 1577 1582 public void setStartFolder(String folder) { 1583 1584 m_startFolder = folder; 1585 } 1586 1587 1592 public void setStartProject(String project) { 1593 1594 m_project = project; 1595 } 1596 1597 1602 public void setStartSite(String site) { 1603 1604 m_startSite = site; 1605 } 1606 1607 1612 public void setStartView(String view) { 1613 1614 m_view = view; 1615 } 1616 1617 1622 public void setSynchronizeSettings(CmsSynchronizeSettings synchronizeSettings) { 1623 1624 m_synchronizeSettings = synchronizeSettings; 1625 } 1626 1627 1632 public void setTaskMessageAccepted(boolean message) { 1633 1634 setTaskMessageSetting(message, CmsTaskService.TASK_MESSAGES_ACCEPTED); 1635 } 1636 1637 1642 public void setTaskMessageCompleted(boolean message) { 1643 1644 setTaskMessageSetting(message, CmsTaskService.TASK_MESSAGES_COMPLETED); 1645 } 1646 1647 1652 public void setTaskMessageForwarded(boolean message) { 1653 1654 setTaskMessageSetting(message, CmsTaskService.TASK_MESSAGES_FORWARDED); 1655 } 1656 1657 1662 public void setTaskMessageMembers(boolean message) { 1663 1664 setTaskMessageSetting(message, CmsTaskService.TASK_MESSAGES_MEMBERS); 1665 } 1666 1667 1673 private void setTaskMessageSetting(boolean set, int setting) { 1674 1675 if (set) { 1676 m_taskMessages |= setting; 1677 } else { 1678 m_taskMessages &= ~setting; 1679 } 1680 } 1681 1682 1687 public void setTaskMessageValue(int value) { 1688 1689 m_taskMessages = value; 1690 } 1691 1692 1697 public void setTaskShowAllProjects(boolean show) { 1698 1699 m_taskShowProjects = show; 1700 } 1701 1702 1707 public void setTaskStartupFilter(String filter) { 1708 1709 m_taskStartupfilter = filter; 1710 } 1711 1712 1717 public void setUser(CmsUser user) { 1718 1719 m_user = user; 1720 } 1721 1722 1727 public void setUseUploadApplet(boolean use) { 1728 1729 m_uploadApplet = use; 1730 } 1731 1732 1737 public void setWorkplaceButtonStyle(int style) { 1738 1739 m_workplaceButtonStyle = style; 1740 } 1741 1742 1747 public void setWorkplaceReportType(String type) { 1748 1749 m_workplaceReportType = type; 1750 } 1751 1752 1757 public boolean showExplorerFileDateCreated() { 1758 1759 return ((m_explorerSettings & CmsUserSettings.FILELIST_DATE_CREATED) > 0); 1760 } 1761 1762 1767 public boolean showExplorerFileDateExpired() { 1768 1769 return ((m_explorerSettings & CmsUserSettings.FILELIST_DATE_EXPIRED) > 0); 1770 } 1771 1772 1777 public boolean showExplorerFileDateLastModified() { 1778 1779 return ((m_explorerSettings & CmsUserSettings.FILELIST_DATE_LASTMODIFIED) > 0); 1780 } 1781 1782 1787 public boolean showExplorerFileDateReleased() { 1788 1789 return ((m_explorerSettings & CmsUserSettings.FILELIST_DATE_RELEASED) > 0); 1790 } 1791 1792 1797 public boolean showExplorerFileLockedBy() { 1798 1799 return ((m_explorerSettings & CmsUserSettings.FILELIST_LOCKEDBY) > 0); 1800 } 1801 1802 1807 public boolean showExplorerFilePermissions() { 1808 1809 return ((m_explorerSettings & CmsUserSettings.FILELIST_PERMISSIONS) > 0); 1810 } 1811 1812 1817 public boolean showExplorerFileSize() { 1818 1819 return ((m_explorerSettings & CmsUserSettings.FILELIST_SIZE) > 0); 1820 } 1821 1822 1827 public boolean showExplorerFileState() { 1828 1829 return ((m_explorerSettings & CmsUserSettings.FILELIST_STATE) > 0); 1830 } 1831 1832 1837 public boolean showExplorerFileTitle() { 1838 1839 return ((m_explorerSettings & CmsUserSettings.FILELIST_TITLE) > 0); 1840 } 1841 1842 1847 public boolean showExplorerFileType() { 1848 1849 return ((m_explorerSettings & CmsUserSettings.FILELIST_TYPE) > 0); 1850 } 1851 1852 1857 public boolean showExplorerFileUserCreated() { 1858 1859 return ((m_explorerSettings & CmsUserSettings.FILELIST_USER_CREATED) > 0); 1860 } 1861 1862 1867 public boolean showExplorerFileUserLastModified() { 1868 1869 return ((m_explorerSettings & CmsUserSettings.FILELIST_USER_LASTMODIFIED) > 0); 1870 } 1871 1872 1877 public boolean useUploadApplet() { 1878 1879 return m_uploadApplet; 1880 } 1881} 1882 | Popular Tags |