summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2007-08-02 05:44:09 (EDT)
committerEike Stepper2007-08-02 05:44:09 (EDT)
commit391ac25300365b78ecb7609a802ca529dc9c0a0a (patch)
tree75fe7a1a4d44a59217d77da4b11297a15371b847
parenta05a79a4b6182ede1aa070d09fe524a41d2aade2 (diff)
downloadcdo-391ac25300365b78ecb7609a802ca529dc9c0a0a.zip
cdo-391ac25300365b78ecb7609a802ca529dc9c0a0a.tar.gz
cdo-391ac25300365b78ecb7609a802ca529dc9c0a0a.tar.bz2
*** empty log message ***
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/Repository.java11
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/RepositoryManager.java5
2 files changed, 11 insertions, 5 deletions
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/Repository.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/Repository.java
index 2cdab1c..676b11f 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/Repository.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/Repository.java
@@ -12,10 +12,10 @@ package org.eclipse.emf.cdo.internal.server;
import org.eclipse.emf.cdo.internal.protocol.CDOIDImpl;
import org.eclipse.emf.cdo.internal.protocol.CDOIDRangeImpl;
+import org.eclipse.emf.cdo.internal.server.store.Store;
import org.eclipse.emf.cdo.protocol.CDOID;
import org.eclipse.emf.cdo.protocol.CDOIDRange;
import org.eclipse.emf.cdo.server.IRepository;
-import org.eclipse.emf.cdo.server.IStore;
import org.eclipse.net4j.internal.util.lifecycle.Lifecycle;
@@ -32,7 +32,7 @@ public class Repository extends Lifecycle implements IRepository
private String name;
- private IStore store;
+ private Store store;
private String uuid;
@@ -48,15 +48,18 @@ public class Repository extends Lifecycle implements IRepository
private long nextMetaIDValue = INITIAL_META_ID_VALUE;
- public Repository(String name, IStore store)
+ public Repository(String name, Store store)
{
this.name = name;
this.store = store;
this.uuid = UUID.randomUUID().toString();
+
packageManager = new RepositoryPackageManager(this);
sessionManager = new SessionManager(this);
resourceManager = new ResourceManager(this);
revisionManager = new RevisionManager(this);
+
+ store.setRepository(this);
}
public String getName()
@@ -64,7 +67,7 @@ public class Repository extends Lifecycle implements IRepository
return name;
}
- public IStore getStore()
+ public Store getStore()
{
return store;
}
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/RepositoryManager.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/RepositoryManager.java
index bd88c8a..12bb6ef 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/RepositoryManager.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/RepositoryManager.java
@@ -11,6 +11,7 @@
package org.eclipse.emf.cdo.internal.server;
import org.eclipse.emf.cdo.internal.server.bundle.OM;
+import org.eclipse.emf.cdo.internal.server.store.Store;
import org.eclipse.emf.cdo.server.IRepositoryManager;
import org.eclipse.emf.cdo.server.IStore;
import org.eclipse.emf.cdo.server.RepositoryNotFoundException;
@@ -75,7 +76,9 @@ public final class RepositoryManager extends Lifecycle implements IRepositoryMan
throw new RuntimeException("Repository already exists: " + name);
}
- repository = new Repository(name, store);
+ // XXX Introduce IStoreFactory so that the client doesn't need to create
+ // the store on its own
+ repository = new Repository(name, (Store)store);
LifecycleUtil.activate(repository);
repositories.put(name, repository);
return repository;