Class CmsPropertyAdvanced
- All Implemented Interfaces:
org.opencms.configuration.I_CmsConfigurationParameterHandler
,org.opencms.workplace.I_CmsDialogHandler
,org.opencms.workplace.I_CmsPostUploadDialogHandler
- Direct Known Subclasses:
CmsPropertyCustom
The following files use this class:
- /commons/property_advanced.jsp
- Since:
- 6.0.0
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
Value for the action: save defined property.static final int
Value for the action: save edited properties.static final int
Value for the action: show define property form.static final int
Value for the action: show edit properties form.static final int
Constant for the "Define" button in the build button method.static final int
Constant for the "Finish" button in the build button method.static final String
Request parameter value for the action: save defined property.static final String
Request parameter value for the action: save edited properties.static final String
Request parameter value for the action: show information form.static final String
Request parameter value for the action: show define property form.static final String
Request parameter value for the action: show edit properties form.static final String
The dialog type.static final String
Value for the dialog mode: new resource wizard.static final String
Value for the dialog mode: new resource wizard with creation of index page for new folder.static final String
Value for the dialog mode: new resource wizard with index page created in new folder.static final String
Key name for the resource panel.static final String
Key name for the structure panel.static final String
Request parameter name for the new property definition.static final String
Configuration key for the dialog handler flag.static final String
Request parameter name for the new property definition.static final String
Configuration key for the upload handler class.static final String
Configuration key for the group name.static final String
Prefix for the hidden fields.static final String
Prefix for the hidden resource value.static final String
Prefix for the hidden structure value.static final String
Prefix for the use property checkboxes.static final String
Prefix for the input values.static final String
Name for the shared (resource) property tab.static final String
Name for the individual (structure) property tab.static final String
The URI to the customized property dialog.static final String
The URI to the standard property dialog.static final String
The URI to the property dialog handler.Fields inherited from class org.opencms.workplace.CmsTabDialog
ACTION_SWITCHTAB, DIALOG_SWITCHTAB, PARAM_SETPRESSED, PARAM_TAB
Fields inherited from class org.opencms.workplace.CmsDialog
ACTION_CANCEL, ACTION_CLOSEPOPUP, ACTION_CLOSEPOPUP_SAVE, ACTION_CONFIRMED, ACTION_CONTINUE, ACTION_DEFAULT, ACTION_LOCKS_CONFIRMED, ACTION_OK, ACTION_REPORT_BEGIN, ACTION_REPORT_END, ACTION_REPORT_UPDATE, ACTION_SET, ACTION_WAIT, ATTRIBUTE_THROWABLE, BUTTON_ADVANCED, BUTTON_BACK, BUTTON_CANCEL, BUTTON_CLOSE, BUTTON_CONTINUE, BUTTON_DETAILS, BUTTON_DISCARD, BUTTON_EDIT, BUTTON_OK, BUTTON_OK_NO_SUBMIT, BUTTON_SET, DIALOG_BACK, DIALOG_CANCEL, DIALOG_CONFIRMED, DIALOG_CONTINUE, DIALOG_INITIAL, DIALOG_LOCKS_CONFIRMED, DIALOG_OK, DIALOG_SET, DIALOG_WAIT, PARAM_ACTION, PARAM_ACTION_VALUE_FOR_CHANGED_INDEX, PARAM_CLOSELINK, PARAM_DIALOGTYPE, PARAM_ERRORSTACK, PARAM_FILE, PARAM_FRAMENAME, PARAM_ISPOPUP, PARAM_LOCK, PARAM_MESSAGE, PARAM_ORIGINALPARAMS, PARAM_PREACTIONDONE, PARAM_REDIRECT, PARAM_RESOURCE, PARAM_TARGET, PARAM_THREAD, PARAM_THREAD_HASNEXT, PARAM_TITLE, REPORT_BEGIN, REPORT_END, REPORT_UPDATE
Fields inherited from class org.opencms.workplace.tools.CmsToolDialog
PARAM_ADMIN_PROJECT, PARAM_BASE, PARAM_FORCE, PARAM_PATH, PARAM_ROOT, PARAM_STYLE, STYLE_NEW
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
Fields inherited from interface org.opencms.configuration.I_CmsConfigurationParameterHandler
ADD_PARAMETER_METHOD, INIT_CONFIGURATION_METHOD
-
Constructor Summary
ConstructorDescriptionDefault constructor needed for dialog handler implementation.CmsPropertyAdvanced
(javax.servlet.jsp.PageContext context, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res) Public constructor with JSP variables.CmsPropertyAdvanced
(org.opencms.jsp.CmsJspActionElement jsp) Public constructor with JSP action element. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Used to close the current JSP dialog.void
Performs the define property action, will be called by the JSP page.void
Deletes the current resource if the dialog is in wizard mode.void
actionEdit
(javax.servlet.http.HttpServletRequest request) Performs the edit properties action, will be called by the JSP page.void
addConfigurationParameter
(String paramName, String paramValue) Creates the HTML String for the active properties overview of the current resource.Creates the HTML String for the edit properties form.Builds the JavaScript to set the property form values delayed.protected void
dialogButtonsHtml
(StringBuffer result, int button, String attribute) Builds a button row with an "Ok", a "Cancel" and a "Define" button.Returns a map with CmsProperty object values keyed by property keys.org.opencms.configuration.CmsParameterConfiguration
getDialogUri
(String resource, org.opencms.jsp.CmsJspActionElement jsp) Returns the value of the dialogmode parameter, or null if this parameter was not provided.Returns the paramIndexPageType.Returns the value of the new property parameter, or null if this parameter was not provided.Returns the value of the usetempfileproject parameter, or null if this parameter was not provided.getPropertyMap
(List<org.opencms.file.CmsProperty> list) Transforms a list of CmsProperty objects with structure and resource values into a map with CmsProperty object values keyed by property keys.protected org.opencms.workplace.explorer.CmsExplorerTypeSettings
getSettingsForType
(String resTypeName) Returns the explorer type settings of the resource type, considering eventual references to another type.Returns the order of the parameter prefixes for each tab.getTabs()
Returns a list with localized Strings representing the names of the tabs.getUploadHook
(org.opencms.file.CmsObject cms, String uploadFolderSitePath) void
protected void
initWorkplaceRequestValues
(org.opencms.workplace.CmsWorkplaceSettings settings, javax.servlet.http.HttpServletRequest request) protected boolean
Returns whether the properties are editable or not depending on the lock state of the resource and the current project.void
setParamDialogmode
(String value) Sets the value of the dialogmode parameter.void
setParamIndexPageType
(String paramIndexPageType) Sets the paramIndexPageType.void
setParamNewproperty
(String value) Sets the value of the new property parameter.void
setParamUsetempfileproject
(String value) Sets the value of the usetempfileproject parameter.Methods inherited from class org.opencms.workplace.CmsTabDialog
dialogTabContent, dialogTabContentEnd, dialogTabContentStart, dialogTabContentStart, dialogTabRow, getActiveTab, getActiveTabName, getParamSetPressed, getParamTab, htmlStart, htmlStart, paramsAsHidden, setParamSetPressed, setParamTab
Methods inherited from class org.opencms.workplace.CmsDialog
appendDelimiter, buildAjaxResultContainer, buildAjaxWaitMessage, buildLockAdditionalOptions, buildLockConfirmationMessageJS, buildLockHeaderBox, checkResourcePermissions, checkResourcePermissions, computeCurrentFolder, dialog, dialogBlock, dialogBlockEnd, dialogBlockStart, dialogButtonRow, dialogButtonRowEnd, dialogButtonRowStart, dialogButtons, dialogButtonsClose, dialogButtonsClose, dialogButtonsCloseDetails, dialogButtonsOk, dialogButtonsOk, dialogButtonsOkCancel, dialogButtonsOkCancel, dialogButtonsOkCancelAdvanced, dialogButtonsSetOkCancel, dialogContent, dialogContentEnd, dialogContentStart, dialogEnd, dialogHead, dialogHorizontalSpacer, dialogLockButtons, dialogRow, dialogRowEnd, dialogRowStart, dialogScriptSubmit, dialogSeparator, dialogSpacer, dialogStart, dialogStart, dialogSubheadline, dialogToggleStart, dialogWhiteBox, dialogWhiteBoxEnd, dialogWhiteBoxStart, getAction, getAdministrationBackLink, getCancelAction, getDialogRealUri, getDialogUri, getOnlineHelpUriCustom, getParamAction, getParamCloseLink, getParamDialogtype, getParamFramename, getParamIsPopup, getParamMessage, getParamOriginalParams, getParamPreActionDone, getParamRedirect, getParamResource, getParamTitle, getState, hasCorrectLockstate, hasSiblings, htmlStart, htmlStartStyle, includeErrorpage, initCmsDialog, isPopup, isPreEditor, openLaunchpad, openWorkplaceLink, pageHtml, pageHtml, setAction, setOnlineHelpUriCustom, setParamAction, setParamCloseLink, setParamDialogtype, setParamFramename, setParamIsPopup, setParamMessage, setParamOriginalParams, setParamPreActionDone, setParamRedirect, setParamResource, setParamTitle
Methods inherited from class org.opencms.workplace.tools.CmsToolDialog
computeUpLevelLink, dialogTitle, getAdminTool, getCurrentToolPath, getParamBase, getParamForce, getParamPath, getParamRoot, getParamStyle, getParentPath, getToolManager, iconsBlockArea, iconsBlockAreaEnd, iconsBlockAreaStart, initAdminTool, pageBody, pageHtmlStyle, setParamBase, setParamForce, setParamPath, setParamRoot, setParamStyle, useNewStyle
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, initMessages, initSettings, initTimeWarp, initUserSettings, initWorkplaceMembers, initWorkplaceMembers, initWorkplaceSettings, isForwarded, isHelpEnabled, isSubElement, isTemporaryFile, key, key, keyDefault, nullToEmpty, paramsAsHidden, paramsAsParameterMap, paramsAsRequest, paramValues, resolveMacros, sendCmsRedirect, sendForward, setForwarded, shortKey, substituteSiteTitle, substituteSiteTitleStatic, switchToCurrentProject, switchToTempProject, updateUserPreferences
-
Field Details
-
ACTION_SAVE_DEFINE
Value for the action: save defined property.- See Also:
-
ACTION_SAVE_EDIT
Value for the action: save edited properties.- See Also:
-
ACTION_SHOW_DEFINE
Value for the action: show define property form.- See Also:
-
ACTION_SHOW_EDIT
Value for the action: show edit properties form.- See Also:
-
BUTTON_DEFINE
Constant for the "Define" button in the build button method.- See Also:
-
BUTTON_FINISH
Constant for the "Finish" button in the build button method.- See Also:
-
DIALOG_SAVE_DEFINE
Request parameter value for the action: save defined property.- See Also:
-
DIALOG_SAVE_EDIT
Request parameter value for the action: save edited properties.- See Also:
-
DIALOG_SHOW_DEFAULT
Request parameter value for the action: show information form.- See Also:
-
DIALOG_SHOW_DEFINE
Request parameter value for the action: show define property form.- See Also:
-
DIALOG_SHOW_EDIT
Request parameter value for the action: show edit properties form.- See Also:
-
DIALOG_TYPE
The dialog type.- See Also:
-
MODE_WIZARD
Value for the dialog mode: new resource wizard.- See Also:
-
MODE_WIZARD_CREATEINDEX
Value for the dialog mode: new resource wizard with creation of index page for new folder.- See Also:
-
MODE_WIZARD_INDEXCREATED
Value for the dialog mode: new resource wizard with index page created in new folder.- See Also:
-
PANEL_RESOURCE
Key name for the resource panel.- See Also:
-
PANEL_STRUCTURE
Key name for the structure panel.- See Also:
-
PARAM_DIALOGMODE
Request parameter name for the new property definition.- See Also:
-
PARAM_HIDEADVANCED
Configuration key for the dialog handler flag.- See Also:
-
PARAM_NEWPROPERTY
Request parameter name for the new property definition.- See Also:
-
PARAM_POSTUPLOADHANDLER
Configuration key for the upload handler class.- See Also:
-
PARAM_SHOWGROUP
Configuration key for the group name.- See Also:
-
PREFIX_HIDDEN
Prefix for the hidden fields.- See Also:
-
PREFIX_RESOURCE
Prefix for the hidden resource value.- See Also:
-
PREFIX_STRUCTURE
Prefix for the hidden structure value.- See Also:
-
PREFIX_USEPROPERTY
Prefix for the use property checkboxes.- See Also:
-
PREFIX_VALUE
Prefix for the input values.- See Also:
-
TAB_RESOURCE
Name for the shared (resource) property tab.- See Also:
-
TAB_STRUCTURE
Name for the individual (structure) property tab.- See Also:
-
URI_PROPERTY_CUSTOM_DIALOG
The URI to the customized property dialog.- See Also:
-
URI_PROPERTY_DIALOG
The URI to the standard property dialog.- See Also:
-
URI_PROPERTY_DIALOG_HANDLER
The URI to the property dialog handler.- See Also:
-
-
Constructor Details
-
CmsPropertyAdvanced
public CmsPropertyAdvanced()Default constructor needed for dialog handler implementation.Do not use this constructor on JSP pages.
-
CmsPropertyAdvanced
Public constructor with JSP action element.- Parameters:
jsp
- an initialized JSP action element
-
CmsPropertyAdvanced
public CmsPropertyAdvanced(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 contextreq
- the JSP requestres
- the JSP response
-
-
Method Details
-
getPropertyMap
public static Map<String,org.opencms.file.CmsProperty> getPropertyMap(List<org.opencms.file.CmsProperty> list) Transforms a list of CmsProperty objects with structure and resource values into a map with CmsProperty object values keyed by property keys.- Parameters:
list
- a list of CmsProperty objects- Returns:
- a map with CmsPropery object values keyed by property keys
-
actionCloseDialog
Used to close the current JSP dialog.This method overwrites the close dialog method in the super class, because in case a new folder is created, after this dialog a new xml page might be created.
It tries to include the URI stored in the workplace settings. This URI is determined by the frame name, which has to be set in the framename parameter.
- Overrides:
actionCloseDialog
in classorg.opencms.workplace.CmsDialog
- Throws:
javax.servlet.jsp.JspException
- if including an element fails
-
actionDefine
Performs the define property action, will be called by the JSP page.- Throws:
javax.servlet.jsp.JspException
- if problems including sub-elements occur
-
actionDeleteResource
Deletes the current resource if the dialog is in wizard mode.If the dialog is not in wizard mode, the resource is not deleted.
- Throws:
javax.servlet.jsp.JspException
- if including the error page fails
-
actionEdit
public void actionEdit(javax.servlet.http.HttpServletRequest request) throws javax.servlet.jsp.JspException Performs the edit properties action, will be called by the JSP page.- Parameters:
request
- the HttpServletRequest- Throws:
javax.servlet.jsp.JspException
- if problems including sub-elements occur
-
addConfigurationParameter
- Specified by:
addConfigurationParameter
in interfaceorg.opencms.configuration.I_CmsConfigurationParameterHandler
- See Also:
-
I_CmsConfigurationParameterHandler.addConfigurationParameter(java.lang.String, java.lang.String)
-
buildActivePropertiesList
Creates the HTML String for the active properties overview of the current resource.- Returns:
- the HTML output String for active properties of the resource
-
buildEditForm
Creates the HTML String for the edit properties form.The values of the form are set delayed, have a look at the JavaDoc of buildSetFormValues() for a detailed description.
- Returns:
- the HTML output String for the edit properties form
-
buildSetFormValues
Builds the JavaScript to set the property form values delayed.The values of the properties are not inserted directly in the <input> tag, because there is a display issue when the property values are very long. This method creates JavaScript to set the property input field values delayed. On the JSP, the code which is created from this method has to be executed delayed after the creation of the html form, e.g. in the <body> tag with the attribute onload="window.setTimeout('doSet()',50);".
- Returns:
- the JavaScript to set the property form values delayed
-
dialogButtonsOkCancelDefine
Builds a button row with an "Ok", a "Cancel" and a "Define" button.- Returns:
- the button row
-
getConfiguration
- Specified by:
getConfiguration
in interfaceorg.opencms.configuration.I_CmsConfigurationParameterHandler
- See Also:
-
I_CmsConfigurationParameterHandler.getConfiguration()
-
getDialogHandler
- Specified by:
getDialogHandler
in interfaceorg.opencms.workplace.I_CmsDialogHandler
- See Also:
-
I_CmsDialogHandler.getDialogHandler()
-
getDialogUri
- Specified by:
getDialogUri
in interfaceorg.opencms.workplace.I_CmsDialogHandler
- See Also:
-
I_CmsDialogHandler.getDialogUri(java.lang.String, CmsJspActionElement)
-
getParamDialogmode
Returns the value of the dialogmode parameter, or null if this parameter was not provided.The dialogmode parameter stores the different modes of the property dialog, e.g. for displaying other buttons in the new resource wizard.
- Returns:
- the value of the usetempfileproject parameter
-
getParamIndexPageType
Returns the paramIndexPageType.- Returns:
- the paramIndexPageType
-
getParamNewproperty
Returns the value of the new property parameter, or null if this parameter was not provided.The new property parameter stores the name of the new defined property.
- Returns:
- the value of the new property parameter
-
getParamUsetempfileproject
Returns the value of the usetempfileproject parameter, or null if this parameter was not provided.The usetempfileproject parameter stores if the file resides in the temp file project.
- Returns:
- the value of the usetempfileproject parameter
-
getTabParameterOrder
Description copied from class:CmsTabDialog
Returns the order of the parameter prefixes for each tab.For example, all parameters stored in tab 1 have the prefix "Tab1", i.e. the getter and setter methods must be getParamTab1MyParameterName().
To change the tab order, simply change the order in the String array and in the generated tab list.
- Specified by:
getTabParameterOrder
in classCmsTabDialog
- Returns:
- the ordered parameter prefix List
- See Also:
-
getTabs
Description copied from class:CmsTabDialog
Returns a list with localized Strings representing the names of the tabs.- Specified by:
getTabs
in classCmsTabDialog
- Returns:
- list with localized String for the tabs
- See Also:
-
getUploadHook
- Specified by:
getUploadHook
in interfaceorg.opencms.workplace.I_CmsPostUploadDialogHandler
- See Also:
-
I_CmsPostUploadDialogHandler.getUploadHook(org.opencms.file.CmsObject, java.lang.String)
-
initConfiguration
- Specified by:
initConfiguration
in interfaceorg.opencms.configuration.I_CmsConfigurationParameterHandler
- See Also:
-
I_CmsConfigurationParameterHandler.initConfiguration()
-
setParamDialogmode
Sets the value of the dialogmode parameter.- Parameters:
value
- the value to set
-
setParamIndexPageType
Sets the paramIndexPageType.- Parameters:
paramIndexPageType
- the paramIndexPageType to set
-
setParamNewproperty
Sets the value of the new property parameter.- Parameters:
value
- the value to set
-
setParamUsetempfileproject
Sets the value of the usetempfileproject parameter.- Parameters:
value
- the value to set
-
dialogButtonsHtml
- Overrides:
dialogButtonsHtml
in classorg.opencms.workplace.CmsDialog
- See Also:
-
CmsDialog.dialogButtonsHtml(java.lang.StringBuffer, int, java.lang.String)
-
getActiveProperties
Returns a map with CmsProperty object values keyed by property keys.- Returns:
- a map with CmsProperty object values
-
getSettingsForType
protected org.opencms.workplace.explorer.CmsExplorerTypeSettings getSettingsForType(String resTypeName) Returns the explorer type settings of the resource type, considering eventual references to another type.- Parameters:
resTypeName
- the resource type name- Returns:
- the explorer type settings of the resource type
-
initWorkplaceRequestValues
protected void initWorkplaceRequestValues(org.opencms.workplace.CmsWorkplaceSettings settings, javax.servlet.http.HttpServletRequest request) - Overrides:
initWorkplaceRequestValues
in classorg.opencms.workplace.CmsDialog
- See Also:
-
CmsWorkplace.initWorkplaceRequestValues(org.opencms.workplace.CmsWorkplaceSettings, javax.servlet.http.HttpServletRequest)
-
isEditable
Returns whether the properties are editable or not depending on the lock state of the resource and the current project.- Returns:
- true if properties are editable, otherwise false
-