Package org.opencms.workplace.tools
Class CmsToolDialog
java.lang.Object
org.opencms.workplace.CmsWorkplace
org.opencms.workplace.tools.CmsToolDialog
- Direct Known Subclasses:
CmsDialog
Helper class that encapsulates all the code for the "new"
style of the administration dialogs.
- Since:
- 6.0.0
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The adminProject parameter name.static final String
Request parameter name for the base tool path in the navigation, should be a parent tool of path.static final String
Request parameter name for the force flag.static final String
Request parameter name for the tool path, should be an accessible tool under the given root.static final String
Request parameter name for the root tool path.static final String
Request parameter name for the style type.static final String
Request parameter value for the 'new' dialog style.Fields inherited from class org.opencms.workplace.CmsWorkplace
DEBUG, DEFAULT_DATE_STRING, 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, INPUT_DEFAULT, INPUT_NONE, JSP_WORKPLACE_URI, PARAM_DIRECTPUBLISH, PARAM_MODELFILE, PARAM_NEWRESOURCETYPE, PARAM_PUBLISHSIBLINGS, PARAM_RELATEDRESOURCES, PARAM_RESOURCELIST, PARAM_SUBRESOURCES, PARAM_WP_EXPLORER_RESOURCE, PARAM_WP_PROJECT, PARAM_WP_SITE, PARAM_WP_START, PARAM_WP_VIEW, PATH_DIALOGS, PATH_WORKPLACE, REQUEST_ATTRIBUTE_MULTIPART, REQUEST_ATTRIBUTE_RELOADTREE, RES_PATH_FILETYPES, RFS_PATH_RESOURCES, SESSION_WORKPLACE_CLASS, VFS_DIR_DEFAULTBODIES, VFS_DIR_TEMPLATES, VFS_PATH_COMMONS, VFS_PATH_EDITORS, VFS_PATH_GALLERIES, VFS_PATH_LOCALES, VFS_PATH_MODELDIALOG, VFS_PATH_MODULES, VFS_PATH_NEWRESOURCEDIALOG, VFS_PATH_RESOURCES, VFS_PATH_SITES, VFS_PATH_SYSTEM, VFS_PATH_VIEWS, VFS_PATH_WORKPLACE, VIEW_ADMIN, VIEW_DIRECT_EDIT, VIEW_EXPLORER, VIEW_GALLERY, VIEW_LIST, VIEW_WORKPLACE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected String
Creates the link for the 'up' button.Builds the standard javascript for submitting the dialog.Generates the standard new style dialog title row, and tool grouping.Returns the admin tool.Returns the current tool path.Returns the value for the base parameter.Returns the value for the force parameter.Returns the path parameter value.Returns the root parameter value.Returns the style parameter value.Returns the path to the parent tool.Returns the tool manager.iconsBlockArea
(int segment, String headline) Builds an block area for icons.Builds the end HTML for a block area with border in the dialog content area.iconsBlockAreaStart
(String headline) Builds the start HTML for a block area with border and optional subheadline in the dialog content area.Initializes the admin tool main view.protected void
initWorkplaceRequestValues
(CmsWorkplaceSettings settings, javax.servlet.http.HttpServletRequest request) Analyzes the request for workplace parameters and adjusts the workplace settings accordingly.Builds the html of the body.pageHtmlStyle
(int segment, String title, String stylesheet) Returns the default html for a workplace page, including setting of DOCTYPE and inserting a header with the content-type, allowing the selection of an individual style sheet.void
setParamBase
(String paramBase) Sets the value of the base parameter.void
setParamForce
(String paramForce) Sets the value of the force parameter.void
setParamPath
(String paramPath) Sets the path parameter value.void
setParamRoot
(String paramRoot) Sets the root parameter value.void
setParamStyle
(String paramStyle) Sets the style parameter value.boolean
Tests if we are working with the new administration dialog style.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, canEditPermissionsForRoles, checkLock, checkLock, checkRole, decodeParamValue, fillParamValues, fillParamValues, generateCssStyle, generatePageEndExtended, generatePageEndSimple, generatePageStartExtended, generatePageStartSimple, getBroadcastMessageString, getCms, getEncoding, getExplorerFileListFullUri, getFrameSource, getJsp, getLocale, getMacroResolver, getMessages, getMultiPartFileItems, getParameterMap, getResourceUri, getResourceUri, getSession, getSettings, getSkinUri, getStartSiteRoot, getStartSiteRoot, getStaticResourceUri, getStaticResourceUri, getStyleUri, getStyleUri, getStyleUri, getTemporaryFileName, getWorkplaceExplorerLink, getWorkplaceExplorerLink, getWorkplaceSettings, htmlEnd, htmlStart, initMessages, initSettings, initTimeWarp, initUserSettings, initWorkplaceMembers, initWorkplaceMembers, initWorkplaceSettings, isForwarded, isHelpEnabled, isSubElement, isTemporaryFile, key, key, keyDefault, nullToEmpty, pageHtml, paramsAsHidden, paramsAsHidden, paramsAsParameterMap, paramsAsRequest, paramValues, resolveMacros, sendCmsRedirect, sendForward, setForwarded, shortKey, substituteSiteTitle, substituteSiteTitleStatic, switchToCurrentProject, switchToTempProject, updateUserPreferences
-
Field Details
-
PARAM_BASE
Request parameter name for the base tool path in the navigation, should be a parent tool of path.- See Also:
-
PARAM_FORCE
Request parameter name for the force flag.- See Also:
-
PARAM_PATH
Request parameter name for the tool path, should be an accessible tool under the given root.- See Also:
-
PARAM_ROOT
Request parameter name for the root tool path.- See Also:
-
PARAM_STYLE
Request parameter name for the style type.- See Also:
-
STYLE_NEW
Request parameter value for the 'new' dialog style.- See Also:
-
PARAM_ADMIN_PROJECT
The adminProject parameter name.- See Also:
-
-
Constructor Details
-
CmsToolDialog
Default Constructor.- Parameters:
jsp
- the jsp action element
-
-
Method Details
-
dialogScriptSubmit
Builds the standard javascript for submitting the dialog.Should only be used by the
method.CmsDialog.dialogScriptSubmit()
- Returns:
- the standard javascript for submitting the dialog
-
dialogTitle
Generates the standard new style dialog title row, and tool grouping.It is called by the
method.CmsDialog.dialog(int, String)
- Returns:
- a dialog window start / end segment
-
getAdminTool
Returns the admin tool.- Returns:
- the admin tool
-
getCurrentToolPath
Returns the current tool path.- Returns:
- the current tool path
-
getParamBase
Returns the value for the base parameter.- Returns:
- the value for the base parameter
-
getParamForce
Returns the value for the force parameter.- Returns:
- the value for the force parameter
-
getParamPath
Returns the path parameter value.- Returns:
- the path parameter value
-
getParamRoot
Returns the root parameter value.- Returns:
- the root parameter value
-
getParamStyle
Returns the style parameter value.- Returns:
- the style parameter value
-
getParentPath
Returns the path to the parent tool.- Returns:
- tha path to the parent tool
-
getToolManager
Returns the tool manager.- Returns:
- the tool manager
-
iconsBlockArea
Builds an block area for icons.- Parameters:
segment
- the HTML segment (START / END)headline
- the headline String for the block- Returns:
- block area start / end segment
- See Also:
-
iconsBlockAreaEnd
Builds the end HTML for a block area with border in the dialog content area.- Returns:
- block area end segment
- See Also:
-
iconsBlockAreaStart
Builds the start HTML for a block area with border and optional subheadline in the dialog content area.- Parameters:
headline
- the headline String for the block- Returns:
- block area start segment
- See Also:
-
initAdminTool
Initializes the admin tool main view.- Returns:
- the new modified parameters array
- Throws:
CmsRoleViolationException
- in case the dialog is opened by a user without the necessary privileges
-
pageBody
Description copied from class:CmsWorkplace
Builds the html of the body.- Overrides:
pageBody
in classCmsWorkplace
- Parameters:
segment
- the HTML segment (START / END)className
- optional class attribute to add to the body tagparameters
- optional parameters to add to the body tag- Returns:
- the html of the body
- See Also:
-
pageHtmlStyle
Description copied from class:CmsWorkplace
Returns the default html for a workplace page, including setting of DOCTYPE and inserting a header with the content-type, allowing the selection of an individual style sheet.- Overrides:
pageHtmlStyle
in classCmsWorkplace
- Parameters:
segment
- the HTML segment (START / END)title
- the title of the page, if null no title tag is insertedstylesheet
- the used style sheet, if null the default stylesheet 'workplace.css' is inserted- Returns:
- the default html for a workplace page
- See Also:
-
setParamBase
Sets the value of the base parameter.- Parameters:
paramBase
- the value of the base parameter to set
-
setParamForce
Sets the value of the force parameter.- Parameters:
paramForce
- the value of the force parameter to set
-
setParamPath
Sets the path parameter value.- Parameters:
paramPath
- the path parameter value to set
-
setParamRoot
Sets the root parameter value.- Parameters:
paramRoot
- the root parameter value to set
-
setParamStyle
Sets the style parameter value.- Parameters:
paramStyle
- the style parameter value to set
-
useNewStyle
Tests if we are working with the new administration dialog style.The default is the new style, this parameter is not intended for external use.
- Returns:
true
if using the new style
-
computeUpLevelLink
Creates the link for the 'up' button.- Returns:
- the link for the 'up' button
-
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 classCmsWorkplace
- Parameters:
settings
- the workplace settingsrequest
- the current request- See Also:
-