Class CmsWorkplaceSettings

java.lang.Object
org.opencms.workplace.CmsWorkplaceSettings

public class CmsWorkplaceSettings extends Object
Object to conveniently access and modify the state of the workplace for a user, will be stored in the session of a user.

Since:
6.0.0
  • Method Details

    • getCollector

      Returns the collector object.

      Use this mechanism for transferring a resource collector between several page instances of an interactive dialog.

      Returns:
      the dialog object
    • getDialogObject

      Returns the dialog object.

      Use this mechanism for transferring a complex object between several page instances of an interactive dialog. This is usually required when editing a complex object in a dialog of the "Administration" view.

      Returns:
      the dialog object
    • getErrorMessage

      Returns the error message to display in the workplace.

      Returns:
      the error message to display in the workplace
    • getExplorerFlaturl

      Returns the explorer flat url.

      Returns:
      the explorer flat url
    • getExplorerMode

      Returns the current explorer mode.

      Returns:
      the current explorer mode
    • getExplorerPage

      public int getExplorerPage()
      Returns the currently selected page in the explorer view.

      Returns:
      the currently selected page in the explorer view
    • getExplorerProjectFilter

      Gets the explorer project filter for the project view.

      This parameter is used in the administration to filter files belonging to a project.

      Returns:
      the explorer project filter
    • getExplorerProjectId

      Gets the explorer project id for the project view.

      This parameter is used in the administration to filter files belonging to a selected project.

      Returns:
      the explorer project id
    • getExplorerResource

      Returns the current resource to be displayed in the explorer.

      Returns:
      the current resource to be displayed in the explorer
    • getFrameUris

      Returns the frame URIs of the currently loaded frameset, with the frame names as keys.

      Returns:
      the frame URIs of the currently loaded frameset
    • getGalleryType

      Returns the current gallery type name.

      Returns:
      the current gallery type name
    • getLastGalleryResultOrder

      Gets the last result sort order for the gallery dialog.

      Returns:
      the last sort order
    • getLastSearchScope

      Returns the last gallery search scope.

      Returns:
      the last gallery search scope
    • getLastUsedGallery

      public String getLastUsedGallery(String galleryKey)
      Returns the last saved gallery for the given gallery key.

      Parameters:
      galleryKey - the key for which to look up the gallery
      Returns:
      the last saved gallery for the given gallery key
    • getListObject

      Returns the list dialog object.

      Use this mechanism for transfering a html list object between several page instances of an interactive dialog. This is usually required when having several lists in a tool or when a list action another list displays of the "Administration" view.

      Returns:
      the dialog object
      See Also:
      • A_CmsListDialog.getListObject(Class, CmsWorkplaceSettings)
    • getPermissionDetailView

      Returns the current detail grade of the view.

      Returns:
      value of the details.
    • getProject

      public CmsUUID getProject()
      Returns the currently selected project of the workplace user.

      Returns:
      the currently selected project of the workplace user
    • getPublishList

      Returns the publish list.

      Returns:
      the publishList
    • getSite

      public String getSite()
      Returns the current site for the user.

      Returns:
      the current site for the user
    • getToolUserData

      Returns the new admin view tool User Data.

      Returns:
      the tool User Data
    • getTreeResource

      public String getTreeResource(String type)
      Returns the tree resource uri for the specified tree type.

      Parameters:
      type - the type of the tree
      Returns:
      the tree resource uri for the specified tree type
    • getTreeSite

      public String getTreeSite(String type)
      Returns the tree site uri for the specified tree type.

      Parameters:
      type - the type of the tree
      Returns:
      the tree site uri for the specified tree type
    • getUser

      public CmsUser getUser()
      Returns the current workplace user.

      Returns:
      the current workplace user
    • getUserSettings

      Returns the current workplace user settings object.

      Returns:
      the current workplace user settings object
    • getViewStartup

      Returns the view startup page.

      The view startup page can be used to directly load a specific workplace dialog or other workplace resource in the OpenCms workplace base frameset after the user logs in.

      Returns:
      the view startup page
    • getViewUri

      public String getViewUri()
      Returns the current view Uri selected in the workplace.

      Returns:
      the current view Uri selected in the workplace
    • isUserAgreementAccepted

      public boolean isUserAgreementAccepted()
      Returns if the user agreement has been accepted in the current workplace session.

      Returns:
      true if the user agreement has been accepted in the current workplace session, otherwise false
    • isViewExplorer

      public boolean isViewExplorer()
      Checks if the current view is the explorer view.

      Returns:
      true if the current view is the explorer view, otherwise false
    • setCollector

      public void setCollector(I_CmsResourceCollector collector)
      Sets the collector object.

      Use this mechanism for transferring a resource collector between several page instances of an interactive dialog.

      Parameters:
      collector - the dialog object to set
    • setDialogObject

      public void setDialogObject(Object dialogObject)
      Sets the dialog object.

      Use this mechanism for transferring a complex object between several page instances of an interactive dialog. This is usually required when editing a complex object in a dialog of the "Administration" view.

      Parameters:
      dialogObject - the dialog object to set
    • setErrorMessage

      public void setErrorMessage(CmsMessageContainer errorMessage)
      Sets the error message to display in the workplace.

      Parameters:
      errorMessage - the error message to display in the workplace
    • setExplorerFlaturl

      public void setExplorerFlaturl(String value)
      Sets the explorer flat url.

      Parameters:
      value - the explorer flat url
    • setExplorerMode

      public void setExplorerMode(String value)
      Sets the current explorer mode.

      Parameters:
      value - the current explorer mode
    • setExplorerPage

      public void setExplorerPage(int page)
      Sets the currently selected page in the explorer view.

      Parameters:
      page - the currently selected page in the explorer view
    • setExplorerProjectFilter

      public void setExplorerProjectFilter(String value)
      Sets the explorer project filter for the project view.

      Parameters:
      value - the explorer project filter
    • setExplorerProjectId

      public void setExplorerProjectId(CmsUUID value)
      Sets the explorer project id for the project view.

      Parameters:
      value - the explorer project id
    • setExplorerResource

      @Deprecated public void setExplorerResource(String value)
      Sets the current resource to be displayed in the explorer.

      Parameters:
      value - the current resource to be displayed in the explorer
    • setExplorerResource

      public void setExplorerResource(String value, CmsObject cms)
      Sets the current resource to be displayed in the explorer.

      Parameters:
      value - the current resource to be displayed in the explorer
      cms - needed for validation / normalization of the given path
    • setGalleryType

      public void setGalleryType(String currentGallery)
      Sets the current gallery type name.

      Parameters:
      currentGallery - the current gallery type name to set
    • setLastGalleryResultOrder

      Sets the last sort order used for the gallery results.

      Parameters:
      order - the last sort order
    • setLastSearchScope

      Sets the last gallery search scope.

      Parameters:
      scope - the gallery search scope
    • setLastUsedGallery

      public void setLastUsedGallery(String galleryKey, String gallerypath)
      Saves the last gallery for a given key.

      Parameters:
      galleryKey - the gallery key
      gallerypath - the resourcepath of the gallery
    • setListObject

      public void setListObject(Object listObject)
      Sets the list object.

      Use this mechanism for transfering a html list object between several page instances of an interactive dialog. This is usually required when having several lists in a tool or when a list action another list displays of the "Administration" view.

      Parameters:
      listObject - the list object to set
      See Also:
      • A_CmsListDialog.setListObject(Class, org.opencms.workplace.list.CmsHtmlList)
    • setPermissionDetailView

      public void setPermissionDetailView(String value)
      Sets the current detail grade of the view.

      Parameters:
      value - the current details.
    • setProject

      public void setProject(CmsUUID project)
      Sets the currently selected project of the workplace user.

      Parameters:
      project - the currently selected project of thw workplace user
    • setPublishList

      public void setPublishList(CmsPublishList publishList)
      Sets the publish list.

      Parameters:
      publishList - the publishList to set
    • setSite

      public void setSite(String value)
      Sets the current site for the user.

      Parameters:
      value - the current site for the user
    • setToolUserData

      public void setToolUserData(CmsToolUserData toolUserData)
      Sets the new admin view tool User Data.

      Parameters:
      toolUserData - the tool User Data to set
    • setTreeResource

      public void setTreeResource(String type, String value)
      Sets the tree resource uri for the specified tree type.

      Parameters:
      type - the type of the tree
      value - the resource uri to set for the type
    • setTreeSite

      public void setTreeSite(String type, String value)
      Sets the tree resource uri for the specified tree type.

      Parameters:
      type - the type of the tree
      value - the resource uri to set for the type
    • setUser

      public void setUser(CmsUser user)
      Sets the current workplace user.

      Parameters:
      user - the current workplace user
    • setUserAgreementAccepted

      public void setUserAgreementAccepted(boolean userAgreementAccepted)
      Sets if the user agreement has been accepted in the current workplace session.

      Parameters:
      userAgreementAccepted - true if the user agreement has been accepted in the current workplace session, otherwise false
    • setUserSettings

      public void setUserSettings(CmsUserSettings userSettings)
      Sets the current workplace user settings object.

      Parameters:
      userSettings - the current workplace user settings object
    • setViewStartup

      public void setViewStartup(String viewStartup)
      Sets the view startup page.

      The view startup page can be used to directly load a specific workplace dialog or other workplace resource in the OpenCms workplace base frameset after the user logs in.

      Parameters:
      viewStartup - the view startup page to set
    • setViewUri

      public void setViewUri(String string)
      Sets the view Uri for the workplace.

      Parameters:
      string - the view Uri for the workplace