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
  • Field Details

  • Constructor Details

  • 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 preference
      value - the default value
      widget - the widget to use for the preference
      widgetConfig - the widget configuration
      niceName - the nice name of the preference
      description - the description of the preference
      ruleRegex - the regex used for validation
      error - the validation error message
      tab - 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"
    • getShowExplorerFileNavText

      Gets if the file navtext should be shown in explorer view.

      Returns:
      "true" if the file navtext 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

      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

      public void initPreferences(CmsWorkplaceManager wpManager)
      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

      public boolean isAllowBrokenRelations()
      Returns if the deletion of relation targets is enabled.

      Returns:
      true if the deletion of relation targets is enabled, otherwise false
    • setAllowBrokenRelations

      public void setAllowBrokenRelations(String allowBrokenRelations)
      Sets if the deletion of relation targets is enabled.

      Parameters:
      allowBrokenRelations - true if relation deletion should be enabled, otherwise false
    • setDialogCopyFileMode

      public void setDialogCopyFileMode(String mode)
      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

      public void setDialogCopyFolderMode(String mode)
      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

      public void setDialogDeleteFileMode(String mode)
      Sets the default setting for file deletion.

      Parameters:
      mode - the default setting for file deletion
    • setDialogExpandInheritedPermissions

      public void setDialogExpandInheritedPermissions(String dialogExpandInheritedPermissions)
      Sets the default setting for expanding inherited permissions in the dialog.

      Parameters:
      dialogExpandInheritedPermissions - the default setting for expanding inherited permissions in the dialog
    • setDialogExpandUserPermissions

      public void setDialogExpandUserPermissions(String dialogExpandUserPermissions)
      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

      public void setDialogPermissionsInheritOnFolder(String dialogPermissionsInheritOnFolder)
      Sets the default setting for inheriting permissions on folders.

      Parameters:
      dialogPermissionsInheritOnFolder - the default setting for inheriting permissions on folders
    • setDialogPublishSiblings

      public void setDialogPublishSiblings(String mode)
      Sets the default setting for direct publishing.

      Parameters:
      mode - the default setting for direct publishing
    • setDirectEditButtonStyle

      public void setDirectEditButtonStyle(String buttonstyle)
      Sets the style of the direct edit buttons of the user.

      Parameters:
      buttonstyle - the style of the direct edit buttons of the user
    • setEditorButtonStyle

      public void setEditorButtonStyle(String buttonstyle)
      Sets the style of the editor buttons of the user.

      Parameters:
      buttonstyle - the style of the editor buttons of the user
    • setExplorerButtonStyle

      public void setExplorerButtonStyle(String buttonstyle)
      Sets the style of the explorer workplace buttons of the user.

      Parameters:
      buttonstyle - the style of the explorer workplace buttons of the user
    • setExplorerFileEntries

      public void setExplorerFileEntries(String entries)
      Sets the number of displayed files per page of the user.

      Parameters:
      entries - the number of displayed files per page of the user
    • setListAllProjects

      public void setListAllProjects(String listAllProjects)
      Sets if all projects should be shown for the user.

      Parameters:
      listAllProjects - "true" or "false"
    • setLocale

      public void setLocale(String locale)
      Sets the workplace locale.

      Parameters:
      locale - the workplace language default
    • setNewFolderCreateIndexPage

      public 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.

      The given String value is interpreted as a Boolean by the means of Boolean.valueOf(String).

      Parameters:
      booleanValue - a String that is interpred as a Boolean by the means of Boolean.valueOf(String)
    • setNewFolderEditProperties

      public 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.

      The given String value is interpreted as a Boolean by the means of Boolean.valueOf(String).

      Parameters:
      booleanValue - a String that is interpreted as a Boolean by the means of Boolean.valueOf(String)
    • setPublishRelatedResourcesMode

      public void setPublishRelatedResourcesMode(String publishRelatedResourcesMode)
      Sets the publish related resources mode.

      Parameters:
      publishRelatedResourcesMode - the publish related resources mode to set
    • setRestrictExplorerView

      public void setRestrictExplorerView(String restrict)
      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

      public void setShowExplorerFileLockedBy(String show)
      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
    • setShowExplorerFileNavText

      public void setShowExplorerFileNavText(String show)
      Sets if the file navtext 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

      public void setShowExplorerFileSize(String show)
      Sets if the file size should be shown in explorer view.

      Parameters:
      show - true if the file size should be shown, otherwise false
    • setShowExplorerFileState

      public void setShowExplorerFileState(String show)
      Sets if the file state should be shown in explorer view.

      Parameters:
      show - true if the state size should be shown, otherwise false
    • setShowExplorerFileTitle

      public void setShowExplorerFileTitle(String show)
      Sets if the file title should be shown in explorer view.

      Parameters:
      show - true if the file title should be shown, otherwise false
    • setShowExplorerFileType

      public void setShowExplorerFileType(String show)
      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

      public void setShowExportSettingsDialog(String mode)
      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

      public void setShowFileUploadButton(String flag)
      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

      public void setShowLockDialog(String mode)
      Sets if the lock dialog should be shown.

      Parameters:
      mode - true if the lock dialog should be shown, otherwise false
    • setShowPublishNotification

      public void setShowPublishNotification(String notification)
      Sets if the publish notification should be shown for the user.

      Parameters:
      notification - "true" or "false" to flag the notification
    • setShowUploadTypeDialog

      public 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.

      The given String value is interpreted as a Boolean by the means of Boolean.valueOf(String).

      Parameters:
      booleanValue - a String that is interpreted as a Boolean by the means of Boolean.valueOf(String)
    • setSubsitemapCreationMode

      public void setSubsitemapCreationMode(String mode)
      Sets the subsitemap creation mode.

      Parameters:
      mode - the string value of the subsitemap creation mode
    • setWorkplaceButtonStyle

      public void setWorkplaceButtonStyle(String buttonstyle)
      Sets the style of the workplace buttons of the user.

      Parameters:
      buttonstyle - the style of the workplace buttons of the user
    • setWorkplaceSearchViewStyle

      public void setWorkplaceSearchViewStyle(String viewStyle)
      Sets the style of the workplace search default view.

      Parameters:
      viewStyle - the style of the workplace search default view