Package org.opencms.configuration
Class CmsDefaultUserSettings
java.lang.Object
org.opencms.db.CmsUserSettings
org.opencms.configuration.CmsDefaultUserSettings
Default user workplace settings, used as default values for worklace settings in the
user preferences.
- Since:
- 6.0.0
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
Enumeration class for defining the publish related resources mode.static enum
Enum for the subsitemap creation mode.Nested classes/interfaces inherited from class org.opencms.db.CmsUserSettings
CmsUserSettings.CmsSearchResultStyle, CmsUserSettings.UploadVariant
-
Field Summary
Modifier and TypeFieldDescriptionArray list for fast lookup of "button styles".static CmsDefaultUserSettings
The current default user settings.Constant for the publish related resources mode, checkbox disabled by default.Constant for the publish related resources mode, onlyCmsRole.VFS_MANAGER
s may publish resources without publishing the related resources.Constant for the publish related resources mode, checkbox enabled by default.static final String
Publish button appearance: show always.static final String
Publish button appearance: show auto (only if user has publish permissions).static final String
Publish button appearance: show never.Fields inherited from class org.opencms.db.CmsUserSettings
ADDITIONAL_INFO_ADDRESS, ADDITIONAL_INFO_CITY, ADDITIONAL_INFO_CONFIRMED_RESOURCES, ADDITIONAL_INFO_COUNTRY, ADDITIONAL_INFO_DEFAULTGROUP, ADDITIONAL_INFO_DESCRIPTION, ADDITIONAL_INFO_EXPLORERSETTINGS, ADDITIONAL_INFO_INSTITUTION, ADDITIONAL_INFO_LAST_PASSWORD_CHANGE, ADDITIONAL_INFO_LAST_USER_DATA_CHECK, ADDITIONAL_INFO_PASSWORD_RESET, ADDITIONAL_INFO_PREFERENCES, ADDITIONAL_INFO_STARTSETTINGS, ADDITIONAL_INFO_TIMEWARP, ADDITIONAL_INFO_UPLOADAPPLET_CLIENTFOLDER, ADDITIONAL_INFO_ZIPCODE, FILELIST_DATE_CREATED, FILELIST_DATE_EXPIRED, FILELIST_DATE_LASTMODIFIED, FILELIST_DATE_RELEASED, FILELIST_LOCKEDBY, FILELIST_NAME, FILELIST_NAVTEXT, FILELIST_PERMISSIONS, FILELIST_SIZE, FILELIST_STATE, FILELIST_TITLE, FILELIST_TYPE, FILELIST_USER_CREATED, FILELIST_USER_LASTMODIFIED, LOGIN_USERAGREEMENT_ACCEPTED, PREF_WORKPLACE_MODE, PREFERENCES, PREFERENCES_ADDITIONAL_PREFIX, SYNC_DESTINATION, SYNC_ENABLED, SYNC_SETTINGS, SYNC_VFS_LIST, WORKPLACE_MODE_NEW, WORKPLACE_MODE_OLD
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addPreference
(String name, String value, String widget, String widgetConfig, String niceName, String description, String ruleRegex, String error, String tab) Adds a preference.Gets the default copy mode when copying a file of the user.Gets the default copy mode when copying a folder of the user.Returns the default setting for file deletion.Returns the default setting for expanding inherited permissions in the dialog.Returns the default setting for expanding the users permissions in the dialog.Returns the default setting for inheriting permissions on folders.Returns the default setting for direct publishing.Determines if the export settings part of the secure/export dialog should be shown.Determines if the lock dialog should be shown.Returns a string representation of the direct edit button style.Returns a string representation of the editor button style.Returns a string representation of the explorer button style.Returns a string representation of the list all projects flag.Gets the map of preferences.Returns the publish related resources mode.Returns if the explorer view is restricted to the defined site and folder.Gets if the file creation date should be shown in explorer view.Gets if the file expired by should be shown in explorer view.Gets if the file last modified date should be shown in explorer view.Gets if the file released by should be shown in explorer view.Gets if the file locked by should be shown in explorer view.Gets if the file navtext should be shown in explorer view.Gets if the file permissions should be shown in explorer view.Gets if the file size should be shown in explorer view.Gets if the file state should be shown in explorer view.Gets if the file title should be shown in explorer view.Gets if the file type should be shown in explorer view.Gets if the file creator should be shown in explorer view.Gets if the file last modified by should be shown in explorer view.Returns a string representation of the show file upload button flag.Returns a string representation of the publish notification flag.Gets the subsitemap creation mode to use for the sitemap editor.Gets the subsitemap creation mode, or returns a default value given as a parameter if the mode is not set.Returns a string representation of the workplace button style.void
initPreferences
(CmsWorkplaceManager wpManager) Initializes the preference configuration.boolean
Returns if the deletion of relation targets is enabled.void
setAllowBrokenRelations
(String allowBrokenRelations) Sets if the deletion of relation targets is enabled.void
setDialogCopyFileMode
(String mode) Sets the default copy mode when copying a file of the user.void
Sets the default copy mode when copying a folder of the user.void
Sets the default setting for file deletion.void
setDialogExpandInheritedPermissions
(String dialogExpandInheritedPermissions) Sets the default setting for expanding inherited permissions in the dialog.void
setDialogExpandUserPermissions
(String dialogExpandUserPermissions) Sets the default setting for expanding the users permissions in the dialog.void
setDialogPermissionsInheritOnFolder
(String dialogPermissionsInheritOnFolder) Sets the default setting for inheriting permissions on folders.void
Sets the default setting for direct publishing.void
setDirectEditButtonStyle
(String buttonstyle) Sets the style of the direct edit buttons of the user.void
setEditorButtonStyle
(String buttonstyle) Sets the style of the editor buttons of the user.void
setExplorerButtonStyle
(String buttonstyle) Sets the style of the explorer workplace buttons of the user.void
setExplorerFileEntries
(String entries) Sets the number of displayed files per page of the user.void
setListAllProjects
(String listAllProjects) Sets if all projects should be shown for the user.void
Sets the workplace locale.void
setNewFolderCreateIndexPage
(String booleanValue) Digester support method for configuration if the "create index page" checkbox in the new folder dialog should be initially be checked or not.void
setNewFolderEditProperties
(String booleanValue) Digester support method for configuration if the "edit properties" checkbox in the new folder dialog should be initially be checked or not.void
setPublishRelatedResourcesMode
(String publishRelatedResourcesMode) Sets the publish related resources mode.void
setRestrictExplorerView
(String restrict) Sets if the explorer view is restricted to the defined site and folder.void
Sets if the file creation date should be shown in explorer view.void
Sets if the file expire date should be shown in explorer view.void
Sets if the file last modified date should be shown in explorer view.void
Sets if the file release date should be shown in explorer view.void
Sets if the file locked by should be shown in explorer view.void
Sets if the file navtext should be shown in explorer view.void
Sets if the file permissions should be shown in explorer view.void
Sets if the file size should be shown in explorer view.void
Sets if the file state should be shown in explorer view.void
Sets if the file title should be shown in explorer view.void
Sets if the file type should be shown in explorer view.void
Sets if the file creator should be shown in explorer view.void
Sets if the file last modified by should be shown in explorer view.void
Sets if the export part of the secure/export dialog should be shown.void
Controls whether to display a file upload icon or not.void
setShowLockDialog
(String mode) Sets if the lock dialog should be shown.void
setShowPublishNotification
(String notification) Sets if the publish notification should be shown for the user.void
setShowUploadTypeDialog
(String booleanValue) Digester support method for configuration if the resource type selection checkbox should show up when uploading a new file in non-applet mode.void
Sets the subsitemap creation mode.void
setWorkplaceButtonStyle
(String buttonstyle) Sets the style of the workplace buttons of the user.void
setWorkplaceSearchViewStyle
(String viewStyle) Sets the style of the workplace search default view.Methods inherited from class org.opencms.db.CmsUserSettings
getAdditionalPreference, getAdditionalPreference, getDialogCopyFileMode, getDialogCopyFolderMode, getDialogDeleteFileMode, getDialogExpandInheritedPermissions, getDialogExpandUserPermissions, getDialogPermissionsInheritOnFolder, getDialogPublishSiblings, getDialogShowExportSettings, getDialogShowLock, getDirectEditButtonStyle, getEditorButtonStyle, getEditorSettings, getExplorerButtonStyle, getExplorerFileEntries, getExplorerFileEntryOptions, getExplorerSettings, getListAllProjects, getLocale, getNewFolderCreateIndexPage, getNewFolderEditProperties, getPreferredEditor, getPublishButtonAppearance, getRestrictExplorerView, getShowFileUploadButton, getShowPublishNotification, getShowUploadTypeDialog, getStartFolder, getStartGalleriesSettings, getStartGallery, getStartGallery, getStartProject, getStartSite, getStartView, getSynchronizeSettings, getTimeWarp, getUploadAppletClientFolder, getUploadVariant, getUser, getWorkplaceButtonStyle, getWorkplaceReportType, getWorkplaceSearchIndexName, getWorkplaceSearchViewStyle, init, save, setAdditionalPreference, setAdditionalPreference, setAdditionalPreferencesFrom, setDialogCopyFileMode, setDialogCopyFolderMode, setDialogDeleteFileMode, setDialogExpandInheritedPermissions, setDialogExpandUserPermissions, setDialogPermissionsInheritOnFolder, setDialogPublishSiblings, setDialogShowExportSettings, setDialogShowLock, setDirectEditButtonStyle, setEditorButtonStyle, setEditorSettings, setExplorerButtonStyle, setExplorerFileEntries, setExplorerFileEntryOptions, setExplorerSettings, setListAllProjects, setLocale, setNewFolderCreateIndexPage, setNewFolderEditPropertes, setPreferredEditor, setPublishButtonAppearance, setRestrictExplorerView, setShowExplorerFileDateCreated, setShowExplorerFileDateExpired, setShowExplorerFileDateLastModified, setShowExplorerFileDateReleased, setShowExplorerFileLockedBy, setShowExplorerFileNavText, setShowExplorerFilePermissions, setShowExplorerFileSize, setShowExplorerFileState, setShowExplorerFileTitle, setShowExplorerFileType, setShowExplorerFileUserCreated, setShowExplorerFileUserLastModified, setShowFileUploadButton, setShowPublishNotification, setShowUploadTypeDialog, setStartFolder, setStartGalleriesSetting, setStartGallery, setStartProject, setStartSite, setStartView, setSynchronizeSettings, setTimeWarp, setUploadAppletClientFolder, setUploadVariant, setUploadVariant, setUser, setWorkplaceButtonStyle, setWorkplaceReportType, setWorkplaceSearchIndexName, setWorkplaceSearchViewStyle, showExplorerFileDateCreated, showExplorerFileDateExpired, showExplorerFileDateLastModified, showExplorerFileDateReleased, showExplorerFileLockedBy, showExplorerFileNavText, showExplorerFilePermissions, showExplorerFileSize, showExplorerFileState, showExplorerFileTitle, showExplorerFileType, showExplorerFileUserCreated, showExplorerFileUserLastModified
-
Field Details
-
CURRENT_DEFAULT_SETTINGS
The current default user settings. -
PUBLISH_RELATED_RESOURCES_MODE_FALSE
public static final CmsDefaultUserSettings.CmsPublishRelatedResourcesMode PUBLISH_RELATED_RESOURCES_MODE_FALSEConstant for the publish related resources mode, checkbox disabled by default. -
PUBLISH_RELATED_RESOURCES_MODE_FORCE
public static final CmsDefaultUserSettings.CmsPublishRelatedResourcesMode PUBLISH_RELATED_RESOURCES_MODE_FORCEConstant for the publish related resources mode, onlyCmsRole.VFS_MANAGER
s may publish resources without publishing the related resources. -
PUBLISH_RELATED_RESOURCES_MODE_TRUE
public static final CmsDefaultUserSettings.CmsPublishRelatedResourcesMode PUBLISH_RELATED_RESOURCES_MODE_TRUEConstant for the publish related resources mode, checkbox enabled by default. -
PUBLISHBUTTON_SHOW_ALWAYS
Publish button appearance: show always.- See Also:
-
PUBLISHBUTTON_SHOW_AUTO
Publish button appearance: show auto (only if user has publish permissions).- See Also:
-
PUBLISHBUTTON_SHOW_NEVER
Publish button appearance: show never.- See Also:
-
BUTTON_STYLES_LIST
Array list for fast lookup of "button styles".
-
-
Constructor Details
-
CmsDefaultUserSettings
public CmsDefaultUserSettings()
-
-
Method Details
-
addPreference
public void addPreference(String name, String value, String widget, String widgetConfig, String niceName, String description, String ruleRegex, String error, String tab) Adds a preference.- Parameters:
name
- the name of the preferencevalue
- the default valuewidget
- the widget to use for the preferencewidgetConfig
- the widget configurationniceName
- the nice name of the preferencedescription
- the description of the preferenceruleRegex
- the regex used for validationerror
- the validation error messagetab
- the tab to display the preference on
-
getDialogCopyFileModeString
Gets the default copy mode when copying a file of the user.- Returns:
- the default copy mode when copying a file of the user
-
getDialogCopyFolderModeString
Gets the default copy mode when copying a folder of the user.- Returns:
- the default copy mode when copying a folder of the user
-
getDialogDeleteFileModeString
Returns the default setting for file deletion.- Returns:
- the default setting for file deletion
-
getDialogExpandInheritedPermissionsString
Returns the default setting for expanding inherited permissions in the dialog.- Returns:
- true if inherited permissions should be expanded, otherwise false
- See Also:
-
getDialogExpandUserPermissionsString
Returns the default setting for expanding the users permissions in the dialog.- Returns:
- true if the users permissions should be expanded, otherwise false
- See Also:
-
getDialogPermissionsInheritOnFolderString
Returns the default setting for inheriting permissions on folders.- Returns:
- true if permissions should be inherited on folders, otherwise false
-
getDialogPublishSiblingsString
Returns the default setting for direct publishing.- Returns:
- the default setting for direct publishing
-
getDialogShowExportSettingsString
Determines if the export settings part of the secure/export dialog should be shown.- Returns:
- true if the export dialog is shown, otherwise false
-
getDialogShowLockString
Determines if the lock dialog should be shown.- Returns:
- true if the lock dialog is shown, otherwise false
-
getDirectEditButtonStyleString
Returns a string representation of the direct edit button style.- Returns:
- string representation of the direct edit button style
-
getEditorButtonStyleString
Returns a string representation of the editor button style.- Returns:
- string representation of the editor button style
-
getExplorerButtonStyleString
Returns a string representation of the explorer button style.- Returns:
- string representation of the explorer button style
-
getListAllProjectsString
Returns a string representation of the list all projects flag.- Returns:
- string representation of the list all projects flag
- See Also:
-
getPreferences
Gets the map of preferences.- Returns:
- the map of preferences
-
getPublishRelatedResources
Returns the publish related resources mode.- Returns:
- the publish related resources mode
-
getRestrictExplorerViewString
Returns if the explorer view is restricted to the defined site and folder.- Returns:
- true if the explorer view is restricted, otherwise false
-
getShowExplorerFileDateCreated
Gets if the file creation date should be shown in explorer view.- Returns:
"true"
if the file creation date should be shown, otherwise"false"
-
getShowExplorerFileDateExpired
Gets if the file expired by should be shown in explorer view.- Returns:
"true"
if the file date expired by should be shown, otherwise"false"
-
getShowExplorerFileDateLastModified
Gets if the file last modified date should be shown in explorer view.- Returns:
"true"
if the file last modified date should be shown, otherwise"false"
-
getShowExplorerFileDateReleased
Gets if the file released by should be shown in explorer view.- Returns:
"true"
if the file date released by should be shown, otherwise"false"
-
getShowExplorerFileLockedBy
Gets if the file locked by should be shown in explorer view.- Returns:
"true"
if the file locked by should be shown, otherwise"false"
-
getShowExplorerFilePermissions
Gets if the file permissions should be shown in explorer view.- Returns:
"true"
if the file permissions should be shown, otherwise"false"
-
getShowExplorerFileSize
Gets if the file size should be shown in explorer view.- Returns:
"true"
if the file size should be shown, otherwise"false"
-
getShowExplorerFileState
Gets if the file state should be shown in explorer view.- Returns:
"true"
if the file state should be shown, otherwise"false"
-
getShowExplorerFileTitle
Gets if the file title should be shown in explorer view.- Returns:
"true"
if the file title should be shown, otherwise"false"
-
getShowExplorerFileType
Gets if the file type should be shown in explorer view.- Returns:
"true"
if the file type should be shown, otherwise"false"
-
getShowExplorerFileUserCreated
Gets if the file creator should be shown in explorer view.- Returns:
"true"
if the file creator should be shown, otherwise"false"
-
getShowExplorerFileUserLastModified
Gets if the file last modified by should be shown in explorer view.- Returns:
"true"
if the file last modified by should be shown, otherwise"false"
-
getShowFileUploadButtonString
Returns a string representation of the show file upload button flag.- Returns:
- string representation of the show file upload button flag
- See Also:
-
getShowPublishNotificationString
Returns a string representation of the publish notification flag.- Returns:
- string representation of the publish notification flag
- See Also:
-
getSubsitemapCreationMode
Gets the subsitemap creation mode to use for the sitemap editor.- Returns:
- the subsitemap creation mode to use for the sitemap editor
-
getSubsitemapCreationMode
public CmsDefaultUserSettings.SubsitemapCreationMode getSubsitemapCreationMode(CmsDefaultUserSettings.SubsitemapCreationMode defaultValue) Gets the subsitemap creation mode, or returns a default value given as a parameter if the mode is not set.- Parameters:
defaultValue
- the value to return when the subsitemap creation mode is not set- Returns:
- the subsitemap creation mode
-
getWorkplaceButtonStyleString
Returns a string representation of the workplace button style.- Returns:
- string representation of the workplace button style
- See Also:
-
initPreferences
Initializes the preference configuration.Note that this method should only be called once the resource types have been initialized, but after addPreference has been called for all configured preferences.
- Parameters:
wpManager
- the active workplace manager
-
isAllowBrokenRelations
Returns if the deletion of relation targets is enabled.- Returns:
true
if the deletion of relation targets is enabled, otherwisefalse
-
setAllowBrokenRelations
Sets if the deletion of relation targets is enabled.- Parameters:
allowBrokenRelations
-true
if relation deletion should be enabled, otherwisefalse
-
setDialogCopyFileMode
Sets the default copy mode when copying a file of the user.- Parameters:
mode
- the default copy mode when copying a file of the user
-
setDialogCopyFolderMode
Sets the default copy mode when copying a folder of the user.- Parameters:
mode
- the default copy mode when copying a folder of the user
-
setDialogDeleteFileMode
Sets the default setting for file deletion.- Parameters:
mode
- the default setting for file deletion
-
setDialogExpandInheritedPermissions
Sets the default setting for expanding inherited permissions in the dialog.- Parameters:
dialogExpandInheritedPermissions
- the default setting for expanding inherited permissions in the dialog
-
setDialogExpandUserPermissions
Sets the default setting for expanding the users permissions in the dialog.- Parameters:
dialogExpandUserPermissions
- the default setting for expanding the users permissions in the dialog
-
setDialogPermissionsInheritOnFolder
Sets the default setting for inheriting permissions on folders.- Parameters:
dialogPermissionsInheritOnFolder
- the default setting for inheriting permissions on folders
-
setDialogPublishSiblings
Sets the default setting for direct publishing.- Parameters:
mode
- the default setting for direct publishing
-
setDirectEditButtonStyle
Sets the style of the direct edit buttons of the user.- Parameters:
buttonstyle
- the style of the direct edit buttons of the user
-
setEditorButtonStyle
Sets the style of the editor buttons of the user.- Parameters:
buttonstyle
- the style of the editor buttons of the user
-
setExplorerButtonStyle
Sets the style of the explorer workplace buttons of the user.- Parameters:
buttonstyle
- the style of the explorer workplace buttons of the user
-
setExplorerFileEntries
Sets the number of displayed files per page of the user.- Parameters:
entries
- the number of displayed files per page of the user
-
setListAllProjects
Sets if all projects should be shown for the user.- Parameters:
listAllProjects
-"true"
or"false"
-
setLocale
Sets the workplace locale.- Parameters:
locale
- the workplace language default
-
setNewFolderCreateIndexPage
Digester support method for configuration if the "create index page" checkbox in the new folder dialog should be initially be checked or not.The given
String
value is interpreted as aBoolean
by the means of
.Boolean.valueOf(String)
- Parameters:
booleanValue
- aString
that is interpred as aBoolean
by the means ofBoolean.valueOf(String)
-
setNewFolderEditProperties
Digester support method for configuration if the "edit properties" checkbox in the new folder dialog should be initially be checked or not.The given
String
value is interpreted as aBoolean
by the means of
.Boolean.valueOf(String)
- Parameters:
booleanValue
- aString
that is interpreted as aBoolean
Boolean.valueOf(String)
-
setPublishRelatedResourcesMode
Sets the publish related resources mode.- Parameters:
publishRelatedResourcesMode
- the publish related resources mode to set
-
setRestrictExplorerView
Sets if the explorer view is restricted to the defined site and folder.- Parameters:
restrict
- true if the explorer view is restricted, otherwise false
-
setShowExplorerFileDateCreated
Sets if the file creation date should be shown in explorer view.- Parameters:
show
- true if the file creation date should be shown, otherwise false
-
setShowExplorerFileDateExpired
Sets if the file expire date should be shown in explorer view.- Parameters:
show
- true if the file expire date should be shown, otherwise false
-
setShowExplorerFileDateLastModified
Sets if the file last modified date should be shown in explorer view.- Parameters:
show
- true if the file last modified date should be shown, otherwise false
-
setShowExplorerFileDateReleased
Sets if the file release date should be shown in explorer view.- Parameters:
show
- true if the file release date should be shown, otherwise false
-
setShowExplorerFileLockedBy
Sets if the file locked by should be shown in explorer view.- Parameters:
show
- true if the file locked by should be shown, otherwise false
-
setShowExplorerFilePermissions
Sets if the file permissions should be shown in explorer view.- Parameters:
show
- true if the file permissions should be shown, otherwise false
-
setShowExplorerFileSize
Sets if the file size should be shown in explorer view.- Parameters:
show
- true if the file size should be shown, otherwise false
-
setShowExplorerFileState
Sets if the file state should be shown in explorer view.- Parameters:
show
- true if the state size should be shown, otherwise false
-
setShowExplorerFileTitle
Sets if the file title should be shown in explorer view.- Parameters:
show
- true if the file title should be shown, otherwise false
-
setShowExplorerFileType
Sets if the file type should be shown in explorer view.- Parameters:
show
- true if the file type should be shown, otherwise false
-
setShowExplorerFileUserCreated
Sets if the file creator should be shown in explorer view.- Parameters:
show
- true if the file creator should be shown, otherwise false
-
setShowExplorerFileUserLastModified
Sets if the file last modified by should be shown in explorer view.- Parameters:
show
- true if the file last modified by should be shown, otherwise false
-
setShowExportSettingsDialog
Sets if the export part of the secure/export dialog should be shown.- Parameters:
mode
- true if the export dialog should be shown, otherwise false
-
setShowFileUploadButton
Controls whether to display a file upload icon or not.- Parameters:
flag
-"true"
or"false"
to flag the use of the file upload button
-
setShowLockDialog
Sets if the lock dialog should be shown.- Parameters:
mode
- true if the lock dialog should be shown, otherwise false
-
setShowPublishNotification
Sets if the publish notification should be shown for the user.- Parameters:
notification
-"true"
or"false"
to flag the notification
-
setShowUploadTypeDialog
Digester support method for configuration if the resource type selection checkbox should show up when uploading a new file in non-applet mode.The given
String
value is interpreted as aBoolean
by the means of
.Boolean.valueOf(String)
- Parameters:
booleanValue
- aString
that is interpreted as aBoolean
by the means ofBoolean.valueOf(String)
-
setSubsitemapCreationMode
Sets the subsitemap creation mode.- Parameters:
mode
- the string value of the subsitemap creation mode
-
setWorkplaceButtonStyle
Sets the style of the workplace buttons of the user.- Parameters:
buttonstyle
- the style of the workplace buttons of the user
-
setWorkplaceSearchViewStyle
Sets the style of the workplace search default view.- Parameters:
viewStyle
- the style of the workplace search default view
-