|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opencms.workplace.CmsWorkplace
org.opencms.workplace.tools.CmsToolDialog
org.opencms.workplace.CmsDialog
org.opencms.workplace.CmsTabDialog
org.opencms.workplace.commons.CmsPropertyAdvanced
public class CmsPropertyAdvanced
Provides methods for the properties dialog.
The following files use this class:
Field Summary | |
---|---|
static int |
ACTION_SAVE_DEFINE
Value for the action: save defined property. |
static int |
ACTION_SAVE_EDIT
Value for the action: save edited properties. |
static int |
ACTION_SHOW_DEFINE
Value for the action: show define property form. |
static int |
ACTION_SHOW_EDIT
Value for the action: show edit properties form. |
static int |
BUTTON_DEFINE
Constant for the "Define" button in the build button method. |
static int |
BUTTON_FINISH
Constant for the "Finish" button in the build button method. |
static java.lang.String |
DIALOG_SAVE_DEFINE
Request parameter value for the action: save defined property. |
static java.lang.String |
DIALOG_SAVE_EDIT
Request parameter value for the action: save edited properties. |
static java.lang.String |
DIALOG_SHOW_DEFAULT
Request parameter value for the action: show information form. |
static java.lang.String |
DIALOG_SHOW_DEFINE
Request parameter value for the action: show define property form. |
static java.lang.String |
DIALOG_SHOW_EDIT
Request parameter value for the action: show edit properties form. |
static java.lang.String |
DIALOG_TYPE
The dialog type. |
static java.lang.String |
MODE_WIZARD
Value for the dialog mode: new resource wizard. |
static java.lang.String |
MODE_WIZARD_CREATEINDEX
Value for the dialog mode: new resource wizard with creation of index page for new folder. |
static java.lang.String |
MODE_WIZARD_INDEXCREATED
Value for the dialog mode: new resource wizard with index page created in new folder. |
static java.lang.String |
PANEL_RESOURCE
Key name for the resource panel. |
static java.lang.String |
PANEL_STRUCTURE
Key name for the structure panel. |
static java.lang.String |
PARAM_DIALOGMODE
Request parameter name for the new property definition. |
static java.lang.String |
PARAM_HIDEADVANCED
Configuration key for the dialog handler flag. |
static java.lang.String |
PARAM_NEWPROPERTY
Request parameter name for the new property definition. |
static java.lang.String |
PARAM_SHOWGROUP
Configuration key for the group name. |
static java.lang.String |
PREFIX_HIDDEN
Prefix for the hidden fields. |
static java.lang.String |
PREFIX_RESOURCE
Prefix for the hidden resource value. |
static java.lang.String |
PREFIX_STRUCTURE
Prefix for the hidden structure value. |
static java.lang.String |
PREFIX_USEPROPERTY
Prefix for the use property checkboxes. |
static java.lang.String |
PREFIX_VALUE
Prefix for the input values. |
static java.lang.String |
TAB_RESOURCE
Name for the shared (resource) property tab. |
static java.lang.String |
TAB_STRUCTURE
Name for the individual (structure) property tab. |
static java.lang.String |
URI_PROPERTY_CUSTOM_DIALOG
The URI to the customized property dialog. |
static java.lang.String |
URI_PROPERTY_DIALOG
The URI to the standard property dialog. |
static java.lang.String |
URI_PROPERTY_DIALOG_HANDLER
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.tools.CmsToolDialog |
---|
PARAM_BASE, PARAM_FORCE, PARAM_PATH, PARAM_ROOT, PARAM_STYLE, STYLE_NEW |
Fields inherited from interface org.opencms.configuration.I_CmsConfigurationParameterHandler |
---|
ADD_PARAMETER_METHOD, INIT_CONFIGURATION_METHOD |
Constructor Summary | |
---|---|
CmsPropertyAdvanced()
Default constructor needed for dialog handler implementation. |
|
CmsPropertyAdvanced(CmsJspActionElement jsp)
Public constructor with JSP action element. |
|
CmsPropertyAdvanced(javax.servlet.jsp.PageContext context,
javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
Public constructor with JSP variables. |
Method Summary | |
---|---|
void |
actionCloseDialog()
Used to close the current JSP dialog. |
void |
actionDefine()
Performs the define property action, will be called by the JSP page. |
void |
actionDeleteResource()
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(java.lang.String paramName,
java.lang.String paramValue)
Adds a configuration parameter to this parameter configurable class instance. |
java.lang.String |
buildActivePropertiesList()
Creates the HTML String for the active properties overview of the current resource. |
java.lang.String |
buildEditForm()
Creates the HTML String for the edit properties form. |
java.lang.String |
buildSetFormValues()
Builds the JavaScript to set the property form values delayed. |
protected void |
dialogButtonsHtml(java.lang.StringBuffer result,
int button,
java.lang.String attribute)
Renders the HTML for a single input button of a specified type. |
java.lang.String |
dialogButtonsOkCancelDefine()
Builds a button row with an "Ok", a "Cancel" and a "Define" button. |
protected java.util.Map |
getActiveProperties()
Returns a map with CmsProperty object values keyed by property keys. |
java.util.Map |
getConfiguration()
Returns the configuration of this parameter configurable class instance, or null if the class does not need to be configured. |
java.lang.String |
getDialogHandler()
Returns the name of the handler which is used as key for the OpenCms runtime properties. |
java.lang.String |
getDialogUri(java.lang.String resource,
CmsJspActionElement jsp)
Returns the dialog URI in the OpenCms VFS to the dialog selector class. |
java.lang.String |
getParamDialogmode()
Returns the value of the dialogmode parameter, or null if this parameter was not provided. |
java.lang.String |
getParamIndexPageType()
Returns the paramIndexPageType. |
java.lang.String |
getParamNewproperty()
Returns the value of the new property parameter, or null if this parameter was not provided. |
java.lang.String |
getParamUsetempfileproject()
Returns the value of the usetempfileproject parameter, or null if this parameter was not provided. |
static java.util.Map |
getPropertyMap(java.util.List list)
Transforms a list of CmsProperty objects with structure and resource values into a map with CmsProperty object values keyed by property keys. |
protected CmsExplorerTypeSettings |
getSettingsForType(java.lang.String resTypeName)
Returns the explorer type settings of the resource type, considering eventual references to another type. |
java.util.List |
getTabParameterOrder()
Returns the order of the parameter prefixes for each tab. |
java.util.List |
getTabs()
Returns a list with localized Strings representing the names of the tabs. |
void |
initConfiguration()
Initializes a configuration after all parameters have been added. |
protected void |
initWorkplaceRequestValues(CmsWorkplaceSettings settings,
javax.servlet.http.HttpServletRequest request)
Analyzes the request for workplace parameters and adjusts the workplace settings accordingly. |
protected boolean |
isEditable()
Returns whether the properties are editable or not depending on the lock state of the resource and the current project. |
void |
setParamDialogmode(java.lang.String value)
Sets the value of the dialogmode parameter. |
void |
setParamIndexPageType(java.lang.String paramIndexPageType)
Sets the paramIndexPageType. |
void |
setParamNewproperty(java.lang.String value)
Sets the value of the new property parameter. |
void |
setParamUsetempfileproject(java.lang.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.tools.CmsToolDialog |
---|
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 java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int ACTION_SAVE_DEFINE
public static final int ACTION_SAVE_EDIT
public static final int ACTION_SHOW_DEFINE
public static final int ACTION_SHOW_EDIT
public static final int BUTTON_DEFINE
public static final int BUTTON_FINISH
public static final java.lang.String DIALOG_SAVE_DEFINE
public static final java.lang.String DIALOG_SAVE_EDIT
public static final java.lang.String DIALOG_SHOW_DEFAULT
public static final java.lang.String DIALOG_SHOW_DEFINE
public static final java.lang.String DIALOG_SHOW_EDIT
public static final java.lang.String DIALOG_TYPE
public static final java.lang.String MODE_WIZARD
public static final java.lang.String MODE_WIZARD_CREATEINDEX
public static final java.lang.String MODE_WIZARD_INDEXCREATED
public static final java.lang.String PANEL_RESOURCE
public static final java.lang.String PANEL_STRUCTURE
public static final java.lang.String PARAM_DIALOGMODE
public static final java.lang.String PARAM_HIDEADVANCED
public static final java.lang.String PARAM_NEWPROPERTY
public static final java.lang.String PARAM_SHOWGROUP
public static final java.lang.String PREFIX_HIDDEN
public static final java.lang.String PREFIX_RESOURCE
public static final java.lang.String PREFIX_STRUCTURE
public static final java.lang.String PREFIX_USEPROPERTY
public static final java.lang.String PREFIX_VALUE
public static final java.lang.String TAB_RESOURCE
public static final java.lang.String TAB_STRUCTURE
public static final java.lang.String URI_PROPERTY_CUSTOM_DIALOG
public static final java.lang.String URI_PROPERTY_DIALOG
public static final java.lang.String URI_PROPERTY_DIALOG_HANDLER
Constructor Detail |
---|
public CmsPropertyAdvanced()
Do not use this constructor on JSP pages.
public CmsPropertyAdvanced(CmsJspActionElement jsp)
jsp
- an initialized JSP action elementpublic CmsPropertyAdvanced(javax.servlet.jsp.PageContext context, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
context
- the JSP page contextreq
- the JSP requestres
- the JSP responseMethod Detail |
---|
public static java.util.Map getPropertyMap(java.util.List list)
list
- a list of CmsProperty objects
public void actionCloseDialog() throws javax.servlet.jsp.JspException
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.
actionCloseDialog
in class CmsDialog
javax.servlet.jsp.JspException
- if including an element failspublic void actionDefine() throws javax.servlet.jsp.JspException
javax.servlet.jsp.JspException
- if problems including sub-elements occurpublic void actionDeleteResource() throws javax.servlet.jsp.JspException
If the dialog is not in wizard mode, the resource is not deleted.
javax.servlet.jsp.JspException
- if including the error page failspublic void actionEdit(javax.servlet.http.HttpServletRequest request) throws javax.servlet.jsp.JspException
request
- the HttpServletRequest
javax.servlet.jsp.JspException
- if problems including sub-elements occurpublic void addConfigurationParameter(java.lang.String paramName, java.lang.String paramValue)
I_CmsConfigurationParameterHandler
addConfigurationParameter
in interface I_CmsConfigurationParameterHandler
paramName
- the name of the parameterparamValue
- the value for the parameterI_CmsConfigurationParameterHandler.addConfigurationParameter(java.lang.String, java.lang.String)
public java.lang.String buildActivePropertiesList()
public java.lang.String buildEditForm()
The values of the form are set delayed, have a look at the JavaDoc of buildSetFormValues() for a detailed description.
public java.lang.String buildSetFormValues()
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);".
public java.lang.String dialogButtonsOkCancelDefine()
public java.util.Map getConfiguration()
I_CmsConfigurationParameterHandler
null
if the class does not need to be configured.
All elements in the configuration are key, value String pairs,
set using the I_CmsConfigurationParameterHandler.addConfigurationParameter(String, String)
method
during initialization of the loader.
Implementations will (should) not to return a direct reference to the internal configuration but just a copy of it, to avoid unwanted external manipulation.
getConfiguration
in interface I_CmsConfigurationParameterHandler
null
I_CmsConfigurationParameterHandler.getConfiguration()
public java.lang.String getDialogHandler()
I_CmsDialogHandler
Store the name of the key as a public String constant in the CmsDialogSelector class.
getDialogHandler
in interface I_CmsDialogHandler
I_CmsDialogHandler.getDialogHandler()
public java.lang.String getDialogUri(java.lang.String resource, CmsJspActionElement jsp)
I_CmsDialogHandler
getDialogUri
in interface I_CmsDialogHandler
resource
- the selected resourcejsp
- the CmsJspActionElement
I_CmsDialogHandler.getDialogUri(java.lang.String, CmsJspActionElement)
public java.lang.String getParamDialogmode()
The dialogmode parameter stores the different modes of the property dialog, e.g. for displaying other buttons in the new resource wizard.
public java.lang.String getParamIndexPageType()
public java.lang.String getParamNewproperty()
The new property parameter stores the name of the new defined property.
public java.lang.String getParamUsetempfileproject()
The usetempfileproject parameter stores if the file resides in the temp file project.
public java.util.List getTabParameterOrder()
CmsTabDialog
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.
getTabParameterOrder
in class CmsTabDialog
CmsTabDialog.getTabParameterOrder()
public java.util.List getTabs()
CmsTabDialog
getTabs
in class CmsTabDialog
CmsTabDialog.getTabs()
public void initConfiguration()
I_CmsConfigurationParameterHandler
initConfiguration
in interface I_CmsConfigurationParameterHandler
I_CmsConfigurationParameterHandler.initConfiguration()
public void setParamDialogmode(java.lang.String value)
value
- the value to setpublic void setParamIndexPageType(java.lang.String paramIndexPageType)
paramIndexPageType
- the paramIndexPageType to setpublic void setParamNewproperty(java.lang.String value)
value
- the value to setpublic void setParamUsetempfileproject(java.lang.String value)
value
- the value to setprotected void dialogButtonsHtml(java.lang.StringBuffer result, int button, java.lang.String attribute)
CmsDialog
dialogButtonsHtml
in class CmsDialog
result
- a string buffer where the rendered HTML gets appended tobutton
- a integer key to identify the buttonattribute
- an optional string with possible tag attributes, or nullCmsDialog.dialogButtonsHtml(java.lang.StringBuffer, int, java.lang.String)
protected java.util.Map getActiveProperties()
protected CmsExplorerTypeSettings getSettingsForType(java.lang.String resTypeName)
resTypeName
- the resource type name
protected void initWorkplaceRequestValues(CmsWorkplaceSettings settings, javax.servlet.http.HttpServletRequest request)
CmsWorkplace
initWorkplaceRequestValues
in class CmsDialog
settings
- the workplace settingsrequest
- the current requestCmsWorkplace.initWorkplaceRequestValues(org.opencms.workplace.CmsWorkplaceSettings, javax.servlet.http.HttpServletRequest)
protected boolean isEditable()
|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |