org.opencms.workplace.explorer
Class CmsTree

java.lang.Object
  extended by org.opencms.workplace.CmsWorkplace
      extended by org.opencms.workplace.explorer.CmsTree

public class CmsTree
extends CmsWorkplace

Generates the tree view for the OpenCms Workplace.

The following Workplace files use this class:

Since:
6.0.0
Version:
$Revision: 1.34 $
Author:
Alexander Kandzior

Field Summary
static java.lang.String PARAM_INCLUDEFILES
          Request parameter name for the includesfiles parameter.
static java.lang.String PARAM_LASTKNOWN
          Request parameter name for the lastknown parameter.
static java.lang.String PARAM_PROJECTAWARE
          Request parameter name for the projectaware parameter.
static java.lang.String PARAM_RESOURCE
          Request parameter name for the resource parameter.
static java.lang.String PARAM_ROOTLOADED
          Request parameter name for the rootloaded parameter.
static java.lang.String PARAM_SHOWSITESELECTOR
          Request parameter name for the showsiteselector parameter.
static java.lang.String PARAM_TREESITE
          Request parameter name for the treesite parameter.
static java.lang.String PARAM_TYPE
          Request parameter name for the type parameter.
 
Fields inherited from class org.opencms.workplace.CmsWorkplace
DEBUG, DEFAULT_LANGUAGE, DEFAULT_LOCALE, DIALOG_PATH_COMMON, FILE_DIALOG_CLOSE, FILE_DIALOG_SCREEN_CONFIRM, FILE_DIALOG_SCREEN_ERROR, FILE_DIALOG_SCREEN_ERRORPAGE, FILE_DIALOG_SCREEN_WAIT, FILE_EXPLORER_FILELIST, FILE_REPORT_OUTPUT, HTML_END, HTML_START, PARAM_WP_EXPLORER_RESOURCE, PARAM_WP_PROJECT, PARAM_WP_SITE, PATH_DIALOGS, PATH_WORKPLACE, REQUEST_ATTRIBUTE_MULTIPART, REQUEST_ATTRIBUTE_RELOADTREE, RFS_PATH_RESOURCES, SESSION_WORKPLACE_CLASS, TEMP_FILE_PREFIX, VFS_DIR_DEFAULTBODIES, VFS_DIR_TEMPLATES, VFS_PATH_COMMONS, VFS_PATH_EDITORS, VFS_PATH_GALLERIES, VFS_PATH_LOCALES, VFS_PATH_MODULES, VFS_PATH_RESOURCES, VFS_PATH_SYSTEM, VFS_PATH_VIEWS, VFS_PATH_WORKPLACE
 
Constructor Summary
CmsTree(CmsJspActionElement jsp)
          Public constructor.
 
Method Summary
 java.lang.String getRootFolder()
          Determines the root folder of the current tree dependent on users setting of explorer view restriction.
 java.lang.String getSiteSelector(java.lang.String htmlAttributes)
          Returns the HTML for the site selector box for the explorer tree window.
 java.lang.String getTree()
          Returns the html for the explorer tree.
 java.lang.String getTreeType()
          Returns the type of this tree (e.g.
 boolean includeFiles()
          Indicates if only folders or files and folders should be included in the tree.
 java.lang.String initTree()
          Returns the HTML for the tree initialization.
static java.lang.String initTree(CmsObject cms, java.lang.String encoding, java.lang.String skinUri)
          Returns the HTML for the tree initialization.
protected  void initWorkplaceRequestValues(CmsWorkplaceSettings settings, javax.servlet.http.HttpServletRequest request)
          Analyzes the request for workplace parameters and adjusts the workplace settings accordingly.
 boolean isProjectAware()
          Returns the project awareness flag.
 void setProjectAware(boolean projectAware)
          Sets the project awareness flag.
 boolean showSiteSelector()
          Indicates if the site selector should be shown depending on the tree type, initial settings and the count of accessible sites.
 
Methods inherited from class org.opencms.workplace.CmsWorkplace
addMessages, addMessages, allParamsAsHidden, allParamsAsRequest, allParamValues, bodyEnd, bodyStart, bodyStart, buildSelect, buildSelect, button, button, buttonBar, buttonBar, buttonBarHorizontalLine, buttonBarLabel, buttonBarLabel, buttonBarLine, buttonBarLineSpacer, buttonBarSeparator, buttonBarSpacer, buttonBarStartTab, checkLock, checkLock, checkRole, decodeParamValue, fillParamValues, fillParamValues, getBroadcastMessageString, getCms, getEncoding, getExplorerFileListFullUri, getFrameSource, getJsp, getLocale, getMacroResolver, getMessages, getMultiPartFileItems, getParameterMap, getResourceUri, getResourceUri, getSession, getSettings, getSkinUri, getStyleUri, getStyleUri, getStyleUri, getTemporaryFileName, htmlEnd, htmlStart, initMessages, initSettings, initTimeWarp, initUserSettings, initWorkplaceMembers, initWorkplaceSettings, isForwarded, isHelpEnabled, isSubElement, isTemporaryFile, isTemporaryFileName, key, key, keyDefault, nullToEmpty, pageBody, pageHtml, pageHtmlStyle, paramsAsHidden, paramsAsHidden, paramsAsParameterMap, paramsAsRequest, paramValues, resolveMacros, sendCmsRedirect, sendForward, setForwarded, shortKey, switchToCurrentProject, switchToTempProject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PARAM_INCLUDEFILES

public static final java.lang.String PARAM_INCLUDEFILES
Request parameter name for the includesfiles parameter.

See Also:
Constant Field Values

PARAM_LASTKNOWN

public static final java.lang.String PARAM_LASTKNOWN
Request parameter name for the lastknown parameter.

See Also:
Constant Field Values

PARAM_PROJECTAWARE

public static final java.lang.String PARAM_PROJECTAWARE
Request parameter name for the projectaware parameter.

See Also:
Constant Field Values

PARAM_RESOURCE

public static final java.lang.String PARAM_RESOURCE
Request parameter name for the resource parameter.

See Also:
Constant Field Values

PARAM_ROOTLOADED

public static final java.lang.String PARAM_ROOTLOADED
Request parameter name for the rootloaded parameter.

See Also:
Constant Field Values

PARAM_SHOWSITESELECTOR

public static final java.lang.String PARAM_SHOWSITESELECTOR
Request parameter name for the showsiteselector parameter.

See Also:
Constant Field Values

PARAM_TREESITE

public static final java.lang.String PARAM_TREESITE
Request parameter name for the treesite parameter.

See Also:
Constant Field Values

PARAM_TYPE

public static final java.lang.String PARAM_TYPE
Request parameter name for the type parameter.

See Also:
Constant Field Values
Constructor Detail

CmsTree

public CmsTree(CmsJspActionElement jsp)
Public constructor.

Parameters:
jsp - an initialized JSP action element
Method Detail

initTree

public static java.lang.String initTree(CmsObject cms,
                                        java.lang.String encoding,
                                        java.lang.String skinUri)
Returns the HTML for the tree initialization.

Parameters:
cms - the CmsObject
encoding - the current encoding
skinUri - the current skin URI
Returns:
the HTML for the tree initialization

getRootFolder

public java.lang.String getRootFolder()
Determines the root folder of the current tree dependent on users setting of explorer view restriction.

Returns:
the root folder resource name to display

getSiteSelector

public java.lang.String getSiteSelector(java.lang.String htmlAttributes)
Returns the HTML for the site selector box for the explorer tree window.

Parameters:
htmlAttributes - optional attributes for the <select> tag
Returns:
HTML code for the site selector box

getTree

public java.lang.String getTree()
Returns the html for the explorer tree.

Returns:
the html for the explorer tree

getTreeType

public java.lang.String getTreeType()
Returns the type of this tree (e.g. "copy", "project" etc.), if null this is the default explorer version.

Returns:
the current type of the tree (e.g. "copy", "project" etc.)

includeFiles

public boolean includeFiles()
Indicates if only folders or files and folders should be included in the tree.

Returns:
true if files and folders should be included in the tree

initTree

public java.lang.String initTree()
Returns the HTML for the tree initialization.

Returns:
the HTML for the tree initialization

isProjectAware

public boolean isProjectAware()
Returns the project awareness flag.

Returns:
the project awareness flag

setProjectAware

public void setProjectAware(boolean projectAware)
Sets the project awareness flag.

Parameters:
projectAware - the project awareness flag to set

showSiteSelector

public boolean showSiteSelector()
Indicates if the site selector should be shown depending on the tree type, initial settings and the count of accessible sites.

Returns:
true if site selector should be shown, otherwise false

initWorkplaceRequestValues

protected void initWorkplaceRequestValues(CmsWorkplaceSettings settings,
                                          javax.servlet.http.HttpServletRequest request)
Description copied from class: CmsWorkplace
Analyzes the request for workplace parameters and adjusts the workplace settings accordingly.

Specified by:
initWorkplaceRequestValues in class CmsWorkplace
Parameters:
settings - the workplace settings
request - the current request
See Also:
CmsWorkplace.initWorkplaceRequestValues(org.opencms.workplace.CmsWorkplaceSettings, javax.servlet.http.HttpServletRequest)