KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > opencms > configuration > CmsDefaultUserSettings


1 /*
2  * File : $Source: /usr/local/cvs/opencms/src/org/opencms/configuration/CmsDefaultUserSettings.java,v $
3  * Date : $Date: 2006/09/27 10:07:04 $
4  * Version: $Revision: 1.18 $
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.configuration;
33
34 import org.opencms.db.CmsUserSettings;
35 import org.opencms.file.CmsResource;
36 import org.opencms.i18n.CmsLocaleManager;
37
38 import java.util.Arrays JavaDoc;
39 import java.util.Collections JavaDoc;
40 import java.util.List JavaDoc;
41
42 /**
43  * Default user workplace settings, used as default values for worklace settings in the
44  * user preferences.<p>
45  *
46  * @author Michael Emmerich
47  * @author Andreas Zahner
48  *
49  * @version $Revision: 1.18 $
50  *
51  * @since 6.0.0
52  */

53 public class CmsDefaultUserSettings extends CmsUserSettings {
54
55     /** Array of the possible "button styles". */
56     public static final String JavaDoc[] BUTTON_STYLES = {"image", "textimage", "text"};
57
58     /** Array list for fast lookup of "button styles". */
59     public static final List JavaDoc BUTTON_STYLES_LIST = Collections.unmodifiableList(Arrays.asList(BUTTON_STYLES));
60     /** Parameter for buttonstyle text & image. */
61     private static final int BUTTONSTYLE_TEXTIMAGE = 1;
62
63     /** Value for preserving siblings in copy dialog settings. */
64     private static final String JavaDoc COPYMODE_PRESERVE = "preservesiblings";
65
66     /** Value for creating a resource in copy dialog settings. */
67     private static final String JavaDoc COPYMODE_RESOURCE = "createresource";
68
69     /** Value for creating a sibling in copy dialog settings. */
70     private static final String JavaDoc COPYMODE_SIBLING = "createsibling";
71
72     /** Value for deleting siblings in delete dialog settings. */
73     private static final String JavaDoc DELETEMODE_DELETE = "deletesiblings";
74
75     /** Value for preserving siblings in delete dialog settings. */
76     private static final String JavaDoc DELETEMODE_PRESERVE = "preservesiblings";
77
78     /** Array of the "task startupfilter" nicenames. */
79     public static final String JavaDoc[] FILTER_NAMES = {
80         "mynewtasks",
81         "mytasksformyroles",
82         "alltasks",
83         "myactivetasks",
84         "myactivetasksformyroles",
85         "allactivetasks",
86         "mycompletedtasks",
87         "mycompletedtasksformyroles",
88         "allcompletedtasks",
89         "newtaskscreatedbyme",
90         "activetaskscreatedbyme",
91         "completedtaskscreatedbyme"};
92
93     /** Array list for fast lookup of "task startupfilter" nicenames. */
94     public static final List JavaDoc FILTER_NAMES_LIST = Collections.unmodifiableList(Arrays.asList(FILTER_NAMES));
95
96     /** Array of the "task startupfilter" values. */
97     public static final String JavaDoc[] FILTER_VALUES = {
98         "a1",
99         "b1",
100         "c1",
101         "a2",
102         "b2",
103         "c2",
104         "a3",
105         "b3",
106         "c3",
107         "d1",
108         "d2",
109         "d3"};
110
111     /** Array list for fast lookup of "task startupfilter" values. */
112     public static final List JavaDoc FILTER_VALUES_LIST = Collections.unmodifiableList(Arrays.asList(FILTER_VALUES));
113
114     /** Value for publishing only resources in publish dialog settings. */
115     private static final String JavaDoc PUBLISHMODE_ONLYRESOURCE = "onlyresource";
116
117     /** Value for publishing siblings in publish dialog settings. */
118     private static final String JavaDoc PUBLISHMODE_SIBLINGS = "allsiblings";
119
120     /**
121      * Gets the default copy mode when copying a file of the user.<p>
122      *
123      * @return the default copy mode when copying a file of the user
124      */

125     public String JavaDoc getDialogCopyFileModeString() {
126
127         if (getDialogCopyFileMode() == CmsResource.COPY_AS_NEW) {
128             return COPYMODE_RESOURCE;
129         } else {
130             return COPYMODE_SIBLING;
131         }
132
133     }
134
135     /**
136      * Gets the default copy mode when copying a folder of the user.<p>
137      *
138      * @return the default copy mode when copying a folder of the user
139      */

140     public String JavaDoc getDialogCopyFolderModeString() {
141
142         if (getDialogCopyFolderMode() == CmsResource.COPY_AS_NEW) {
143             return COPYMODE_RESOURCE;
144         } else if (getDialogCopyFolderMode() == CmsResource.COPY_AS_SIBLING) {
145             return COPYMODE_SIBLING;
146         } else {
147             return COPYMODE_PRESERVE;
148         }
149     }
150
151     /**
152      * Returns the default setting for file deletion.<p>
153      *
154      * @return the default setting for file deletion
155      */

156     public String JavaDoc getDialogDeleteFileModeString() {
157
158         if (getDialogDeleteFileMode() == CmsResource.DELETE_REMOVE_SIBLINGS) {
159             return DELETEMODE_DELETE;
160         } else {
161             return DELETEMODE_PRESERVE;
162         }
163     }
164
165     /**
166      * Returns the default setting for expanding inherited permissions in the dialog.<p>
167      *
168      * @return true if inherited permissions should be expanded, otherwise false
169      */

170     public String JavaDoc getDialogExpandInheritedPermissionsString() {
171
172         return String.valueOf(getDialogExpandInheritedPermissions());
173     }
174
175     /**
176      * Returns the default setting for expanding the users permissions in the dialog.<p>
177      *
178      * @return true if the users permissions should be expanded, otherwise false
179      */

180     public String JavaDoc getDialogExpandUserPermissionsString() {
181
182         return String.valueOf(getDialogExpandUserPermissions());
183     }
184
185     /**
186      * Returns the default setting for inheriting permissions on folders.<p>
187      *
188      * @return true if permissions should be inherited on folders, otherwise false
189      */

190     public String JavaDoc getDialogPermissionsInheritOnFolderString() {
191
192         return String.valueOf(getDialogPermissionsInheritOnFolder());
193     }
194
195     /**
196      * Returns the default setting for direct publishing.<p>
197      *
198      * @return the default setting for direct publishing
199      */

200     public String JavaDoc getDialogPublishSiblingsString() {
201
202         if (getDialogPublishSiblings()) {
203             return PUBLISHMODE_SIBLINGS;
204         } else {
205             return PUBLISHMODE_ONLYRESOURCE;
206         }
207     }
208
209     /**
210      * Determines if the export settings part of the secure/export dialog should be shown.<p>
211      *
212      * @return true if the export dialog is shown, otherwise false
213      */

214     public String JavaDoc getDialogShowExportSettingsString() {
215
216         return String.valueOf(getDialogShowExportSettings());
217     }
218
219     /**
220      * Determines if the lock dialog should be shown.<p>
221      *
222      * @return true if the lock dialog is shown, otherwise false
223      */

224     public String JavaDoc getDialogShowLockString() {
225
226         return String.valueOf(getDialogShowLock());
227     }
228
229     /**
230      * Returns a string representation of the direct edit button style.<p>
231      *
232      * @return string representation of the direct edit button style
233      */

234     public String JavaDoc getDirectEditButtonStyleString() {
235
236         return BUTTON_STYLES[getDirectEditButtonStyle()];
237     }
238
239     /**
240      * Returns a string representation of the editor button style.<p>
241      *
242      * @return string representation of the editor button style
243      */

244     public String JavaDoc getEditorButtonStyleString() {
245
246         return BUTTON_STYLES[getEditorButtonStyle()];
247     }
248
249     /**
250      * Returns a string representation of the explorer button style.<p>
251      *
252      * @return string representation of the explorer button style
253      */

254     public String JavaDoc getExplorerButtonStyleString() {
255
256         return BUTTON_STYLES[getExplorerButtonStyle()];
257     }
258
259     /**
260      * Checks if a specific explorer setting depending is set.<p>
261      *
262      * @param setting the settings constant value for the explorer settings
263      * @return <code>"true"</code> if the explorer setting is set, otherwise <code>"false"</code>
264      */

265     private String JavaDoc getExplorerSetting(int setting) {
266
267         return String.valueOf((getExplorerSettings() & setting) > 0);
268     }
269
270     /**
271      * Returns if the explorer view is restricted to the defined site and folder.<p>
272      *
273      * @return true if the explorer view is restricted, otherwise false
274      */

275     public String JavaDoc getRestrictExplorerViewString() {
276
277         return String.valueOf(getRestrictExplorerView());
278     }
279
280     /**
281      * Gets if the file creation date should be shown in explorer view.<p>
282      *
283      * @return <code>"true"</code> if the file creation date should be shown, otherwise <code>"false"</code>
284      */

285     public String JavaDoc getShowExplorerFileDateCreated() {
286
287         return getExplorerSetting(CmsUserSettings.FILELIST_DATE_CREATED);
288     }
289
290     /**
291      * Gets if the file expired by should be shown in explorer view.<p>
292      *
293      * @return <code>"true"</code> if the file date expired by should be shown, otherwise <code>"false"</code>
294      */

295     public String JavaDoc getShowExplorerFileDateExpired() {
296
297         return getExplorerSetting(CmsUserSettings.FILELIST_DATE_EXPIRED);
298     }
299
300     /**
301      * Gets if the file last modified date should be shown in explorer view.<p>
302      *
303      * @return <code>"true"</code> if the file last modified date should be shown, otherwise <code>"false"</code>
304      */

305     public String JavaDoc getShowExplorerFileDateLastModified() {
306
307         return getExplorerSetting(CmsUserSettings.FILELIST_DATE_LASTMODIFIED);
308     }
309
310     /**
311      * Gets if the file released by should be shown in explorer view.<p>
312      *
313      * @return <code>"true"</code> if the file date released by should be shown, otherwise <code>"false"</code>
314      */

315     public String JavaDoc getShowExplorerFileDateReleased() {
316
317         return getExplorerSetting(CmsUserSettings.FILELIST_DATE_RELEASED);
318     }
319
320     /**
321      * Gets if the file locked by should be shown in explorer view.<p>
322      *
323      * @return <code>"true"</code> if the file locked by should be shown, otherwise <code>"false"</code>
324      */

325     public String JavaDoc getShowExplorerFileLockedBy() {
326
327         return getExplorerSetting(CmsUserSettings.FILELIST_LOCKEDBY);
328     }
329
330     /**
331      * Gets if the file permissions should be shown in explorer view.<p>
332      *
333      * @return <code>"true"</code> if the file permissions should be shown, otherwise <code>"false"</code>
334      */

335     public String JavaDoc getShowExplorerFilePermissions() {
336
337         return getExplorerSetting(CmsUserSettings.FILELIST_PERMISSIONS);
338     }
339
340     /**
341      * Gets if the file size should be shown in explorer view.<p>
342      *
343      * @return <code>"true"</code> if the file size should be shown, otherwise <code>"false"</code>
344      */

345     public String JavaDoc getShowExplorerFileSize() {
346
347         return getExplorerSetting(CmsUserSettings.FILELIST_SIZE);
348     }
349
350     /**
351      * Gets if the file state should be shown in explorer view.<p>
352      *
353      * @return <code>"true"</code> if the file state should be shown, otherwise <code>"false"</code>
354      */

355     public String JavaDoc getShowExplorerFileState() {
356
357         return getExplorerSetting(CmsUserSettings.FILELIST_STATE);
358     }
359
360     /**
361      * Gets if the file title should be shown in explorer view.<p>
362      *
363      * @return <code>"true"</code> if the file title should be shown, otherwise <code>"false"</code>
364      */

365     public String JavaDoc getShowExplorerFileTitle() {
366
367         return getExplorerSetting(CmsUserSettings.FILELIST_TITLE);
368     }
369
370     /**
371      * Gets if the file type should be shown in explorer view.<p>
372      *
373      * @return <code>"true"</code> if the file type should be shown, otherwise <code>"false"</code>
374      */

375     public String JavaDoc getShowExplorerFileType() {
376
377         return getExplorerSetting(CmsUserSettings.FILELIST_TYPE);
378     }
379
380     /**
381      * Gets if the file creator should be shown in explorer view.<p>
382      *
383      * @return <code>"true"</code> if the file creator should be shown, otherwise <code>"false"</code>
384      */

385     public String JavaDoc getShowExplorerFileUserCreated() {
386
387         return getExplorerSetting(CmsUserSettings.FILELIST_USER_CREATED);
388     }
389
390     /**
391      * Gets if the file last modified by should be shown in explorer view.<p>
392      *
393      * @return <code>"true"</code> if the file last modified by should be shown, otherwise <code>"false"</code>
394      */

395     public String JavaDoc getShowExplorerFileUserLastModified() {
396
397         return getExplorerSetting(CmsUserSettings.FILELIST_USER_LASTMODIFIED);
398     }
399
400     /**
401      * Determines if a message should be sent if the task is accepted.<p>
402      *
403      * @return <code>"true"</code> if a message should be sent if the task is accepted, otherwise <code>"false"</code>
404      */

405     public String JavaDoc getTaskMessageAcceptedString() {
406
407         return String.valueOf(getTaskMessageAccepted());
408     }
409
410     /**
411      * Determines if a message should be sent if the task is completed.<p>
412      *
413      * @return <code>"true"</code> if a message should be sent if the task is completed, otherwise <code>"false"</code>
414      */

415     public String JavaDoc getTaskMessageCompletedString() {
416
417         return String.valueOf(getTaskMessageCompleted());
418     }
419
420     /**
421      * Determines if a message should be sent if the task is forwarded.<p>
422      *
423      * @return <code>"true"</code> if a message should be sent if the task is forwarded, otherwise <code>"false"</code>
424      */

425     public String JavaDoc getTaskMessageForwardedString() {
426
427         return String.valueOf(getTaskMessageForwarded());
428     }
429
430     /**
431      * Determines if all role members should be informed about the task.<p>
432      *
433      * @return <code>"true"</code> if all role members should be informed about the task, otherwise <code>"false"</code>
434      */

435     public String JavaDoc getTaskMessageMembersString() {
436
437         return String.valueOf(getTaskMessageMembers());
438     }
439
440     /**
441      * Determines if all projects should be shown in tasks view.<p>
442      *
443      * @return <code>"true"</code> if all projects should be shown in tasks view, otherwise <code>"false"</code>
444      */

445     public String JavaDoc getTaskShowAllProjectsString() {
446
447         return String.valueOf(getTaskShowAllProjects());
448     }
449
450     /**
451      * Gets the startup filter for the tasks view.<p>
452      *
453      * @return the startup filter for the tasks view
454      */

455     public String JavaDoc getTaskStartupFilterDefault() {
456
457         int defaultFilter = FILTER_VALUES_LIST.indexOf(getTaskStartupFilter());
458         return FILTER_NAMES[defaultFilter];
459     }
460
461     /**
462      * Returns a string representation of the upload Applet flag.<p>
463      *
464      * @return string representation of the uploadApplet flag
465      */

466     public String JavaDoc getUploadAppletString() {
467
468         return String.valueOf(useUploadApplet());
469     }
470
471     /**
472      * Returns a string representation of the workplace button style.<p>
473      *
474      * @return string representation of the workplace button style
475      */

476     public String JavaDoc getWorkplaceButtonStyleString() {
477
478         return BUTTON_STYLES[getWorkplaceButtonStyle()];
479     }
480
481     /**
482      * Sets the default copy mode when copying a file of the user.<p>
483      *
484      * @param mode the default copy mode when copying a file of the user
485      */

486     public void setDialogCopyFileMode(String JavaDoc mode) {
487
488         int copyMode = CmsResource.COPY_AS_NEW;
489         if (mode.equalsIgnoreCase(COPYMODE_SIBLING)) {
490             copyMode = CmsResource.COPY_AS_SIBLING;
491         }
492         setDialogCopyFileMode(copyMode);
493     }
494
495     /**
496      * Sets the default copy mode when copying a folder of the user.<p>
497      *
498      * @param mode the default copy mode when copying a folder of the user
499      */

500     public void setDialogCopyFolderMode(String JavaDoc mode) {
501
502         int copyMode = CmsResource.COPY_AS_NEW;
503         if (mode.equalsIgnoreCase(COPYMODE_SIBLING)) {
504             copyMode = CmsResource.COPY_AS_SIBLING;
505         } else if (mode.equalsIgnoreCase(COPYMODE_PRESERVE)) {
506             copyMode = CmsResource.COPY_PRESERVE_SIBLING;
507         }
508         setDialogCopyFolderMode(copyMode);
509     }
510
511     /**
512      * Sets the default setting for file deletion.<p>
513      *
514      * @param mode the default setting for file deletion
515      */

516     public void setDialogDeleteFileMode(String JavaDoc mode) {
517
518         int deleteMode = CmsResource.DELETE_PRESERVE_SIBLINGS;
519         if (mode.equalsIgnoreCase(DELETEMODE_DELETE)) {
520             deleteMode = CmsResource.DELETE_REMOVE_SIBLINGS;
521         }
522         setDialogDeleteFileMode(deleteMode);
523     }
524
525     /**
526      * Sets the default setting for expanding inherited permissions in the dialog.<p>
527      *
528      * @param dialogExpandInheritedPermissions the default setting for expanding inherited permissions in the dialog
529      */

530     public void setDialogExpandInheritedPermissions(String JavaDoc dialogExpandInheritedPermissions) {
531
532         setDialogExpandInheritedPermissions(Boolean.valueOf(dialogExpandInheritedPermissions).booleanValue());
533     }
534
535     /**
536      * Sets the default setting for expanding the users permissions in the dialog.<p>
537      *
538      * @param dialogExpandUserPermissions the default setting for expanding the users permissions in the dialog
539      */

540     public void setDialogExpandUserPermissions(String JavaDoc dialogExpandUserPermissions) {
541
542         setDialogExpandUserPermissions(Boolean.valueOf(dialogExpandUserPermissions).booleanValue());
543     }
544
545     /**
546      * Sets the default setting for inheriting permissions on folders.<p>
547      *
548      * @param dialogPermissionsInheritOnFolder the default setting for inheriting permissions on folders
549      */

550     public void setDialogPermissionsInheritOnFolder(String JavaDoc dialogPermissionsInheritOnFolder) {
551
552         setDialogPermissionsInheritOnFolder(Boolean.valueOf(dialogPermissionsInheritOnFolder).booleanValue());
553     }
554
555     /**
556      * Sets the default setting for direct publishing.<p>
557      *
558      * @param mode the default setting for direct publishing
559      */

560     public void setDialogPublishSiblings(String JavaDoc mode) {
561
562         boolean publishSiblings = false;
563         if (mode.equalsIgnoreCase(PUBLISHMODE_SIBLINGS)) {
564             publishSiblings = true;
565         }
566         setDialogPublishSiblings(publishSiblings);
567     }
568
569     /**
570      * Sets the style of the direct edit buttons of the user.<p>
571      *
572      * @param buttonstyle the style of the direct edit buttons of the user
573      */

574     public void setDirectEditButtonStyle(String JavaDoc buttonstyle) {
575
576         int buttonstyleValue = BUTTONSTYLE_TEXTIMAGE;
577         try {
578             if (buttonstyle != null) {
579                 buttonstyleValue = BUTTON_STYLES_LIST.indexOf(buttonstyle);
580             }
581         } catch (Exception JavaDoc e) {
582             // do nothing, use the default value
583
}
584         setDirectEditButtonStyle(buttonstyleValue);
585     }
586
587     /**
588      * Sets the style of the editor buttons of the user.<p>
589      *
590      * @param buttonstyle the style of the editor buttons of the user
591      */

592     public void setEditorButtonStyle(String JavaDoc buttonstyle) {
593
594         int buttonstyleValue = BUTTONSTYLE_TEXTIMAGE;
595         try {
596             if (buttonstyle != null) {
597                 buttonstyleValue = BUTTON_STYLES_LIST.indexOf(buttonstyle);
598             }
599         } catch (Exception JavaDoc e) {
600             // do nothing, use the default value
601
}
602         setEditorButtonStyle(buttonstyleValue);
603     }
604
605     /**
606      * Sets the style of the explorer workplace buttons of the user.<p>
607      *
608      * @param buttonstyle the style of the explorer workplace buttons of the user
609      */

610     public void setExplorerButtonStyle(String JavaDoc buttonstyle) {
611
612         int buttonstyleValue = BUTTONSTYLE_TEXTIMAGE;
613         try {
614             if (buttonstyle != null) {
615                 buttonstyleValue = BUTTON_STYLES_LIST.indexOf(buttonstyle);
616             }
617         } catch (Exception JavaDoc e) {
618             // do nothing, use the default value
619
}
620         setExplorerButtonStyle(buttonstyleValue);
621     }
622
623     /**
624      * Sets the number of displayed files per page of the user.<p>
625      *
626      * @param entries the number of displayed files per page of the user
627      */

628     public void setExplorerFileEntries(String JavaDoc entries) {
629
630         try {
631             setExplorerFileEntries(Integer.parseInt(entries));
632         } catch (Throwable JavaDoc t) {
633             // ignore this exception
634
}
635     }
636
637     /**
638      * Sets the workplace locale.<p>
639      *
640      * @param locale the workplace language default
641      */

642     public void setLocale(String JavaDoc locale) {
643
644         // set the language
645
setLocale(CmsLocaleManager.getLocale(locale));
646     }
647
648     /**
649      * Digester support method for configuration if the "create index page" checkbox in the new folder
650      * dialog should be initially be checked or not. <p>
651      *
652      * The given <code>String</code> value is interpreted as a {@link Boolean} by the means
653      * of <code>{@link Boolean#valueOf(String)}</code>. <p>
654      *
655      * @param booleanValue a <code>String</code> that is interpred as a {@link Boolean} by the means
656      * of <code>{@link Boolean#valueOf(String)}</code>
657      */

658     public void setNewFolderCreateIndexPage(String JavaDoc booleanValue) {
659
660         setNewFolderCreateIndexPage(Boolean.valueOf(booleanValue));
661     }
662
663     /**
664      * Digester support method for configuration if the "edit properties" checkbox in the new folder
665      * dialog should be initially be checked or not. <p>
666      *
667      * The given <code>String</code> value is interpreted as a {@link Boolean} by the means
668      * of <code>{@link Boolean#valueOf(String)}</code>. <p>
669      *
670      * @param booleanValue a <code>String</code> that is interpred as a {@link Boolean} by the means
671      * of <code>{@link Boolean#valueOf(String)}</code>
672      */

673     public void setNewFolderEditProperties(String JavaDoc booleanValue) {
674
675         setNewFolderEditPropertes(Boolean.valueOf(booleanValue));
676     }
677
678     /**
679      * Sets if the explorer view is restricted to the defined site and folder.<p>
680      *
681      * @param restrict true if the explorer view is restricted, otherwise false
682      */

683     public void setRestrictExplorerView(String JavaDoc restrict) {
684
685         setRestrictExplorerView(Boolean.valueOf(restrict).booleanValue());
686     }
687
688     /**
689      * Sets if the file creation date should be shown in explorer view.<p>
690      *
691      * @param show true if the file creation date should be shown, otherwise false
692      */

693     public void setShowExplorerFileDateCreated(String JavaDoc show) {
694
695         setShowExplorerFileDateCreated(Boolean.valueOf(show).booleanValue());
696     }
697
698     /**
699      * Sets if the file expire date should be shown in explorer view.<p>
700      *
701      * @param show true if the file expire date should be shown, otherwise false
702      */

703     public void setShowExplorerFileDateExpired(String JavaDoc show) {
704
705         setShowExplorerFileDateExpired(Boolean.valueOf(show).booleanValue());
706     }
707
708     /**
709      * Sets if the file last modified date should be shown in explorer view.<p>
710      *
711      * @param show true if the file last modified date should be shown, otherwise false
712      */

713     public void setShowExplorerFileDateLastModified(String JavaDoc show) {
714
715         setShowExplorerFileDateLastModified(Boolean.valueOf(show).booleanValue());
716     }
717
718     /**
719      * Sets if the file release date should be shown in explorer view.<p>
720      *
721      * @param show true if the file relese date should be shown, otherwise false
722      */

723     public void setShowExplorerFileDateReleased(String JavaDoc show) {
724
725         setShowExplorerFileDateReleased(Boolean.valueOf(show).booleanValue());
726     }
727
728     /**
729      * Sets if the file locked by should be shown in explorer view.<p>
730      *
731      * @param show true if the file locked by should be shown, otherwise false
732      */

733     public void setShowExplorerFileLockedBy(String JavaDoc show) {
734
735         setShowExplorerFileLockedBy(Boolean.valueOf(show).booleanValue());
736     }
737
738     /**
739      * Sets if the file permissions should be shown in explorer view.<p>
740      *
741      * @param show true if the file permissions should be shown, otherwise false
742      */

743     public void setShowExplorerFilePermissions(String JavaDoc show) {
744
745         setShowExplorerFilePermissions(Boolean.valueOf(show).booleanValue());
746     }
747
748     /**
749      * Sets if the file size should be shown in explorer view.<p>
750      *
751      * @param show true if the file size should be shown, otherwise false
752      */

753     public void setShowExplorerFileSize(String JavaDoc show) {
754
755         setShowExplorerFileSize(Boolean.valueOf(show).booleanValue());
756     }
757
758     /**
759      * Sets if the file state should be shown in explorer view.<p>
760      *
761      * @param show true if the state size should be shown, otherwise false
762      */

763     public void setShowExplorerFileState(String JavaDoc show) {
764
765         setShowExplorerFileState(Boolean.valueOf(show).booleanValue());
766     }
767
768     /**
769      * Sets if the file title should be shown in explorer view.<p>
770      *
771      * @param show true if the file title should be shown, otherwise false
772      */

773     public void setShowExplorerFileTitle(String JavaDoc show) {
774
775         setShowExplorerFileTitle(Boolean.valueOf(show).booleanValue());
776     }
777
778     /**
779      * Sets if the file type should be shown in explorer view.<p>
780      *
781      * @param show true if the file type should be shown, otherwise false
782      */

783     public void setShowExplorerFileType(String JavaDoc show) {
784
785         setShowExplorerFileType(Boolean.valueOf(show).booleanValue());
786     }
787
788     /**
789      * Sets if the file creator should be shown in explorer view.<p>
790      *
791      * @param show true if the file creator should be shown, otherwise false
792      */

793     public void setShowExplorerFileUserCreated(String JavaDoc show) {
794
795         setShowExplorerFileUserCreated(Boolean.valueOf(show).booleanValue());
796     }
797
798     /**
799      * Sets if the file last modified by should be shown in explorer view.<p>
800      *
801      * @param show true if the file last modified by should be shown, otherwise false
802      */

803     public void setShowExplorerFileUserLastModified(String JavaDoc show) {
804
805         setShowExplorerFileUserLastModified(Boolean.valueOf(show).booleanValue());
806     }
807
808     /**
809      * Sets if the export part of the secure/export dialog should be shown.<p>
810      *
811      * @param mode true if the export dialog should be shown, otherwise false
812      */

813     public void setShowExportSettingsDialog(String JavaDoc mode) {
814
815         setDialogShowExportSettings(Boolean.valueOf(mode).booleanValue());
816     }
817
818     /**
819      * Sets if the lock dialog should be shown.<p>
820      *
821      * @param mode true if the lock dialog should be shown, otherwise false
822      */

823     public void setShowLockDialog(String JavaDoc mode) {
824
825         setDialogShowLock(Boolean.valueOf(mode).booleanValue());
826     }
827
828     /**
829      * Sets if a message should be sent if the task is accepted.<p>
830      *
831      * @param mode true if a message should be sent if the task is accepted, otherwise false
832      */

833     public void setTaskMessageAccepted(String JavaDoc mode) {
834
835         setTaskMessageAccepted(Boolean.valueOf(mode).booleanValue());
836     }
837
838     /**
839      * Sets if a message should be sent if the task is completed.<p>
840      *
841      * @param mode true if a message should be sent if the task is completed, otherwise false
842      */

843     public void setTaskMessageCompleted(String JavaDoc mode) {
844
845         setTaskMessageCompleted(Boolean.valueOf(mode).booleanValue());
846     }
847
848     /**
849      * Sets if a message should be sent if the task is forwarded.<p>
850      *
851      * @param mode true if a message should be sent if the task is forwarded, otherwise false
852      */

853     public void setTaskMessageForwarded(String JavaDoc mode) {
854
855         setTaskMessageForwarded(Boolean.valueOf(mode).booleanValue());
856     }
857
858     /**
859      * Sets if all role members should be informed about the task.<p>
860      *
861      * @param mode true if all role members should be informed about the task, otherwise false
862      */

863     public void setTaskMessageMembers(String JavaDoc mode) {
864
865         setTaskMessageMembers(Boolean.valueOf(mode).booleanValue());
866     }
867
868     /**
869      * Sets if all projects should be shown in tasks view.<p>
870      *
871      * @param mode true if all projects should be shown in tasks view, otherwise false
872      */

873     public void setTaskShowAllProjects(String JavaDoc mode) {
874
875         setTaskShowAllProjects(Boolean.valueOf(mode).booleanValue());
876
877     }
878
879     /**
880      * Sets the startup filter for the tasks view.<p>
881      *
882      * @param filter the startup filter for the tasks view
883      */

884     public void setTaskStartupFilterDefault(String JavaDoc filter) {
885
886         int defaultFilter = 0;
887         try {
888             if (filter != null) {
889                 defaultFilter = FILTER_NAMES_LIST.indexOf(filter);
890             }
891         } catch (Exception JavaDoc e) {
892             // do nothing, use the default value
893
}
894         setTaskStartupFilter(FILTER_VALUES[defaultFilter]);
895     }
896
897     /**
898      * Sets the usage of the upload applet for the user user.<p>
899      *
900      * @param applet <code>"true"</code> or <code>"false"</code> to flag the use of the applet
901      */

902     public void setUploadApplet(String JavaDoc applet) {
903
904         // set the usage of the upload applet
905
setUseUploadApplet(Boolean.valueOf(applet).booleanValue());
906     }
907
908     /**
909      * Sets the style of the workplace buttons of the user.<p>
910      *
911      * @param buttonstyle the style of the workplace buttons of the user
912      */

913     public void setWorkplaceButtonStyle(String JavaDoc buttonstyle) {
914
915         int buttonstyleValue = BUTTONSTYLE_TEXTIMAGE;
916
917         try {
918             if (buttonstyle != null) {
919                 buttonstyleValue = BUTTON_STYLES_LIST.indexOf(buttonstyle);
920             }
921         } catch (Exception JavaDoc e) {
922             // do nothing, use the default value
923
}
924
925         setWorkplaceButtonStyle(buttonstyleValue);
926     }
927 }
Popular Tags