ALF-2397 - Deployment protocol add create/update flag to "send" method.

API Changeto DeploymentTarget (Add a boolean parameter)

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@20862 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Mark Rogers
2010-06-29 11:59:40 +00:00
parent c6e059b23a
commit 1b9e0d9837
2 changed files with 6 additions and 5 deletions

View File

@@ -1847,7 +1847,7 @@ public class DeploymentServiceImpl implements DeploymentService
AVMNodeDescriptor src = work.getSrc();
if(src.isFile())
{
copyFileToFSR(src, work.getVersion(), event.getDestination(), ticket);
copyFileToFSR(src, true, work.getVersion(), event.getDestination(), ticket);
}
else
{
@@ -1857,7 +1857,7 @@ public class DeploymentServiceImpl implements DeploymentService
}
else if (event.getType().equals(DeploymentEvent.Type.UPDATED))
{
copyFileToFSR(work.getSrc(), work.getVersion(), event.getDestination(), ticket);
copyFileToFSR(work.getSrc(), false, work.getVersion(), event.getDestination(), ticket);
}
// success, now put the event onto the event queue
eventQueue.add(event);
@@ -1885,6 +1885,7 @@ public class DeploymentServiceImpl implements DeploymentService
*/
private void copyFileToFSR(
final AVMNodeDescriptor src,
final boolean create,
final int version,
final String dstPath,
final String ticket)
@@ -1905,7 +1906,7 @@ public class DeploymentServiceImpl implements DeploymentService
Set<String>stringAspects = getAspects(avmService, src);
Map<String, Serializable> stringProperties = getProperties(src, version);
OutputStream out = service.send(ticket, dstPath, src.getGuid(), encoding, mimeType, stringAspects, stringProperties);
OutputStream out = service.send(ticket, create, dstPath, src.getGuid(), encoding, mimeType, stringAspects, stringProperties);
try
{