KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > opencms > db > CmsUserSettings


1 /*
2  * File : $Source: /usr/local/cvs/opencms/src/org/opencms/db/CmsUserSettings.java,v $
3  * Date : $Date: 2006/09/27 10:07:04 $
4  * Version: $Revision: 1.38 $
5  *
6  * This library is part of OpenCms -
7  * the Open Source Content Mananagement System
8  *
9  * Copyright (c) 2005 Alkacon Software GmbH (http://www.alkacon.com)
10  *
11  * This library is free software; you can redistribute it and/or
12  * modify it under the terms of the GNU Lesser General Public
13  * License as published by the Free Software Foundation; either
14  * version 2.1 of the License, or (at your option) any later version.
15  *
16  * This library is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19  * Lesser General Public License for more details.
20  *
21  * For further information about Alkacon Software GmbH, please see the
22  * company website: http://www.alkacon.com
23  *
24  * For further information about OpenCms, please see the
25  * project website: http://www.opencms.org
26  *
27  * You should have received a copy of the GNU Lesser General Public
28  * License along with this library; if not, write to the Free Software
29  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
30  */

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 JavaDoc;
46 import java.util.Locale JavaDoc;
47 import java.util.Map JavaDoc;
48
49 /**
50  * Object to conveniently access and modify the users workplace settings.<p>
51  *
52  * @author Andreas Zahner
53  * @author Michael Emmerich
54  *
55  * @version $Revision: 1.38 $
56  *
57  * @since 6.0.0
58  */

59 public class CmsUserSettings {
60
61     /** Key for additional info city. */
62     // Value must unfortunatly still be "USER_TOWN" or existing serialized user information will be lost
63
public static final String JavaDoc ADDITIONAL_INFO_CITY = "USER_TOWN";
64
65     /** Key for additional info of resources that were confirmemed by the user. */
66     public static final String JavaDoc ADDITIONAL_INFO_CONFIRMED_RESOURCES = "ADDITIONAL_INFO_CONFIRMED_RESOURCES";
67     /** Key for additional info address. */
68     public static final String JavaDoc ADDITIONAL_INFO_COUNTRY = "USER_COUNTRY";
69
70     /** Key for additional info default group. */
71     public static final String JavaDoc ADDITIONAL_INFO_DEFAULTGROUP = "USER_DEFAULTGROUP";
72
73     /** Key for additional info explorer settings. */
74     public static final String JavaDoc ADDITIONAL_INFO_EXPLORERSETTINGS = "USER_EXPLORERSETTINGS";
75
76     /** Key for additional info flags. */
77     public static final String JavaDoc ADDITIONAL_INFO_PREFERENCES = "USER_PREFERENCES";
78
79     /** Key for additional info start settings. */
80     public static final String JavaDoc ADDITIONAL_INFO_STARTSETTINGS = "USER_STARTSETTINGS";
81
82     /**
83      * Key for additional info city.
84      *
85      * @deprecated use {@link #ADDITIONAL_INFO_CITY} instead
86      */

87     public static final String JavaDoc ADDITIONAL_INFO_TOWN = "USER_TOWN";
88
89     /** Key for additional info address. */
90     public static final String JavaDoc ADDITIONAL_INFO_ZIPCODE = "USER_ZIPCODE";
91
92     /** The default button style. */
93     private static final int BUTTONSTYLE_DEFAULT = 1;
94
95     /** The default number of entries per page. */
96     private static final int ENTRYS_PER_PAGE_DEFAULT = 50;
97
98     /** Flag for displaying the date created column. */
99     public static final int FILELIST_DATE_CREATED = 1024;
100
101     /** Flag for displaying the date expired column. */
102     public static final int FILELIST_DATE_EXPIRED = 8192;
103
104     /** Flag for displaying the changed column. */
105     public static final int FILELIST_DATE_LASTMODIFIED = 4;
106
107     /** Flag for displaying the date released column. */
108     public static final int FILELIST_DATE_RELEASED = 4096;
109
110     /** Flag for displaying the locked column. */
111     public static final int FILELIST_LOCKEDBY = 256;
112
113     /** Flag for displaying the name column. */
114     public static final int FILELIST_NAME = 512;
115
116     /** Flag for displaying the access column. */
117     public static final int FILELIST_PERMISSIONS = 128;
118
119     /** Flag for displaying the size column. */
120     public static final int FILELIST_SIZE = 8;
121
122     /** Flag for displaying the state column. */
123     public static final int FILELIST_STATE = 16;
124
125     /** Flag for displaying the title column. */
126     public static final int FILELIST_TITLE = 1;
127
128     /** Flag for displaying the filetype column. */
129     public static final int FILELIST_TYPE = 2;
130
131     /** Flag for displaying the owner column. */
132     public static final int FILELIST_USER_CREATED = 32;
133
134     /** Flag for displaying the user who last modified column. */
135     public static final int FILELIST_USER_LASTMODIFIED = 2048;
136
137     /** Identifier prefix for all keys in the user additional info table. */
138     private static final String JavaDoc PREFERENCES = "USERPREFERENCES_";
139
140     /** Identifier for the project settings key. */
141     private static final String JavaDoc PROJECT_SETTINGS = "PROJECT_SETTINGS";
142
143     /** Identifier for the synchronize setting key. */
144     private static final String JavaDoc 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 JavaDoc m_editorSettings;
165
166     private int m_explorerButtonStyle;
167
168     private int m_explorerFileEntries;
169
170     private int m_explorerSettings;
171
172     private Locale JavaDoc m_locale;
173
174     /** Controls if the "create index page" checkbox in the new folder dialog should be initially be checked or not. */
175     private Boolean JavaDoc m_newFolderCreateIndexPage;
176
177     /** Controls if the "edit properties" checkbox in the new folder dialog should be initially be checked or not. */
178     private Boolean JavaDoc m_newFolderEditProperties;
179
180     private String JavaDoc m_project;
181
182     private CmsUserProjectSettings m_projectSettings;
183
184     private String JavaDoc m_publishButtonAppearance;
185
186     private boolean m_restrictExplorerView;
187
188     private boolean m_showExportSettings;
189
190     private boolean m_showLock;
191
192     private String JavaDoc m_startFolder;
193
194     private String JavaDoc m_startSite;
195
196     private CmsSynchronizeSettings m_synchronizeSettings;
197
198     private int m_taskMessages;
199
200     private boolean m_taskShowProjects;
201
202     private String JavaDoc m_taskStartupfilter;
203
204     private boolean m_uploadApplet;
205
206     private CmsUser m_user;
207
208     private String JavaDoc m_view;
209
210     private int m_workplaceButtonStyle;
211
212     private String JavaDoc m_workplaceReportType;
213
214     /**
215      * Creates an empty new user settings object.<p>
216      */

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 JavaDoc();
225         m_newFolderCreateIndexPage = Boolean.TRUE;
226         m_newFolderEditProperties = Boolean.TRUE;
227     }
228
229     /**
230      * Creates a user settings object with initialized settings of the current user.<p>
231      *
232      * @param cms the OpenCms context
233      */

234     public CmsUserSettings(CmsObject cms) {
235
236         init(cms, cms.getRequestContext().currentUser());
237     }
238
239     /**
240      * Creates a user settings object with initialized settings of the user.<p>
241      *
242      * @param cms the OpenCms context
243      * @param user the OpenCms user
244      */

245     public CmsUserSettings(CmsObject cms, CmsUser user) {
246
247         init(cms, user);
248     }
249
250     /**
251      * Creates a user settings object with initialized settings of the user.<p>
252      *
253      * Some default settings will be unset, if no cms object is given.<p>
254      *
255      * @param user the current CmsUser
256      *
257      * @see #CmsUserSettings(CmsObject, CmsUser)
258      */

259     public CmsUserSettings(CmsUser user) {
260
261         init(user);
262     }
263
264     /**
265      * Gets the default copy mode when copying a file of the user.<p>
266      *
267      * @return the default copy mode when copying a file of the user
268      */

269     public int getDialogCopyFileMode() {
270
271         return m_dialogFileCopy;
272     }
273
274     /**
275      * Gets the default copy mode when copying a folder of the user.<p>
276      *
277      * @return the default copy mode when copying a folder of the user
278      */

279     public int getDialogCopyFolderMode() {
280
281         return m_dialogFolderCopy;
282     }
283
284     /**
285      * Returns the default setting for file deletion.<p>
286      *
287      * @return the default setting for file deletion
288      */

289     public int getDialogDeleteFileMode() {
290
291         return m_dialogFileDelete;
292     }
293
294     /**
295      * Returns the default setting for expanding inherited permissions in the dialog.<p>
296      *
297      * @return true if inherited permissions should be expanded, otherwise false
298      */

299     public boolean getDialogExpandInheritedPermissions() {
300
301         return m_dialogExpandInheritedPermissions;
302     }
303
304     /**
305      * Returns the default setting for expanding the users permissions in the dialog.<p>
306      *
307      * @return true if the users permissions should be expanded, otherwise false
308      */

309     public boolean getDialogExpandUserPermissions() {
310
311         return m_dialogExpandUserPermissions;
312     }
313
314     /**
315      * Returns the default setting for inheriting permissions on folders.<p>
316      *
317      * @return true if permissions should be inherited on folders, otherwise false
318      */

319     public boolean getDialogPermissionsInheritOnFolder() {
320
321         return m_dialogPermissionsInheritOnFolder;
322     }
323
324     /**
325      * Returns the default setting for direct publishing.<p>
326      *
327      * @return the default setting for direct publishing: true if siblings should be published, otherwise false
328      */

329     public boolean getDialogPublishSiblings() {
330
331         return m_dialogDirectpublish;
332     }
333
334     /**
335      * Determines if the export part of the secure/export dialog should be shown.<p>
336      *
337      * @return true if the export dialog is shown, otherwise false
338      */

339     public boolean getDialogShowExportSettings() {
340
341         return m_showExportSettings;
342     }
343
344     /**
345      * Determines if the lock dialog should be shown.<p>
346      *
347      * @return true if the lock dialog is shown, otherwise false
348      */

349     public boolean getDialogShowLock() {
350
351         return m_showLock;
352     }
353
354     /**
355      * Returns the style of the direct edit buttons of the user.<p>
356      *
357      * @return the style of the direct edit buttons of the user
358      */

359     public int getDirectEditButtonStyle() {
360
361         return m_directeditButtonStyle;
362     }
363
364     /**
365      * Returns the style of the editor buttons of the user.<p>
366      *
367      * @return the style of the editor buttons of the user
368      */

369     public int getEditorButtonStyle() {
370
371         return m_editorButtonStyle;
372     }
373
374     /**
375      * Returns the editor settings of the user.<p>
376      *
377      * @return the editor settings of the user
378      */

379     public Map JavaDoc getEditorSettings() {
380
381         return m_editorSettings;
382     }
383
384     /**
385      * Returns the style of the explorer buttons of the user.<p>
386      *
387      * @return the style of the explorer buttons of the user
388      */

389     public int getExplorerButtonStyle() {
390
391         return m_explorerButtonStyle;
392     }
393
394     /**
395      * Returns the number of displayed files per page of the user.<p>
396      *
397      * @return the number of displayed files per page of the user
398      */

399     public int getExplorerFileEntries() {
400
401         return m_explorerFileEntries;
402     }
403
404     /**
405      * Returns the explorer start settings.<p>
406      *
407      * @return the explorer start settings
408      */

409     public int getExplorerSettings() {
410
411         return m_explorerSettings;
412     }
413
414     /**
415      * Returns the locale of the user.<p>
416      *
417      * @return the loclae of the user
418      */

419     public Locale JavaDoc getLocale() {
420
421         return m_locale;
422     }
423
424     /**
425      * Returns <code>{@link Boolean#TRUE}</code> if the "create index page" checkbox in the new folder
426      * dialog should be initially be checked or not. <p>
427      *
428      * @return <code>{@link Boolean#TRUE}</code> if the "create index page" checkbox in the new folder
429      * dialog should be initially be checked or not.
430      */

431     public Boolean JavaDoc getNewFolderCreateIndexPage() {
432
433         return m_newFolderCreateIndexPage;
434     }
435
436     /**
437      * Returns <code>{@link Boolean#TRUE}</code> if the "edit properties" checkbox in the new folder
438      * dialog should be initially be checked or not. <p>
439      *
440      * @return <code>{@link Boolean#TRUE}</code> if the "edit properties" checkbox in the new folder
441      * dialog should be initially be checked or not.
442      */

443     public Boolean JavaDoc getNewFolderEditProperties() {
444
445         return m_newFolderEditProperties;
446     }
447
448     /**
449      * Returns the preferred editor for the given resource type of the user.<p>
450      *
451      * @param resourceType the resource type
452      * @return the preferred editor for the resource type or null, if not specified
453      */

454     public String JavaDoc getPreferredEditor(String JavaDoc resourceType) {
455
456         return (String JavaDoc)m_editorSettings.get(resourceType);
457     }
458
459     /**
460      * Returns the project Settings.<p>
461      *
462      * @return the project Settings
463      */

464     public CmsUserProjectSettings getProjectSettings() {
465
466         return m_projectSettings;
467     }
468
469     /**
470      * Returns the appearance of the "publish project" button.<p>
471      *
472      * @return the appearance of the "publish project" button
473      */

474     public String JavaDoc getPublishButtonAppearance() {
475
476         return m_publishButtonAppearance;
477     }
478
479     /**
480      * Sets if the explorer view is restricted to the defined site and folder.<p>
481      *
482      * @return true if the explorer view is restricted, otherwise false
483      */

484     public boolean getRestrictExplorerView() {
485
486         return m_restrictExplorerView;
487     }
488
489     /**
490      * Returns the start folder of the user.<p>
491      *
492      * @return the start folder of the user
493      */

494     public String JavaDoc getStartFolder() {
495
496         return m_startFolder;
497     }
498
499     /**
500      * Returns the start project of the user.<p>
501      *
502      * @return the start project of the user
503      */

504     public String JavaDoc getStartProject() {
505
506         return m_project;
507     }
508
509     /**
510      * Returns the start site of the user.<p>
511      *
512      * @return the start site of the user
513      */

514     public String JavaDoc getStartSite() {
515
516         return m_startSite;
517     }
518
519     /**
520      * Returns the current start view of the user.<p>
521      *
522      * @return the current start view of the user
523      */

524     public String JavaDoc getStartView() {
525
526         return m_view;
527     }
528
529     /**
530      * Returns the (optional) workplace synchronize settings.<p>
531      *
532      * @return the (optional) workplace synchronize settings
533      */

534     public CmsSynchronizeSettings getSynchronizeSettings() {
535
536         return m_synchronizeSettings;
537     }
538
539     /**
540      * Determines if a message should be sent if the task is accepted.<p>
541      *
542      * @return true if a message should be sent if the task is accepted, otherwise false
543      */

544     public boolean getTaskMessageAccepted() {
545
546         return ((m_taskMessages & CmsTaskService.TASK_MESSAGES_ACCEPTED) > 0);
547     }
548
549     /**
550      * Determines if a message should be sent if the task is completed.<p>
551      *
552      * @return true if a message should be sent if the task is completed, otherwise false
553      */

554     public boolean getTaskMessageCompleted() {
555
556         return ((m_taskMessages & CmsTaskService.TASK_MESSAGES_COMPLETED) > 0);
557     }
558
559     /**
560      * Determines if a message should be sent if the task is forwarded.<p>
561      *
562      * @return true if a message should be sent if the task is forwarded, otherwise false
563      */

564     public boolean getTaskMessageForwarded() {
565
566         return ((m_taskMessages & CmsTaskService.TASK_MESSAGES_FORWARDED) > 0);
567     }
568
569     /**
570      * Determines if all role members should be informed about the task.<p>
571      *
572      * @return true if all role members should be informed about the task, otherwise false
573      */

574     public boolean getTaskMessageMembers() {
575
576         return ((m_taskMessages & CmsTaskService.TASK_MESSAGES_MEMBERS) > 0);
577     }
578
579     /**
580      * Returns the task messages value for the tasks view.<p>
581      *
582      * @return task messages value for the tasks view
583      */

584     public int getTaskMessageValue() {
585
586         return m_taskMessages;
587     }
588
589     /**
590      * Determines if all projects should be shown in tasks view.<p>
591      *
592      * @return true if all projects should be shown in tasks view, otherwise false
593      */

594     public boolean getTaskShowAllProjects() {
595
596         return m_taskShowProjects;
597     }
598
599     /**
600      * Returns the startup filter for the tasks view.<p>
601      *
602      * @return the startup filter for the tasks view
603      */

604     public String JavaDoc getTaskStartupFilter() {
605
606         return m_taskStartupfilter;
607     }
608
609     /**
610      * Returns the current user for the settings.<p>
611      *
612      * @return the CmsUser
613      */

614     public CmsUser getUser() {
615
616         return m_user;
617     }
618
619     /**
620      * Returns the style of the workplace buttons of the user.<p>
621      *
622      * @return the style of the workplace buttons of the user
623      */

624     public int getWorkplaceButtonStyle() {
625
626         return m_workplaceButtonStyle;
627     }
628
629     /**
630      * Returns the type of the report (simple or extended) of the user.<p>
631      *
632      * @return the type of the report (simple or extended) of the user
633      */

634     public String JavaDoc getWorkplaceReportType() {
635
636         return m_workplaceReportType;
637     }
638
639     /**
640      * Initializes the user settings with the given users setting parameters.<p>
641      *
642      * @param cms the OpenCms context
643      * @param user the current CmsUser
644      */

645     public void init(CmsObject cms, CmsUser user) {
646
647         m_user = user;
648
649         // try to initialize the User Settings with the values stored in the user object.
650
// if no values are found, the default user settings will be used.
651

652         // workplace button style
653
try {
654             m_workplaceButtonStyle = ((Integer JavaDoc)m_user.getAdditionalInfo(PREFERENCES
655                 + CmsWorkplaceConfiguration.N_WORKPLACEGENERALOPTIONS
656                 + CmsWorkplaceConfiguration.N_BUTTONSTYLE)).intValue();
657         } catch (Throwable JavaDoc t) {
658             m_workplaceButtonStyle = OpenCms.getWorkplaceManager().getDefaultUserSettings().getWorkplaceButtonStyle();
659         }
660         // workplace report type
661
m_workplaceReportType = ((String JavaDoc)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         // workplace uploadapplet mode
668
try {
669             m_uploadApplet = ((Boolean JavaDoc)m_user.getAdditionalInfo(PREFERENCES
670                 + CmsWorkplaceConfiguration.N_WORKPLACEGENERALOPTIONS
671                 + CmsWorkplaceConfiguration.N_UPLOADAPPLET)).booleanValue();
672         } catch (Throwable JavaDoc t) {
673             m_uploadApplet = OpenCms.getWorkplaceManager().getDefaultUserSettings().useUploadApplet();
674         }
675         // locale
676
m_locale = (Locale JavaDoc)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         // start project
683
try {
684             m_project = ((String JavaDoc)m_user.getAdditionalInfo(PREFERENCES
685                 + CmsWorkplaceConfiguration.N_WORKPLACESTARTUPSETTINGS
686                 + CmsWorkplaceConfiguration.N_PROJECT));
687         } catch (Throwable JavaDoc t) {
688             m_project = null;
689         }
690         if (m_project == null) {
691             m_project = OpenCms.getWorkplaceManager().getDefaultUserSettings().getStartProject();
692         }
693         // start view
694
m_view = ((String JavaDoc)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         // explorer button style
701
try {
702             m_explorerButtonStyle = ((Integer JavaDoc)m_user.getAdditionalInfo(PREFERENCES
703                 + CmsWorkplaceConfiguration.N_EXPLORERGENERALOPTIONS
704                 + CmsWorkplaceConfiguration.N_BUTTONSTYLE)).intValue();
705         } catch (Throwable JavaDoc t) {
706             m_explorerButtonStyle = OpenCms.getWorkplaceManager().getDefaultUserSettings().getExplorerButtonStyle();
707         }
708         // explorer file entires
709
try {
710             m_explorerFileEntries = ((Integer JavaDoc)m_user.getAdditionalInfo(PREFERENCES
711                 + CmsWorkplaceConfiguration.N_EXPLORERGENERALOPTIONS
712                 + CmsWorkplaceConfiguration.N_ENTRIES)).intValue();
713         } catch (Throwable JavaDoc t) {
714             m_explorerFileEntries = OpenCms.getWorkplaceManager().getDefaultUserSettings().getExplorerFileEntries();
715         }
716         // explorer settings
717
try {
718             m_explorerSettings = ((Integer JavaDoc)m_user.getAdditionalInfo(PREFERENCES
719                 + CmsWorkplaceConfiguration.N_EXPLORERGENERALOPTIONS
720                 + CmsWorkplaceConfiguration.N_EXPLORERDISPLAYOPTIONS)).intValue();
721         } catch (Throwable JavaDoc t) {
722             m_explorerSettings = OpenCms.getWorkplaceManager().getDefaultUserSettings().getExplorerSettings();
723         }
724         // dialog file copy mode
725
try {
726             m_dialogFileCopy = ((Integer JavaDoc)m_user.getAdditionalInfo(PREFERENCES
727                 + CmsWorkplaceConfiguration.N_DIALOGSDEFAULTSETTINGS
728                 + CmsWorkplaceConfiguration.N_FILECOPY)).intValue();
729         } catch (Throwable JavaDoc t) {
730             m_dialogFileCopy = OpenCms.getWorkplaceManager().getDefaultUserSettings().getDialogCopyFileMode();
731         }
732         // dialog folder copy mode
733
try {
734             m_dialogFolderCopy = ((Integer JavaDoc)m_user.getAdditionalInfo(PREFERENCES
735                 + CmsWorkplaceConfiguration.N_DIALOGSDEFAULTSETTINGS
736                 + CmsWorkplaceConfiguration.N_FOLDERCOPY)).intValue();
737         } catch (Throwable JavaDoc t) {
738             m_dialogFolderCopy = OpenCms.getWorkplaceManager().getDefaultUserSettings().getDialogCopyFolderMode();
739         }
740         // dialog file delete mode
741
try {
742             m_dialogFileDelete = ((Integer JavaDoc)m_user.getAdditionalInfo(PREFERENCES
743                 + CmsWorkplaceConfiguration.N_DIALOGSDEFAULTSETTINGS
744                 + CmsWorkplaceConfiguration.N_FILEDELETION)).intValue();
745         } catch (Throwable JavaDoc t) {
746             m_dialogFileDelete = OpenCms.getWorkplaceManager().getDefaultUserSettings().getDialogDeleteFileMode();
747         }
748         // dialog directpublish mode
749
try {
750             m_dialogDirectpublish = ((Boolean JavaDoc)m_user.getAdditionalInfo(PREFERENCES
751                 + CmsWorkplaceConfiguration.N_DIALOGSDEFAULTSETTINGS
752                 + CmsWorkplaceConfiguration.N_DIRECTPUBLISH)).booleanValue();
753         } catch (Throwable JavaDoc t) {
754             m_dialogDirectpublish = OpenCms.getWorkplaceManager().getDefaultUserSettings().getDialogPublishSiblings();
755         }
756         // dialog show lock mode
757
try {
758             m_showLock = ((Boolean JavaDoc)m_user.getAdditionalInfo(PREFERENCES
759                 + CmsWorkplaceConfiguration.N_DIALOGSDEFAULTSETTINGS
760                 + CmsWorkplaceConfiguration.N_SHOWLOCK)).booleanValue();
761         } catch (Throwable JavaDoc t) {
762             m_showLock = OpenCms.getWorkplaceManager().getDefaultUserSettings().getDialogShowLock();
763         }
764         // dialog show export settings mode
765
try {
766             m_showExportSettings = ((Boolean JavaDoc)m_user.getAdditionalInfo(PREFERENCES
767                 + CmsWorkplaceConfiguration.N_DIALOGSDEFAULTSETTINGS
768                 + CmsWorkplaceConfiguration.N_SHOWEXPORTSETTINGS)).booleanValue();
769         } catch (Throwable JavaDoc t) {
770             m_showExportSettings = OpenCms.getWorkplaceManager().getDefaultUserSettings().getDialogShowExportSettings();
771         }
772         // dialog permissions inheritation mode
773
try {
774             m_dialogPermissionsInheritOnFolder = ((Boolean JavaDoc)m_user.getAdditionalInfo(PREFERENCES
775                 + CmsWorkplaceConfiguration.N_DIALOGSDEFAULTSETTINGS
776                 + CmsWorkplaceConfiguration.N_PERMISSIONSINHERITONFOLDER)).booleanValue();
777         } catch (Throwable JavaDoc t) {
778             m_dialogPermissionsInheritOnFolder = OpenCms.getWorkplaceManager().getDefaultUserSettings().getDialogPermissionsInheritOnFolder();
779         }
780         // dialog expand inherited permissions mode
781
try {
782             m_dialogExpandInheritedPermissions = ((Boolean JavaDoc)m_user.getAdditionalInfo(PREFERENCES
783                 + CmsWorkplaceConfiguration.N_DIALOGSDEFAULTSETTINGS
784                 + CmsWorkplaceConfiguration.N_EXPANDPERMISSIONSINHERITED)).booleanValue();
785         } catch (Throwable JavaDoc t) {
786             m_dialogExpandInheritedPermissions = OpenCms.getWorkplaceManager().getDefaultUserSettings().getDialogExpandInheritedPermissions();
787         }
788         // dialog expand users permissions mode
789
try {
790             m_dialogExpandUserPermissions = ((Boolean JavaDoc)m_user.getAdditionalInfo(PREFERENCES
791                 + CmsWorkplaceConfiguration.N_DIALOGSDEFAULTSETTINGS
792                 + CmsWorkplaceConfiguration.N_EXPANDPERMISSIONSUSER)).booleanValue();
793         } catch (Throwable JavaDoc t) {
794             m_dialogExpandUserPermissions = OpenCms.getWorkplaceManager().getDefaultUserSettings().getDialogExpandUserPermissions();
795         }
796         // editor button style
797
try {
798             m_editorButtonStyle = ((Integer JavaDoc)m_user.getAdditionalInfo(PREFERENCES
799                 + CmsWorkplaceConfiguration.N_EDITORGENERALOPTIONS
800                 + CmsWorkplaceConfiguration.N_BUTTONSTYLE)).intValue();
801         } catch (Throwable JavaDoc t) {
802             m_editorButtonStyle = OpenCms.getWorkplaceManager().getDefaultUserSettings().getEditorButtonStyle();
803         }
804         // directedit button style
805
try {
806             m_directeditButtonStyle = ((Integer JavaDoc)m_user.getAdditionalInfo(PREFERENCES
807                 + CmsWorkplaceConfiguration.N_EDITORGENERALOPTIONS
808                 + CmsWorkplaceConfiguration.N_DIRECTEDITSTYLE)).intValue();
809         } catch (Throwable JavaDoc t) {
810             m_directeditButtonStyle = OpenCms.getWorkplaceManager().getDefaultUserSettings().getDirectEditButtonStyle();
811         }
812         // editor settings
813
m_editorSettings = (HashMap JavaDoc)m_user.getAdditionalInfo(PREFERENCES
814             + CmsWorkplaceConfiguration.N_EDITORPREFERREDEDITORS);
815         if (m_editorSettings == null) {
816             m_editorSettings = new HashMap JavaDoc(OpenCms.getWorkplaceManager().getDefaultUserSettings().getEditorSettings());
817         }
818         // task startupfilter
819
m_taskStartupfilter = (String JavaDoc)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         // task show all projects
826
try {
827             m_taskShowProjects = ((Boolean JavaDoc)m_user.getAdditionalInfo(PREFERENCES
828                 + CmsWorkplaceConfiguration.N_WORKFLOWGENERALOPTIONS
829                 + CmsWorkplaceConfiguration.N_SHOWPROJECTS)).booleanValue();
830         } catch (Throwable JavaDoc t) {
831             m_taskShowProjects = OpenCms.getWorkplaceManager().getDefaultUserSettings().getTaskShowAllProjects();
832         }
833         // task messages
834
try {
835             m_taskMessages = ((Integer JavaDoc)m_user.getAdditionalInfo(PREFERENCES
836                 + CmsWorkplaceConfiguration.N_WORKFLOWDEFAULTSETTINGS)).intValue();
837         } catch (Throwable JavaDoc t) {
838             m_taskMessages = OpenCms.getWorkplaceManager().getDefaultUserSettings().getTaskMessageValue();
839         }
840
841         // start site
842
m_startSite = ((String JavaDoc)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         // start folder
849
m_startFolder = ((String JavaDoc)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         // restrict explorer folder view
857
try {
858             m_restrictExplorerView = ((Boolean JavaDoc)m_user.getAdditionalInfo(PREFERENCES
859                 + CmsWorkplaceConfiguration.N_WORKPLACESTARTUPSETTINGS
860                 + CmsWorkplaceConfiguration.N_RESTRICTEXPLORERVIEW)).booleanValue();
861         } catch (Throwable JavaDoc t) {
862             m_restrictExplorerView = OpenCms.getWorkplaceManager().getDefaultUserSettings().getRestrictExplorerView();
863         }
864
865         // synchronize settings
866
try {
867             m_synchronizeSettings = ((CmsSynchronizeSettings)m_user.getAdditionalInfo(PREFERENCES + SYNC_SETTINGS));
868         } catch (Throwable JavaDoc t) {
869             // default is to disable the synchronize settings
870
m_synchronizeSettings = null;
871         }
872
873         // project settings
874
try {
875             m_projectSettings = ((CmsUserProjectSettings)m_user.getAdditionalInfo(PREFERENCES + PROJECT_SETTINGS));
876         } catch (Throwable JavaDoc t) {
877             m_projectSettings = null;
878         }
879         if (m_projectSettings == null) {
880             // default
881
m_projectSettings = new CmsUserProjectSettings();
882             m_projectSettings.setDeleteAfterPublishing(false);
883             try {
884                 m_projectSettings.setManagerGroup(cms.readGroup(OpenCms.getDefaultUsers().getGroupProjectmanagers()).getId());
885             } catch (Exception JavaDoc e) {
886                 // ignore
887
}
888             try {
889                 m_projectSettings.setUserGroup(cms.readGroup(OpenCms.getDefaultUsers().getGroupUsers()).getId());
890             } catch (Exception JavaDoc e) {
891                 // ignore
892
}
893             m_projectSettings.setProjectFilesMode(CmsProjectResourcesDisplayMode.ALL_CHANGES);
894         }
895
896         try {
897             save(null);
898         } catch (CmsException e) {
899             // to nothing here
900
}
901     }
902
903     /**
904      * Initializes the user settings with the given users setting parameters.<p>
905      *
906      * Some default settings will be unset, if no cms object is given.<p>
907      *
908      * @param user the current CmsUser
909      *
910      * @see #init(CmsObject, CmsUser)
911      */

912     public void init(CmsUser user) {
913
914         init(null, user);
915     }
916
917     /**
918      * Saves the changed settings of the user to the user object.<p>
919      *
920      * If the given CmsObject is null, the additional user infos are only updated in memory
921      * and not saved into the database.<p>
922      *
923      * @param cms the CmsObject needed to write the user to the db
924      * @throws CmsException if user cannot be written to the db
925      */

926     public void save(CmsObject cms) throws CmsException {
927
928         // only set those values that are different than the default values
929
// if the user info should be updated in the databas (i.e. the CmsObject != null)
930
// all values that are equal to the defaul values must be deleted form the additinal
931
// user settings.
932

933         // workplace button style
934
if (getWorkplaceButtonStyle() != OpenCms.getWorkplaceManager().getDefaultUserSettings().getWorkplaceButtonStyle()) {
935             m_user.setAdditionalInfo(PREFERENCES
936                 + CmsWorkplaceConfiguration.N_WORKPLACEGENERALOPTIONS
937                 + CmsWorkplaceConfiguration.N_BUTTONSTYLE, new Integer JavaDoc(getWorkplaceButtonStyle()));
938         } else if (cms != null) {
939             m_user.deleteAdditionalInfo(PREFERENCES
940                 + CmsWorkplaceConfiguration.N_WORKPLACEGENERALOPTIONS
941                 + CmsWorkplaceConfiguration.N_BUTTONSTYLE);
942         }
943         // workplace report type
944
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         // workplace uploadapplet
955
if (useUploadApplet() != OpenCms.getWorkplaceManager().getDefaultUserSettings().useUploadApplet()) {
956             m_user.setAdditionalInfo(PREFERENCES
957                 + CmsWorkplaceConfiguration.N_WORKPLACEGENERALOPTIONS
958                 + CmsWorkplaceConfiguration.N_UPLOADAPPLET, new Boolean JavaDoc(useUploadApplet()));
959         } else if (cms != null) {
960             m_user.deleteAdditionalInfo(PREFERENCES
961                 + CmsWorkplaceConfiguration.N_WORKPLACEGENERALOPTIONS
962                 + CmsWorkplaceConfiguration.N_UPLOADAPPLET);
963         }
964         // locale
965
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         // startproject
975
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         // view
985
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         // explorer button style
995
if (getExplorerButtonStyle() != OpenCms.getWorkplaceManager().getDefaultUserSettings().getExplorerButtonStyle()) {
996             m_user.setAdditionalInfo(PREFERENCES
997                 + CmsWorkplaceConfiguration.N_EXPLORERGENERALOPTIONS
998                 + CmsWorkplaceConfiguration.N_BUTTONSTYLE, new Integer JavaDoc(getExplorerButtonStyle()));
999         } else if (cms != null) {
1000            m_user.deleteAdditionalInfo(PREFERENCES
1001                + CmsWorkplaceConfiguration.N_EXPLORERGENERALOPTIONS
1002                + CmsWorkplaceConfiguration.N_BUTTONSTYLE);
1003        }
1004        // explorer file entires
1005
if (getExplorerFileEntries() != OpenCms.getWorkplaceManager().getDefaultUserSettings().getExplorerFileEntries()) {
1006            m_user.setAdditionalInfo(PREFERENCES
1007                + CmsWorkplaceConfiguration.N_EXPLORERGENERALOPTIONS
1008                + CmsWorkplaceConfiguration.N_ENTRIES, new Integer JavaDoc(getExplorerFileEntries()));
1009        } else if (cms != null) {
1010            m_user.deleteAdditionalInfo(PREFERENCES
1011                + CmsWorkplaceConfiguration.N_EXPLORERGENERALOPTIONS
1012                + CmsWorkplaceConfiguration.N_ENTRIES);
1013        }
1014        // explorer settings
1015
if (getExplorerSettings() != OpenCms.getWorkplaceManager().getDefaultUserSettings().getExplorerSettings()) {
1016            m_user.setAdditionalInfo(PREFERENCES
1017                + CmsWorkplaceConfiguration.N_EXPLORERGENERALOPTIONS
1018                + CmsWorkplaceConfiguration.N_EXPLORERDISPLAYOPTIONS, new Integer JavaDoc(getExplorerSettings()));
1019        } else if (cms != null) {
1020            m_user.deleteAdditionalInfo(PREFERENCES
1021                + CmsWorkplaceConfiguration.N_EXPLORERGENERALOPTIONS
1022                + CmsWorkplaceConfiguration.N_EXPLORERDISPLAYOPTIONS);
1023        }
1024        // dialog file copy mode
1025
if (getDialogCopyFileMode() != OpenCms.getWorkplaceManager().getDefaultUserSettings().getDialogCopyFileMode()) {
1026            m_user.setAdditionalInfo(PREFERENCES
1027                + CmsWorkplaceConfiguration.N_DIALOGSDEFAULTSETTINGS
1028                + CmsWorkplaceConfiguration.N_FILECOPY, new Integer JavaDoc(getDialogCopyFileMode()));
1029        } else if (cms != null) {
1030            m_user.deleteAdditionalInfo(PREFERENCES
1031                + CmsWorkplaceConfiguration.N_DIALOGSDEFAULTSETTINGS
1032                + CmsWorkplaceConfiguration.N_FILECOPY);
1033        }
1034        // dialog folder copy mode
1035
if (getDialogCopyFolderMode() != OpenCms.getWorkplaceManager().getDefaultUserSettings().getDialogCopyFolderMode()) {
1036            m_user.setAdditionalInfo(PREFERENCES
1037                + CmsWorkplaceConfiguration.N_DIALOGSDEFAULTSETTINGS
1038                + CmsWorkplaceConfiguration.N_FOLDERCOPY, new Integer JavaDoc(getDialogCopyFolderMode()));
1039        } else if (cms != null) {
1040            m_user.deleteAdditionalInfo(PREFERENCES
1041                + CmsWorkplaceConfiguration.N_DIALOGSDEFAULTSETTINGS
1042                + CmsWorkplaceConfiguration.N_FOLDERCOPY);
1043        }
1044        // dialog file delete mode
1045
if (getDialogDeleteFileMode() != OpenCms.getWorkplaceManager().getDefaultUserSettings().getDialogDeleteFileMode()) {
1046            m_user.setAdditionalInfo(PREFERENCES
1047                + CmsWorkplaceConfiguration.N_DIALOGSDEFAULTSETTINGS
1048                + CmsWorkplaceConfiguration.N_FILEDELETION, new Integer JavaDoc(getDialogDeleteFileMode()));
1049        } else if (cms != null) {
1050            m_user.deleteAdditionalInfo(PREFERENCES
1051                + CmsWorkplaceConfiguration.N_DIALOGSDEFAULTSETTINGS
1052                + CmsWorkplaceConfiguration.N_FILEDELETION);
1053        }
1054        // dialog directpublish mode
1055
if (getDialogPublishSiblings() != OpenCms.getWorkplaceManager().getDefaultUserSettings().getDialogPublishSiblings()) {
1056            m_user.setAdditionalInfo(PREFERENCES
1057                + CmsWorkplaceConfiguration.N_DIALOGSDEFAULTSETTINGS
1058                + CmsWorkplaceConfiguration.N_DIRECTPUBLISH, new Boolean JavaDoc(getDialogPublishSiblings()));
1059        } else if (cms != null) {
1060            m_user.deleteAdditionalInfo(PREFERENCES
1061                + CmsWorkplaceConfiguration.N_DIALOGSDEFAULTSETTINGS
1062                + CmsWorkplaceConfiguration.N_DIRECTPUBLISH);
1063        }
1064        // dialog show lock mode
1065
if (getDialogShowLock() != OpenCms.getWorkplaceManager().getDefaultUserSettings().getDialogShowLock()) {
1066            m_user.setAdditionalInfo(PREFERENCES
1067                + CmsWorkplaceConfiguration.N_DIALOGSDEFAULTSETTINGS
1068                + CmsWorkplaceConfiguration.N_SHOWLOCK, new Boolean JavaDoc(getDialogShowLock()));
1069        } else if (cms != null) {
1070            m_user.deleteAdditionalInfo(PREFERENCES
1071                + CmsWorkplaceConfiguration.N_DIALOGSDEFAULTSETTINGS
1072                + CmsWorkplaceConfiguration.N_SHOWLOCK);
1073        }
1074        // dialog permissions inheritation mode
1075
if (getDialogPermissionsInheritOnFolder() != OpenCms.getWorkplaceManager().getDefaultUserSettings().getDialogPermissionsInheritOnFolder()) {
1076            m_user.setAdditionalInfo(PREFERENCES
1077                + CmsWorkplaceConfiguration.N_DIALOGSDEFAULTSETTINGS
1078                + CmsWorkplaceConfiguration.N_PERMISSIONSINHERITONFOLDER, new Boolean JavaDoc(
1079                getDialogPermissionsInheritOnFolder()));
1080        } else if (cms != null) {
1081            m_user.deleteAdditionalInfo(PREFERENCES
1082                + CmsWorkplaceConfiguration.N_DIALOGSDEFAULTSETTINGS
1083                + CmsWorkplaceConfiguration.N_PERMISSIONSINHERITONFOLDER);
1084        }
1085        // dialog expand inherited permissions mode
1086
if (getDialogExpandInheritedPermissions() != OpenCms.getWorkplaceManager().getDefaultUserSettings().getDialogExpandInheritedPermissions()) {
1087            m_user.setAdditionalInfo(PREFERENCES
1088                + CmsWorkplaceConfiguration.N_DIALOGSDEFAULTSETTINGS
1089                + CmsWorkplaceConfiguration.N_EXPANDPERMISSIONSINHERITED, new Boolean JavaDoc(
1090                getDialogExpandInheritedPermissions()));
1091        } else if (cms != null) {
1092            m_user.deleteAdditionalInfo(PREFERENCES
1093                + CmsWorkplaceConfiguration.N_DIALOGSDEFAULTSETTINGS
1094                + CmsWorkplaceConfiguration.N_EXPANDPERMISSIONSINHERITED);
1095        }
1096        // dialog expand users permissions mode
1097
if (getDialogExpandUserPermissions() != OpenCms.getWorkplaceManager().getDefaultUserSettings().getDialogExpandUserPermissions()) {
1098            m_user.setAdditionalInfo(PREFERENCES
1099                + CmsWorkplaceConfiguration.N_DIALOGSDEFAULTSETTINGS
1100                + CmsWorkplaceConfiguration.N_EXPANDPERMISSIONSUSER, new Boolean JavaDoc(getDialogExpandUserPermissions()));
1101        } else if (cms != null) {
1102            m_user.deleteAdditionalInfo(PREFERENCES
1103                + CmsWorkplaceConfiguration.N_DIALOGSDEFAULTSETTINGS
1104                + CmsWorkplaceConfiguration.N_EXPANDPERMISSIONSUSER);
1105        }
1106        // editor button style
1107
if (getEditorButtonStyle() != OpenCms.getWorkplaceManager().getDefaultUserSettings().getEditorButtonStyle()) {
1108            m_user.setAdditionalInfo(PREFERENCES
1109                + CmsWorkplaceConfiguration.N_EDITORGENERALOPTIONS
1110                + CmsWorkplaceConfiguration.N_BUTTONSTYLE, new Integer JavaDoc(getEditorButtonStyle()));
1111        } else if (cms != null) {
1112            m_user.deleteAdditionalInfo(PREFERENCES
1113                + CmsWorkplaceConfiguration.N_EDITORGENERALOPTIONS
1114                + CmsWorkplaceConfiguration.N_BUTTONSTYLE);
1115        }
1116        // directedit button style
1117
if (getDirectEditButtonStyle() != OpenCms.getWorkplaceManager().getDefaultUserSettings().getDirectEditButtonStyle()) {
1118            m_user.setAdditionalInfo(PREFERENCES
1119                + CmsWorkplaceConfiguration.N_EDITORGENERALOPTIONS
1120                + CmsWorkplaceConfiguration.N_DIRECTEDITSTYLE, new Integer JavaDoc(getDirectEditButtonStyle()));
1121        } else if (cms != null) {
1122            m_user.deleteAdditionalInfo(PREFERENCES
1123                + CmsWorkplaceConfiguration.N_EDITORGENERALOPTIONS
1124                + CmsWorkplaceConfiguration.N_DIRECTEDITSTYLE);
1125        }
1126        // editorsettings
1127
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        // task startup filter
1133
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        // task show all projects
1144
if (getTaskShowAllProjects() != OpenCms.getWorkplaceManager().getDefaultUserSettings().getTaskShowAllProjects()) {
1145            m_user.setAdditionalInfo(PREFERENCES
1146                + CmsWorkplaceConfiguration.N_WORKFLOWGENERALOPTIONS
1147                + CmsWorkplaceConfiguration.N_SHOWPROJECTS, new Boolean JavaDoc(getTaskShowAllProjects()));
1148        } else if (cms != null) {
1149            m_user.deleteAdditionalInfo(PREFERENCES
1150                + CmsWorkplaceConfiguration.N_WORKFLOWGENERALOPTIONS
1151                + CmsWorkplaceConfiguration.N_SHOWPROJECTS);
1152        }
1153        // task messages
1154
if (getTaskMessageValue() != OpenCms.getWorkplaceManager().getDefaultUserSettings().getTaskMessageValue()) {
1155            m_user.setAdditionalInfo(PREFERENCES + CmsWorkplaceConfiguration.N_WORKFLOWDEFAULTSETTINGS, new Integer JavaDoc(
1156                m_taskMessages));
1157        } else if (cms != null) {
1158            m_user.deleteAdditionalInfo(PREFERENCES + CmsWorkplaceConfiguration.N_WORKFLOWDEFAULTSETTINGS);
1159        }
1160
1161        // start site
1162
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        // start folder
1172
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        // restrict explorer folder view
1184
if (getRestrictExplorerView() != OpenCms.getWorkplaceManager().getDefaultUserSettings().getRestrictExplorerView()) {
1185            m_user.setAdditionalInfo(PREFERENCES
1186                + CmsWorkplaceConfiguration.N_WORKPLACESTARTUPSETTINGS
1187                + CmsWorkplaceConfiguration.N_RESTRICTEXPLORERVIEW, new Boolean JavaDoc(getRestrictExplorerView()));
1188        } else if (cms != null) {
1189            m_user.deleteAdditionalInfo(PREFERENCES
1190                + CmsWorkplaceConfiguration.N_WORKPLACESTARTUPSETTINGS
1191                + CmsWorkplaceConfiguration.N_RESTRICTEXPLORERVIEW);
1192        }
1193
1194        // synchronize settings
1195
if (getSynchronizeSettings() != null) {
1196            m_user.setAdditionalInfo(PREFERENCES + SYNC_SETTINGS, getSynchronizeSettings());
1197        } else {
1198            m_user.deleteAdditionalInfo(PREFERENCES + SYNC_SETTINGS);
1199        }
1200
1201        // project settings
1202
if (getProjectSettings() != null) {
1203            m_user.setAdditionalInfo(PREFERENCES + PROJECT_SETTINGS, getProjectSettings());
1204        } else {
1205            m_user.deleteAdditionalInfo(PREFERENCES + PROJECT_SETTINGS);
1206        }
1207
1208        // only write the updated user to the DB if we have the cms object
1209
if (cms != null) {
1210            cms.writeUser(m_user);
1211        }
1212    }
1213
1214    /**
1215     * Sets the default copy mode when copying a file of the user.<p>
1216     *
1217     * @param mode the default copy mode when copying a file of the user
1218     */

1219    public void setDialogCopyFileMode(int mode) {
1220
1221        m_dialogFileCopy = mode;
1222    }
1223
1224    /**
1225     * Sets the default copy mode when copying a folder of the user.<p>
1226     *
1227     * @param mode the default copy mode when copying a folder of the user
1228     */

1229    public void setDialogCopyFolderMode(int mode) {
1230
1231        m_dialogFolderCopy = mode;
1232    }
1233
1234    /**
1235     * Sets the default setting for file deletion.<p>
1236     *
1237     * @param mode the default setting for file deletion
1238     */

1239    public void setDialogDeleteFileMode(int mode) {
1240
1241        m_dialogFileDelete = mode;
1242    }
1243
1244    /**
1245     * Sets the default setting for expanding inherited permissions in the dialog.<p>
1246     *
1247     * @param dialogShowInheritedPermissions the default setting for expanding inherited permissions in the dialog
1248     */

1249    public void setDialogExpandInheritedPermissions(boolean dialogShowInheritedPermissions) {
1250
1251        m_dialogExpandInheritedPermissions = dialogShowInheritedPermissions;
1252    }
1253
1254    /**
1255     * Sets the default setting for expanding the users permissions in the dialog.<p>
1256     *
1257     * @param dialogShowUserPermissions the default setting for expanding the users permissions in the dialog
1258     */

1259    public void setDialogExpandUserPermissions(boolean dialogShowUserPermissions) {
1260
1261        m_dialogExpandUserPermissions = dialogShowUserPermissions;
1262    }
1263
1264    /**
1265     * Sets the default setting for inheriting permissions on folders.<p>
1266     *
1267     * @param dialogPermissionsInheritOnFolder the default setting for inheriting permissions on folders
1268     */

1269    public void setDialogPermissionsInheritOnFolder(boolean dialogPermissionsInheritOnFolder) {
1270
1271        m_dialogPermissionsInheritOnFolder = dialogPermissionsInheritOnFolder;
1272    }
1273
1274    /**
1275     * Sets the default setting for direct publishing.<p>
1276     *
1277     * @param publishSiblings the default setting for direct publishing: true if siblings should be published, otherwise false
1278     */

1279    public void setDialogPublishSiblings(boolean publishSiblings) {
1280
1281        m_dialogDirectpublish = publishSiblings;
1282    }
1283
1284    /**
1285     * Sets if the export setting part of the secure/export dialog should be shown.<p>
1286     *
1287     * @param show true if the export dialog should be shown, otherwise false
1288     */

1289    public void setDialogShowExportSettings(boolean show) {
1290
1291        m_showExportSettings = show;
1292    }
1293
1294    /**
1295     * Sets if the lock dialog should be shown.<p>
1296     *
1297     * @param show true if the lock dialog should be shown, otherwise false
1298     */

1299    public void setDialogShowLock(boolean show) {
1300
1301        m_showLock = show;
1302    }
1303
1304    /**
1305     * Sets the style of the direct edit buttons of the user.<p>
1306     *
1307     * @param style the style of the direct edit buttons of the user
1308     */

1309    public void setDirectEditButtonStyle(int style) {
1310
1311        m_directeditButtonStyle = style;
1312    }
1313
1314    /**
1315     * Sets the style of the editor buttons of the user.<p>
1316     *
1317     * @param style the style of the editor buttons of the user
1318     */

1319    public void setEditorButtonStyle(int style) {
1320
1321        m_editorButtonStyle = style;
1322    }
1323
1324    /**
1325     * Sets the editor settings of the user.<p>
1326     *
1327     * @param settings the editor settings of the user
1328     */

1329    public void setEditorSettings(Map JavaDoc settings) {
1330
1331        m_editorSettings = new HashMap JavaDoc(settings);
1332    }
1333
1334    /**
1335     * Sets the style of the explorer buttons of the user.<p>
1336     *
1337     * @param style the style of the explorer buttons of the user
1338     */

1339    public void setExplorerButtonStyle(int style) {
1340
1341        m_explorerButtonStyle = style;
1342    }
1343
1344    /**
1345     * Sets the number of displayed files per page of the user.<p>
1346     *
1347     * @param entries the number of displayed files per page of the user
1348     */

1349    public void setExplorerFileEntries(int entries) {
1350
1351        m_explorerFileEntries = entries;
1352    }
1353
1354    /**
1355     * Sets a specific explorer setting depending on the set parameter.<p>
1356     *
1357     * @param set true if the setting should be set, otherwise false
1358     * @param setting the settings constant value for the explorer settings
1359     */

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    /**
1370     * Sets the explorer start settings.<p>
1371     *
1372     * @param settings explorer start settings tu use
1373     */

1374    public void setExplorerSettings(int settings) {
1375
1376        m_explorerSettings = settings;
1377    }
1378
1379    /**
1380     * Sets the locale of the user.<p>
1381     *
1382     * @param locale the locale of the user
1383     */

1384    public void setLocale(Locale JavaDoc locale) {
1385
1386        m_locale = locale;
1387    }
1388
1389    /**
1390     * Sets if the "create index page" checkbox in the new folder
1391     * dialog should be initially be checked or not. <p>
1392     *
1393     * @param controls if the "create index page" checkbox in the new folder
1394     * dialog should be initially be checked or not.
1395     */

1396    public void setNewFolderCreateIndexPage(Boolean JavaDoc setting) {
1397
1398        m_newFolderCreateIndexPage = setting;
1399    }
1400
1401    /**
1402     * Sets if the "edit properties" checkbox in the new folder
1403     * dialog should be initially be checked or not. <p>
1404     *
1405     * @param controls if the "edit properties" checkbox in the new folder
1406     * dialog should be initially be checked or not.
1407     */

1408    public void setNewFolderEditPropertes(Boolean JavaDoc setting) {
1409
1410        m_newFolderEditProperties = setting;
1411    }
1412
1413    /**
1414     * Sets the preferred editor for the given resource type of the user.<p>
1415     *
1416     * @param resourceType the resource type
1417     * @param editorUri the editor URI
1418     */

1419    public void setPreferredEditor(String JavaDoc resourceType, String JavaDoc editorUri) {
1420
1421        if (editorUri == null) {
1422            m_editorSettings.remove(resourceType);
1423        }
1424        m_editorSettings.put(resourceType, editorUri);
1425    }
1426
1427    /**
1428     * Sets the project Settings.<p>
1429     *
1430     * @param projectSettings the project Settings to set
1431     */

1432    public void setProjectSettings(CmsUserProjectSettings projectSettings) {
1433
1434        m_projectSettings = projectSettings;
1435    }
1436
1437    /**
1438     * Sets the appearance of the "publish project" button.<p>
1439     *
1440     * @param publishButtonAppearance the appearance of the "publish project" button
1441     */

1442    public void setPublishButtonAppearance(String JavaDoc publishButtonAppearance) {
1443
1444        m_publishButtonAppearance = publishButtonAppearance;
1445    }
1446
1447    /**
1448     * Sets if the explorer view is restricted to the defined site and folder.<p>
1449     *
1450     * @param restrict true if the explorer view is restricted, otherwise false
1451     */

1452    public void setRestrictExplorerView(boolean restrict) {
1453
1454        m_restrictExplorerView = restrict;
1455    }
1456
1457    /**
1458     * Sets if the file creation date should be shown in explorer view.<p>
1459     *
1460     * @param show true if the file creation date should be shown, otherwise false
1461     */

1462    public void setShowExplorerFileDateCreated(boolean show) {
1463
1464        setExplorerSetting(show, CmsUserSettings.FILELIST_DATE_CREATED);
1465    }
1466
1467    /**
1468     * Sets if the file expire date should be shown in explorer view.<p>
1469     *
1470     * @param show true if the file expire date should be shown, otherwise false
1471     */

1472    public void setShowExplorerFileDateExpired(boolean show) {
1473
1474        setExplorerSetting(show, CmsUserSettings.FILELIST_DATE_EXPIRED);
1475    }
1476
1477    /**
1478     * Sets if the file last modified date should be shown in explorer view.<p>
1479     *
1480     * @param show true if the file last modified date should be shown, otherwise false
1481     */

1482    public void setShowExplorerFileDateLastModified(boolean show) {
1483
1484        setExplorerSetting(show, CmsUserSettings.FILELIST_DATE_LASTMODIFIED);
1485    }
1486
1487    /**
1488     * Sets if the file release date should be shown in explorer view.<p>
1489     *
1490     * @param show true if the file release date should be shown, otherwise false
1491     */

1492    public void setShowExplorerFileDateReleased(boolean show) {
1493
1494        setExplorerSetting(show, CmsUserSettings.FILELIST_DATE_RELEASED);
1495    }
1496
1497    /**
1498     * Sets if the file locked by should be shown in explorer view.<p>
1499     *
1500     * @param show true if the file locked by should be shown, otherwise false
1501     */

1502    public void setShowExplorerFileLockedBy(boolean show) {
1503
1504        setExplorerSetting(show, CmsUserSettings.FILELIST_LOCKEDBY);
1505    }
1506
1507    /**
1508     * Sets if the file permissions should be shown in explorer view.<p>
1509     *
1510     * @param show true if the file permissions should be shown, otherwise false
1511     */

1512    public void setShowExplorerFilePermissions(boolean show) {
1513
1514        setExplorerSetting(show, CmsUserSettings.FILELIST_PERMISSIONS);
1515    }
1516
1517    /**
1518     * Sets if the file size should be shown in explorer view.<p>
1519     *
1520     * @param show true if the file size should be shown, otherwise false
1521     */

1522    public void setShowExplorerFileSize(boolean show) {
1523
1524        setExplorerSetting(show, CmsUserSettings.FILELIST_SIZE);
1525    }
1526
1527    /**
1528     * Sets if the file state should be shown in explorer view.<p>
1529     *
1530     * @param show true if the state size should be shown, otherwise false
1531     */

1532    public void setShowExplorerFileState(boolean show) {
1533
1534        setExplorerSetting(show, CmsUserSettings.FILELIST_STATE);
1535    }
1536
1537    /**
1538     * Sets if the file title should be shown in explorer view.<p>
1539     *
1540     * @param show true if the file title should be shown, otherwise false
1541     */

1542    public void setShowExplorerFileTitle(boolean show) {
1543
1544        setExplorerSetting(show, CmsUserSettings.FILELIST_TITLE);
1545    }
1546
1547    /**
1548     * Sets if the file type should be shown in explorer view.<p>
1549     *
1550     * @param show true if the file type should be shown, otherwise false
1551     */

1552    public void setShowExplorerFileType(boolean show) {
1553
1554        setExplorerSetting(show, CmsUserSettings.FILELIST_TYPE);
1555    }
1556
1557    /**
1558     * Sets if the file creator should be shown in explorer view.<p>
1559     *
1560     * @param show true if the file creator should be shown, otherwise false
1561     */

1562    public void setShowExplorerFileUserCreated(boolean show) {
1563
1564        setExplorerSetting(show, CmsUserSettings.FILELIST_USER_CREATED);
1565    }
1566
1567    /**
1568     * Sets if the file last modified by should be shown in explorer view.<p>
1569     *
1570     * @param show true if the file last modified by should be shown, otherwise false
1571     */

1572    public void setShowExplorerFileUserLastModified(boolean show) {
1573
1574        setExplorerSetting(show, CmsUserSettings.FILELIST_USER_LASTMODIFIED);
1575    }
1576
1577    /**
1578     * Sets the start folder of the user.<p>
1579     *
1580     * @param folder the start folder of the user
1581     */

1582    public void setStartFolder(String JavaDoc folder) {
1583
1584        m_startFolder = folder;
1585    }
1586
1587    /**
1588     * Sets the start project of the user.<p>
1589     *
1590     * @param project the start project id of the user
1591     */

1592    public void setStartProject(String JavaDoc project) {
1593
1594        m_project = project;
1595    }
1596
1597    /**
1598     * Sets the start site of the user.<p>
1599     *
1600     * @param site the start site of the user
1601     */

1602    public void setStartSite(String JavaDoc site) {
1603
1604        m_startSite = site;
1605    }
1606
1607    /**
1608     * Sets the current start view of the user.<p>
1609     *
1610     * @param view the current start view of the user
1611     */

1612    public void setStartView(String JavaDoc view) {
1613
1614        m_view = view;
1615    }
1616
1617    /**
1618     * Sets the (optional) workplace synchronize settings.<p>
1619     *
1620     * @param synchronizeSettings the (optional) workplace synchronize settings to set
1621     */

1622    public void setSynchronizeSettings(CmsSynchronizeSettings synchronizeSettings) {
1623
1624        m_synchronizeSettings = synchronizeSettings;
1625    }
1626
1627    /**
1628     * Sets if a message should be sent if the task is accepted.<p>
1629     *
1630     * @param message true if a message should be sent if the task is accepted, otherwise false
1631     */

1632    public void setTaskMessageAccepted(boolean message) {
1633
1634        setTaskMessageSetting(message, CmsTaskService.TASK_MESSAGES_ACCEPTED);
1635    }
1636
1637    /**
1638     * Sets if a message should be sent if the task is completed.<p>
1639     *
1640     * @param message true if a message should be sent if the task is completed, otherwise false
1641     */

1642    public void setTaskMessageCompleted(boolean message) {
1643
1644        setTaskMessageSetting(message, CmsTaskService.TASK_MESSAGES_COMPLETED);
1645    }
1646
1647    /**
1648     * Sets if a message should be sent if the task is forwarded.<p>
1649     *
1650     * @param message true if a message should be sent if the task is forwarded, otherwise false
1651     */

1652    public void setTaskMessageForwarded(boolean message) {
1653
1654        setTaskMessageSetting(message, CmsTaskService.TASK_MESSAGES_FORWARDED);
1655    }
1656
1657    /**
1658     * Sets if all role members should be informed about the task.<p>
1659     *
1660     * @param message true if all role members should be informed about the task, otherwise false
1661     */

1662    public void setTaskMessageMembers(boolean message) {
1663
1664        setTaskMessageSetting(message, CmsTaskService.TASK_MESSAGES_MEMBERS);
1665    }
1666
1667    /**
1668     * Sets a specific task message setting depending on the set parameter.<p>
1669     *
1670     * @param set true if the setting should be set, otherwise false
1671     * @param setting the settings constant value for the task message settings
1672     */

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    /**
1683     * Sets the task message values.<p>
1684     *
1685     * @param value the value of the task messages
1686     */

1687    public void setTaskMessageValue(int value) {
1688
1689        m_taskMessages = value;
1690    }
1691
1692    /**
1693     * Sets if all projects should be shown in tasks view.<p>
1694     *
1695     * @param show true if all projects should be shown in tasks view, otherwise false
1696     */

1697    public void setTaskShowAllProjects(boolean show) {
1698
1699        m_taskShowProjects = show;
1700    }
1701
1702    /**
1703     * Sets the startup filter for the tasks view.<p>
1704     *
1705     * @param filter the startup filter for the tasks view
1706     */

1707    public void setTaskStartupFilter(String JavaDoc filter) {
1708
1709        m_taskStartupfilter = filter;
1710    }
1711
1712    /**
1713     * Sets the current user for the settings.<p>
1714     *
1715     * @param user the CmsUser
1716     */

1717    public void setUser(CmsUser user) {
1718
1719        m_user = user;
1720    }
1721
1722    /**
1723     * Sets if the upload applet should be used.<p>
1724     *
1725     * @param use true if the upload applet should be used, otherwise false
1726     */

1727    public void setUseUploadApplet(boolean use) {
1728
1729        m_uploadApplet = use;
1730    }
1731
1732    /**
1733     * Sets the style of the workplace buttons of the user.<p>
1734     *
1735     * @param style the style of the workplace buttons of the user
1736     */

1737    public void setWorkplaceButtonStyle(int style) {
1738
1739        m_workplaceButtonStyle = style;
1740    }
1741
1742    /**
1743     * Sets the type of the report (simple or extended) of the user.<p>
1744     *
1745     * @param type the type of the report (simple or extended) of the user
1746     */

1747    public void setWorkplaceReportType(String JavaDoc type) {
1748
1749        m_workplaceReportType = type;
1750    }
1751
1752    /**
1753     * Determines if the file creation date should be shown in explorer view.<p>
1754     *
1755     * @return true if the file creation date should be shown, otherwise false
1756     */

1757    public boolean showExplorerFileDateCreated() {
1758
1759        return ((m_explorerSettings & CmsUserSettings.FILELIST_DATE_CREATED) > 0);
1760    }
1761
1762    /**
1763     * Determines if the file date expired should be shown in explorer view.<p>
1764     *
1765     * @return true if the file date expired should be shown, otherwise false
1766     */

1767    public boolean showExplorerFileDateExpired() {
1768
1769        return ((m_explorerSettings & CmsUserSettings.FILELIST_DATE_EXPIRED) > 0);
1770    }
1771
1772    /**
1773     * Determines if the file last modified date should be shown in explorer view.<p>
1774     *
1775     * @return true if the file last modified date should be shown, otherwise false
1776     */

1777    public boolean showExplorerFileDateLastModified() {
1778
1779        return ((m_explorerSettings & CmsUserSettings.FILELIST_DATE_LASTMODIFIED) > 0);
1780    }
1781
1782    /**
1783     * Determines if the file date released should be shown in explorer view.<p>
1784     *
1785     * @return true if the file date released should be shown, otherwise false
1786     */

1787    public boolean showExplorerFileDateReleased() {
1788
1789        return ((m_explorerSettings & CmsUserSettings.FILELIST_DATE_RELEASED) > 0);
1790    }
1791
1792    /**
1793     * Determines if the file locked by should be shown in explorer view.<p>
1794     *
1795     * @return true if the file locked by should be shown, otherwise false
1796     */

1797    public boolean showExplorerFileLockedBy() {
1798
1799        return ((m_explorerSettings & CmsUserSettings.FILELIST_LOCKEDBY) > 0);
1800    }
1801
1802    /**
1803     * Determines if the file permissions should be shown in explorer view.<p>
1804     *
1805     * @return true if the file permissions should be shown, otherwise false
1806     */

1807    public boolean showExplorerFilePermissions() {
1808
1809        return ((m_explorerSettings & CmsUserSettings.FILELIST_PERMISSIONS) > 0);
1810    }
1811
1812    /**
1813     * Determines if the file size should be shown in explorer view.<p>
1814     *
1815     * @return true if the file size should be shown, otherwise false
1816     */

1817    public boolean showExplorerFileSize() {
1818
1819        return ((m_explorerSettings & CmsUserSettings.FILELIST_SIZE) > 0);
1820    }
1821
1822    /**
1823     * Determines if the file state should be shown in explorer view.<p>
1824     *
1825     * @return true if the file state should be shown, otherwise false
1826     */

1827    public boolean showExplorerFileState() {
1828
1829        return ((m_explorerSettings & CmsUserSettings.FILELIST_STATE) > 0);
1830    }
1831
1832    /**
1833     * Determines if the file title should be shown in explorer view.<p>
1834     *
1835     * @return true if the file title should be shown, otherwise false
1836     */

1837    public boolean showExplorerFileTitle() {
1838
1839        return ((m_explorerSettings & CmsUserSettings.FILELIST_TITLE) > 0);
1840    }
1841
1842    /**
1843     * Determines if the file type should be shown in explorer view.<p>
1844     *
1845     * @return true if the file type should be shown, otherwise false
1846     */

1847    public boolean showExplorerFileType() {
1848
1849        return ((m_explorerSettings & CmsUserSettings.FILELIST_TYPE) > 0);
1850    }
1851
1852    /**
1853     * Determines if the file creator should be shown in explorer view.<p>
1854     *
1855     * @return true if the file creator should be shown, otherwise false
1856     */

1857    public boolean showExplorerFileUserCreated() {
1858
1859        return ((m_explorerSettings & CmsUserSettings.FILELIST_USER_CREATED) > 0);
1860    }
1861
1862    /**
1863     * Determines if the file last modified by should be shown in explorer view.<p>
1864     *
1865     * @return true if the file last modified by should be shown, otherwise false
1866     */

1867    public boolean showExplorerFileUserLastModified() {
1868
1869        return ((m_explorerSettings & CmsUserSettings.FILELIST_USER_LASTMODIFIED) > 0);
1870    }
1871
1872    /**
1873     * Determines if the upload applet should be used.<p>
1874     *
1875     * @return true if the if the upload applet should be used, otherwise false
1876     */

1877    public boolean useUploadApplet() {
1878
1879        return m_uploadApplet;
1880    }
1881}
1882
Popular Tags