mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
Merge WCM_WDR_MER TO HEAD
MOB-399 Implementation of Deploymemnt Engine MOB-669 MOB-630 Revisions 14181 - 14539 merged,, git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@14543 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -53,14 +53,23 @@
|
|||||||
|
|
||||||
|
|
||||||
<!-- Deployment Service -->
|
<!-- Deployment Service -->
|
||||||
<bean id="deploymentService" class="org.alfresco.repo.deploy.DeploymentServiceImpl">
|
<bean id="deploymentService" class="org.alfresco.repo.deploy.DeploymentServiceImpl" init-method="init">
|
||||||
<property name="avmService">
|
<property name="avmService">
|
||||||
<ref bean="indexingAVMService"/>
|
<ref bean="indexingAVMService"/>
|
||||||
</property>
|
</property>
|
||||||
|
|
||||||
|
<property name="avmNodeService">
|
||||||
|
<ref bean="avmNodeService"/>
|
||||||
|
</property>
|
||||||
|
|
||||||
<property name="transactionService">
|
<property name="transactionService">
|
||||||
<ref bean="transactionService"/>
|
<ref bean="transactionService"/>
|
||||||
</property>
|
</property>
|
||||||
|
|
||||||
|
<property name="jobLockService">
|
||||||
|
<ref bean="jobLockService"/>
|
||||||
|
</property>
|
||||||
|
|
||||||
<!-- how many files to send in parallel -->
|
<!-- how many files to send in parallel -->
|
||||||
<property name="numberOfSendingThreads">
|
<property name="numberOfSendingThreads">
|
||||||
<value>5</value>
|
<value>5</value>
|
||||||
|
90
config/alfresco/deployment/filesystem-target.xml
Normal file
90
config/alfresco/deployment/filesystem-target.xml
Normal file
@@ -0,0 +1,90 @@
|
|||||||
|
<?xml version='1.0' encoding='UTF-8'?>
|
||||||
|
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>
|
||||||
|
|
||||||
|
<!-- Built in deployment server target -->
|
||||||
|
|
||||||
|
<beans>
|
||||||
|
|
||||||
|
<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
|
||||||
|
<property name="ignoreUnresolvablePlaceholders">
|
||||||
|
<value>true</value>
|
||||||
|
</property>
|
||||||
|
<property name="locations">
|
||||||
|
<list>
|
||||||
|
<value>classpath:alfresco/deployment/filesystem.properties</value>
|
||||||
|
</list>
|
||||||
|
</property>
|
||||||
|
</bean>
|
||||||
|
|
||||||
|
<!-- This is the common configuration for all file system receivers -->
|
||||||
|
<bean id="fileSystemReceiverService" class="org.alfresco.deployment.impl.fsr.FileSystemReceiverServiceImpl"
|
||||||
|
init-method="init">
|
||||||
|
|
||||||
|
<!-- Will an error be thrown if the FSR overwrites files outside its control -->
|
||||||
|
<property name="errorOnOverwrite"><value>${deployment.filesystem.errorOnOverwrite}</value></property>
|
||||||
|
|
||||||
|
<!-- Where to store temporary data -->
|
||||||
|
<property name="dataDirectory">
|
||||||
|
<value>${deployment.filesystem.datadir}</value>
|
||||||
|
</property>
|
||||||
|
|
||||||
|
<!-- Where to log information -->
|
||||||
|
<property name="logDirectory">
|
||||||
|
<value>${deployment.filesystem.logdir}</value>
|
||||||
|
</property>
|
||||||
|
|
||||||
|
<!-- where to store meta data -->
|
||||||
|
<property name="metaDataDirectory">
|
||||||
|
<value>${deployment.filesystem.metadatadir}</value>
|
||||||
|
</property>
|
||||||
|
|
||||||
|
<property name="commandQueue"><ref bean="deploymentReceiverCommandQueue" /></property>
|
||||||
|
</bean>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
|
||||||
|
Defines and registers the deployment target with the name "default"
|
||||||
|
Which is a FileSystemDeploymentTarget with the "deploymentReceiverEngine"
|
||||||
|
-->
|
||||||
|
|
||||||
|
<bean class="org.alfresco.deployment.impl.server.DeploymentTargetRegistrationBean"
|
||||||
|
init-method="register" >
|
||||||
|
|
||||||
|
<property name="name"><value>${deployment.filesystem.default.name}</value></property>
|
||||||
|
<property name="registry"><ref bean="deploymentReceiverEngine" /></property>
|
||||||
|
|
||||||
|
<property name="target">
|
||||||
|
<bean class="org.alfresco.deployment.impl.fsr.FileSystemDeploymentTarget" init-method="init">
|
||||||
|
<property name="rootDirectory"><value>${deployment.filesystem.default.rootdir}</value></property>
|
||||||
|
<property name="autoFix"><value>${deployment.filesystem.autofix}</value></property>
|
||||||
|
<property name="fileSystemReceiverService"><ref bean="fileSystemReceiverService"/></property>
|
||||||
|
|
||||||
|
<!-- how to authenticate for this particular target -->
|
||||||
|
<property name="authenticator">
|
||||||
|
<bean
|
||||||
|
class="org.alfresco.deployment.impl.DeploymentReceiverAuthenticatorAuthenticationService"
|
||||||
|
init-method="init">
|
||||||
|
<property name="authenticationService">
|
||||||
|
<ref bean="AuthenticationService" />
|
||||||
|
</property>
|
||||||
|
</bean>
|
||||||
|
</property>
|
||||||
|
|
||||||
|
<!-- Target Event Handlers
|
||||||
|
<property name="prepare">
|
||||||
|
<list>
|
||||||
|
<bean class="org.alfresco.deployment.SampleRunnable"/>
|
||||||
|
</list>
|
||||||
|
</property>
|
||||||
|
|
||||||
|
<property name="postCommit">
|
||||||
|
<list>
|
||||||
|
<bean class="org.alfresco.deployment.SampleRunnable"/>
|
||||||
|
</list>
|
||||||
|
</property>
|
||||||
|
-->
|
||||||
|
</bean>
|
||||||
|
</property>
|
||||||
|
</bean>
|
||||||
|
|
||||||
|
</beans>
|
18
config/alfresco/deployment/filesystem.properties
Normal file
18
config/alfresco/deployment/filesystem.properties
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
; Built in deployment receiver properties for the default
|
||||||
|
; filesystem receiver
|
||||||
|
|
||||||
|
; filesystem receiver configuration
|
||||||
|
deployment.filesystem.datadir=./depdata
|
||||||
|
deployment.filesystem.logdir=./deplog
|
||||||
|
deployment.filesystem.metadatadir=./depmetadata
|
||||||
|
|
||||||
|
deployment.filesystem.autofix=true
|
||||||
|
deployment.filesystem.errorOnOverwrite=false
|
||||||
|
|
||||||
|
; default filesystem target configuration
|
||||||
|
deployment.filesystem.default.rootdir=./www
|
||||||
|
deployment.filesystem.default.name=filesystem
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@@ -309,6 +309,7 @@ attribute.rmi.service.port=50503
|
|||||||
authentication.rmi.service.port=50504
|
authentication.rmi.service.port=50504
|
||||||
repo.rmi.service.port=50505
|
repo.rmi.service.port=50505
|
||||||
action.rmi.service.port=50506
|
action.rmi.service.port=50506
|
||||||
|
deployment.rmi.service.port=50507
|
||||||
|
|
||||||
# External executable locations
|
# External executable locations
|
||||||
ooo.exe=soffice
|
ooo.exe=soffice
|
||||||
|
@@ -0,0 +1,4 @@
|
|||||||
|
# WCM Deployment - Receiver Properties
|
||||||
|
|
||||||
|
wcm-deployment-receiver.rmi.service.port=${deployment.rmi.service.port}
|
||||||
|
wcm-deployment-receiver.poll.delay=5000
|
@@ -0,0 +1,71 @@
|
|||||||
|
<?xml version='1.0' encoding='UTF-8'?>
|
||||||
|
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>
|
||||||
|
<beans>
|
||||||
|
|
||||||
|
<!-- Repository Embedded Deployment Receiver Configuration -->
|
||||||
|
|
||||||
|
<!-- command queue for deployment service -->
|
||||||
|
<bean id="deploymentReceiverCommandQueue" class="org.alfresco.deployment.impl.server.DeploymentCommandQueueImpl" >
|
||||||
|
</bean>
|
||||||
|
|
||||||
|
<!-- Housekeeper for the deployment queue -->
|
||||||
|
<bean id="commandQueueHousekeeper" class="org.alfresco.deployment.impl.server.DeploymentCommandQueueHousekeeper"
|
||||||
|
init-method="init">
|
||||||
|
<property name="commandQueue"><ref bean="deploymentReceiverCommandQueue" /></property>
|
||||||
|
</bean>
|
||||||
|
|
||||||
|
<!-- Management for reader threads -->
|
||||||
|
<bean id="deploymentReaderManagement" class="org.alfresco.deployment.impl.server.ReaderManagementPool" >
|
||||||
|
</bean>
|
||||||
|
|
||||||
|
<!-- This is the deployment engine which is built into the repository -->
|
||||||
|
<bean id="deploymentReceiverEngine"
|
||||||
|
class="org.alfresco.deployment.impl.server.DeploymentReceiverEngineImpl"
|
||||||
|
init-method="init">
|
||||||
|
|
||||||
|
<!-- How long to wait before polling housekeeping -->
|
||||||
|
<property name="pollDelay"><value>${wcm-deployment-receiver.poll.delay}</value></property>
|
||||||
|
|
||||||
|
<property name="commandQueue"><ref bean="deploymentReceiverCommandQueue" /></property>
|
||||||
|
|
||||||
|
<property name="readerManagement"><ref bean="deploymentReaderManagement" /></property>
|
||||||
|
|
||||||
|
<!-- Define your content transformers here
|
||||||
|
<property name="transformers">
|
||||||
|
<list>
|
||||||
|
</list>
|
||||||
|
</property>
|
||||||
|
-->
|
||||||
|
|
||||||
|
<!-- Define your housekeepers here -->
|
||||||
|
<property name="housekeepers">
|
||||||
|
<set>
|
||||||
|
<ref bean="commandQueueHousekeeper"/>
|
||||||
|
</set>
|
||||||
|
</property>
|
||||||
|
</bean>
|
||||||
|
|
||||||
|
<!-- The remote interface for the deployment receiver engine -->
|
||||||
|
|
||||||
|
<bean id="deploymentReceiverTransportRMI" class="org.springframework.remoting.rmi.RmiServiceExporter">
|
||||||
|
<property name="service">
|
||||||
|
<ref bean="deploymentReceiverEngine"/>
|
||||||
|
</property>
|
||||||
|
<property name="serviceInterface">
|
||||||
|
<value>org.alfresco.deployment.DeploymentReceiverTransport</value>
|
||||||
|
</property>
|
||||||
|
<property name="serviceName">
|
||||||
|
<value>deployment</value>
|
||||||
|
</property>
|
||||||
|
<property name="registryPort">
|
||||||
|
<value>${alfresco.rmi.services.port}</value>
|
||||||
|
</property>
|
||||||
|
<property name="servicePort">
|
||||||
|
<value>${wcm-deployment-receiver.rmi.service.port}</value>
|
||||||
|
</property>
|
||||||
|
</bean>
|
||||||
|
|
||||||
|
<!-- Now import the deployment targets -->
|
||||||
|
<import resource="classpath*:alfresco/deployment/*-target.xml" />
|
||||||
|
|
||||||
|
</beans>
|
@@ -418,8 +418,18 @@ public class AVMDeployWebsiteAction extends ActionExecuterAbstractBase
|
|||||||
logger.debug("Performing Alfresco deployment to " + host + ":" + port +
|
logger.debug("Performing Alfresco deployment to " + host + ":" + port +
|
||||||
" using deploymentserver: " + serverProps);
|
" using deploymentserver: " + serverProps);
|
||||||
|
|
||||||
this.deployService.deployDifference(version, path, host, port,
|
this.deployService.deployDifference(version,
|
||||||
remoteUsername, remotePassword, targetPath, regexMatcher, true, false, false, callbacks);
|
path,
|
||||||
|
host,
|
||||||
|
port,
|
||||||
|
remoteUsername,
|
||||||
|
remotePassword,
|
||||||
|
targetPath,
|
||||||
|
regexMatcher,
|
||||||
|
true,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
callbacks);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Throwable err)
|
catch (Throwable err)
|
||||||
|
@@ -126,7 +126,7 @@ public class BulkLoader
|
|||||||
catch (IOException e)
|
catch (IOException e)
|
||||||
{
|
{
|
||||||
e.printStackTrace(System.err);
|
e.printStackTrace(System.err);
|
||||||
throw new AVMException("I/O Error");
|
throw new AVMException("I/O Error", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -119,10 +119,10 @@ public class ASRDeploymentTest extends AVMServiceTestBase
|
|||||||
String buffyText = "This is test data: Buffy the Vampire Slayer is an Emmy Award-winning and Golden Globe-nominated American cult television series that aired from March 10, 1997 until May 20, 2003. The series was created in 1997 by writer-director Joss Whedon under his production tag, Mutant Enemy Productions with later co-executive producers being Jane Espenson, David Fury, and Marti Noxon. The series narrative follows Buffy Summers (played by Sarah Michelle Gellar), the latest in a line of young women chosen by fate to battle against vampires, demons, and the forces of darkness as the Slayer. Like previous Slayers, Buffy is aided by a Watcher, who guides and trains her. Unlike her predecessors, Buffy surrounds herself with a circle of loyal friends who become known as the Scooby Gang.";
|
String buffyText = "This is test data: Buffy the Vampire Slayer is an Emmy Award-winning and Golden Globe-nominated American cult television series that aired from March 10, 1997 until May 20, 2003. The series was created in 1997 by writer-director Joss Whedon under his production tag, Mutant Enemy Productions with later co-executive producers being Jane Espenson, David Fury, and Marti Noxon. The series narrative follows Buffy Summers (played by Sarah Michelle Gellar), the latest in a line of young women chosen by fate to battle against vampires, demons, and the forces of darkness as the Slayer. Like previous Slayers, Buffy is aided by a Watcher, who guides and trains her. Unlike her predecessors, Buffy surrounds herself with a circle of loyal friends who become known as the Scooby Gang.";
|
||||||
fService.createFile("main:/a/b", "buffy").close();
|
fService.createFile("main:/a/b", "buffy").close();
|
||||||
writer = fService.getContentWriter("main:/a/b/buffy");
|
writer = fService.getContentWriter("main:/a/b/buffy");
|
||||||
|
|
||||||
// Force a conversion
|
// Force a conversion
|
||||||
writer.setEncoding("UTF-16");
|
writer.setEncoding("UTF-16");
|
||||||
writer.setMimetype(MimetypeMap.MIMETYPE_TEXT_PLAIN);
|
writer.setMimetype(MimetypeMap.MIMETYPE_TEXT_PLAIN);
|
||||||
|
|
||||||
writer.putContent(buffyText);
|
writer.putContent(buffyText);
|
||||||
|
|
||||||
fService.createFile("main:/a/b", "fudge.bak").close();
|
fService.createFile("main:/a/b", "fudge.bak").close();
|
||||||
@@ -144,14 +144,14 @@ public class ASRDeploymentTest extends AVMServiceTestBase
|
|||||||
assertTrue("first deployment no start", firstDeployment.contains(new DeploymentEvent(DeploymentEvent.Type.START, null, destRef)));
|
assertTrue("first deployment no start", firstDeployment.contains(new DeploymentEvent(DeploymentEvent.Type.START, null, destRef)));
|
||||||
assertTrue("first deployment no finish", firstDeployment.contains(new DeploymentEvent(DeploymentEvent.Type.END, null, destRef)));
|
assertTrue("first deployment no finish", firstDeployment.contains(new DeploymentEvent(DeploymentEvent.Type.END, null, destRef)));
|
||||||
assertTrue("first deployment wrong size", firstDeployment.size() == 11);
|
assertTrue("first deployment wrong size", firstDeployment.size() == 11);
|
||||||
assertTrue("Update missing: /a", firstDeployment.contains(new DeploymentEvent(DeploymentEvent.Type.COPIED, null, destRef + "/a")));
|
assertTrue("Update missing: /a", firstDeployment.contains(new DeploymentEvent(DeploymentEvent.Type.CREATED, null, destRef + "/a")));
|
||||||
assertTrue("Update missing: /a/b", firstDeployment.contains(new DeploymentEvent(DeploymentEvent.Type.COPIED, null, destRef + "/a/b")));
|
assertTrue("Update missing: /a/b", firstDeployment.contains(new DeploymentEvent(DeploymentEvent.Type.CREATED, null, destRef + "/a/b")));
|
||||||
assertTrue("Update missing: /a/b/c", firstDeployment.contains(new DeploymentEvent(DeploymentEvent.Type.COPIED, null, destRef + "/a/b/c")));
|
assertTrue("Update missing: /a/b/c", firstDeployment.contains(new DeploymentEvent(DeploymentEvent.Type.CREATED, null, destRef + "/a/b/c")));
|
||||||
assertTrue("Update missing: /d/e", firstDeployment.contains(new DeploymentEvent(DeploymentEvent.Type.COPIED, null, destRef + "/d/e")));
|
assertTrue("Update missing: /d/e", firstDeployment.contains(new DeploymentEvent(DeploymentEvent.Type.CREATED, null, destRef + "/d/e")));
|
||||||
assertTrue("Update missing: /a/b/c/foo", firstDeployment.contains(new DeploymentEvent(DeploymentEvent.Type.COPIED, null, destRef + "/a/b/c/foo")));
|
assertTrue("Update missing: /a/b/c/foo", firstDeployment.contains(new DeploymentEvent(DeploymentEvent.Type.CREATED, null, destRef + "/a/b/c/foo")));
|
||||||
assertTrue("Update missing: /a/b/c/bar", firstDeployment.contains(new DeploymentEvent(DeploymentEvent.Type.COPIED, null, destRef + "/a/b/c/bar")));
|
assertTrue("Update missing: /a/b/c/bar", firstDeployment.contains(new DeploymentEvent(DeploymentEvent.Type.CREATED, null, destRef + "/a/b/c/bar")));
|
||||||
assertTrue("Update missing: /a/b/buffy", firstDeployment.contains(new DeploymentEvent(DeploymentEvent.Type.COPIED, null, destRef + "/a/b/buffy")));
|
assertTrue("Update missing: /a/b/buffy", firstDeployment.contains(new DeploymentEvent(DeploymentEvent.Type.CREATED, null, destRef + "/a/b/buffy")));
|
||||||
assertFalse("Fudge has not been excluded", firstDeployment.contains(new DeploymentEvent(DeploymentEvent.Type.COPIED, null, destRef + "/a/b/fudge.bak")));
|
assertFalse("Fudge has not been excluded", firstDeployment.contains(new DeploymentEvent(DeploymentEvent.Type.CREATED, null, destRef + "/a/b/fudge.bak")));
|
||||||
|
|
||||||
// Check that files exist in the destination AVM Store
|
// Check that files exist in the destination AVM Store
|
||||||
{
|
{
|
||||||
|
@@ -43,6 +43,8 @@ public class DeploymentClientOutputStream extends OutputStream
|
|||||||
|
|
||||||
private String fOutputToken;
|
private String fOutputToken;
|
||||||
|
|
||||||
|
private boolean open = true;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Make one up.
|
* Make one up.
|
||||||
* @param transport
|
* @param transport
|
||||||
@@ -75,7 +77,11 @@ public class DeploymentClientOutputStream extends OutputStream
|
|||||||
@Override
|
@Override
|
||||||
public void close() throws IOException
|
public void close() throws IOException
|
||||||
{
|
{
|
||||||
// NO OP
|
if(open)
|
||||||
|
{
|
||||||
|
fTransport.finishSend(fTicket, fOutputToken);
|
||||||
|
}
|
||||||
|
open = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
@@ -27,9 +27,13 @@ package org.alfresco.repo.deploy;
|
|||||||
|
|
||||||
import java.io.OutputStream;
|
import java.io.OutputStream;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Set;
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
import org.alfresco.deployment.DeploymentReceiverService;
|
import org.alfresco.deployment.DeploymentReceiverService;
|
||||||
import org.alfresco.deployment.DeploymentReceiverTransport;
|
import org.alfresco.deployment.DeploymentReceiverTransport;
|
||||||
|
import org.alfresco.deployment.DeploymentToken;
|
||||||
import org.alfresco.deployment.FileDescriptor;
|
import org.alfresco.deployment.FileDescriptor;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -68,9 +72,17 @@ public class DeploymentReceiverServiceClient implements
|
|||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.alfresco.deployment.DeploymentReceiverService#begin(java.lang.String, java.lang.String, java.lang.String)
|
* @see org.alfresco.deployment.DeploymentReceiverService#begin(java.lang.String, java.lang.String, java.lang.String)
|
||||||
*/
|
*/
|
||||||
public String begin(String target, String user, String password)
|
public DeploymentToken begin(String target, String storeName, int version, String user, String password)
|
||||||
{
|
{
|
||||||
return fTransport.begin(target, user, password);
|
return fTransport.begin(target, storeName, version, user, password);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.alfresco.deployment.DeploymentReceiverService#commit(java.lang.String)
|
||||||
|
*/
|
||||||
|
public void prepare(String ticket)
|
||||||
|
{
|
||||||
|
fTransport.prepare(ticket);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
@@ -109,17 +121,17 @@ public class DeploymentReceiverServiceClient implements
|
|||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.alfresco.deployment.DeploymentReceiverService#mkdir(java.lang.String, java.lang.String, java.lang.String)
|
* @see org.alfresco.deployment.DeploymentReceiverService#mkdir(java.lang.String, java.lang.String, java.lang.String)
|
||||||
*/
|
*/
|
||||||
public void mkdir(String ticket, String path, String guid)
|
public void createDirectory(String ticket, String path, String guid, Set<String>aspects, Map<String, Serializable> properties)
|
||||||
{
|
{
|
||||||
fTransport.mkdir(ticket, path, guid);
|
fTransport.createDirectory(ticket, path, guid, aspects, properties);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.alfresco.deployment.DeploymentReceiverService#send(java.lang.String, java.lang.String, java.lang.String)
|
* @see org.alfresco.deployment.DeploymentReceiverService#send(java.lang.String, java.lang.String, java.lang.String)
|
||||||
*/
|
*/
|
||||||
public OutputStream send(String ticket, String path, String guid)
|
public OutputStream send(String ticket, String path, String guid, String encoding, String mimeType, Set<String>aspects, Map<String, Serializable> props)
|
||||||
{
|
{
|
||||||
String outputToken = fTransport.getSendToken(ticket, path, guid);
|
String outputToken = fTransport.getSendToken(ticket, path, guid, encoding, mimeType, aspects, props);
|
||||||
return new DeploymentClientOutputStream(fTransport, ticket, outputToken);
|
return new DeploymentClientOutputStream(fTransport, ticket, outputToken);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -131,8 +143,8 @@ public class DeploymentReceiverServiceClient implements
|
|||||||
fTransport.shutDown(user, password);
|
fTransport.shutDown(user, password);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setGuid(String ticket, String path, String guid)
|
public void updateDirectory(String ticket, String path, String guid, Set<String>aspects, Map<String, Serializable> props)
|
||||||
{
|
{
|
||||||
fTransport.setGuid(ticket, path, guid);
|
fTransport.updateDirectory(ticket, path, guid, aspects, props);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
File diff suppressed because it is too large
Load Diff
@@ -180,14 +180,14 @@ public class FSDeploymentTest extends AVMServiceTestBase
|
|||||||
assertTrue("first deployment no start", firstDeployment.contains(new DeploymentEvent(DeploymentEvent.Type.START, null, TEST_TARGET)));
|
assertTrue("first deployment no start", firstDeployment.contains(new DeploymentEvent(DeploymentEvent.Type.START, null, TEST_TARGET)));
|
||||||
assertTrue("first deployment no finish", firstDeployment.contains(new DeploymentEvent(DeploymentEvent.Type.END, null, TEST_TARGET)));
|
assertTrue("first deployment no finish", firstDeployment.contains(new DeploymentEvent(DeploymentEvent.Type.END, null, TEST_TARGET)));
|
||||||
assertTrue("first deployment wrong size", firstDeployment.size() == 11);
|
assertTrue("first deployment wrong size", firstDeployment.size() == 11);
|
||||||
assertTrue("Update missing: /a", firstDeployment.contains(new DeploymentEvent(DeploymentEvent.Type.COPIED, null, "/a")));
|
assertTrue("Update missing: /a", firstDeployment.contains(new DeploymentEvent(DeploymentEvent.Type.CREATED, null, "/a")));
|
||||||
assertTrue("Update missing: /a/b", firstDeployment.contains(new DeploymentEvent(DeploymentEvent.Type.COPIED, null, "/a/b")));
|
assertTrue("Update missing: /a/b", firstDeployment.contains(new DeploymentEvent(DeploymentEvent.Type.CREATED, null, "/a/b")));
|
||||||
assertTrue("Update missing: /a/b/c", firstDeployment.contains(new DeploymentEvent(DeploymentEvent.Type.COPIED, null, "/a/b/c")));
|
assertTrue("Update missing: /a/b/c", firstDeployment.contains(new DeploymentEvent(DeploymentEvent.Type.CREATED, null, "/a/b/c")));
|
||||||
assertTrue("Update missing: /d/e", firstDeployment.contains(new DeploymentEvent(DeploymentEvent.Type.COPIED, null, "/d/e")));
|
assertTrue("Update missing: /d/e", firstDeployment.contains(new DeploymentEvent(DeploymentEvent.Type.CREATED, null, "/d/e")));
|
||||||
assertTrue("Update missing: /a/b/c/foo", firstDeployment.contains(new DeploymentEvent(DeploymentEvent.Type.COPIED, null, "/a/b/c/foo")));
|
assertTrue("Update missing: /a/b/c/foo", firstDeployment.contains(new DeploymentEvent(DeploymentEvent.Type.CREATED, null, "/a/b/c/foo")));
|
||||||
assertTrue("Update missing: /a/b/c/bar", firstDeployment.contains(new DeploymentEvent(DeploymentEvent.Type.COPIED, null, "/a/b/c/bar")));
|
assertTrue("Update missing: /a/b/c/bar", firstDeployment.contains(new DeploymentEvent(DeploymentEvent.Type.CREATED, null, "/a/b/c/bar")));
|
||||||
assertTrue("Update missing: /a/b/buffy", firstDeployment.contains(new DeploymentEvent(DeploymentEvent.Type.COPIED, null, "/a/b/buffy")));
|
assertTrue("Update missing: /a/b/buffy", firstDeployment.contains(new DeploymentEvent(DeploymentEvent.Type.CREATED, null, "/a/b/buffy")));
|
||||||
assertFalse("Fudge has not been excluded", firstDeployment.contains(new DeploymentEvent(DeploymentEvent.Type.COPIED, null, "/a/b/fudge.bak")));
|
assertFalse("Fudge has not been excluded", firstDeployment.contains(new DeploymentEvent(DeploymentEvent.Type.CREATED, null, "/a/b/fudge.bak")));
|
||||||
|
|
||||||
// Check that files exist on target
|
// Check that files exist on target
|
||||||
File target = new File("target");
|
File target = new File("target");
|
||||||
@@ -342,7 +342,7 @@ public class FSDeploymentTest extends AVMServiceTestBase
|
|||||||
Set<DeploymentEvent> firstDeployment = new HashSet<DeploymentEvent>();
|
Set<DeploymentEvent> firstDeployment = new HashSet<DeploymentEvent>();
|
||||||
firstDeployment.addAll(report.getEvents());
|
firstDeployment.addAll(report.getEvents());
|
||||||
|
|
||||||
assertTrue("Update missing: /a/test02.html", firstDeployment.contains(new DeploymentEvent(DeploymentEvent.Type.COPIED, null, "/a/test02.html")));
|
assertTrue("Update missing: /a/test02.html", firstDeployment.contains(new DeploymentEvent(DeploymentEvent.Type.CREATED, null, "/a/test02.html")));
|
||||||
assertTrue("delete missing: /a/test03.html", firstDeployment.contains(new DeploymentEvent(DeploymentEvent.Type.DELETED, null, "/a/test03.html")));
|
assertTrue("delete missing: /a/test03.html", firstDeployment.contains(new DeploymentEvent(DeploymentEvent.Type.DELETED, null, "/a/test03.html")));
|
||||||
|
|
||||||
|
|
||||||
@@ -409,7 +409,7 @@ public class FSDeploymentTest extends AVMServiceTestBase
|
|||||||
{
|
{
|
||||||
System.out.println(event);
|
System.out.println(event);
|
||||||
}
|
}
|
||||||
assertTrue("Update missing", smallUpdate.contains(new DeploymentEvent(DeploymentEvent.Type.COPIED, null, "/a/b/fudge.bak")));
|
assertTrue("Update missing", smallUpdate.contains(new DeploymentEvent(DeploymentEvent.Type.CREATED, null, "/a/b/fudge.bak")));
|
||||||
assertEquals(5, smallUpdate.size());
|
assertEquals(5, smallUpdate.size());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -455,7 +455,7 @@ public class FSDeploymentTest extends AVMServiceTestBase
|
|||||||
{
|
{
|
||||||
System.out.println(event);
|
System.out.println(event);
|
||||||
}
|
}
|
||||||
assertTrue("Update missing", smallUpdate.contains(new DeploymentEvent(DeploymentEvent.Type.COPIED, null, "/a/b/Zander")));
|
assertTrue("Update missing", smallUpdate.contains(new DeploymentEvent(DeploymentEvent.Type.CREATED, null, "/a/b/Zander")));
|
||||||
assertTrue("Update missing", smallUpdate.contains(new DeploymentEvent(DeploymentEvent.Type.DELETED, null, "/a/b/Drusilla")));
|
assertTrue("Update missing", smallUpdate.contains(new DeploymentEvent(DeploymentEvent.Type.DELETED, null, "/a/b/Drusilla")));
|
||||||
assertTrue("Update missing", smallUpdate.contains(new DeploymentEvent(DeploymentEvent.Type.DELETED, null, "/a/b/Master")));
|
assertTrue("Update missing", smallUpdate.contains(new DeploymentEvent(DeploymentEvent.Type.DELETED, null, "/a/b/Master")));
|
||||||
assertEquals(5, smallUpdate.size());
|
assertEquals(5, smallUpdate.size());
|
||||||
|
@@ -78,6 +78,7 @@ public interface JobLockService
|
|||||||
* make use of retrying; the lock is actually being refreshed and will therefore never
|
* make use of retrying; the lock is actually being refreshed and will therefore never
|
||||||
* become valid if it doesn't refresh directly.
|
* become valid if it doesn't refresh directly.
|
||||||
*
|
*
|
||||||
|
* @param timeToLive the time (in milliseconds) for the lock to remain valid
|
||||||
* @param retryWait the time (in milliseconds) to wait before trying again
|
* @param retryWait the time (in milliseconds) to wait before trying again
|
||||||
* @param retryCount the maximum number of times to attempt the lock acquisition
|
* @param retryCount the maximum number of times to attempt the lock acquisition
|
||||||
* @throws LockAcquisitionException if the lock could not be acquired
|
* @throws LockAcquisitionException if the lock could not be acquired
|
||||||
|
@@ -43,7 +43,7 @@ public class DeploymentEvent implements Serializable
|
|||||||
*/
|
*/
|
||||||
public static enum Type implements Serializable
|
public static enum Type implements Serializable
|
||||||
{
|
{
|
||||||
COPIED, // Copied a source node that did not exist on the destination.
|
CREATED, // Copied a source node that did not exist on the destination.
|
||||||
UPDATED, // Overwrote the destination.
|
UPDATED, // Overwrote the destination.
|
||||||
DELETED, // Deleted the destination node.
|
DELETED, // Deleted the destination node.
|
||||||
START, // A Deployment has begun.
|
START, // A Deployment has begun.
|
||||||
|
Reference in New Issue
Block a user