mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +00:00
Merged DEV_TEMPORARY to HEAD
18288: ENH-678: alfresco webdav does not pass litmus webdav test suite git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@18320 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -24,7 +24,13 @@
|
||||
*/
|
||||
package org.alfresco.repo.webdav;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.alfresco.service.cmr.model.FileFolderService;
|
||||
import org.alfresco.service.cmr.model.FileInfo;
|
||||
import org.alfresco.service.cmr.model.FileNotFoundException;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
|
||||
/**
|
||||
@@ -47,6 +53,27 @@ public class MoveMethod extends AbstractMoveOrCopyMethod
|
||||
NodeRef destParentNodeRef,
|
||||
String name) throws Exception
|
||||
{
|
||||
NodeRef rootNodeRef = getRootNodeRef();
|
||||
|
||||
String path = getPath();
|
||||
List<String> pathElements = getDAVHelper().splitAllPaths(path);
|
||||
FileInfo fileInfo = null;
|
||||
try
|
||||
{
|
||||
// get the node to move
|
||||
fileInfo = fileFolderService.resolveNamePath(rootNodeRef, pathElements);
|
||||
}
|
||||
catch (FileNotFoundException e)
|
||||
{
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
logger.debug("Node not found: " + getPath());
|
||||
}
|
||||
throw new WebDAVServerException(HttpServletResponse.SC_NOT_FOUND);
|
||||
}
|
||||
|
||||
checkNode(fileInfo);
|
||||
|
||||
fileFolderService.move(sourceNodeRef, destParentNodeRef, name);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user