summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2008-01-23 10:13:17 (EST)
committerEike Stepper2008-01-23 10:13:17 (EST)
commit20b2ca154d0e6f181af588f0e2a560912997d677 (patch)
tree59bee3993428a11211b6d79c868b71e170ee8d79
parenteb5e2b64c44b9779ddb96c50d41f974bd1ea9b6d (diff)
downloadcdo-20b2ca154d0e6f181af588f0e2a560912997d677.zip
cdo-20b2ca154d0e6f181af588f0e2a560912997d677.tar.gz
cdo-20b2ca154d0e6f181af588f0e2a560912997d677.tar.bz2
[215688] Create save points
https://bugs.eclipse.org/bugs/show_bug.cgi?id=215688
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/CDOServerUtil.java19
1 files changed, 18 insertions, 1 deletions
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/CDOServerUtil.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/CDOServerUtil.java
index 8fff7d6..a4f94b0 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/CDOServerUtil.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/CDOServerUtil.java
@@ -10,6 +10,8 @@
**************************************************************************/
package org.eclipse.emf.cdo.server;
+import org.eclipse.emf.cdo.internal.server.ContainerRepositoryProvider;
+import org.eclipse.emf.cdo.internal.server.Repository;
import org.eclipse.emf.cdo.internal.server.RepositoryFactory;
import org.eclipse.emf.cdo.internal.server.protocol.CDOServerProtocolFactory;
@@ -30,6 +32,7 @@ import javax.xml.parsers.ParserConfigurationException;
import java.io.File;
import java.io.IOException;
+import java.util.Map;
/**
* @author Eike Stepper
@@ -40,12 +43,26 @@ public final class CDOServerUtil
{
}
+ public static IRepository createRepository(String name, IStore store, Map<String, String> props)
+ {
+ Repository repository = new Repository();
+ repository.setName(name);
+ repository.setProperties(props);
+ repository.setStore(store);
+ store.setRepository(repository);
+ return repository;
+ }
+
public static void prepareContainer(IManagedContainer container, IRepositoryProvider repositoryProvider)
{
- // container.registerFactory(new RepositoryFactory());
container.registerFactory(new CDOServerProtocolFactory(repositoryProvider));
}
+ public static void prepareContainer(IManagedContainer container)
+ {
+ prepareContainer(container, new ContainerRepositoryProvider(container));
+ }
+
public static void addRepository(IManagedContainer container, IRepository repository)
{
LifecycleUtil.activate(repository);