Merged V2.1 to HEAD

6349: Build fix after ReadPermissions was added to the permission model
   6350: CIFS file rename fixes
   6352: Management of avmsubmittedaspect, particularly as applies to newly created directories
   6353: Added assemble to ignore property pattern
   6354: Deployment project build stuff
   6355: Fix for AR-1245 (Do not authenticate in a read only TX as it could create a person object)
   6356: Office 2003 Add-Ins - Fixes to installers to support Vista
   6357: Office Add-In web scripts - Updated to support the new Office 2007 extensions (.docx, .xlsx, .pptx)
   6358: Fix for AR-1392 - Audit string lengths
   6359: Remove unwanted rule model from repo
            Fix issue with update rules on spaces causing documents to be deleted in CIFS
   6360: Office 2003 Add-In Installers, Vista fixes


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@6723 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2007-09-10 14:30:55 +00:00
parent cd78bd51ba
commit b166891218
12 changed files with 268 additions and 577 deletions

View File

@@ -19,7 +19,8 @@
* and Open Source Software ("FLOSS") applications as described in Alfresco's
* FLOSS exception. You should have recieved a copy of the text describing
* the FLOSS exception, and it is also available here:
* http://www.alfresco.com/legal/licensing" */
* http://www.alfresco.com/legal/licensing
*/
package org.alfresco.repo.avm.wf;
import java.io.Serializable;
@@ -44,8 +45,9 @@ import org.alfresco.util.Pair;
import org.jbpm.graph.exe.ExecutionContext;
import org.springframework.beans.factory.BeanFactory;
public class AVMSubmitPackageHandler extends JBPMSpringActionHandler implements
Serializable
public class AVMSubmitPackageHandler
extends JBPMSpringActionHandler
implements Serializable
{
private static final long serialVersionUID = 4113360751217684995L;
@@ -116,8 +118,9 @@ public class AVMSubmitPackageHandler extends JBPMSpringActionHandler implements
final List<AVMDifference> stagingDiffs = fAVMSyncService.compare(pkgPath.getFirst(), pkgPath.getSecond(), -1, targetPath, null);
for (final AVMDifference diff : stagingDiffs)
{
fAVMSubmittedAspect.clearSubmitted(diff.getSourceVersion(), diff.getSourcePath());
recursivelyRemoveLocks(webProject, diff.getSourceVersion(), diff.getSourcePath());
this.recursivelyRemoveLocksAndSubmittedAspect(webProject,
diff.getSourceVersion(),
diff.getSourcePath());
}
// Allow AVMSubmitTransactionListener to inspect the staging diffs
@@ -150,8 +153,9 @@ public class AVMSubmitPackageHandler extends JBPMSpringActionHandler implements
* Recursively remove locks from a path. Walking child folders looking for files
* to remove locks from.
*/
private void recursivelyRemoveLocks(String webProject, int version, String path)
private void recursivelyRemoveLocksAndSubmittedAspect(final String webProject, final int version, final String path)
{
fAVMSubmittedAspect.clearSubmitted(version, path);
AVMNodeDescriptor desc = fAVMService.lookup(version, path, true);
if (desc.isFile() || desc.isDeletedFile())
{
@@ -159,10 +163,9 @@ public class AVMSubmitPackageHandler extends JBPMSpringActionHandler implements
}
else
{
Map<String, AVMNodeDescriptor> list = fAVMService.getDirectoryListing(version, path, true);
for (AVMNodeDescriptor child : list.values())
for (final AVMNodeDescriptor child : fAVMService.getDirectoryListingArray(version, path, true))
{
recursivelyRemoveLocks(webProject, version, child.getPath());
this.recursivelyRemoveLocksAndSubmittedAspect(webProject, version, child.getPath());
}
}
}