📄 cmsworkplacesettings.java
字号:
/**
* Returns the current workplace user.<p>
*
* @return the current workplace user
*/
public CmsUser getUser() {
return m_user;
}
/**
* Returns the current workplace user settings object.<p>
*
* @return the current workplace user settings object
*/
public CmsUserSettings getUserSettings() {
return m_userSettings;
}
/**
* Returns the view startup page.<p>
*
* 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.<p>
*
* @return the view startup page
*/
public String getViewStartup() {
return m_viewStartup;
}
/**
* Returns the current view Uri selected in the workplace.<p>
*
* @return the current view Uri selected in the workplace
*/
public String getViewUri() {
return m_viewUri;
}
/**
* Checks if the current view is the explorer view.<p>
*
* @return true if the current view is the explorer view, otherwise false
*/
public boolean isViewExplorer() {
return getViewUri().endsWith(CmsWorkplace.FILE_EXPLORER_FILELIST);
}
/**
* Sets the collector object.<p>
*
* Use this mechanism for transferring a resource collector between
* several page instances of an interactive dialog.<p>
*
* @param collector the dialog object to set
*/
public void setCollector(I_CmsResourceCollector collector) {
m_collector = collector;
}
/**
* Sets the dialog object.<p>
*
* 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.<p>
*
* @param dialogObject the dialog object to set
*/
public void setDialogObject(Object dialogObject) {
m_dialogObject = dialogObject;
}
/**
* Sets the error message to display in the workplace.<p>
*
* @param errorMessage the error message to display in the workplace
*/
public void setErrorMessage(CmsMessageContainer errorMessage) {
m_errorMessage = errorMessage;
}
/**
* Sets the explorer flat url.<p>
*
* @param value the explorer flat url
*/
public void setExplorerFlaturl(String value) {
m_explorerFlaturl = value;
}
/**
* Sets the current explorer mode.<p>
*
* @param value the current explorer mode
*/
public void setExplorerMode(String value) {
m_explorerMode = value;
}
/**
* Sets the currently selected page in the explorer view.<p>
*
* @param page the currently selected page in the explorer view
*/
public void setExplorerPage(int page) {
m_explorerPage = page;
}
/**
* Sets the explorer project filter for the project view.<p>
*
* @param value the explorer project filter
*/
public void setExplorerProjectFilter(String value) {
m_explorerProjectFilter = value;
}
/**
* Sets the explorer project id for the project view.<p>
*
* @param value the explorer project id
*/
public void setExplorerProjectId(CmsUUID value) {
m_explorerProjectId = value;
}
/**
* Sets the current resource to be displayed in the explorer.<p>
*
* @param value the current resource to be displayed in the explorer
*/
public void setExplorerResource(String value) {
if (value == null) {
return;
}
// get the current explorer mode
String mode = getExplorerMode();
if (mode == null) {
mode = CmsExplorer.VIEW_EXPLORER;
}
if (CmsExplorer.VIEW_EXPLORER.equals(mode)) {
// append the current site to the key when in explorer view mode
mode += "_" + getSite() + "/";
}
// set the resource for the given mode
if (value.startsWith(CmsResource.VFS_FOLDER_SYSTEM + "/")
&& (!value.startsWith(m_currentSite))
&& (!CmsExplorer.VIEW_GALLERY.equals(getExplorerMode()))) {
// restrict access to /system/
m_explorerResource.put(mode, "/");
} else {
m_explorerResource.put(mode, value);
}
}
/**
* Sets the current gallery type name.<p>
*
* @param currentGallery the current gallery type name to set
*/
public void setGalleryType(String currentGallery) {
m_galleryType = currentGallery;
}
/**
* Saves the last gallery.<p>
*
* @param galleryTypeId the type id of the gallery as key
* @param gallerypath the resourcepath of the gallery
*/
public void setLastUsedGallery(int galleryTypeId, String gallerypath) {
m_lastUsedGalleries.put(String.valueOf(galleryTypeId), gallerypath);
}
/**
* Sets the list object.<p>
*
* 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.<p>
*
* @param listObject the list object to set
*
* @see org.opencms.workplace.list.A_CmsListDialog#setListObject(Class, org.opencms.workplace.list.CmsHtmlList)
*/
public void setListObject(Object listObject) {
m_listObject = listObject;
}
/**
* Sets the current detail grade of the view.<p>
*
* @param value the current details.
*/
public void setPermissionDetailView(String value) {
m_permissionDetailView = value;
}
/**
* Sets the currently selected project of the workplace user.<p>
*
* @param project the currently selected project of thw workplace user
*/
public void setProject(CmsUUID project) {
m_project = project;
}
/**
* Sets the publish list.<p>
*
* @param publishList the publishList to set
*/
public void setPublishList(CmsPublishList publishList) {
m_publishList = publishList;
}
/**
* Sets the current site for the user.<p>
*
* @param value the current site for the user
*/
public void setSite(String value) {
if ((value != null) && !value.equals(m_currentSite)) {
m_currentSite = value;
m_treeType = new HashMap();
}
}
/**
* Sets the new admin view tool User Data.<p>
*
* @param toolUserData the tool User Data to set
*/
public void setToolUserData(CmsToolUserData toolUserData) {
m_toolUserData = toolUserData;
}
/**
* Sets the tree resource uri for the specified tree type.<p>
*
* @param type the type of the tree
* @param value the resource uri to set for the type
*/
public void setTreeResource(String type, String value) {
if (value == null) {
return;
}
if (value.startsWith(CmsResource.VFS_FOLDER_SYSTEM + "/") && (!value.startsWith(m_currentSite))) {
// restrict access to /system/
value = "/";
}
m_treeType.put(type, value);
}
/**
* Sets the tree resource uri for the specified tree type.<p>
*
* @param type the type of the tree
* @param value the resource uri to set for the type
*/
public void setTreeSite(String type, String value) {
if (value == null) {
return;
}
m_treeSite.put(type, value);
}
/**
* Sets the current workplace user.<p>
*
* @param user the current workplace user
*/
public void setUser(CmsUser user) {
m_user = user;
}
/**
* Sets the current workplace user settings object.<p>
*
* @param userSettings the current workplace user settings object
*/
public void setUserSettings(CmsUserSettings userSettings) {
m_userSettings = userSettings;
}
/**
* Sets the view startup page.<p>
*
* 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.<p>
*
* @param viewStartup the view startup page to set
*/
public void setViewStartup(String viewStartup) {
m_viewStartup = viewStartup;
}
/**
* Sets the view Uri for the workplace.<p>
*
* @param string the view Uri for the workplace
*/
public void setViewUri(String string) {
m_viewUri = string;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -