|
||||||
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.CmsMultiDialog
org.opencms.workplace.commons.CmsDelete
public class CmsDelete
Provides methods for the delete resources dialog.
The following files use this class:
Field Summary | |
---|---|
static int |
ACTION_DELETE
Value for the action: delete the resource. |
static java.lang.String |
DIALOG_TYPE
The dialog type. |
static org.apache.commons.logging.Log |
LOG
The log object for this class. |
static java.lang.String |
PARAM_DELETE_SIBLINGS
Request parameter name for the deletesiblings parameter. |
static java.lang.String |
URI_DELETE_DIALOG
The delete dialog URI. |
Fields inherited from class org.opencms.workplace.CmsMultiDialog |
---|
DELIMITER_RESOURCES, PARAM_RESOURCELIST |
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 | |
---|---|
CmsDelete()
Default constructor needed for dialog handler implementation. |
|
CmsDelete(CmsJspActionElement jsp)
Public constructor with JSP action element. |
|
CmsDelete(javax.servlet.jsp.PageContext context,
javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
Public constructor with JSP variables. |
Method Summary | |
---|---|
void |
actionDelete()
Performs the delete 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 |
buildConfirmation()
Returns the html for the confirmation message. |
java.lang.String |
buildDeleteSiblings()
Returns the html for the "delete siblings" options when deleting a a resource with siblings. |
java.lang.String |
buildReport()
Returns html code for the possible broken relations. |
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 |
getParamDeleteSiblings()
Returns the value of the boolean option to delete siblings. |
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. |
boolean |
isCanDelete()
Returns true if the current user is allowed
to delete the selected resources. |
protected boolean |
performDialogOperation()
Performs the resource deletion. |
protected void |
performSingleDeleteOperation(java.lang.String resource,
CmsResource.CmsResourceDeleteMode deleteOption)
Performs the delete operation for a single VFS resource. |
void |
setParamDeleteSiblings(java.lang.String value)
Sets the value of the boolean option to delete siblings. |
Methods inherited from class org.opencms.workplace.CmsMultiDialog |
---|
addMultiOperationException, buildLockHeaderBox, buildResourceList, checkMultiOperationException, checkResourcePermissions, getParamResourcelist, getResourceList, getResourceListAsParam, isMultiOperation, isOperationOnFolder, setDialogTitle, setParamResource, setParamResourcelist |
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_DELETE
public static final java.lang.String DIALOG_TYPE
public static final org.apache.commons.logging.Log LOG
public static final java.lang.String PARAM_DELETE_SIBLINGS
public static final java.lang.String URI_DELETE_DIALOG
Constructor Detail |
---|
public CmsDelete()
public CmsDelete(CmsJspActionElement jsp)
jsp
- an initialized JSP action elementpublic CmsDelete(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 void actionDelete() throws javax.servlet.jsp.JspException
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 buildConfirmation()
public java.lang.String buildDeleteSiblings()
public java.lang.String buildReport() throws javax.servlet.jsp.JspException, javax.servlet.ServletException, java.io.IOException
javax.servlet.jsp.JspException
- if dialog actions fail
java.io.IOException
- in case of errros forwarding to the required result page
javax.servlet.ServletException
- in case of errros forwarding to the required result pagepublic 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 getParamDeleteSiblings()
public void initConfiguration()
I_CmsConfigurationParameterHandler
initConfiguration
in interface I_CmsConfigurationParameterHandler
I_CmsConfigurationParameterHandler.initConfiguration()
public boolean isCanDelete()
true
if the current user is allowed
to delete the selected resources.
true
if the current user is allowed
to delete the selected resourcespublic void setParamDeleteSiblings(java.lang.String value)
value
- the value of the boolean option to delete siblingsprotected 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 performDialogOperation() throws CmsException
performDialogOperation
in class CmsMultiDialog
CmsException
- if deletion is not successfulprotected void performSingleDeleteOperation(java.lang.String resource, CmsResource.CmsResourceDeleteMode deleteOption) throws CmsException
resource
- the resource VFS pathdeleteOption
- the delete option for sibling deletion
CmsException
- if deleting the resource fails
|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |