Merged V3.1 to HEAD

13175: Basic implementation of timestamp propagation
   13176: Fixed ETHREEOH-1172: NodeService.getProperties sometimes returning instance of "Collections.SingletonList"
   13184: Merged V3.0 to V3.1
      13179: Merged V2.2 to V3.0
         13141: Fix for ETWOTWO-1109: WCM - content publisher cannot submit modified assets (2.2.3-dev regress)
         13144: Fix for repopened ETWOTWO-1082:  AVM has concurrency limitations via CIFS/NFS/FTP ...
      13180: Merged V2.2 to V3.0
         13144: Fix for repopened ETWOTWO-1082:  AVM has concurrency limitations via CIFS/NFS/FTP ...
   13185: Logging enhancements to FileFolderService to aid debugging of ETHREEOH-1247
   13187: Changed NPE to IllegalArgumentException
   13191: Fix for ETHREEOH-1267 malformed JSON.
   13203: Fix ETHREEOH-1309 regress
   13205: Fixed typo of UNKNOWN
   13206: DM index check - allow index transaction tracker to be reset, etc
   13213: Fixed ETHREEOH-1313: System Property Overrides not working when using the installer
   13214: WCM services - add/update unit tests - CRUD using different roles
   ___________________________________________________________________
   Modified: svn:mergeinfo
      Merged /alfresco/BRANCHES/V3.0:r13179-13180
      Merged /alfresco/BRANCHES/V2.2:r13141,13144
      Merged /alfresco/BRANCHES/V3.1:r13172,13175-13176,13179-13181,13184-13189,13191,13203,13205-13206,13210-13215


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@13610 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2009-03-12 20:15:34 +00:00
parent 39bc2536d5
commit 07114a1ed2
21 changed files with 736 additions and 68 deletions

View File

@@ -1711,7 +1711,7 @@ public class AVMStoreImpl implements AVMStore, Serializable
}
/**
* Link a node intro a directory, directly.
* Link a node into a directory, directly.
* @param parentPath The path to the directory.
* @param name The name to give the parent.
* @param toLink The node to link.
@@ -1730,6 +1730,37 @@ public class AVMStoreImpl implements AVMStore, Serializable
}
dir.link(lPath, name, toLink);
}
/**
* Update a link to a node in a directory, directly.
* @param parentPath The path to the directory.
* @param name The name to give the parent.
* @param toLink The node to link.
*/
public void updateLink(String parentPath, String name, AVMNodeDescriptor toLink)
{
Lookup lPath = lookupDirectory(-1, parentPath, true);
if (lPath == null)
{
throw new AVMNotFoundException("Path " + parentPath + " not found.");
}
DirectoryNode dir = (DirectoryNode)lPath.getCurrentNode();
Lookup cPath = new Lookup(lPath, AVMDAOs.Instance().fAVMNodeDAO, AVMDAOs.Instance().fAVMStoreDAO);
Pair<AVMNode, Boolean> result = dir.lookupChild(cPath, name, true);
if (result == null)
{
throw new AVMNotFoundException("Path " + parentPath + "/" +name + " not found.");
}
AVMNode child = result.getFirst();
if (!fAVMRepository.can(null, child, PermissionService.WRITE, cPath.getDirectlyContained()))
{
throw new AccessDeniedException("Not allowed to update node: " + parentPath + "/" +name );
}
dir.removeChild(lPath, name);
dir.link(lPath, name, toLink);
}
/**
* Revert a head path to a given version. This works by cloning