mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged V3.2 to HEAD
15596: Merged V3.1 to V3.2 14017: Fix ETHREEOH-1880 - remove (double-)reverse of WCM staging snapshot order 14112: Fix ETHREEOH-1758 - apply contributed patch 14447: Merged V2.2 to V3.1 14276: ETWOTWO-1224 / WCM-948 - browsing staging area during (commit of) large submit can cause AVMNotFoundException: Path /www/avm_webapps not found. 14452: Add WCM services-based unit test for ETWOTWO-1224 / WCM-948 14589: ETHREEOH-1646 - User Sandboxes aren't visible for Content Publisher 15604: Merged V3.1 to V3.2 14734: Merged V2.2 to V3.1 14718: ETWOTWO-1244 - unable to revert some snapshots ("Does not exist: xxx") 14852: Merged V2.2 to V3.1 14720: ETWOTWO-1183 - "Show All Sandboxes" checkbox should only be visible for "Content Publisher" or "Content Manager" 15032: Fix ETHREEOH-2240 - delete WCM web project (does not clean-up workflow sandboxes and also appears in archive store) 15037: Fix ETHREEOH-2240 - follow-on for Alfresco Explorer's Manage (Review) Task Dialog 15056: Fix ETHREEOH-2297 - WCM layered folder - problem deleting file 15072: Minor - fix remote AVM test 15605: Merged V3.1 to V3.2 15082: Merged V2.2 to V3.1 15081: AVM - add tests only 15083: Fix ETHREEOH-2296 - user conflict when updating an AVM layered file 15118: Merged V2.2 to V3.1 15115: Fix ETWOTWO-1265 - WCM locking not working as expected (+ add WCM services test) 15137: Fix ETHREEOH-2309 and ETHREEOH-227 - including refactor (& clean-up) of WCM-related actions 15156: Fix ETHREEOH-2078 & ETHREEOH-2040 - WCM - deploy to localhost causes "Must have at least one store" errors 15175: Fix ETHREEOH-2309 and ETHREEOH-227 - further clean-up of WCM submit/undo actions (for consistency) 15190: Minor: message updates for WCM submit/undo actions git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@16858 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -63,6 +63,8 @@ import org.alfresco.service.cmr.security.PermissionService;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
import org.alfresco.util.GUID;
|
||||
import org.alfresco.util.Pair;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
||||
/**
|
||||
* A Repository contains a current root directory and a list of
|
||||
@@ -72,6 +74,7 @@ import org.alfresco.util.Pair;
|
||||
*/
|
||||
public class AVMStoreImpl implements AVMStore
|
||||
{
|
||||
private static Log fgLogger = LogFactory.getLog(AVMStoreImpl.class);
|
||||
/**
|
||||
* The primary key.
|
||||
*/
|
||||
@@ -560,7 +563,38 @@ public class AVMStoreImpl implements AVMStore
|
||||
{
|
||||
throw new AVMExistsException("Child exists: " + name);
|
||||
}
|
||||
// TODO Reexamine decision to not check validity of srcPath.
|
||||
// TODO Reexamine decision to not check validity of srcPath. Warning for now.
|
||||
String[] srcPathParts = srcPath.split(":");
|
||||
String[] dstPathParts = dstPath.split(":");
|
||||
|
||||
Lookup lPathSrc = null;
|
||||
if (srcPathParts[0].equals(dstPathParts[0]))
|
||||
{
|
||||
lPathSrc = lookup(-1, srcPathParts[1], false, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
AVMStore srcStore = AVMDAOs.Instance().fAVMStoreDAO.getByName(srcPathParts[0]);
|
||||
if (srcStore != null)
|
||||
{
|
||||
lPathSrc = srcStore.lookup(-1, srcPathParts[1], false, false);
|
||||
}
|
||||
}
|
||||
|
||||
AVMNode srcNode = null;
|
||||
if (lPathSrc == null)
|
||||
{
|
||||
fgLogger.warn("CreateLayeredFile: srcPath not found: "+srcPath);
|
||||
}
|
||||
else
|
||||
{
|
||||
srcNode = (AVMNode)lPathSrc.getCurrentNode();
|
||||
if (! (srcNode instanceof FileNode))
|
||||
{
|
||||
fgLogger.warn("CreateLayeredFile: srcPath is not a file: "+srcPath);
|
||||
}
|
||||
}
|
||||
|
||||
LayeredFileNodeImpl newFile =
|
||||
new LayeredFileNodeImpl(srcPath, this, null);
|
||||
|
||||
@@ -573,6 +607,13 @@ public class AVMStoreImpl implements AVMStore
|
||||
{
|
||||
newFile.setAncestor(child);
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((srcNode != null) && (srcNode instanceof FileNode))
|
||||
{
|
||||
newFile.setAncestor((FileNode)srcNode);
|
||||
}
|
||||
}
|
||||
|
||||
// newFile.setVersionID(getNextVersionID());
|
||||
//dir.updateModTime();
|
||||
@@ -738,12 +779,24 @@ public class AVMStoreImpl implements AVMStore
|
||||
{
|
||||
throw new AVMNotFoundException("Path " + path + " not found.");
|
||||
}
|
||||
|
||||
DirectoryNode dir = (DirectoryNode)lPath.getCurrentNode();
|
||||
Pair<AVMNode, Boolean> temp = dir.lookupChild(lPath, name, false);
|
||||
AVMNode child = (temp == null) ? null : temp.getFirst();
|
||||
if (child == null)
|
||||
{
|
||||
throw new AVMNotFoundException("Does not exist: " + name);
|
||||
Lookup lPathToChild = lookup(-1, path+"/"+name, true, false);
|
||||
if (lPathToChild != null)
|
||||
{
|
||||
// ETHREEOH-2297
|
||||
child = lPathToChild.getCurrentNode();
|
||||
}
|
||||
if (child == null)
|
||||
{
|
||||
throw new AVMNotFoundException("Does not exist: " + name);
|
||||
}
|
||||
|
||||
dir = lPathToChild.getCurrentNodeDirectory();
|
||||
}
|
||||
|
||||
if (!fAVMRepository.can(this, child, PermissionService.DELETE_NODE, false))
|
||||
|
Reference in New Issue
Block a user