Class CmsWorkplaceSettings


  • public class CmsWorkplaceSettings
    extends java.lang.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 Detail

      • getCollector

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

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

        public CmsMessageContainer getErrorMessage()
        Returns the error message to display in the workplace.

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

        public java.lang.String getExplorerFlaturl()
        Returns the explorer flat url.

        Returns:
        the explorer flat url
      • getExplorerMode

        public java.lang.String 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

        public java.lang.String 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

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

        public java.lang.String getExplorerResource()
        Returns the current resource to be displayed in the explorer.

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

        public java.util.Map<java.lang.String,​java.lang.String> 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

        public java.lang.String getGalleryType()
        Returns the current gallery type name.

        Returns:
        the current gallery type name
      • getLastUsedGallery

        public java.lang.String getLastUsedGallery​(java.lang.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

        public java.lang.Object 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

        public java.lang.String 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
      • getSite

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

        Returns:
        the current site for the user
      • getTreeResource

        public java.lang.String getTreeResource​(java.lang.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 java.lang.String getTreeSite​(java.lang.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

        public CmsUserSettings getUserSettings()
        Returns the current workplace user settings object.

        Returns:
        the current workplace user settings object
      • getViewStartup

        public java.lang.String 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 java.lang.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​(java.lang.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​(java.lang.String value)
        Sets the explorer flat url.

        Parameters:
        value - the explorer flat url
      • setExplorerMode

        public void setExplorerMode​(java.lang.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​(java.lang.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​(java.lang.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​(java.lang.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​(java.lang.String currentGallery)
        Sets the current gallery type name.

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

        public void setLastUsedGallery​(java.lang.String galleryKey,
                                       java.lang.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​(java.lang.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​(java.lang.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​(java.lang.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​(java.lang.String type,
                                    java.lang.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​(java.lang.String type,
                                java.lang.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​(java.lang.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​(java.lang.String string)
        Sets the view Uri for the workplace.

        Parameters:
        string - the view Uri for the workplace