org.opencms.workplace.explorer
Class CmsExplorerContextMenuBuilder

java.lang.Object
  extended byorg.opencms.workplace.CmsWorkplace
      extended byorg.opencms.workplace.explorer.CmsExplorerContextMenuBuilder

public class CmsExplorerContextMenuBuilder
extends CmsWorkplace

Context menu builder class.

Since:
6.5.6
Version:
$Revision: 1.8 $
Author:
Michael Moossen, Andreas Zahner

Field Summary
 
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
CmsExplorerContextMenuBuilder(CmsJspActionElement jsp)
          Public constructor.
CmsExplorerContextMenuBuilder(javax.servlet.jsp.PageContext context, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
          Public constructor with JSP variables.
 
Method Summary
protected  void buildHtmlContextMenu(java.util.List contextMenuEntries, CmsExplorerContextMenuItem parent, java.lang.StringBuffer menu, CmsResourceUtil[] resUtil, CmsMenuRuleTranslator menuRuleTranslator, boolean isSingleSelection, java.util.Map storedModes)
          Returns the HTML for the list of given context menu entry items.
 java.lang.String contextMenu()
          Generates the context menu for the given resources.
 java.lang.String getParamActtarget()
          Returns the link target parameter value.
 java.lang.String getParamResourcelist()
          Returns the resourcelist parameter value.
protected  void initWorkplaceRequestValues(CmsWorkplaceSettings settings, javax.servlet.http.HttpServletRequest request)
          Analyzes the request for workplace parameters and adjusts the workplace settings accordingly.
 void setParamActtarget(java.lang.String paramActtarget)
          Sets the link target parameter value.
 void setParamResourcelist(java.lang.String paramResourcelist)
          Sets the resourcelist parameter value.
 
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
 

Constructor Detail

CmsExplorerContextMenuBuilder

public CmsExplorerContextMenuBuilder(CmsJspActionElement jsp)
Public constructor.

Parameters:
jsp - an initialized JSP action element

CmsExplorerContextMenuBuilder

public CmsExplorerContextMenuBuilder(javax.servlet.jsp.PageContext context,
                                     javax.servlet.http.HttpServletRequest req,
                                     javax.servlet.http.HttpServletResponse res)
Public constructor with JSP variables.

Parameters:
context - the JSP page context
req - the JSP request
res - the JSP response
Method Detail

contextMenu

public java.lang.String contextMenu()
Generates the context menu for the given resources.

Returns:
html code

getParamActtarget

public java.lang.String getParamActtarget()
Returns the link target parameter value.

Returns:
the link target parameter value

getParamResourcelist

public java.lang.String getParamResourcelist()
Returns the resourcelist parameter value.

Returns:
the resourcelist parameter value

setParamActtarget

public void setParamActtarget(java.lang.String paramActtarget)
Sets the link target parameter value.

Parameters:
paramActtarget - the link target parameter value to set

setParamResourcelist

public void setParamResourcelist(java.lang.String paramResourcelist)
Sets the resourcelist parameter value.

Parameters:
paramResourcelist - the resourcelist parameter value to set

buildHtmlContextMenu

protected void buildHtmlContextMenu(java.util.List contextMenuEntries,
                                    CmsExplorerContextMenuItem parent,
                                    java.lang.StringBuffer menu,
                                    CmsResourceUtil[] resUtil,
                                    CmsMenuRuleTranslator menuRuleTranslator,
                                    boolean isSingleSelection,
                                    java.util.Map storedModes)
Returns the HTML for the list of given context menu entry items.

Parameters:
contextMenuEntries - the context menu entry items to loop
parent - the parent context menu entry item or null if none is defined
menu - the Buffer to add the HTML to
resUtil - the initialized resource utility to create the context menu for
menuRuleTranslator - the menu rule translator
isSingleSelection - flag indicating if more than one resource is selected
storedModes - caches the mode for the item rules

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)