org.opencms.workplace
Class CmsWorkplaceSettings

java.lang.Object
  extended by org.opencms.workplace.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
Version:
$Revision: 1.66 $
Author:
Alexander Kandzior

Method Summary
 I_CmsResourceCollector getCollector()
          Returns the collector object.
 java.lang.Object getDialogObject()
          Returns the dialog object.
 CmsMessageContainer getErrorMessage()
          Returns the error message to display in the workplace.
 java.lang.String getExplorerFlaturl()
          Returns the explorer flat url.
 java.lang.String getExplorerMode()
          Returns the current explorer mode.
 int getExplorerPage()
          Returns the currently selected page in the explorer view.
 java.lang.String getExplorerProjectFilter()
          Gets the explorer project filter for the project view.
 CmsUUID getExplorerProjectId()
          Gets the explorer project id for the project view.
 java.lang.String getExplorerResource()
          Returns the current resource to be displayed in the explorer.
 java.util.Map getFrameUris()
          Returns the frame URIs of the currently loaded frameset, with the frame names as keys.
 java.lang.String getGalleryType()
          Returns the current gallery type name.
 java.lang.String getLastUsedGallery(int galleryTypeId)
          Returns the last saved gallery for the given gallery type id.
 java.lang.Object getListObject()
          Returns the list dialog object.
 java.lang.String getPermissionDetailView()
          Returns the current detail grade of the view.
 CmsUUID getProject()
          Returns the currently selected project of the workplace user.
 CmsPublishList getPublishList()
          Returns the publish list.
 java.lang.String getSite()
          Returns the current site for the user.
 CmsToolUserData getToolUserData()
          Returns the new admin view tool User Data.
 java.lang.String getTreeResource(java.lang.String type)
          Returns the tree resource uri for the specified tree type.
 java.lang.String getTreeSite(java.lang.String type)
          Returns the tree site uri for the specified tree type.
 CmsUser getUser()
          Returns the current workplace user.
 CmsUserSettings getUserSettings()
          Returns the current workplace user settings object.
 java.lang.String getViewStartup()
          Returns the view startup page.
 java.lang.String getViewUri()
          Returns the current view Uri selected in the workplace.
 boolean isViewExplorer()
          Checks if the current view is the explorer view.
 void setCollector(I_CmsResourceCollector collector)
          Sets the collector object.
 void setDialogObject(java.lang.Object dialogObject)
          Sets the dialog object.
 void setErrorMessage(CmsMessageContainer errorMessage)
          Sets the error message to display in the workplace.
 void setExplorerFlaturl(java.lang.String value)
          Sets the explorer flat url.
 void setExplorerMode(java.lang.String value)
          Sets the current explorer mode.
 void setExplorerPage(int page)
          Sets the currently selected page in the explorer view.
 void setExplorerProjectFilter(java.lang.String value)
          Sets the explorer project filter for the project view.
 void setExplorerProjectId(CmsUUID value)
          Sets the explorer project id for the project view.
 void setExplorerResource(java.lang.String value)
          Deprecated. use setExplorerResource(String, CmsObject) instead
 void setExplorerResource(java.lang.String value, CmsObject cms)
          Sets the current resource to be displayed in the explorer.
 void setGalleryType(java.lang.String currentGallery)
          Sets the current gallery type name.
 void setLastUsedGallery(int galleryTypeId, java.lang.String gallerypath)
          Saves the last gallery.
 void setListObject(java.lang.Object listObject)
          Sets the list object.
 void setPermissionDetailView(java.lang.String value)
          Sets the current detail grade of the view.
 void setProject(CmsUUID project)
          Sets the currently selected project of the workplace user.
 void setPublishList(CmsPublishList publishList)
          Sets the publish list.
 void setSite(java.lang.String value)
          Sets the current site for the user.
 void setToolUserData(CmsToolUserData toolUserData)
          Sets the new admin view tool User Data.
 void setTreeResource(java.lang.String type, java.lang.String value)
          Sets the tree resource uri for the specified tree type.
 void setTreeSite(java.lang.String type, java.lang.String value)
          Sets the tree resource uri for the specified tree type.
 void setUser(CmsUser user)
          Sets the current workplace user.
 void setUserSettings(CmsUserSettings userSettings)
          Sets the current workplace user settings object.
 void setViewStartup(java.lang.String viewStartup)
          Sets the view startup page.
 void setViewUri(java.lang.String string)
          Sets the view Uri for the workplace.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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 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(int galleryTypeId)
Returns the last saved gallery for the given gallery type id.

Parameters:
galleryTypeId - the type id of the gallery
Returns:
the last saved gallery for the given gallery type id

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

getPublishList

public CmsPublishList getPublishList()
Returns the publish list.

Returns:
the publishList

getSite

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

Returns:
the current site for the user

getToolUserData

public CmsToolUserData getToolUserData()
Returns the new admin view tool User Data.

Returns:
the tool User Data

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

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

public void setExplorerResource(java.lang.String value)
Deprecated. use setExplorerResource(String, CmsObject) instead

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(int galleryTypeId,
                               java.lang.String gallerypath)
Saves the last gallery.

Parameters:
galleryTypeId - the type id of the gallery as 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

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