net.sf.webdav.methods
Class DoCopy
java.lang.Object
net.sf.webdav.methods.AbstractMethod
net.sf.webdav.methods.DoCopy
- All Implemented Interfaces:
- IMethodExecutor
public class DoCopy
- extends AbstractMethod
|
Method Summary |
boolean |
copyResource(ITransaction transaction,
javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
Copy a resource. |
void |
execute(ITransaction transaction,
javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
|
protected String |
normalize(String path)
Return 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 net.sf.webdav.methods.AbstractMethod |
checkLocks, getCleanPath, getDepth, getDocumentBuilder, getETag, getLockIdFromIfHeader, getLockIdFromLockTokenHeader, getParentPath, getRelativePath, rewriteUrl, sendReport |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DoCopy
public DoCopy(IWebdavStore store,
ResourceLocks resourceLocks,
DoDelete doDelete,
boolean readOnly)
execute
public void execute(ITransaction transaction,
javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
throws IOException,
LockFailedException
- Throws:
IOException
LockFailedException
copyResource
public boolean copyResource(ITransaction transaction,
javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
throws WebdavException,
IOException,
LockFailedException
- 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 occurs
IOException - when an error occurs while sending the response
LockFailedException
normalize
protected String normalize(String path)
- 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),
return
null instead.
- Parameters:
path - Path to be normalized
- Returns:
- normalized path
Copyright © 2013 KnowledgePlaza. All Rights Reserved.