mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Deployment stuff.
Filesystem deployment can now run a given java class, or external program on commit. Changed signatures of DeploymentService methods to take a NameMatcher to act as an exclusion filter for deployment. This works for filesystem deployment but isn't in place for alfresco->alfresco deployment. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@6214 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -487,7 +487,7 @@ public class AVMServiceTest extends AVMServiceTestBase
|
||||
// TestDeploymentCallback callback = new TestDeploymentCallback();
|
||||
fService.createStore("target");
|
||||
DeploymentReport report = depService.deployDifference(-1, "main:/a", "localhost", 50500, "admin", "admin",
|
||||
"target:/a", false, false, false, null);
|
||||
"target:/a", null, false, false, false, null);
|
||||
runQueriesAgainstBasicTreeWithAOnly("target");
|
||||
System.out.println(report);
|
||||
assertEquals(fService.lookup(-1, "main:/a/b/c/foo").getGuid(), fService.lookup(-1, "target:/a/b/c/foo")
|
||||
@@ -498,39 +498,39 @@ public class AVMServiceTest extends AVMServiceTestBase
|
||||
ContentData dstCD = fService.getContentDataForRead(-1, "target:/a/b/c/foo");
|
||||
assertEquals(srcCD.getMimetype(), dstCD.getMimetype());
|
||||
fService.createFile("main:/a/b", "biz").close();
|
||||
report = depService.deployDifference(-1, "main:/a", "localhost", 50500, "admin", "admin", "target:/a",
|
||||
report = depService.deployDifference(-1, "main:/a", "localhost", 50500, "admin", "admin", "target:/a", null,
|
||||
false, false, true, null);
|
||||
// Nothing was done
|
||||
runQueriesAgainstBasicTreeWithAOnly("target");
|
||||
System.out.println(report);
|
||||
System.out.println(recursiveList("target", -1, true));
|
||||
assertNull(fService.lookup(-1, "target:/a/b/biz"));
|
||||
report = depService.deployDifference(-1, "main:/a", "localhost", 50500, "admin", "admin", "target:/a",
|
||||
report = depService.deployDifference(-1, "main:/a", "localhost", 50500, "admin", "admin", "target:/a", null,
|
||||
false, false, false, null);
|
||||
System.out.println(report);
|
||||
runQueriesForCreateAndDeploy("target");
|
||||
assertEquals(fService.lookup(-1, "main:/a/b/biz").getGuid(), fService.lookup(-1, "target:/a/b/biz")
|
||||
.getGuid());
|
||||
fService.removeNode("main:/a/b/c/foo");
|
||||
report = depService.deployDifference(-1, "main:/a", "localhost", 50500, "admin", "admin", "target:/a",
|
||||
report = depService.deployDifference(-1, "main:/a", "localhost", 50500, "admin", "admin", "target:/a", null,
|
||||
false, true, false, null);
|
||||
runQueriesForCreateAndDeploy("target");
|
||||
System.out.println(report);
|
||||
assertNotNull(fService.lookup(-1, "target:/a/b/c/foo"));
|
||||
report = depService.deployDifference(-1, "main:/a", "localhost", 50500, "admin", "admin", "target:/a",
|
||||
report = depService.deployDifference(-1, "main:/a", "localhost", 50500, "admin", "admin", "target:/a", null,
|
||||
false, false, false, null);
|
||||
System.out.println(report);
|
||||
runQueriesForRemoveAndDelpoy("target");
|
||||
assertNull(fService.lookup(-1, "target:/a/b/c/foo"));
|
||||
fService.removeNode("main:/a/b/c/bar");
|
||||
fService.createDirectory("main:/a/b/c", "bar");
|
||||
report = depService.deployDifference(-1, "main:/a", "localhost", 50500, "admin", "admin", "target:/a",
|
||||
report = depService.deployDifference(-1, "main:/a", "localhost", 50500, "admin", "admin", "target:/a", null,
|
||||
false, false, false, null);
|
||||
System.out.println(report);
|
||||
runQueriesForRemoveFileAndCreateDirectoryAndDeploy("target");
|
||||
report = depService.deployDifference(-1, "main:/a", "localhost", 50500, "admin", "admin", "target:/a",
|
||||
report = depService.deployDifference(-1, "main:/a", "localhost", 50500, "admin", "admin", "target:/a", null,
|
||||
false, false, false, null);
|
||||
depService.deployDifference(-1, "main:/a", "localhost", 50500, "admin", "admin", "target2:/wiggly/diggly",
|
||||
depService.deployDifference(-1, "main:/a", "localhost", 50500, "admin", "admin", "target2:/wiggly/diggly", null,
|
||||
true, false, false, null);
|
||||
System.out.println(report);
|
||||
}
|
||||
|
@@ -235,16 +235,20 @@ public class AVMDeploySnapshotAction extends ActionExecuterAbstractBase
|
||||
if (logger.isDebugEnabled())
|
||||
logger.debug("Performing file server deployment to " + host + ":" + port);
|
||||
|
||||
// TODO Added new NameMatcher parameter to deploy methods. It acts as a filter.
|
||||
// Any matching path names are ignored for deployment purposes.
|
||||
report = this.deployService.deployDifferenceFS(version, path, host, port,
|
||||
remoteUsername, remotePassword, "/", true, false, false, callback);
|
||||
remoteUsername, remotePassword, "/", null, true, false, false, callback);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (logger.isDebugEnabled())
|
||||
logger.debug("Performing Alfresco deployment to " + host + ":" + port);
|
||||
|
||||
// TODO Added new NameMatcher parameter to deploy methods. It acts as a filter.
|
||||
// Any matching path names are ignored for deployment purposes.
|
||||
report = this.deployService.deployDifference(version, path, host, port,
|
||||
remoteUsername, remotePassword, targetPath, true, false, false, callback);
|
||||
remoteUsername, remotePassword, targetPath, null, true, false, false, callback);
|
||||
}
|
||||
}
|
||||
catch (Throwable err)
|
||||
|
Reference in New Issue
Block a user