|
||||||
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.CmsCopy
public class CmsCopy
Provides methods for the copy resources dialog.
The following files use this class:
Field Summary | |
---|---|
static int |
ACTION_COPY
Value for the action: copy the resource. |
static java.lang.String |
DIALOG_TYPE
The dialog type. |
static java.lang.String |
PARAM_KEEPRIGHTS
Request parameter name for the keep rights flag. |
static java.lang.String |
PARAM_OVERWRITE
Request parameter name for the overwrite flag. |
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 |
Constructor Summary | |
---|---|
CmsCopy(CmsJspActionElement jsp)
Public constructor with JSP action element. |
|
CmsCopy(javax.servlet.jsp.PageContext context,
javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
Public constructor with JSP variables. |
Method Summary | |
---|---|
void |
actionCopy()
Performs the copy action, will be called by the JSP page. |
java.lang.String |
buildRadioCopyMode()
Builds the input radio buttons to select between preserving links or creating new resources when copying. |
java.lang.String |
getParamCopymode()
Returns the value of the copymode parameter. |
java.lang.String |
getParamKeeprights()
Returns the value of the keeprights parameter. |
java.lang.String |
getParamOverwrite()
Returns the value of the overwrite parameter. |
java.lang.String |
getParamTarget()
Returns the value of the target parameter, or null if this parameter was not provided. |
protected void |
initWorkplaceRequestValues(CmsWorkplaceSettings settings,
javax.servlet.http.HttpServletRequest request)
Analyzes the request for workplace parameters and adjusts the workplace settings accordingly. |
protected boolean |
performDialogOperation()
Performs the resource copying. |
protected void |
performSingleCopyOperation(java.lang.String source,
java.lang.String target,
java.lang.String sitePrefix,
CmsResource.CmsResourceCopyMode copyMode,
boolean overwrite)
Performs the copy operation for a single VFS resource. |
void |
setParamCopymode(java.lang.String value)
Sets the value of the copymode parameter. |
void |
setParamKeeprights(java.lang.String value)
Sets the value of the "keeprights" parameter. |
void |
setParamOverwrite(java.lang.String paramOverwrite)
Sets the value of the overwrite parameter. |
void |
setParamTarget(java.lang.String value)
Sets the value of the target parameter. |
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_COPY
public static final java.lang.String DIALOG_TYPE
public static final java.lang.String PARAM_KEEPRIGHTS
public static final java.lang.String PARAM_OVERWRITE
Constructor Detail |
---|
public CmsCopy(CmsJspActionElement jsp)
jsp
- an initialized JSP action elementpublic CmsCopy(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 actionCopy() throws javax.servlet.jsp.JspException
javax.servlet.jsp.JspException
- if problems including sub-elements occurpublic java.lang.String buildRadioCopyMode()
public java.lang.String getParamCopymode()
public java.lang.String getParamKeeprights()
public java.lang.String getParamOverwrite()
public java.lang.String getParamTarget()
The target parameter selects the target name of the operation.
public void setParamCopymode(java.lang.String value)
value
- the value of the copymode parameterpublic void setParamKeeprights(java.lang.String value)
value
- the value of the "keeprights" parameterpublic void setParamOverwrite(java.lang.String paramOverwrite)
paramOverwrite
- the value of the overwrite parameterpublic void setParamTarget(java.lang.String value)
value
- the value to setprotected 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 copying is not successfulprotected void performSingleCopyOperation(java.lang.String source, java.lang.String target, java.lang.String sitePrefix, CmsResource.CmsResourceCopyMode copyMode, boolean overwrite) throws CmsException
source
- the source VFS pathtarget
- the target VFS pathsitePrefix
- the site prefixcopyMode
- the copy mode for siblingsoverwrite
- the overwrite flag
CmsException
- if copying the resource fails
|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |