Package nl.info.webdav.methods
Class DoCopy
java.lang.Object
nl.info.webdav.methods.AbstractMethod
nl.info.webdav.methods.DoCopy
- All Implemented Interfaces:
IMethodExecutor
-
Field Summary
Fields inherited from class nl.info.webdav.methods.AbstractMethod
BUF_SIZE, CREATION_DATE_FORMAT, DEFAULT_TIMEOUT, INFINITY, LAST_MODIFIED_DATE_FORMAT, LOCAL_DATE_FORMAT, MAX_TIMEOUT, TEMP_TIMEOUT, TEMPORARY, URL_ENCODER -
Constructor Summary
ConstructorsConstructorDescriptionDoCopy(IWebdavStore store, ResourceLocks resourceLocks, DoDelete doDelete, boolean readOnly) -
Method Summary
Modifier and TypeMethodDescriptionbooleancopyResource(ITransaction transaction, jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse resp) Copy a resource.voidexecute(ITransaction transaction, jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse resp) protected StringReturn a context-relative path, beginning with a "/", that represents the canonical version of the specified path after ".." and "." elements are resolved out.Methods inherited from class nl.info.webdav.methods.AbstractMethod
checkLocks, creationDateFormat, getCleanPath, getDepth, getDocumentBuilder, getETag, getLocalDateFormat, getLockIdFromIfHeader, getLockIdFromLockTokenHeader, getParentPath, getRelativePath, lastModifiedDateFormat, rewriteUrl, sendReport
-
Constructor Details
-
DoCopy
-
-
Method Details
-
execute
public void execute(ITransaction transaction, jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse resp) throws IOException, LockFailedException - Throws:
IOExceptionLockFailedException
-
copyResource
public boolean copyResource(ITransaction transaction, jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse resp) throws WebdavException, IOException Copy a resource.- Parameters:
transaction- indicates that the method is within the scope of a WebDAV transactionreq- Servlet requestresp- Servlet response- Returns:
- true if the copy is successful
- Throws:
WebdavException- if an error in the underlying store occursIOException- when an error occurs while sending the response
-
normalize
Return a context-relative path, beginning with a "/", that represents the canonical version of the specified path after ".." and "." elements are resolved out. If the specified path attempts to go outside the boundaries of the current context (i.e. too many ".." path elements are present), returnnullinstead.- Parameters:
path- path to be normalized- Returns:
- normalized path
-