mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged V2.9 to HEAD
10531: Merged V2.2 to V2.9 9928: Optimise & consolidate get web project user role (ETWOTWO-568) 9962: Reverted rev 9902 of RuleServiceImpl 9964: Fixed transaction read-only declaration 9979: ETWOTWO-572: Allow OpenOffice to be called remotely 9987: Second attempt at fixing ETWOTWO-438: versionable aspect and invite user 10096: Fix for ETWOTWO-507 FSR Service Port 10224: Fix for ETWOTWO-507 (inconsistent results with add and delete together) 10225: Adding logging and making FSR work with absolute directories (ETWOTWO-70 and ETWOONE-81) 10254: ALFCOM-242, ALFCOM-230, ETWOTWO-437 10283: Fixed deployment installer builder to use IJ v1.2.7 10359: Add Display Group for deployment servers to JSF client (ETWOTWO-474) 10536: MT - simple setup/system test 10553: Hid domain objects completely within the UsageDeltaDAO git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@10613 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -877,7 +877,7 @@ public class DeploymentServiceImpl implements DeploymentService
|
||||
}
|
||||
report.add(event);
|
||||
String storeName = srcPath.substring(0, srcPath.indexOf(':'));
|
||||
System.out.println(storeName);
|
||||
|
||||
if (version < 0)
|
||||
{
|
||||
version = fAVMService.createSnapshot(storeName, null, null).get(storeName);
|
||||
@@ -908,15 +908,28 @@ public class DeploymentServiceImpl implements DeploymentService
|
||||
callback.eventOccurred(event);
|
||||
}
|
||||
|
||||
if (service != null)
|
||||
if (service != null && ticket != null)
|
||||
{
|
||||
// TODO MER - Consider what happens if abort throws an exception itself, then we loose e?
|
||||
service.abort(ticket);
|
||||
}
|
||||
|
||||
throw new AVMException("Deployment to: " + target + " failed.", e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* deployDirectoryPush
|
||||
* Compares the source and destination listings and updates report with update events required to make
|
||||
* dest similar to src.
|
||||
* @param service
|
||||
* @param ticket
|
||||
* @param report
|
||||
* @param callbacks
|
||||
* @param version
|
||||
* @param srcPath
|
||||
* @param dstPath
|
||||
* @param matcher
|
||||
*/
|
||||
private void deployDirectoryPush(DeploymentReceiverService service, String ticket,
|
||||
DeploymentReport report, List<DeploymentCallback> callbacks,
|
||||
int version,
|
||||
@@ -926,9 +939,12 @@ public class DeploymentServiceImpl implements DeploymentService
|
||||
List<FileDescriptor> dstListing = service.getListing(ticket, dstPath);
|
||||
Iterator<AVMNodeDescriptor> srcIter = srcListing.values().iterator();
|
||||
Iterator<FileDescriptor> dstIter = dstListing.iterator();
|
||||
// Here with two sorted directory listings
|
||||
AVMNodeDescriptor src = null;
|
||||
FileDescriptor dst = null;
|
||||
while (srcIter.hasNext() || dstIter.hasNext())
|
||||
|
||||
// Step through both directory listings
|
||||
while (srcIter.hasNext() || dstIter.hasNext() || src != null || dst != null)
|
||||
{
|
||||
if (src == null)
|
||||
{
|
||||
@@ -944,7 +960,11 @@ public class DeploymentServiceImpl implements DeploymentService
|
||||
dst = dstIter.next();
|
||||
}
|
||||
}
|
||||
// This means no entry on src so delete.
|
||||
if (fgLogger.isDebugEnabled())
|
||||
{
|
||||
fgLogger.debug("comparing src:" + src + " dst:"+ dst);
|
||||
}
|
||||
// This means no entry on src so delete what is on dst.
|
||||
if (src == null)
|
||||
{
|
||||
String newDstPath = extendPath(dstPath, dst.getName());
|
||||
@@ -980,9 +1000,12 @@ public class DeploymentServiceImpl implements DeploymentService
|
||||
src = null;
|
||||
continue;
|
||||
}
|
||||
|
||||
// Here with src and dst containing something
|
||||
int diff = src.getName().compareToIgnoreCase(dst.getName());
|
||||
if (diff < 0)
|
||||
{
|
||||
// src is less than dst - must be new content in src
|
||||
if (!excluded(matcher, src.getPath(), null))
|
||||
{
|
||||
copy(service, ticket, report, callbacks, version, src, dstPath, matcher);
|
||||
@@ -992,6 +1015,7 @@ public class DeploymentServiceImpl implements DeploymentService
|
||||
}
|
||||
if (diff == 0)
|
||||
{
|
||||
// src and dst have same file name
|
||||
if (src.getGuid().equals(dst.getGUID()))
|
||||
{
|
||||
src = null;
|
||||
|
Reference in New Issue
Block a user