mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Fix to AVMSubmitPackageHandler to handle folders in a workflow and recursively unlock files in a folder.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@6059 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -117,7 +117,7 @@ public class AVMSubmitPackageHandler extends JBPMSpringActionHandler implements
|
||||
for (final AVMDifference diff : stagingDiffs)
|
||||
{
|
||||
fAVMSubmittedAspect.clearSubmitted(diff.getSourceVersion(), diff.getSourcePath());
|
||||
this.fAVMLockingService.removeLock(webProject, diff.getSourcePath().substring(diff.getSourcePath().indexOf(":") + 1));
|
||||
recursivelyRemoveLocks(webProject, diff.getSourceVersion(), diff.getSourcePath());
|
||||
}
|
||||
|
||||
// Allow AVMSubmitTransactionListener to inspect the staging diffs
|
||||
@@ -145,4 +145,21 @@ public class AVMSubmitPackageHandler extends JBPMSpringActionHandler implements
|
||||
fAVMSyncService.flatten(from, targetPath);
|
||||
}
|
||||
}
|
||||
|
||||
private void recursivelyRemoveLocks(String webProject, int version, String path)
|
||||
{
|
||||
AVMNodeDescriptor desc = fAVMService.lookup(version, path, true);
|
||||
if (desc.isFile() || desc.isDeletedFile())
|
||||
{
|
||||
fAVMLockingService.removeLock(webProject, path.substring(path.indexOf(":") + 1));
|
||||
}
|
||||
else
|
||||
{
|
||||
Map<String, AVMNodeDescriptor> list = fAVMService.getDirectoryListing(version, path, true);
|
||||
for (AVMNodeDescriptor child : list.values())
|
||||
{
|
||||
recursivelyRemoveLocks(webProject, version, child.getPath());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user