Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--features/org.eclipse.emf.cdo.sdk-feature/feature.xml3
-rw-r--r--plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/protocol/CDOProtocolConstants.java5
-rw-r--r--plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/branch/CDOBranchImpl.java11
-rw-r--r--plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/branch/CDOBranchManagerImpl.java4
-rw-r--r--plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/spi/common/branch/InternalCDOBranchManager.java5
-rw-r--r--plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/CDONet4jSessionConfigurationImpl.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/CDOClientProtocol.java7
-rw-r--r--plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/HandleRevisionsRequest.java127
-rw-r--r--plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/db/mapping/IClassMapping.java7
-rw-r--r--plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/db/mapping/IMappingStrategy.java4
-rw-r--r--plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/DBStore.java3
-rw-r--r--plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/DBStoreAccessor.java47
-rw-r--r--plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/MetaDataManager.java5
-rw-r--r--plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/AbstractMappingStrategy.java6
-rw-r--r--plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/horizontal/AbstractHorizontalClassMapping.java41
-rw-r--r--plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/horizontal/HorizontalBranchingClassMapping.java44
-rw-r--r--plugins/org.eclipse.emf.cdo.server.db4o/src/org/eclipse/emf/cdo/server/internal/db4o/DB4OStoreAccessor.java36
-rw-r--r--plugins/org.eclipse.emf.cdo.server.hibernate/src/org/eclipse/emf/cdo/server/internal/hibernate/HibernateStoreAccessor.java31
-rw-r--r--plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/protocol/CDOServerProtocol.java3
-rw-r--r--plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/protocol/HandleRevisionsIndication.java131
-rw-r--r--plugins/org.eclipse.emf.cdo.server.objectivity/src/org/eclipse/emf/cdo/server/internal/objectivity/ObjectivityStoreAccessor.java29
-rw-r--r--plugins/org.eclipse.emf.cdo.server.ocl/src/org/eclipse/emf/cdo/server/ocl/CDOExtentCreator.java4
-rw-r--r--plugins/org.eclipse.emf.cdo.server/META-INF/MANIFEST.MF6
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/Repository.java50
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/ServerCDOView.java5
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/embedded/EmbeddedClientSessionProtocol.java9
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/mem/MEMStore.java21
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/mem/MEMStoreAccessor.java76
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/IStoreAccessor.java29
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/RepositoryNotFoundException.java4
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/InternalRepository.java8
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/StoreAccessor.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/META-INF/MANIFEST.MF3
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/StateMachineTest.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/WorkspaceTest.java404
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/config/IRepositoryConfig.java4
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/config/impl/ConfigTest.java6
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/config/impl/RepositoryConfig.java12
-rw-r--r--plugins/org.eclipse.emf.cdo.workspace/.classpath7
-rw-r--r--plugins/org.eclipse.emf.cdo.workspace/.cvsignore2
-rw-r--r--plugins/org.eclipse.emf.cdo.workspace/.options3
-rw-r--r--plugins/org.eclipse.emf.cdo.workspace/.project34
-rw-r--r--plugins/org.eclipse.emf.cdo.workspace/.settings/org.eclipse.core.resources.prefs3
-rw-r--r--plugins/org.eclipse.emf.cdo.workspace/.settings/org.eclipse.jdt.core.prefs360
-rw-r--r--plugins/org.eclipse.emf.cdo.workspace/.settings/org.eclipse.jdt.ui.prefs120
-rw-r--r--plugins/org.eclipse.emf.cdo.workspace/.settings/org.eclipse.ltk.core.refactoring.prefs3
-rw-r--r--plugins/org.eclipse.emf.cdo.workspace/.settings/org.eclipse.mylyn.tasks.ui.prefs4
-rw-r--r--plugins/org.eclipse.emf.cdo.workspace/.settings/org.eclipse.mylyn.team.ui.prefs3
-rw-r--r--plugins/org.eclipse.emf.cdo.workspace/.settings/org.eclipse.pde.api.tools.prefs94
-rw-r--r--plugins/org.eclipse.emf.cdo.workspace/.settings/org.eclipse.pde.prefs31
-rw-r--r--plugins/org.eclipse.emf.cdo.workspace/META-INF/MANIFEST.MF15
-rw-r--r--plugins/org.eclipse.emf.cdo.workspace/about.html28
-rw-r--r--plugins/org.eclipse.emf.cdo.workspace/build.properties10
-rw-r--r--plugins/org.eclipse.emf.cdo.workspace/copyright.txt8
-rw-r--r--plugins/org.eclipse.emf.cdo.workspace/plugin.properties11
-rw-r--r--plugins/org.eclipse.emf.cdo.workspace/src/org/eclipse/emf/cdo/internal/workspace/CDOWorkspaceImpl.java369
-rw-r--r--plugins/org.eclipse.emf.cdo.workspace/src/org/eclipse/emf/cdo/internal/workspace/bundle/OM.java44
-rw-r--r--plugins/org.eclipse.emf.cdo.workspace/src/org/eclipse/emf/cdo/workspace/CDOWorkspace.java48
-rw-r--r--plugins/org.eclipse.emf.cdo.workspace/src/org/eclipse/emf/cdo/workspace/CDOWorkspaceUtil.java36
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/session/CDOSession.java8
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/session/CDOSessionImpl.java23
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/spi/cdo/CDOSessionProtocol.java7
-rw-r--r--plugins/org.eclipse.net4j.jvm/src/org/eclipse/net4j/jvm/JVMUtil.java2
63 files changed, 2393 insertions, 76 deletions
diff --git a/features/org.eclipse.emf.cdo.sdk-feature/feature.xml b/features/org.eclipse.emf.cdo.sdk-feature/feature.xml
index bc5f7f501c..8d48055d57 100644
--- a/features/org.eclipse.emf.cdo.sdk-feature/feature.xml
+++ b/features/org.eclipse.emf.cdo.sdk-feature/feature.xml
@@ -34,6 +34,7 @@
</url>
<plugin id="org.eclipse.emf.cdo.efs" download-size="0" install-size="0" version="0.0.0" unpack="false"/>
+ <plugin id="org.eclipse.emf.cdo.workspace" download-size="0" install-size="0" version="0.0.0" unpack="false"/>
<plugin id="org.eclipse.emf.cdo.migrator" download-size="0" install-size="0" version="0.0.0" unpack="false"/>
<plugin id="org.eclipse.emf.cdo.sdk" download-size="0" install-size="0" version="0.0.0" unpack="false"/>
@@ -49,6 +50,8 @@
<includes id="org.eclipse.emf.cdo.server.hibernate.source" version="0.0.0"/>
<includes id="org.eclipse.emf.cdo.server.db4o.source" version="0.0.0"/>
+ <plugin id="org.eclipse.emf.cdo.efs.source" download-size="0" install-size="0" version="0.0.0" unpack="false"/>
+ <plugin id="org.eclipse.emf.cdo.workspace.source" download-size="0" install-size="0" version="0.0.0" unpack="false"/>
<plugin id="org.eclipse.emf.cdo.migrator.source" download-size="0" install-size="0" version="0.0.0" unpack="false"/>
</feature>
diff --git a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/protocol/CDOProtocolConstants.java b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/protocol/CDOProtocolConstants.java
index 89abb5bd13..21529146ed 100644
--- a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/protocol/CDOProtocolConstants.java
+++ b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/protocol/CDOProtocolConstants.java
@@ -204,6 +204,11 @@ public interface CDOProtocolConstants
*/
public static final short SIGNAL_LOAD_LOB = 46;
+ /**
+ * @since 4.0
+ */
+ public static final short SIGNAL_HANDLE_REVISIONS = 47;
+
// //////////////////////////////////////////////////////////////////////
// Session Refresh
diff --git a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/branch/CDOBranchImpl.java b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/branch/CDOBranchImpl.java
index acc0cbfbaa..a5e8cc512a 100644
--- a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/branch/CDOBranchImpl.java
+++ b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/branch/CDOBranchImpl.java
@@ -319,11 +319,14 @@ public class CDOBranchImpl extends Container<CDOBranch> implements InternalCDOBr
*/
public static class Main extends CDOBranchImpl
{
+ private boolean local;
+
private InternalCDOBranchManager branchManager;
- public Main(InternalCDOBranchManager branchManager, long timeStamp)
+ public Main(InternalCDOBranchManager branchManager, boolean local, long timeStamp)
{
super(MAIN_BRANCH_ID, MAIN_BRANCH_NAME, new CDOBranchPointImpl(null, timeStamp));
+ this.local = local;
this.branchManager = branchManager;
}
@@ -334,6 +337,12 @@ public class CDOBranchImpl extends Container<CDOBranch> implements InternalCDOBr
}
@Override
+ public boolean isLocal()
+ {
+ return local;
+ }
+
+ @Override
public InternalCDOBranchManager getBranchManager()
{
return branchManager;
diff --git a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/branch/CDOBranchManagerImpl.java b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/branch/CDOBranchManagerImpl.java
index 075e561f08..8aec9bc1b9 100644
--- a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/branch/CDOBranchManagerImpl.java
+++ b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/branch/CDOBranchManagerImpl.java
@@ -66,10 +66,10 @@ public class CDOBranchManagerImpl extends Lifecycle implements InternalCDOBranch
this.timeProvider = timeProvider;
}
- public void initMainBranch(long repositoryCreationTime)
+ public void initMainBranch(boolean local, long repositoryCreationTime)
{
checkInactive();
- mainBranch = new CDOBranchImpl.Main(this, repositoryCreationTime);
+ mainBranch = new CDOBranchImpl.Main(this, local, repositoryCreationTime);
}
public void handleBranchCreated(InternalCDOBranch branch)
diff --git a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/spi/common/branch/InternalCDOBranchManager.java b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/spi/common/branch/InternalCDOBranchManager.java
index 3396ddefdb..8f99fcea9e 100644
--- a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/spi/common/branch/InternalCDOBranchManager.java
+++ b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/spi/common/branch/InternalCDOBranchManager.java
@@ -36,7 +36,10 @@ public interface InternalCDOBranchManager extends CDOBranchManager, ILifecycle
public void setTimeProvider(CDOTimeProvider timeProvider);
- public void initMainBranch(long timestamp);
+ /**
+ * @since 4.0
+ */
+ public void initMainBranch(boolean local, long timestamp);
public InternalCDOBranch getMainBranch();
diff --git a/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/CDONet4jSessionConfigurationImpl.java b/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/CDONet4jSessionConfigurationImpl.java
index 56c711f811..33ff7bc551 100644
--- a/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/CDONet4jSessionConfigurationImpl.java
+++ b/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/CDONet4jSessionConfigurationImpl.java
@@ -217,7 +217,7 @@ public class CDONet4jSessionConfigurationImpl extends CDOSessionConfigurationImp
branchManager.setBranchLoader(session.getSessionProtocol());
branchManager.setTimeProvider(session.getRepositoryInfo());
- branchManager.initMainBranch(session.getRepositoryInfo().getCreationTime());
+ branchManager.initMainBranch(false, session.getRepositoryInfo().getCreationTime());
branchManager.activate();
if (commitInfoManager == null)
diff --git a/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/CDOClientProtocol.java b/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/CDOClientProtocol.java
index 6f241f0545..6c6cd9ccc5 100644
--- a/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/CDOClientProtocol.java
+++ b/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/CDOClientProtocol.java
@@ -26,6 +26,7 @@ import org.eclipse.emf.cdo.common.model.CDOPackageUnit;
import org.eclipse.emf.cdo.common.model.lob.CDOLob;
import org.eclipse.emf.cdo.common.model.lob.CDOLobInfo;
import org.eclipse.emf.cdo.common.protocol.CDOProtocolConstants;
+import org.eclipse.emf.cdo.common.revision.CDORevisionHandler;
import org.eclipse.emf.cdo.common.util.TransportException;
import org.eclipse.emf.cdo.internal.net4j.bundle.OM;
import org.eclipse.emf.cdo.session.CDOSession;
@@ -281,6 +282,12 @@ public class CDOClientProtocol extends SignalProtocol<CDOSession> implements CDO
}
}
+ public void handleRevisions(EClass eClass, CDOBranch branch, boolean exactBranch, long timeStamp, boolean exactTime,
+ CDORevisionHandler handler)
+ {
+ send(new HandleRevisionsRequest(this, eClass, branch, exactBranch, timeStamp, exactTime, handler));
+ }
+
public CommitTransactionResult commitTransaction(int transactionID, String comment, boolean releaseLocks,
CDOIDProvider idProvider, CDOCommitData commitData, Collection<CDOLob<?>> lobs, OMMonitor monitor)
{
diff --git a/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/HandleRevisionsRequest.java b/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/HandleRevisionsRequest.java
new file mode 100644
index 0000000000..466d28012b
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/HandleRevisionsRequest.java
@@ -0,0 +1,127 @@
+/***************************************************************************
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany) and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Eike Stepper - initial API and implementation
+ **************************************************************************/
+package org.eclipse.emf.cdo.internal.net4j.protocol;
+
+import org.eclipse.emf.cdo.common.branch.CDOBranch;
+import org.eclipse.emf.cdo.common.protocol.CDODataInput;
+import org.eclipse.emf.cdo.common.protocol.CDODataOutput;
+import org.eclipse.emf.cdo.common.protocol.CDOProtocolConstants;
+import org.eclipse.emf.cdo.common.revision.CDORevision;
+import org.eclipse.emf.cdo.common.revision.CDORevisionHandler;
+import org.eclipse.emf.cdo.common.util.CDOCommonUtil;
+import org.eclipse.emf.cdo.internal.net4j.bundle.OM;
+
+import org.eclipse.net4j.util.om.trace.ContextTracer;
+
+import org.eclipse.emf.ecore.EClass;
+
+import java.io.IOException;
+
+/**
+ * @author Eike Stepper
+ */
+public class HandleRevisionsRequest extends CDOClientRequest<Boolean>
+{
+ private static final ContextTracer TRACER = new ContextTracer(OM.DEBUG_PROTOCOL, HandleRevisionsRequest.class);
+
+ private EClass eClass;
+
+ private CDOBranch branch;
+
+ private boolean exactBranch;
+
+ private long timeStamp;
+
+ private boolean exactTime;
+
+ private CDORevisionHandler handler;
+
+ public HandleRevisionsRequest(CDOClientProtocol protocol, EClass eClass, CDOBranch branch, boolean exactBranch,
+ long timeStamp, boolean exactTime, CDORevisionHandler handler)
+ {
+ super(protocol, CDOProtocolConstants.SIGNAL_HANDLE_REVISIONS);
+ this.eClass = eClass;
+ this.branch = branch;
+ this.exactBranch = exactBranch;
+ this.timeStamp = timeStamp;
+ this.exactTime = exactTime;
+ this.handler = handler;
+ }
+
+ @Override
+ protected void requesting(CDODataOutput out) throws IOException
+ {
+ if (eClass != null)
+ {
+ out.writeBoolean(true);
+ if (TRACER.isEnabled())
+ {
+ TRACER.format("Writing eClass: {0}", eClass); //$NON-NLS-1$
+ }
+
+ out.writeCDOClassifierRef(eClass);
+ }
+ else
+ {
+ out.writeBoolean(false);
+ }
+
+ if (branch != null)
+ {
+ out.writeBoolean(true);
+ if (TRACER.isEnabled())
+ {
+ TRACER.format("Writing branch: {0}", branch); //$NON-NLS-1$
+ }
+
+ out.writeCDOBranch(branch);
+ if (TRACER.isEnabled())
+ {
+ TRACER.format("Writing exactBranch: {0}", exactBranch); //$NON-NLS-1$
+ }
+
+ out.writeBoolean(exactBranch);
+ }
+ else
+ {
+ out.writeBoolean(false);
+ }
+ if (TRACER.isEnabled())
+ {
+ TRACER.format("Writing timeStamp: {0}", CDOCommonUtil.formatTimeStamp(timeStamp)); //$NON-NLS-1$
+ }
+
+ out.writeLong(timeStamp);
+ if (TRACER.isEnabled())
+ {
+ TRACER.format("Writing exactTime: {0}", exactTime); //$NON-NLS-1$
+ }
+
+ out.writeBoolean(exactTime);
+ }
+
+ @Override
+ protected Boolean confirming(CDODataInput in) throws IOException
+ {
+ while (in.readBoolean())
+ {
+ CDORevision revision = in.readCDORevision();
+ if (TRACER.isEnabled())
+ {
+ TRACER.format("Read revision: {0}", revision); //$NON-NLS-1$
+ }
+
+ handler.handleRevision(revision);
+ }
+
+ return true;
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/db/mapping/IClassMapping.java b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/db/mapping/IClassMapping.java
index 39a1de583e..a71efd9ffc 100644
--- a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/db/mapping/IClassMapping.java
+++ b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/db/mapping/IClassMapping.java
@@ -161,11 +161,12 @@ public interface IClassMapping
* <code>revision.getTimeStamp()</code>.
* </ul>
*
- * @see IMappingStrategy#handleRevisions(IDBStoreAccessor, org.eclipse.emf.ecore.EClass, CDOBranch, long,
+ * @see IMappingStrategy#handleRevisions(IDBStoreAccessor, org.eclipse.emf.ecore.EClass, CDOBranch, long, boolean,
* CDORevisionHandler)
- * @since 3.0
+ * @since 4.0
*/
- public void handleRevisions(IDBStoreAccessor accessor, CDOBranch branch, long timeStamp, CDORevisionHandler handler);
+ public void handleRevisions(IDBStoreAccessor accessor, CDOBranch branch, long timeStamp, boolean exactTime,
+ CDORevisionHandler handler);
/**
* Returns a set of CDOIDs that have at least one revision in any of the passed branches and time ranges.
diff --git a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/db/mapping/IMappingStrategy.java b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/db/mapping/IMappingStrategy.java
index ef16082728..e06e0b8b72 100644
--- a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/db/mapping/IMappingStrategy.java
+++ b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/db/mapping/IMappingStrategy.java
@@ -302,10 +302,10 @@ public interface IMappingStrategy
* <code>revision.getTimeStamp()</code>.
* </ul>
*
- * @since 3.0
+ * @since 4.0
*/
public void handleRevisions(IDBStoreAccessor accessor, EClass eClass, CDOBranch branch, long timeStamp,
- CDORevisionHandler handler);
+ boolean exactTime, CDORevisionHandler handler);
/**
* Returns a set of CDOIDs that have at least one revision in any of the passed branches and time ranges.
diff --git a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/DBStore.java b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/DBStore.java
index 63c16eb431..0bc11e84a4 100644
--- a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/DBStore.java
+++ b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/DBStore.java
@@ -15,7 +15,6 @@
package org.eclipse.emf.cdo.server.internal.db;
import org.eclipse.emf.cdo.common.branch.CDOBranch;
-import org.eclipse.emf.cdo.common.branch.CDOBranchPoint;
import org.eclipse.emf.cdo.common.revision.CDOAllRevisionsProvider;
import org.eclipse.emf.cdo.common.revision.CDORevision;
import org.eclipse.emf.cdo.common.revision.CDORevisionHandler;
@@ -381,7 +380,7 @@ public class DBStore extends LongIDStore implements IDBStore, CDOAllRevisionsPro
try
{
- accessor.handleRevisions(null, null, CDOBranchPoint.UNSPECIFIED_DATE, new CDORevisionHandler()
+ accessor.handleRevisions(null, null, DBStore.UNSPECIFIED_DATE, true, new CDORevisionHandler()
{
public boolean handleRevision(CDORevision revision)
{
diff --git a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/DBStoreAccessor.java b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/DBStoreAccessor.java
index 14dd770dc4..fc6e085ec9 100644
--- a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/DBStoreAccessor.java
+++ b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/DBStoreAccessor.java
@@ -976,22 +976,11 @@ public class DBStoreAccessor extends LongIDStoreAccessor implements IDBStoreAcce
return mappingStrategy.readChangeSet(this, segments);
}
- /**
- * Passes all revisions of the store to the {@link CDORevisionHandler handler} if <b>all</b> of the following
- * conditions are met:
- * <ul>
- * <li>The <code>eClass</code> parameter is <code>null</code> or equal to <code>revision.getEClass()</code>.
- * <li>The <code>branch</code> parameter is <code>null</code> or equal to <code>revision.getBranch()</code>.
- * <li>The <code>timeStamp</code> parameter is {@link CDOBranchPoint#UNSPECIFIED_DATE} or equal to
- * <code>revision.getTimeStamp()</code>.
- * </ul>
- *
- * @since 3.0
- */
- public void handleRevisions(EClass eClass, CDOBranch branch, long timeStamp, CDORevisionHandler handler)
+ public void handleRevisions(EClass eClass, CDOBranch branch, long timeStamp, boolean exactTime,
+ CDORevisionHandler handler)
{
IMappingStrategy mappingStrategy = getStore().getMappingStrategy();
- mappingStrategy.handleRevisions(this, eClass, branch, timeStamp, new DBRevisionHandler(handler));
+ mappingStrategy.handleRevisions(this, eClass, branch, timeStamp, true, new DBRevisionHandler(handler));
}
public void rawExport(CDODataOutput out, int fromBranchID, int toBranchID, long fromCommitTime, long toCommitTime)
@@ -1087,6 +1076,36 @@ public class DBStoreAccessor extends LongIDStoreAccessor implements IDBStoreAcce
}
}
+ public Object rawStore(InternalCDOPackageUnit[] packageUnits, Object context, OMMonitor monitor)
+ {
+ writePackageUnits(packageUnits, monitor);
+ return context;
+ }
+
+ public Object rawStore(InternalCDORevision revision, Object context, OMMonitor monitor)
+ {
+ writeRevision(revision, monitor);
+ return context;
+ }
+
+ public void rawCommit(Object context, OMMonitor monitor)
+ {
+ Async async = monitor.forkAsync();
+
+ try
+ {
+ connection.commit();
+ }
+ catch (SQLException ex)
+ {
+ throw new DBException(ex);
+ }
+ finally
+ {
+ async.stop();
+ }
+ }
+
/**
* @author Stefan Winkler
*/
diff --git a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/MetaDataManager.java b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/MetaDataManager.java
index 543f25b295..d81dc985f7 100644
--- a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/MetaDataManager.java
+++ b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/MetaDataManager.java
@@ -13,7 +13,6 @@
*/
package org.eclipse.emf.cdo.server.internal.db;
-import org.eclipse.emf.cdo.common.branch.CDOBranchPoint;
import org.eclipse.emf.cdo.common.id.CDOID;
import org.eclipse.emf.cdo.common.id.CDOIDMeta;
import org.eclipse.emf.cdo.common.id.CDOIDMetaRange;
@@ -96,7 +95,7 @@ public class MetaDataManager extends Lifecycle implements IMetaDataManager
public Collection<InternalCDOPackageUnit> readPackageUnits(Connection connection)
{
- return readPackageUnits(connection, CDOBranchPoint.UNSPECIFIED_DATE, CDOBranchPoint.UNSPECIFIED_DATE, new Monitor());
+ return readPackageUnits(connection, DBStore.UNSPECIFIED_DATE, DBStore.UNSPECIFIED_DATE, new Monitor());
}
public final void writePackageUnits(Connection connection, InternalCDOPackageUnit[] packageUnits, OMMonitor monitor)
@@ -328,7 +327,7 @@ public class MetaDataManager extends Lifecycle implements IMetaDataManager
};
String where = null;
- if (fromCommitTime != CDOBranchPoint.UNSPECIFIED_DATE)
+ if (fromCommitTime != DBStore.UNSPECIFIED_DATE)
{
where = CDODBSchema.PACKAGE_UNITS_ID + "<>'" + CDOModelUtil.CORE_PACKAGE_URI + "' AND "
+ CDODBSchema.PACKAGE_UNITS_ID + "<>'" + CDOModelUtil.RESOURCE_PACKAGE_URI + "' AND "
diff --git a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/AbstractMappingStrategy.java b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/AbstractMappingStrategy.java
index b20e07b1f5..e422749b0f 100644
--- a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/AbstractMappingStrategy.java
+++ b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/AbstractMappingStrategy.java
@@ -175,19 +175,19 @@ public abstract class AbstractMappingStrategy extends Lifecycle implements IMapp
// -- object id related methods ----------------------------------------
public void handleRevisions(IDBStoreAccessor accessor, EClass eClass, CDOBranch branch, long timeStamp,
- CDORevisionHandler handler)
+ boolean exactTime, CDORevisionHandler handler)
{
if (eClass == null)
{
for (IClassMapping mapping : getClassMappings().values())
{
- mapping.handleRevisions(accessor, branch, timeStamp, handler);
+ mapping.handleRevisions(accessor, branch, timeStamp, exactTime, handler);
}
}
else
{
IClassMapping classMapping = getClassMapping(eClass);
- classMapping.handleRevisions(accessor, branch, timeStamp, handler);
+ classMapping.handleRevisions(accessor, branch, timeStamp, exactTime, handler);
}
}
diff --git a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/horizontal/AbstractHorizontalClassMapping.java b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/horizontal/AbstractHorizontalClassMapping.java
index 5ee5136656..6e7d0dcaa7 100644
--- a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/horizontal/AbstractHorizontalClassMapping.java
+++ b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/horizontal/AbstractHorizontalClassMapping.java
@@ -500,7 +500,8 @@ public abstract class AbstractHorizontalClassMapping implements IClassMapping
}
}
- public void handleRevisions(IDBStoreAccessor accessor, CDOBranch branch, long timeStamp, CDORevisionHandler handler)
+ public void handleRevisions(IDBStoreAccessor accessor, CDOBranch branch, long timeStamp, boolean exactTime,
+ CDORevisionHandler handler)
{
// branch parameter is ignored, because either it is null or main branch.
// this does not make any difference for non-branching store.
@@ -520,19 +521,47 @@ public abstract class AbstractHorizontalClassMapping implements IClassMapping
StringBuilder builder = new StringBuilder(sqlSelectForHandle);
- if (timeStamp != CDOBranchPoint.UNSPECIFIED_DATE)
+ int timeParameters = 0;
+ if (exactTime)
+ {
+ if (timeStamp != DBStore.UNSPECIFIED_DATE)
+ {
+ builder.append(" WHERE "); //$NON-NLS-1$
+ builder.append(CDODBSchema.ATTRIBUTES_CREATED);
+ builder.append("=?"); //$NON-NLS-1$
+ timeParameters = 1;
+ }
+ }
+ else
{
builder.append(" WHERE "); //$NON-NLS-1$
- builder.append(CDODBSchema.ATTRIBUTES_CREATED);
- builder.append("=? "); //$NON-NLS-1$
+ if (timeStamp != DBStore.UNSPECIFIED_DATE)
+ {
+ builder.append(CDODBSchema.ATTRIBUTES_CREATED);
+ builder.append(">=?"); //$NON-NLS-1$
+ builder.append(" AND ("); //$NON-NLS-1$
+ builder.append(CDODBSchema.ATTRIBUTES_REVISED);
+ builder.append("<=? OR "); //$NON-NLS-1$
+ builder.append(CDODBSchema.ATTRIBUTES_REVISED);
+ builder.append("="); //$NON-NLS-1$
+ builder.append(DBStore.UNSPECIFIED_DATE);
+ builder.append(")"); //$NON-NLS-1$
+ timeParameters = 2;
+ }
+ else
+ {
+ builder.append(CDODBSchema.ATTRIBUTES_REVISED);
+ builder.append("="); //$NON-NLS-1$
+ builder.append(DBStore.UNSPECIFIED_DATE);
+ }
}
try
{
stmt = statementCache.getPreparedStatement(builder.toString(), ReuseProbability.LOW);
- if (timeStamp != CDOBranchPoint.UNSPECIFIED_DATE)
+ for (int i = 0; i < timeParameters; i++)
{
- stmt.setLong(1, timeStamp);
+ stmt.setLong(i + 1, timeStamp);
}
rs = stmt.executeQuery();
diff --git a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/horizontal/HorizontalBranchingClassMapping.java b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/horizontal/HorizontalBranchingClassMapping.java
index d5571fb36d..7a0982527b 100644
--- a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/horizontal/HorizontalBranchingClassMapping.java
+++ b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/horizontal/HorizontalBranchingClassMapping.java
@@ -668,7 +668,8 @@ public class HorizontalBranchingClassMapping extends AbstractHorizontalClassMapp
}
@Override
- public void handleRevisions(IDBStoreAccessor accessor, CDOBranch branch, long timeStamp, CDORevisionHandler handler)
+ public void handleRevisions(IDBStoreAccessor accessor, CDOBranch branch, long timeStamp, boolean exactTime,
+ CDORevisionHandler handler)
{
StringBuilder builder = new StringBuilder(sqlSelectForHandle);
boolean whereAppend = false;
@@ -678,17 +679,44 @@ public class HorizontalBranchingClassMapping extends AbstractHorizontalClassMapp
// TODO: Prepare this string literal
builder.append(" WHERE "); //$NON-NLS-1$
builder.append(CDODBSchema.ATTRIBUTES_BRANCH);
- builder.append("=? "); //$NON-NLS-1$
+ builder.append("=?"); //$NON-NLS-1$
whereAppend = true;
}
- if (timeStamp != CDOBranchPoint.UNSPECIFIED_DATE)
+ int timeParameters = 0;
+ if (exactTime)
+ {
+ if (timeStamp != DBStore.UNSPECIFIED_DATE)
+ {
+ builder.append(whereAppend ? " AND " : " WHERE "); //$NON-NLS-1$ //$NON-NLS-2$
+ builder.append(CDODBSchema.ATTRIBUTES_CREATED);
+ builder.append("=?"); //$NON-NLS-1$
+ timeParameters = 1;
+ }
+ }
+ else
{
- // TODO: Prepare this string literal
builder.append(whereAppend ? " AND " : " WHERE "); //$NON-NLS-1$ //$NON-NLS-2$
- builder.append(CDODBSchema.ATTRIBUTES_CREATED);
- builder.append("=? "); //$NON-NLS-1$
+ if (timeStamp != DBStore.UNSPECIFIED_DATE)
+ {
+ builder.append(CDODBSchema.ATTRIBUTES_CREATED);
+ builder.append(">=?"); //$NON-NLS-1$
+ builder.append(" AND ("); //$NON-NLS-1$
+ builder.append(CDODBSchema.ATTRIBUTES_REVISED);
+ builder.append("<=? OR "); //$NON-NLS-1$
+ builder.append(CDODBSchema.ATTRIBUTES_REVISED);
+ builder.append("="); //$NON-NLS-1$
+ builder.append(DBStore.UNSPECIFIED_DATE);
+ builder.append(")"); //$NON-NLS-1$
+ timeParameters = 2;
+ }
+ else
+ {
+ builder.append(CDODBSchema.ATTRIBUTES_REVISED);
+ builder.append("="); //$NON-NLS-1$
+ builder.append(DBStore.UNSPECIFIED_DATE);
+ }
}
IRepository repository = accessor.getStore().getRepository();
@@ -709,9 +737,9 @@ public class HorizontalBranchingClassMapping extends AbstractHorizontalClassMapp
stmt.setInt(col++, branch.getID());
}
- if (timeStamp != CDOBranchPoint.UNSPECIFIED_DATE)
+ for (int i = 0; i < timeParameters; i++)
{
- stmt.setLong(col, timeStamp);
+ stmt.setLong(col++, timeStamp);
}
rs = stmt.executeQuery();
diff --git a/plugins/org.eclipse.emf.cdo.server.db4o/src/org/eclipse/emf/cdo/server/internal/db4o/DB4OStoreAccessor.java b/plugins/org.eclipse.emf.cdo.server.db4o/src/org/eclipse/emf/cdo/server/internal/db4o/DB4OStoreAccessor.java
index 636d9963c6..ea67642a56 100644
--- a/plugins/org.eclipse.emf.cdo.server.db4o/src/org/eclipse/emf/cdo/server/internal/db4o/DB4OStoreAccessor.java
+++ b/plugins/org.eclipse.emf.cdo.server.db4o/src/org/eclipse/emf/cdo/server/internal/db4o/DB4OStoreAccessor.java
@@ -215,6 +215,7 @@ public class DB4OStoreAccessor extends LongIDStoreAccessor
public IStoreChunkReader createChunkReader(InternalCDORevision revision, EStructuralFeature feature)
{
+ // TODO: implement DB4OStoreAccessor.createChunkReader(revision, feature)
throw new UnsupportedOperationException();
}
@@ -271,13 +272,16 @@ public class DB4OStoreAccessor extends LongIDStoreAccessor
return DB4ORevision.getCDORevision(getStore(), revision);
}
- public void handleRevisions(EClass eClass, CDOBranch branch, long timeStamp, CDORevisionHandler handler)
+ public void handleRevisions(EClass eClass, CDOBranch branch, long timeStamp, boolean exactTime,
+ CDORevisionHandler handler)
{
+ // TODO: implement DB4OStoreAccessor.handleRevisions(eClass, branch, timeStamp, exactTime, handler)
throw new UnsupportedOperationException();
}
public Set<CDOID> readChangeSet(CDOChangeSetSegment... segments)
{
+ // TODO: implement DB4OStoreAccessor.readChangeSet(segments)
throw new UnsupportedOperationException();
}
@@ -360,60 +364,89 @@ public class DB4OStoreAccessor extends LongIDStoreAccessor
public void rawExport(CDODataOutput out, int fromBranchID, int toBranchID, long fromCommitTime, long toCommitTime)
throws IOException
{
+ // TODO: implement DB4OStoreAccessor.rawExport(out, fromBranchID, toBranchID, fromCommitTime, toCommitTime)
throw new UnsupportedOperationException();
}
public void rawImport(CDODataInput in, int fromBranchID, int toBranchID, long fromCommitTime, long toCommitTime)
throws IOException
{
+ // TODO: implement DB4OStoreAccessor.rawImport(in, fromBranchID, toBranchID, fromCommitTime, toCommitTime)
throw new UnsupportedOperationException();
}
public void rawImport(CDODataInput in, int fromBranchID, int toBranchID, long fromCommitTime, long toCommitTime,
OMMonitor monitor) throws IOException
{
+ // TODO: implement DB4OStoreAccessor.rawImport(in, fromBranchID, toBranchID, fromCommitTime, toCommitTime, monitor)
+ throw new UnsupportedOperationException();
+ }
+
+ public Object rawStore(InternalCDOPackageUnit[] packageUnits, Object context, OMMonitor monitor)
+ {
+ // TODO: implement DB4OStoreAccessor.rawStore(packageUnits, context, monitor)
+ throw new UnsupportedOperationException();
+ }
+
+ public Object rawStore(InternalCDORevision revision, Object context, OMMonitor monitor)
+ {
+ // TODO: implement DB4OStoreAccessor.rawStore(revision, context, monitor)
+ throw new UnsupportedOperationException();
+ }
+
+ public void rawCommit(Object context, OMMonitor monitor)
+ {
+ // TODO: implement DB4OStoreAccessor.rawCommit(context, monitor)
throw new UnsupportedOperationException();
}
public void queryLobs(List<byte[]> ids)
{
+ // TODO: implement DB4OStoreAccessor.queryLobs(ids)
throw new UnsupportedOperationException();
}
public void loadLob(byte[] id, OutputStream out) throws IOException
{
+ // TODO: implement DB4OStoreAccessor.loadLob(id, out)
throw new UnsupportedOperationException();
}
@Override
protected void writeBlob(byte[] id, long size, InputStream inputStream) throws IOException
{
+ // TODO: implement DB4OStoreAccessor.writeBlob(id, size, inputStream)
throw new UnsupportedOperationException();
}
@Override
protected void writeClob(byte[] id, long size, Reader reader) throws IOException
{
+ // TODO: implement DB4OStoreAccessor.writeClob(id, size, reader)
throw new UnsupportedOperationException();
}
public Pair<Integer, Long> createBranch(int branchID, BranchInfo branchInfo)
{
+ // TODO: implement DB4OStoreAccessor.createBranch(branchID, branchInfo)
throw new UnsupportedOperationException();
}
public BranchInfo loadBranch(int branchID)
{
+ // TODO: implement DB4OStoreAccessor.loadBranch(branchID)
throw new UnsupportedOperationException();
}
public SubBranchInfo[] loadSubBranches(int branchID)
{
+ // TODO: implement DB4OStoreAccessor.loadSubBranches(branchID)
throw new UnsupportedOperationException();
}
public int loadBranches(int startID, int endID, CDOBranchHandler branchHandler)
{
+ // TODO: implement DB4OStoreAccessor.loadBranches(startID, endID, branchHandler)
throw new UnsupportedOperationException();
}
@@ -580,6 +613,7 @@ public class DB4OStoreAccessor extends LongIDStoreAccessor
protected void writeRevisionDeltas(InternalCDORevisionDelta[] revisionDeltas, CDOBranch branch, long created,
OMMonitor monitor)
{
+ // TODO: implement DB4OStoreAccessor.writeRevisionDeltas(revisionDeltas, branch, created, monitor)
throw new UnsupportedOperationException();
}
diff --git a/plugins/org.eclipse.emf.cdo.server.hibernate/src/org/eclipse/emf/cdo/server/internal/hibernate/HibernateStoreAccessor.java b/plugins/org.eclipse.emf.cdo.server.hibernate/src/org/eclipse/emf/cdo/server/internal/hibernate/HibernateStoreAccessor.java
index 69fcfa6ced..05c161198d 100644
--- a/plugins/org.eclipse.emf.cdo.server.hibernate/src/org/eclipse/emf/cdo/server/internal/hibernate/HibernateStoreAccessor.java
+++ b/plugins/org.eclipse.emf.cdo.server.hibernate/src/org/eclipse/emf/cdo/server/internal/hibernate/HibernateStoreAccessor.java
@@ -397,9 +397,10 @@ public class HibernateStoreAccessor extends StoreAccessor implements IHibernateS
throw new UnsupportedOperationException();
}
- public void handleRevisions(EClass eClass, CDOBranch branch, long timeStamp, CDORevisionHandler handler)
+ public void handleRevisions(EClass eClass, CDOBranch branch, long timeStamp, boolean exactTime,
+ CDORevisionHandler handler)
{
- // TODO: implement HibernateStoreAccessor.handleRevisions(eClass, branch, timeStamp, handler)
+ // TODO: implement HibernateStoreAccessor.handleRevisions(eClass, branch, timeStamp, exactTime, handler)
throw new UnsupportedOperationException();
}
@@ -708,40 +709,66 @@ public class HibernateStoreAccessor extends StoreAccessor implements IHibernateS
protected void writeRevisionDeltas(InternalCDORevisionDelta[] revisionDeltas, CDOBranch branch, long created,
OMMonitor monitor)
{
+ // TODO: implement HibernateStoreAccessor.writeRevisionDeltas(revisionDeltas, branch, created, monitor)
throw new UnsupportedOperationException();
}
public void rawExport(CDODataOutput out, int fromBranchID, int toBranchID, long fromCommitTime, long toCommitTime)
throws IOException
{
+ // TODO: implement HibernateStoreAccessor.rawExport(out, fromBranchID, toBranchID, fromCommitTime, toCommitTime)
throw new UnsupportedOperationException();
}
public void rawImport(CDODataInput in, int fromBranchID, int toBranchID, long fromCommitTime, long toCommitTime,
OMMonitor monitor) throws IOException
{
+ // TODO: implement HibernateStoreAccessor.rawImport(in, fromBranchID, toBranchID, fromCommitTime, toCommitTime,
+ // monitor)
+ throw new UnsupportedOperationException();
+ }
+
+ public Object rawStore(InternalCDOPackageUnit[] packageUnits, Object context, OMMonitor monitor)
+ {
+ // TODO: implement HibernateStoreAccessor.rawStore(packageUnits, context, monitor)
+ throw new UnsupportedOperationException();
+ }
+
+ public Object rawStore(InternalCDORevision revision, Object context, OMMonitor monitor)
+ {
+ // TODO: implement HibernateStoreAccessor.rawStore(revision, context, monitor)
+ throw new UnsupportedOperationException();
+ }
+
+ public void rawCommit(Object context, OMMonitor monitor)
+ {
+ // TODO: implement HibernateStoreAccessor.rawCommit(context, monitor)
throw new UnsupportedOperationException();
}
public void queryLobs(List<byte[]> ids)
{
+ // TODO: implement HibernateStoreAccessor.queryLobs(ids)
throw new UnsupportedOperationException();
}
public void loadLob(byte[] id, OutputStream out) throws IOException
{
+ // TODO: implement HibernateStoreAccessor.loadLob(id, out)
throw new UnsupportedOperationException();
}
@Override
protected void writeBlob(byte[] id, long size, InputStream inputStream) throws IOException
{
+ // TODO: implement HibernateStoreAccessor.writeBlob(id, size, inputStream)
throw new UnsupportedOperationException();
}
@Override
protected void writeClob(byte[] id, long size, Reader reader) throws IOException
{
+ // TODO: implement HibernateStoreAccessor.writeClob(id, size, reader)
throw new UnsupportedOperationException();
}
diff --git a/plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/protocol/CDOServerProtocol.java b/plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/protocol/CDOServerProtocol.java
index 8e6713829f..b3e6c151e4 100644
--- a/plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/protocol/CDOServerProtocol.java
+++ b/plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/protocol/CDOServerProtocol.java
@@ -281,6 +281,9 @@ public class CDOServerProtocol extends SignalProtocol<InternalSession> implement
case CDOProtocolConstants.SIGNAL_LOAD_MERGE_DATA:
return new LoadMergeDataIndication(this);
+ case CDOProtocolConstants.SIGNAL_HANDLE_REVISIONS:
+ return new HandleRevisionsIndication(this);
+
default:
return super.createSignalReactor(signalID);
}
diff --git a/plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/protocol/HandleRevisionsIndication.java b/plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/protocol/HandleRevisionsIndication.java
new file mode 100644
index 0000000000..d0ea6801ce
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/protocol/HandleRevisionsIndication.java
@@ -0,0 +1,131 @@
+/**
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany) and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.emf.cdo.server.internal.net4j.protocol;
+
+import org.eclipse.emf.cdo.common.branch.CDOBranch;
+import org.eclipse.emf.cdo.common.protocol.CDODataInput;
+import org.eclipse.emf.cdo.common.protocol.CDODataOutput;
+import org.eclipse.emf.cdo.common.protocol.CDOProtocolConstants;
+import org.eclipse.emf.cdo.common.revision.CDORevision;
+import org.eclipse.emf.cdo.common.revision.CDORevisionHandler;
+import org.eclipse.emf.cdo.common.util.CDOCommonUtil;
+import org.eclipse.emf.cdo.server.internal.net4j.bundle.OM;
+
+import org.eclipse.net4j.util.om.trace.ContextTracer;
+
+import org.eclipse.emf.ecore.EClass;
+
+import java.io.IOException;
+
+/**
+ * @author Eike Stepper
+ */
+public class HandleRevisionsIndication extends CDOReadIndication
+{
+ private static final ContextTracer TRACER = new ContextTracer(OM.DEBUG_PROTOCOL, HandleRevisionsIndication.class);
+
+ private EClass eClass;
+
+ private CDOBranch branch;
+
+ private boolean exactBranch;
+
+ private long timeStamp;
+
+ private boolean exactTime;
+
+ public HandleRevisionsIndication(CDOServerProtocol protocol)
+ {
+ super(protocol, CDOProtocolConstants.SIGNAL_HANDLE_REVISIONS);
+ }
+
+ @Override
+ protected void indicating(CDODataInput in) throws IOException
+ {
+ if (in.readBoolean())
+ {
+ eClass = (EClass)in.readCDOClassifierRefAndResolve();
+ if (TRACER.isEnabled())
+ {
+ TRACER.format("Read eClass: {0}", eClass); //$NON-NLS-1$
+ }
+ }
+
+ if (in.readBoolean())
+ {
+ branch = in.readCDOBranch();
+ if (TRACER.isEnabled())
+ {
+ TRACER.format("Read branch: {0}", branch); //$NON-NLS-1$
+ }
+
+ exactBranch = in.readBoolean();
+ if (TRACER.isEnabled())
+ {
+ TRACER.format("Read exactBranch: {0}", exactBranch); //$NON-NLS-1$
+ }
+ }
+
+ timeStamp = in.readLong();
+ if (TRACER.isEnabled())
+ {
+ TRACER.format("Read timeStamp: {0}", CDOCommonUtil.formatTimeStamp(timeStamp)); //$NON-NLS-1$
+ }
+
+ exactTime = in.readBoolean();
+ if (TRACER.isEnabled())
+ {
+ TRACER.format("Read exactTime: {0}", exactTime); //$NON-NLS-1$
+ }
+ }
+
+ @Override
+ protected void responding(final CDODataOutput out) throws IOException
+ {
+ final IOException[] ioException = { null };
+ final RuntimeException[] runtimeException = { null };
+
+ getRepository().handleRevisions(eClass, branch, exactBranch, timeStamp, exactTime, new CDORevisionHandler()
+ {
+ public boolean handleRevision(CDORevision revision)
+ {
+ try
+ {
+ out.writeBoolean(true);
+ out.writeCDORevision(revision, CDORevision.UNCHUNKED);
+ return true;
+ }
+ catch (IOException ex)
+ {
+ ioException[0] = ex;
+ }
+ catch (RuntimeException ex)
+ {
+ runtimeException[0] = ex;
+ }
+
+ return false;
+ }
+ });
+
+ if (ioException[0] != null)
+ {
+ throw ioException[0];
+ }
+
+ if (runtimeException[0] != null)
+ {
+ throw runtimeException[0];
+ }
+
+ out.writeBoolean(false);
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.server.objectivity/src/org/eclipse/emf/cdo/server/internal/objectivity/ObjectivityStoreAccessor.java b/plugins/org.eclipse.emf.cdo.server.objectivity/src/org/eclipse/emf/cdo/server/internal/objectivity/ObjectivityStoreAccessor.java
index 4609066200..df76b0542e 100644
--- a/plugins/org.eclipse.emf.cdo.server.objectivity/src/org/eclipse/emf/cdo/server/internal/objectivity/ObjectivityStoreAccessor.java
+++ b/plugins/org.eclipse.emf.cdo.server.objectivity/src/org/eclipse/emf/cdo/server/internal/objectivity/ObjectivityStoreAccessor.java
@@ -1189,8 +1189,10 @@ public class ObjectivityStoreAccessor extends StoreAccessor implements IObjectiv
return result.toArray(new SubBranchInfo[result.size()]);
}
- public void handleRevisions(EClass eClass, CDOBranch branch, long timeStamp, CDORevisionHandler handler)
+ public void handleRevisions(EClass eClass, CDOBranch branch, long timeStamp, boolean exactTime,
+ CDORevisionHandler handler)
{
+ // TODO: implement ObjectivityStoreAccessor.handleRevisions(eClass, branch, timeStamp, exactTime, handler)
throw new UnsupportedOperationException();
}
@@ -1232,6 +1234,7 @@ public class ObjectivityStoreAccessor extends StoreAccessor implements IObjectiv
public void rawExport(CDODataOutput out, int fromBranchID, int toBranchID, long fromCommitTime, long toCommitTime)
throws IOException
{
+ // TODO: implement ObjectivityStoreAccessor.rawExport(out, fromBranchID, toBranchID, fromCommitTime, toCommitTime)
throw new UnsupportedOperationException();
}
@@ -1241,28 +1244,52 @@ public class ObjectivityStoreAccessor extends StoreAccessor implements IObjectiv
public void rawImport(CDODataInput in, int fromBranchID, int toBranchID, long fromCommitTime, long toCommitTime,
OMMonitor monitor) throws IOException
{
+ // TODO: implement ObjectivityStoreAccessor.rawImport(in, fromBranchID, toBranchID, fromCommitTime, toCommitTime,
+ // monitor)
+ throw new UnsupportedOperationException();
+ }
+
+ public Object rawStore(InternalCDOPackageUnit[] packageUnits, Object context, OMMonitor monitor)
+ {
+ // TODO: implement ObjectivityStoreAccessor.rawStore(packageUnits, context, monitor)
+ throw new UnsupportedOperationException();
+ }
+
+ public Object rawStore(InternalCDORevision revision, Object context, OMMonitor monitor)
+ {
+ // TODO: implement ObjectivityStoreAccessor.rawStore(revision, context, monitor)
+ throw new UnsupportedOperationException();
+ }
+
+ public void rawCommit(Object context, OMMonitor monitor)
+ {
+ // TODO: implement ObjectivityStoreAccessor.rawCommit(context, monitor)
throw new UnsupportedOperationException();
}
public void queryLobs(List<byte[]> ids)
{
+ // TODO: implement ObjectivityStoreAccessor.queryLobs(ids)
throw new UnsupportedOperationException();
}
public void loadLob(byte[] id, OutputStream out) throws IOException
{
+ // TODO: implement ObjectivityStoreAccessor.loadLob(id, out)
throw new UnsupportedOperationException();
}
@Override
protected void writeBlob(byte[] id, long size, InputStream inputStream) throws IOException
{
+ // TODO: implement ObjectivityStoreAccessor.writeBlob(id, size, inputStream)
throw new UnsupportedOperationException();
}
@Override
protected void writeClob(byte[] id, long size, Reader reader) throws IOException
{
+ // TODO: implement ObjectivityStoreAccessor.writeClob(id, size, reader)
throw new UnsupportedOperationException();
}
}
diff --git a/plugins/org.eclipse.emf.cdo.server.ocl/src/org/eclipse/emf/cdo/server/ocl/CDOExtentCreator.java b/plugins/org.eclipse.emf.cdo.server.ocl/src/org/eclipse/emf/cdo/server/ocl/CDOExtentCreator.java
index fcc786e985..ce3aeea161 100644
--- a/plugins/org.eclipse.emf.cdo.server.ocl/src/org/eclipse/emf/cdo/server/ocl/CDOExtentCreator.java
+++ b/plugins/org.eclipse.emf.cdo.server.ocl/src/org/eclipse/emf/cdo/server/ocl/CDOExtentCreator.java
@@ -106,7 +106,7 @@ public class CDOExtentCreator implements OCLExtentCreator
}
}
- accessor.handleRevisions(eClass, branch, timeStamp, new CDORevisionHandler()
+ accessor.handleRevisions(eClass, branch, timeStamp, true, new CDORevisionHandler()
{
public boolean handleRevision(CDORevision revision)
{
@@ -248,7 +248,7 @@ public class CDOExtentCreator implements OCLExtentCreator
private void handlePersistentState()
{
- accessor.handleRevisions(eClass, branch, timeStamp, new CDORevisionHandler()
+ accessor.handleRevisions(eClass, branch, timeStamp, true, new CDORevisionHandler()
{
public boolean handleRevision(CDORevision revision)
{
diff --git a/plugins/org.eclipse.emf.cdo.server/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.cdo.server/META-INF/MANIFEST.MF
index 91c48b9945..6f5d6d98c9 100644
--- a/plugins/org.eclipse.emf.cdo.server/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.emf.cdo.server/META-INF/MANIFEST.MF
@@ -12,7 +12,11 @@ Bundle-ClassPath: .
Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.4.0,4.0.0)";resolution:=optional,
org.eclipse.emf.cdo;bundle-version="[4.0.0,5.0.0)";visibility:=reexport,
org.eclipse.net4j.util;bundle-version="[3.1.0,4.0.0)";visibility:=reexport
-Export-Package: org.eclipse.emf.cdo.internal.server;version="4.0.0";x-friends:="org.eclipse.emf.cdo.server.db,org.eclipse.emf.cdo.server.net4j,org.eclipse.emf.cdo.tests",
+Export-Package: org.eclipse.emf.cdo.internal.server;version="4.0.0";
+ x-friends:="org.eclipse.emf.cdo.server.db,
+ org.eclipse.emf.cdo.server.net4j,
+ org.eclipse.emf.cdo.tests,
+ org.eclipse.emf.cdo.workspace",
org.eclipse.emf.cdo.internal.server.bundle;version="4.0.0";x-internal:=true,
org.eclipse.emf.cdo.internal.server.embedded;version="4.0.0";x-friends:="org.eclipse.emf.cdo.tests",
org.eclipse.emf.cdo.internal.server.mem;version="4.0.0";x-friends:="org.eclipse.emf.cdo.tests",
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 d4e379b082..56f1fc1ccc 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
@@ -34,6 +34,7 @@ import org.eclipse.emf.cdo.common.model.EMFUtil;
import org.eclipse.emf.cdo.common.protocol.CDODataOutput;
import org.eclipse.emf.cdo.common.protocol.CDOProtocolConstants;
import org.eclipse.emf.cdo.common.revision.CDORevision;
+import org.eclipse.emf.cdo.common.revision.CDORevisionHandler;
import org.eclipse.emf.cdo.common.revision.CDORevisionKey;
import org.eclipse.emf.cdo.common.revision.CDORevisionUtil;
import org.eclipse.emf.cdo.common.revision.delta.CDORevisionDeltaUtil;
@@ -1254,6 +1255,48 @@ public class Repository extends Container<Object> implements InternalRepository
accessor.loadLob(id, out);
}
+ public void handleRevisions(EClass eClass, CDOBranch branch, boolean exactBranch, long timeStamp, boolean exactTime,
+ final CDORevisionHandler handler)
+ {
+ CDORevisionHandler wrapper = handler;
+ if (!exactBranch)
+ {
+ if (exactTime && timeStamp == CDOBranchPoint.UNSPECIFIED_DATE)
+ {
+ throw new IllegalArgumentException("Time stamp must be specified if exactBranch==false and exactTime==true");
+ }
+
+ wrapper = new CDORevisionHandler()
+ {
+ private Set<CDOID> handled = new HashSet<CDOID>();
+
+ public boolean handleRevision(CDORevision revision)
+ {
+ if (handled.add(revision.getID()))
+ {
+ return handler.handleRevision(revision);
+ }
+
+ return true;
+ }
+ };
+ }
+
+ IStoreAccessor accessor = StoreThreadLocal.getAccessor();
+ while (branch != null)
+ {
+ accessor.handleRevisions(eClass, branch, timeStamp, exactTime, wrapper);
+ if (exactBranch)
+ {
+ break;
+ }
+
+ CDOBranchPoint base = branch.getBase();
+ branch = base.getBranch();
+ timeStamp = base.getTimeStamp();
+ }
+ }
+
@Override
public String toString()
{
@@ -1341,7 +1384,7 @@ public class Repository extends Container<Object> implements InternalRepository
LifecycleUtil.activate(lockManager);
lastCommitTimeStamp = Math.max(store.getCreationTime(), store.getLastCommitTime());
- branchManager.initMainBranch(lastCommitTimeStamp);
+ initMainBranch(branchManager, lastCommitTimeStamp);
LifecycleUtil.activate(branchManager);
if (store.isFirstTime())
@@ -1407,6 +1450,11 @@ public class Repository extends Container<Object> implements InternalRepository
return packageUnit;
}
+ protected void initMainBranch(InternalCDOBranchManager branchManager, long lastCommitTimeStamp)
+ {
+ branchManager.initMainBranch(false, lastCommitTimeStamp);
+ }
+
protected void initRootResource()
{
CDOBranchPoint head = branchManager.getMainBranch().getHead();
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/ServerCDOView.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/ServerCDOView.java
index 3a80d155f7..55937c4afd 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/ServerCDOView.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/ServerCDOView.java
@@ -561,6 +561,11 @@ public class ServerCDOView extends AbstractCDOView implements org.eclipse.emf.cd
throw new UnsupportedOperationException();
}
+ public CDOView openView(ResourceSet resourceSet)
+ {
+ throw new UnsupportedOperationException();
+ }
+
public CDOView openView(long timeStamp)
{
throw new UnsupportedOperationException();
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/embedded/EmbeddedClientSessionProtocol.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/embedded/EmbeddedClientSessionProtocol.java
index d053cbaef0..25dfc1f74f 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/embedded/EmbeddedClientSessionProtocol.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/embedded/EmbeddedClientSessionProtocol.java
@@ -28,6 +28,7 @@ import org.eclipse.emf.cdo.common.model.lob.CDOLob;
import org.eclipse.emf.cdo.common.model.lob.CDOLobInfo;
import org.eclipse.emf.cdo.common.protocol.CDOAuthenticationResult;
import org.eclipse.emf.cdo.common.protocol.CDOAuthenticator;
+import org.eclipse.emf.cdo.common.revision.CDORevisionHandler;
import org.eclipse.emf.cdo.common.revision.CDORevisionKey;
import org.eclipse.emf.cdo.common.util.CDOQueryQueue;
import org.eclipse.emf.cdo.server.StoreThreadLocal;
@@ -327,6 +328,14 @@ public class EmbeddedClientSessionProtocol extends Lifecycle implements CDOSessi
throw new UnsupportedOperationException();
}
+ public void handleRevisions(EClass eClass, CDOBranch branch, boolean exactBranch, long timeStamp, boolean exactTime,
+ CDORevisionHandler handler)
+ {
+ // TODO: implement EmbeddedClientSessionProtocol.handleRevisions(eClass, branch, exactBranch, timeStamp, exactTime,
+ // handler)
+ throw new UnsupportedOperationException();
+ }
+
public CommitTransactionResult commitTransaction(int transactionID, String comment, boolean releaseLocks,
CDOIDProvider idProvider, CDOCommitData commitData, Collection<CDOLob<?>> lobs, OMMonitor monitor)
{
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/mem/MEMStore.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/mem/MEMStore.java
index 6c86bd9eb4..448e8ea5db 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/mem/MEMStore.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/mem/MEMStore.java
@@ -276,13 +276,14 @@ public class MEMStore extends LongIDStore implements IMEMStore, BranchLoader
}
}
- public synchronized void handleRevisions(EClass eClass, CDOBranch branch, long timeStamp, CDORevisionHandler handler)
+ public synchronized void handleRevisions(EClass eClass, CDOBranch branch, long timeStamp, boolean exactTime,
+ CDORevisionHandler handler)
{
for (List<InternalCDORevision> list : revisions.values())
{
for (InternalCDORevision revision : list)
{
- if (!handleRevision(revision, eClass, branch, timeStamp, handler))
+ if (!handleRevision(revision, eClass, branch, timeStamp, exactTime, handler))
{
return;
}
@@ -291,7 +292,7 @@ public class MEMStore extends LongIDStore implements IMEMStore, BranchLoader
}
private boolean handleRevision(InternalCDORevision revision, EClass eClass, CDOBranch branch, long timeStamp,
- CDORevisionHandler handler)
+ boolean exactTime, CDORevisionHandler handler)
{
if (eClass != null && revision.getEClass() != eClass)
{
@@ -303,9 +304,19 @@ public class MEMStore extends LongIDStore implements IMEMStore, BranchLoader
return true;
}
- if (timeStamp != CDOBranchPoint.UNSPECIFIED_DATE && revision.getTimeStamp() != timeStamp)
+ if (exactTime)
{
- return true;
+ if (timeStamp != CDOBranchPoint.UNSPECIFIED_DATE && revision.getTimeStamp() != timeStamp)
+ {
+ return true;
+ }
+ }
+ else
+ {
+ if (revision.isValid(timeStamp))
+ {
+ return true;
+ }
}
return handler.handleRevision(revision);
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/mem/MEMStoreAccessor.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/mem/MEMStoreAccessor.java
index 4b78670282..f441af1014 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/mem/MEMStoreAccessor.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/mem/MEMStoreAccessor.java
@@ -206,9 +206,10 @@ public class MEMStoreAccessor extends LongIDStoreAccessor
return getStore().getRevisionByVersion(id, branchVersion);
}
- public void handleRevisions(EClass eClass, CDOBranch branch, long timeStamp, CDORevisionHandler handler)
+ public void handleRevisions(EClass eClass, CDOBranch branch, long timeStamp, boolean exactTime,
+ CDORevisionHandler handler)
{
- getStore().handleRevisions(eClass, branch, timeStamp, handler);
+ getStore().handleRevisions(eClass, branch, timeStamp, exactTime, handler);
}
/**
@@ -355,6 +356,48 @@ public class MEMStoreAccessor extends LongIDStoreAccessor
getStore().rawImport(in, fromBranchID, toBranchID, fromCommitTime, toCommitTime, monitor);
}
+ private RawStoreContext getRawStoreContext(Object object)
+ {
+ RawStoreContext context = (RawStoreContext)object;
+ if (context == null)
+ {
+ context = new RawStoreContext();
+ }
+
+ return context;
+ }
+
+ public Object rawStore(InternalCDOPackageUnit[] packageUnits, Object context, OMMonitor monitor)
+ {
+ RawStoreContext rawStoreContext = getRawStoreContext(context);
+ rawStoreContext.setPackageUnits(packageUnits);
+ return rawStoreContext;
+ }
+
+ public Object rawStore(InternalCDORevision revision, Object context, OMMonitor monitor)
+ {
+ RawStoreContext rawStoreContext = getRawStoreContext(context);
+ rawStoreContext.getRevisions().add(revision);
+ return rawStoreContext;
+ }
+
+ public void rawCommit(Object context, OMMonitor monitor)
+ {
+ RawStoreContext rawStoreContext = (RawStoreContext)context;
+ if (rawStoreContext != null)
+ {
+ MEMStore store = getStore();
+ synchronized (store)
+ {
+ writePackageUnits(rawStoreContext.getPackageUnits(), monitor);
+ for (InternalCDORevision revision : rawStoreContext.getRevisions())
+ {
+ getStore().addRevision(revision);
+ }
+ }
+ }
+ }
+
public void queryLobs(List<byte[]> ids)
{
getStore().queryLobs(ids);
@@ -400,4 +443,33 @@ public class MEMStoreAccessor extends LongIDStoreAccessor
{
// Pooling of store accessors not supported
}
+
+ /**
+ * @author Eike Stepper
+ */
+ private static final class RawStoreContext
+ {
+ private InternalCDOPackageUnit[] packageUnits = {};
+
+ private List<InternalCDORevision> revisions = new ArrayList<InternalCDORevision>();
+
+ public RawStoreContext()
+ {
+ }
+
+ public InternalCDOPackageUnit[] getPackageUnits()
+ {
+ return packageUnits;
+ }
+
+ public void setPackageUnits(InternalCDOPackageUnit[] packageUnits)
+ {
+ this.packageUnits = packageUnits;
+ }
+
+ public List<InternalCDORevision> getRevisions()
+ {
+ return revisions;
+ }
+ }
}
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/IStoreAccessor.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/IStoreAccessor.java
index 01a0658c7d..ace8bca776 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/IStoreAccessor.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/IStoreAccessor.java
@@ -124,13 +124,19 @@ public interface IStoreAccessor extends IQueryHandlerProvider, BranchLoader, Com
* <ul>
* <li>The <code>eClass</code> parameter is <code>null</code> or equal to <code>revision.getEClass()</code>.
* <li>The <code>branch</code> parameter is <code>null</code> or equal to <code>revision.getBranch()</code>.
- * <li>The <code>timeStamp</code> parameter is {@link CDOBranchPoint#UNSPECIFIED_DATE} or equal to
- * <code>revision.getTimeStamp()</code>.
+ * <li><b>One</b> of the following conditions is met:
+ * <ul>
+ * <li>The <code>exactTime</code> parameter is <code>true</code> and the <code>timeStamp</code> parameter is
+ * {@link CDOBranchPoint#UNSPECIFIED_DATE UNSPECIFIED} or equal to <code>revision.getTimeStamp()</code>.
+ * <li>The <code>exactTime</code> parameter is <code>false</code> and the <code>timeStamp</code> parameter is between
+ * <code>revision.getTimeStamp()</code> and <code>revision.getRevised()</code>.
+ * </ul>
* </ul>
*
- * @since 3.0
+ * @since 4.0
*/
- public void handleRevisions(EClass eClass, CDOBranch branch, long timeStamp, CDORevisionHandler handler);
+ public void handleRevisions(EClass eClass, CDOBranch branch, long timeStamp, boolean exactTime,
+ CDORevisionHandler handler);
/**
* Returns a set of CDOIDs that have at least one revision in any of the passed branches and time ranges.
@@ -226,6 +232,21 @@ public interface IStoreAccessor extends IQueryHandlerProvider, BranchLoader, Com
public void rawImport(CDODataInput in, int fromBranchID, int toBranchID, long fromCommitTime, long toCommitTime,
OMMonitor monitor) throws IOException;
+ /**
+ * @since 4.0
+ */
+ public Object rawStore(InternalCDOPackageUnit[] packageUnits, Object context, OMMonitor monitor);
+
+ /**
+ * @since 4.0
+ */
+ public Object rawStore(InternalCDORevision revision, Object context, OMMonitor monitor);
+
+ /**
+ * @since 4.0
+ */
+ public void rawCommit(Object context, OMMonitor monitor);
+
public void release();
/**
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/RepositoryNotFoundException.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/RepositoryNotFoundException.java
index 2835a51b7d..061d2c5804 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/RepositoryNotFoundException.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/RepositoryNotFoundException.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Eike Stepper - initial API and implementation
*/
@@ -32,6 +32,6 @@ public class RepositoryNotFoundException extends CDOException
@Override
public String getMessage()
{
- return "CDORepositoryInfo not found: " + getRepositoryName(); //$NON-NLS-1$
+ return "Repository not found: " + getRepositoryName(); //$NON-NLS-1$
}
}
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/InternalRepository.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/InternalRepository.java
index 364b23ebda..c1c9da40ca 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/InternalRepository.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/InternalRepository.java
@@ -16,6 +16,7 @@ import org.eclipse.emf.cdo.common.commit.CDOChangeSetData;
import org.eclipse.emf.cdo.common.id.CDOID;
import org.eclipse.emf.cdo.common.protocol.CDODataOutput;
import org.eclipse.emf.cdo.common.revision.CDORevision;
+import org.eclipse.emf.cdo.common.revision.CDORevisionHandler;
import org.eclipse.emf.cdo.server.IQueryHandlerProvider;
import org.eclipse.emf.cdo.server.IRepository;
import org.eclipse.emf.cdo.server.IStoreAccessor;
@@ -35,6 +36,7 @@ import org.eclipse.emf.cdo.spi.common.revision.InternalCDORevisionManager.Revisi
import org.eclipse.net4j.util.om.monitor.OMMonitor;
+import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EStructuralFeature;
import java.io.IOException;
@@ -125,4 +127,10 @@ public interface InternalRepository extends IRepository, PackageLoader, BranchLo
* @since 4.0
*/
public void loadLob(byte[] id, OutputStream out) throws IOException;
+
+ /**
+ * @since 4.0
+ */
+ public void handleRevisions(EClass eClass, CDOBranch branch, boolean exactBranch, long timeStamp, boolean exactTime,
+ CDORevisionHandler handler);
}
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/StoreAccessor.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/StoreAccessor.java
index d1b2d6f582..d7c65e7605 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/StoreAccessor.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/StoreAccessor.java
@@ -389,7 +389,7 @@ public abstract class StoreAccessor extends Lifecycle implements IStoreAccessor
public CDOCommitData getCommitData()
{
- storeAccessor.handleRevisions(null, null, timeStamp, this);
+ storeAccessor.handleRevisions(null, null, timeStamp, true, this);
return new CDOCommitDataImpl(newPackageUnits, newObjects, changedObjects, detachedObjects);
}
diff --git a/plugins/org.eclipse.emf.cdo.tests/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.cdo.tests/META-INF/MANIFEST.MF
index 8801f40c9e..b047dd05fb 100644
--- a/plugins/org.eclipse.emf.cdo.tests/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.emf.cdo.tests/META-INF/MANIFEST.MF
@@ -30,7 +30,8 @@ Require-Bundle: org.eclipse.net4j.tests;bundle-version="[4.0.0,5.0.0)";visibilit
org.eclipse.emf.cdo.tests.model4interfaces;bundle-version="[3.0.0,4.0.0)";visibility:=reexport,
org.eclipse.emf.cdo.tests.model5;bundle-version="[3.0.0,4.0.0)";visibility:=reexport,
org.eclipse.emf.cdo.defs;bundle-version="[4.0.0,5.0.0)";visibility:=reexport,
- org.eclipse.emf.cdo.server.ocl;bundle-version="[4.0.0,5.0.0)";visibility:=reexport
+ org.eclipse.emf.cdo.server.ocl;bundle-version="[4.0.0,5.0.0)";visibility:=reexport,
+ org.eclipse.emf.cdo.workspace;bundle-version="[4.0.0,5.0.0)"
Import-Package: org.apache.derby.jdbc;version="[10.0.0,11.0.0)",
org.h2.jdbcx;version="[1.1.0,1.2.0)"
Export-Package: base;version="4.0.0",
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/StateMachineTest.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/StateMachineTest.java
index f24134ec38..8a7a50f8d8 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/StateMachineTest.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/StateMachineTest.java
@@ -44,7 +44,7 @@ public class StateMachineTest extends AbstractCDOTest
{
private static final long TIMESTAMP = 12345678;
- private static final CDOBranch BRANCH = new CDOBranchImpl.Main(null, 0L);
+ private static final CDOBranch BRANCH = new CDOBranchImpl.Main(null, false, 0L);
// ///////////////////////////////////////////////////
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/WorkspaceTest.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/WorkspaceTest.java
new file mode 100644
index 0000000000..9fca92679b
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/WorkspaceTest.java
@@ -0,0 +1,404 @@
+/**
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany) and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.emf.cdo.tests;
+
+import org.eclipse.emf.cdo.CDOObject;
+import org.eclipse.emf.cdo.common.CDOCommonSession.Options.PassiveUpdateMode;
+import org.eclipse.emf.cdo.common.branch.CDOBranch;
+import org.eclipse.emf.cdo.common.branch.CDOBranchPoint;
+import org.eclipse.emf.cdo.common.protocol.CDOAuthenticator;
+import org.eclipse.emf.cdo.common.revision.CDOAllRevisionsProvider;
+import org.eclipse.emf.cdo.common.revision.CDORevision;
+import org.eclipse.emf.cdo.common.revision.CDORevisionUtil;
+import org.eclipse.emf.cdo.eresource.CDOResource;
+import org.eclipse.emf.cdo.server.IStore;
+import org.eclipse.emf.cdo.server.mem.MEMStoreUtil;
+import org.eclipse.emf.cdo.session.CDOSession;
+import org.eclipse.emf.cdo.session.CDOSession.ExceptionHandler;
+import org.eclipse.emf.cdo.session.CDOSessionConfiguration;
+import org.eclipse.emf.cdo.session.CDOSessionConfigurationFactory;
+import org.eclipse.emf.cdo.tests.model1.Customer;
+import org.eclipse.emf.cdo.tests.model1.OrderDetail;
+import org.eclipse.emf.cdo.tests.model1.Product1;
+import org.eclipse.emf.cdo.tests.model1.SalesOrder;
+import org.eclipse.emf.cdo.tests.model1.VAT;
+import org.eclipse.emf.cdo.transaction.CDOTransaction;
+import org.eclipse.emf.cdo.util.CommitException;
+import org.eclipse.emf.cdo.view.CDOView;
+import org.eclipse.emf.cdo.workspace.CDOWorkspace;
+import org.eclipse.emf.cdo.workspace.CDOWorkspaceUtil;
+
+import org.eclipse.net4j.jvm.JVMUtil;
+import org.eclipse.net4j.util.io.IOUtil;
+
+import org.eclipse.emf.ecore.EObject;
+
+import java.io.PrintStream;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author Eike Stepper
+ */
+public class WorkspaceTest extends AbstractCDOTest
+{
+ private static final String RESOURCE = "/test1";
+
+ private static final int NUM_OF_PRODUCTS = 100;
+
+ private static final int NUM_OF_CUSTOMERS = 20;
+
+ private static final int NUM_OF_PRODUCTS_CUSTOMER = NUM_OF_PRODUCTS / NUM_OF_CUSTOMERS;
+
+ private static final int NUM_OF_SALES_ORDERS = 50;
+
+ private CDOTransaction transaction;
+
+ private List<Product1> products = new ArrayList<Product1>();
+
+ private List<Customer> customers = new ArrayList<Customer>();
+
+ private List<OrderDetail> orderDetails = new ArrayList<OrderDetail>();
+
+ private List<SalesOrder> salesOrders = new ArrayList<SalesOrder>();
+
+ private int totalObjects;
+
+ private IStore localStore;
+
+ @Override
+ protected void doSetUp() throws Exception
+ {
+ super.doSetUp();
+ disableConsole();
+
+ CDOSession session = openSession();
+ transaction = session.openTransaction();
+ createTestSet(transaction);
+
+ JVMUtil.prepareContainer(getClientContainer());
+ localStore = createLocalStore();
+ }
+
+ public void testCheckout() throws Exception
+ {
+ CDOWorkspace workspace = checkout("MAIN", CDOBranchPoint.UNSPECIFIED_DATE);
+
+ assertEquals(1 + totalObjects, dumpLocalStore(null)); // Root resource + totalObjects
+ workspace.close();
+ }
+
+ public void testReadObjects() throws Exception
+ {
+ CDOWorkspace workspace = checkout("MAIN", CDOBranchPoint.UNSPECIFIED_DATE);
+
+ CDOView view = workspace.openView();
+ CDOResource resource = view.getResource(RESOURCE);
+ assertEquals(totalObjects, dumpObjects(null, resource));
+ workspace.close();
+ }
+
+ public void testModifyObjects() throws Exception
+ {
+ CDOWorkspace workspace = checkout("MAIN", CDOBranchPoint.UNSPECIFIED_DATE);
+
+ CDOTransaction transaction = workspace.openTransaction();
+ CDOResource resource = transaction.getResource(RESOURCE);
+ for (EObject object : resource.getContents())
+ {
+ if (object instanceof Product1)
+ {
+ Product1 product = (Product1)object;
+ product.setName("MODIFIED_" + product.getName());
+ }
+ }
+
+ assertEquals(true, transaction.isDirty());
+ assertEquals(NUM_OF_PRODUCTS, transaction.getDirtyObjects().size());
+
+ transaction.commit();
+ assertEquals(false, transaction.isDirty());
+ assertEquals(0, transaction.getDirtyObjects().size());
+
+ clearCache(transaction.getSession().getRevisionManager());
+
+ CDOView view = workspace.openView();
+ resource = view.getResource(RESOURCE);
+ assertEquals(totalObjects, dumpObjects(null, resource));
+ for (EObject object : resource.getContents())
+ {
+ if (object instanceof Product1)
+ {
+ Product1 product = (Product1)object;
+ assertEquals(true, product.getName().startsWith("MODIFIED_"));
+ }
+ }
+
+ workspace.close();
+ }
+
+ public void testAddObjects() throws Exception
+ {
+ CDOWorkspace workspace = checkout("MAIN", CDOBranchPoint.UNSPECIFIED_DATE);
+
+ CDOTransaction transaction = workspace.openTransaction();
+ CDOResource resource = transaction.getResource(RESOURCE);
+ for (int i = 0; i < NUM_OF_PRODUCTS; i++)
+ {
+ resource.getContents().add(createProduct(i));
+ }
+
+ assertEquals(true, transaction.isDirty());
+ assertEquals(1, transaction.getDirtyObjects().size());
+ assertEquals(NUM_OF_PRODUCTS, transaction.getNewObjects().size());
+
+ transaction.commit();
+ assertEquals(false, transaction.isDirty());
+ assertEquals(0, transaction.getDirtyObjects().size());
+ assertEquals(0, transaction.getNewObjects().size());
+
+ clearCache(transaction.getSession().getRevisionManager());
+
+ CDOView view = workspace.openView();
+ resource = view.getResource(RESOURCE);
+ assertEquals(totalObjects + NUM_OF_PRODUCTS, dumpObjects("--> ", resource));
+ workspace.close();
+ }
+
+ private int dumpLocalStore(PrintStream out)
+ {
+ if (localStore instanceof CDOAllRevisionsProvider)
+ {
+ CDOAllRevisionsProvider provider = (CDOAllRevisionsProvider)localStore;
+ Map<CDOBranch, List<CDORevision>> allRevisions = provider.getAllRevisions();
+ int size = allRevisions.values().iterator().next().size();
+ System.out.println("Local Store: " + size);
+
+ if (out != null)
+ {
+ CDORevisionUtil.dumpAllRevisions(allRevisions, out);
+ }
+
+ return size;
+ }
+
+ return 0;
+ }
+
+ private int dumpObjects(String prefix, CDOObject object)
+ {
+ if (prefix != null)
+ {
+ IOUtil.OUT().println(prefix + object);
+ }
+
+ int sum = 1;
+ for (EObject content : object.eContents())
+ {
+ sum += dumpObjects(prefix != null ? prefix + " " : null, (CDOObject)content);
+ }
+
+ return sum;
+ }
+
+ private CDOResource createTestSet(CDOTransaction transaction) throws CommitException
+ {
+ disableConsole();
+ CDOResource resource = transaction.createResource(RESOURCE);
+ fillResource(resource);
+
+ totalObjects = 1;
+ for (Iterator<EObject> it = resource.eAllContents(); it.hasNext();)
+ {
+ it.next();
+ ++totalObjects;
+ }
+
+ transaction.commit();
+ enableConsole();
+ return resource;
+ }
+
+ private void fillResource(CDOResource resource)
+ {
+ msg("Creating Testset");
+ List<Product1> products = new ArrayList<Product1>();
+ for (int i = 0; i < NUM_OF_PRODUCTS; i++)
+ {
+ products.add(createProduct(i));
+ }
+
+ resource.getContents().addAll(products);
+
+ int productCounter = 0;
+ for (int i = 0; i < NUM_OF_CUSTOMERS; i++)
+ {
+ Customer customer = createCustomer(i);
+ resource.getContents().add(customer);
+
+ List<Product1> customerProducts = products.subList(productCounter, productCounter + NUM_OF_PRODUCTS_CUSTOMER);
+ for (int k = 0; k < NUM_OF_SALES_ORDERS; k++)
+ {
+ resource.getContents().add(createSalesOrder(i * 10 + k, customer, customerProducts));
+ }
+
+ productCounter += NUM_OF_PRODUCTS_CUSTOMER;
+ }
+ }
+
+ private Customer createCustomer(int i)
+ {
+ Customer customer = getModel1Factory().createCustomer();
+ customer.setCity(i == 0 ? null : "City " + i); // set first city null for null-test-case
+ customer.setName("" + i);
+ customer.setStreet("Street " + i);
+
+ customers.add(customer);
+ return customer;
+ }
+
+ private SalesOrder createSalesOrder(int num, Customer customer, List<Product1> products)
+ {
+ SalesOrder salesOrder = getModel1Factory().createSalesOrder();
+ salesOrder.setCustomer(customer);
+ salesOrder.setId(num);
+ salesOrder.getOrderDetails().addAll(createOrderDetails(num, products));
+
+ salesOrders.add(salesOrder);
+ return salesOrder;
+ }
+
+ private List<OrderDetail> createOrderDetails(int index, List<Product1> products)
+ {
+ List<OrderDetail> orderDetails = new ArrayList<OrderDetail>();
+
+ int count = 0;
+ for (Product1 product : products)
+ {
+ OrderDetail orderDetail = createOrderDetail(product, count++ * index * 1.1f);
+ orderDetails.add(orderDetail);
+ }
+
+ return orderDetails;
+ }
+
+ private OrderDetail createOrderDetail(Product1 product, float price)
+ {
+ OrderDetail orderDetail = getModel1Factory().createOrderDetail();
+ orderDetail.setPrice(price);
+ orderDetail.setProduct(product);
+
+ orderDetails.add(orderDetail);
+ return orderDetail;
+ }
+
+ private Product1 createProduct(int index)
+ {
+ Product1 product = getModel1Factory().createProduct1();
+ product.setDescription("Description " + index);
+ product.setName("" + index);
+ if (index < 10)
+ {
+ product.setVat(VAT.VAT15);
+ }
+ else
+ {
+ product.setVat(VAT.VAT7);
+ }
+
+ products.add(product);
+ return product;
+ }
+
+ protected IStore createLocalStore()
+ {
+ return MEMStoreUtil.createMEMStore();
+ }
+
+ protected CDOWorkspace checkout(String branchPath, long timeStamp)
+ {
+ disableConsole();
+ CDOSessionConfigurationFactory remote = new RemoteSessionConfigurationFactory();
+
+ CDOWorkspace workspace = CDOWorkspaceUtil.checkout(localStore, remote, branchPath, timeStamp);
+ registerRepository(workspace.getLocalRepository());
+ return workspace;
+ }
+
+ /**
+ * @author Eike Stepper
+ */
+ private final class RemoteSessionConfigurationFactory implements CDOSessionConfigurationFactory
+ {
+ public CDOSessionConfiguration createSessionConfiguration()
+ {
+ return new CDOSessionConfiguration()
+ {
+ public CDOSession openSession()
+ {
+ return WorkspaceTest.this.openSession();
+ }
+
+ public void setPassiveUpdateMode(PassiveUpdateMode passiveUpdateMode)
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public void setPassiveUpdateEnabled(boolean passiveUpdateEnabled)
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public void setExceptionHandler(ExceptionHandler exceptionHandler)
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public void setActivateOnOpen(boolean activateOnOpen)
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public boolean isSessionOpen()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public boolean isPassiveUpdateEnabled()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public boolean isActivateOnOpen()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public PassiveUpdateMode getPassiveUpdateMode()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public ExceptionHandler getExceptionHandler()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public CDOAuthenticator getAuthenticator()
+ {
+ throw new UnsupportedOperationException();
+ }
+ };
+ }
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/config/IRepositoryConfig.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/config/IRepositoryConfig.java
index 0e6fa493b1..d45004aa9e 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/config/IRepositoryConfig.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/config/IRepositoryConfig.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Eike Stepper - initial API and implementation
*/
@@ -25,5 +25,7 @@ public interface IRepositoryConfig extends IConfig
public InternalRepository getRepository(String name);
+ public void registerRepository(InternalRepository repository);
+
public void setRestarting(boolean b);
}
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/config/impl/ConfigTest.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/config/impl/ConfigTest.java
index e47c30d95b..b8d414e282 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/config/impl/ConfigTest.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/config/impl/ConfigTest.java
@@ -11,6 +11,7 @@
package org.eclipse.emf.cdo.tests.config.impl;
import org.eclipse.emf.cdo.common.revision.CDORevisionManager;
+import org.eclipse.emf.cdo.server.IRepository;
import org.eclipse.emf.cdo.session.CDOSession;
import org.eclipse.emf.cdo.spi.common.revision.InternalCDORevisionManager;
import org.eclipse.emf.cdo.spi.server.InternalRepository;
@@ -202,6 +203,11 @@ public abstract class ConfigTest extends AbstractOMTest implements IConstants
return getRepositoryConfig().getRepository(IRepositoryConfig.REPOSITORY_NAME);
}
+ public void registerRepository(IRepository repository)
+ {
+ getRepositoryConfig().registerRepository((InternalRepository)repository);
+ }
+
public void restartRepository()
{
restartRepository(IRepositoryConfig.REPOSITORY_NAME);
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/config/impl/RepositoryConfig.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/config/impl/RepositoryConfig.java
index 2c96a7a9fc..40e919563d 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/config/impl/RepositoryConfig.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/config/impl/RepositoryConfig.java
@@ -149,10 +149,7 @@ public abstract class RepositoryConfig extends Config implements IRepositoryConf
}
repository.setQueryHandlerProvider(new ContainerQueryHandlerProvider(getCurrentTest().getServerContainer()));
- repository.addListener(repositoryListener);
-
- repositories.put(name, repository);
- LifecycleUtil.activate(repository);
+ registerRepository(repository);
}
return repository;
@@ -168,6 +165,13 @@ public abstract class RepositoryConfig extends Config implements IRepositoryConf
props.put(Props.REVISED_LRU_CAPACITY, "10000");
}
+ public void registerRepository(InternalRepository repository)
+ {
+ repository.addListener(repositoryListener);
+ repositories.put(repository.getName(), repository);
+ LifecycleUtil.activate(repository);
+ }
+
@Override
public void setUp() throws Exception
{
diff --git a/plugins/org.eclipse.emf.cdo.workspace/.classpath b/plugins/org.eclipse.emf.cdo.workspace/.classpath
new file mode 100644
index 0000000000..64c5e31b7a
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.workspace/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/plugins/org.eclipse.emf.cdo.workspace/.cvsignore b/plugins/org.eclipse.emf.cdo.workspace/.cvsignore
new file mode 100644
index 0000000000..693869726d
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.workspace/.cvsignore
@@ -0,0 +1,2 @@
+bin
+doc
diff --git a/plugins/org.eclipse.emf.cdo.workspace/.options b/plugins/org.eclipse.emf.cdo.workspace/.options
new file mode 100644
index 0000000000..290b98f560
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.workspace/.options
@@ -0,0 +1,3 @@
+# Debugging and tracing options
+
+org.eclipse.emf.cdo.workspace/debug = true
diff --git a/plugins/org.eclipse.emf.cdo.workspace/.project b/plugins/org.eclipse.emf.cdo.workspace/.project
new file mode 100644
index 0000000000..1f2760431c
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.workspace/.project
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.emf.cdo.workspace</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/org.eclipse.emf.cdo.workspace/.settings/org.eclipse.core.resources.prefs b/plugins/org.eclipse.emf.cdo.workspace/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000000..a1cef9a448
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.workspace/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,3 @@
+#Thu Dec 18 13:30:26 CET 2008
+eclipse.preferences.version=1
+encoding//model/org.eclipse.emf.cdo.defs.ecorediag=UTF-8
diff --git a/plugins/org.eclipse.emf.cdo.workspace/.settings/org.eclipse.jdt.core.prefs b/plugins/org.eclipse.emf.cdo.workspace/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000000..f6c5987344
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.workspace/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,360 @@
+#Thu Feb 04 09:44:24 CET 2010
+eclipse.preferences.version=1
+org.eclipse.jdt.core.codeComplete.argumentPrefixes=
+org.eclipse.jdt.core.codeComplete.argumentSuffixes=
+org.eclipse.jdt.core.codeComplete.fieldPrefixes=
+org.eclipse.jdt.core.codeComplete.fieldSuffixes=
+org.eclipse.jdt.core.codeComplete.localPrefixes=
+org.eclipse.jdt.core.codeComplete.localSuffixes=
+org.eclipse.jdt.core.codeComplete.staticFieldPrefixes=
+org.eclipse.jdt.core.codeComplete.staticFieldSuffixes=
+org.eclipse.jdt.core.codeComplete.staticFinalFieldPrefixes=
+org.eclipse.jdt.core.codeComplete.staticFinalFieldSuffixes=
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.doc.comment.support=enabled
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
+org.eclipse.jdt.core.compiler.problem.deadCode=warning
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=warning
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
+org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=disabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=disabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=public
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=warning
+org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag
+org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=warning
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
+org.eclipse.jdt.core.compiler.problem.nullReference=warning
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=warning
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedImport=warning
+org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
+org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
+org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
+org.eclipse.jdt.core.compiler.source=1.5
+org.eclipse.jdt.core.compiler.taskCaseSensitive=enabled
+org.eclipse.jdt.core.compiler.taskPriorities=NORMAL,HIGH,HIGH,LOW,LOW,LOW,LOW,LOW
+org.eclipse.jdt.core.compiler.taskTags=TODO,FIXME,XXX,PERF,MEM,POLISH,@generated NOT,@ADDED
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=1
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=next_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=next_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=next_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=next_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=next_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=next_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=next_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=next_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=next_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=next_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=true
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=true
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=120
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=2
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_member=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=true
+org.eclipse.jdt.core.formatter.join_wrapped_lines=true
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=120
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=space
+org.eclipse.jdt.core.formatter.tabulation.size=2
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
diff --git a/plugins/org.eclipse.emf.cdo.workspace/.settings/org.eclipse.jdt.ui.prefs b/plugins/org.eclipse.emf.cdo.workspace/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644
index 0000000000..51145884f6
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.workspace/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,120 @@
+#Thu Feb 04 09:44:24 CET 2010
+cleanup.add_default_serial_version_id=true
+cleanup.add_generated_serial_version_id=false
+cleanup.add_missing_annotations=true
+cleanup.add_missing_deprecated_annotations=true
+cleanup.add_missing_methods=false
+cleanup.add_missing_nls_tags=false
+cleanup.add_missing_override_annotations=true
+cleanup.add_missing_override_annotations_interface_methods=true
+cleanup.add_serial_version_id=true
+cleanup.always_use_blocks=true
+cleanup.always_use_parentheses_in_expressions=false
+cleanup.always_use_this_for_non_static_field_access=false
+cleanup.always_use_this_for_non_static_method_access=false
+cleanup.convert_to_enhanced_for_loop=false
+cleanup.correct_indentation=true
+cleanup.format_source_code=true
+cleanup.format_source_code_changes_only=false
+cleanup.make_local_variable_final=true
+cleanup.make_parameters_final=false
+cleanup.make_private_fields_final=true
+cleanup.make_type_abstract_if_missing_method=false
+cleanup.make_variable_declarations_final=false
+cleanup.never_use_blocks=false
+cleanup.never_use_parentheses_in_expressions=true
+cleanup.organize_imports=true
+cleanup.qualify_static_field_accesses_with_declaring_class=false
+cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+cleanup.qualify_static_member_accesses_with_declaring_class=false
+cleanup.qualify_static_method_accesses_with_declaring_class=false
+cleanup.remove_private_constructors=true
+cleanup.remove_trailing_whitespaces=true
+cleanup.remove_trailing_whitespaces_all=true
+cleanup.remove_trailing_whitespaces_ignore_empty=false
+cleanup.remove_unnecessary_casts=true
+cleanup.remove_unnecessary_nls_tags=true
+cleanup.remove_unused_imports=true
+cleanup.remove_unused_local_variables=false
+cleanup.remove_unused_private_fields=true
+cleanup.remove_unused_private_members=false
+cleanup.remove_unused_private_methods=true
+cleanup.remove_unused_private_types=true
+cleanup.sort_members=false
+cleanup.sort_members_all=false
+cleanup.use_blocks=true
+cleanup.use_blocks_only_for_return_and_throw=false
+cleanup.use_parentheses_in_expressions=true
+cleanup.use_this_for_non_static_field_access=true
+cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+cleanup.use_this_for_non_static_method_access=true
+cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+cleanup_profile=_EMFT
+cleanup_settings_version=2
+eclipse.preferences.version=1
+editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
+formatter_profile=_EMFT
+formatter_settings_version=11
+org.eclipse.jdt.ui.exception.name=ex
+org.eclipse.jdt.ui.gettersetter.use.is=true
+org.eclipse.jdt.ui.ignorelowercasenames=true
+org.eclipse.jdt.ui.importorder=org.eclipse.emf.cdo;org.eclipse.emf.internal.cdo;org.eclipse.net4j;org.eclipse.internal.net4j;org.eclipse.emf;org.eclipse;com;org;javax;java;
+org.eclipse.jdt.ui.javadoc=true
+org.eclipse.jdt.ui.keywordthis=false
+org.eclipse.jdt.ui.ondemandthreshold=99
+org.eclipse.jdt.ui.overrideannotation=true
+org.eclipse.jdt.ui.staticondemandthreshold=99
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="false" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment"/><template autoinsert\="false" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment"/><template autoinsert\="false" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment"/><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/**\r\n * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany) and others.\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http\://www.eclipse.org/legal/epl-v10.html\r\n * \r\n * Contributors\:\r\n * Eike Stepper - initial API and implementation\r\n */</template><template autoinsert\="false" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\r\n * @author Eike Stepper\r\n */</template><template autoinsert\="false" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment"/><template autoinsert\="false" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment"/><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment"/><template autoinsert\="false" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment"/><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\r\n${package_declaration}\r\n\r\n${typecomment}\r\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\r\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\r\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\r\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\r\n</template><template autoinsert\="false" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">${exception_var}.printStackTrace();</template><template autoinsert\="false" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">${body_statement}</template><template autoinsert\="false" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
+sp_cleanup.add_default_serial_version_id=true
+sp_cleanup.add_generated_serial_version_id=false
+sp_cleanup.add_missing_annotations=true
+sp_cleanup.add_missing_deprecated_annotations=true
+sp_cleanup.add_missing_methods=false
+sp_cleanup.add_missing_nls_tags=false
+sp_cleanup.add_missing_override_annotations=true
+sp_cleanup.add_missing_override_annotations_interface_methods=false
+sp_cleanup.add_serial_version_id=false
+sp_cleanup.always_use_blocks=true
+sp_cleanup.always_use_parentheses_in_expressions=false
+sp_cleanup.always_use_this_for_non_static_field_access=false
+sp_cleanup.always_use_this_for_non_static_method_access=false
+sp_cleanup.convert_to_enhanced_for_loop=false
+sp_cleanup.correct_indentation=true
+sp_cleanup.format_source_code=true
+sp_cleanup.format_source_code_changes_only=false
+sp_cleanup.make_local_variable_final=false
+sp_cleanup.make_parameters_final=false
+sp_cleanup.make_private_fields_final=true
+sp_cleanup.make_type_abstract_if_missing_method=false
+sp_cleanup.make_variable_declarations_final=false
+sp_cleanup.never_use_blocks=false
+sp_cleanup.never_use_parentheses_in_expressions=true
+sp_cleanup.on_save_use_additional_actions=true
+sp_cleanup.organize_imports=true
+sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
+sp_cleanup.remove_private_constructors=true
+sp_cleanup.remove_trailing_whitespaces=true
+sp_cleanup.remove_trailing_whitespaces_all=true
+sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
+sp_cleanup.remove_unnecessary_casts=true
+sp_cleanup.remove_unnecessary_nls_tags=true
+sp_cleanup.remove_unused_imports=true
+sp_cleanup.remove_unused_local_variables=false
+sp_cleanup.remove_unused_private_fields=true
+sp_cleanup.remove_unused_private_members=false
+sp_cleanup.remove_unused_private_methods=true
+sp_cleanup.remove_unused_private_types=true
+sp_cleanup.sort_members=false
+sp_cleanup.sort_members_all=false
+sp_cleanup.use_blocks=true
+sp_cleanup.use_blocks_only_for_return_and_throw=false
+sp_cleanup.use_parentheses_in_expressions=true
+sp_cleanup.use_this_for_non_static_field_access=true
+sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+sp_cleanup.use_this_for_non_static_method_access=true
+sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/plugins/org.eclipse.emf.cdo.workspace/.settings/org.eclipse.ltk.core.refactoring.prefs b/plugins/org.eclipse.emf.cdo.workspace/.settings/org.eclipse.ltk.core.refactoring.prefs
new file mode 100644
index 0000000000..864e30fe5d
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.workspace/.settings/org.eclipse.ltk.core.refactoring.prefs
@@ -0,0 +1,3 @@
+#Thu Feb 04 09:44:24 CET 2010
+eclipse.preferences.version=1
+org.eclipse.ltk.core.refactoring.enable.project.refactoring.history=false
diff --git a/plugins/org.eclipse.emf.cdo.workspace/.settings/org.eclipse.mylyn.tasks.ui.prefs b/plugins/org.eclipse.emf.cdo.workspace/.settings/org.eclipse.mylyn.tasks.ui.prefs
new file mode 100644
index 0000000000..b050639a54
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.workspace/.settings/org.eclipse.mylyn.tasks.ui.prefs
@@ -0,0 +1,4 @@
+#Thu Feb 04 09:44:24 CET 2010
+eclipse.preferences.version=1
+project.repository.kind=bugzilla
+project.repository.url=https\://bugs.eclipse.org/bugs
diff --git a/plugins/org.eclipse.emf.cdo.workspace/.settings/org.eclipse.mylyn.team.ui.prefs b/plugins/org.eclipse.emf.cdo.workspace/.settings/org.eclipse.mylyn.team.ui.prefs
new file mode 100644
index 0000000000..2f50f36c0c
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.workspace/.settings/org.eclipse.mylyn.team.ui.prefs
@@ -0,0 +1,3 @@
+#Thu Feb 04 09:44:24 CET 2010
+commit.comment.template=[${task.id}] ${task.description} \r\n${task.url}
+eclipse.preferences.version=1
diff --git a/plugins/org.eclipse.emf.cdo.workspace/.settings/org.eclipse.pde.api.tools.prefs b/plugins/org.eclipse.emf.cdo.workspace/.settings/org.eclipse.pde.api.tools.prefs
new file mode 100644
index 0000000000..89b93d6243
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.workspace/.settings/org.eclipse.pde.api.tools.prefs
@@ -0,0 +1,94 @@
+#Sun Jul 18 08:53:50 CEST 2010
+ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error
+ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error
+CLASS_ELEMENT_TYPE_ADDED_METHOD=Error
+CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error
+CLASS_ELEMENT_TYPE_REMOVED_FIELD=Error
+CLASS_ELEMENT_TYPE_REMOVED_METHOD=Error
+CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Error
+ENUM_ELEMENT_TYPE_REMOVED_FIELD=Error
+ENUM_ELEMENT_TYPE_REMOVED_METHOD=Error
+ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+FIELD_ELEMENT_TYPE_ADDED_VALUE=Error
+FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_TYPE=Error
+FIELD_ELEMENT_TYPE_CHANGED_VALUE=Error
+FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Error
+FIELD_ELEMENT_TYPE_REMOVED_VALUE=Error
+ILLEGAL_EXTEND=Warning
+ILLEGAL_IMPLEMENT=Warning
+ILLEGAL_INSTANTIATE=Warning
+ILLEGAL_OVERRIDE=Warning
+ILLEGAL_REFERENCE=Warning
+INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Error
+INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+INVALID_JAVADOC_TAG=Ignore
+INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Ignore
+LEAK_EXTEND=Warning
+LEAK_FIELD_DECL=Warning
+LEAK_IMPLEMENT=Warning
+LEAK_METHOD_PARAM=Warning
+LEAK_METHOD_RETURN_TYPE=Warning
+METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error
+METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
+UNUSED_PROBLEM_FILTERS=Warning
+automatically_removed_unused_problem_filters=Disabled
+eclipse.preferences.version=1
+incompatible_api_component_version=Error
+incompatible_api_component_version_include_major_without_breaking_change=Disabled
+incompatible_api_component_version_include_minor_without_api_change=Disabled
+invalid_since_tag_version=Error
+malformed_since_tag=Error
+missing_since_tag=Error
+report_api_breakage_when_major_version_incremented=Disabled
+report_resolution_errors_api_component=Warning
diff --git a/plugins/org.eclipse.emf.cdo.workspace/.settings/org.eclipse.pde.prefs b/plugins/org.eclipse.emf.cdo.workspace/.settings/org.eclipse.pde.prefs
new file mode 100644
index 0000000000..c6b96bb45e
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.workspace/.settings/org.eclipse.pde.prefs
@@ -0,0 +1,31 @@
+#Thu Feb 04 09:44:24 CET 2010
+compilers.f.unresolved-features=1
+compilers.f.unresolved-plugins=1
+compilers.incompatible-environment=1
+compilers.p.build=1
+compilers.p.build.bin.includes=1
+compilers.p.build.java.compliance=1
+compilers.p.build.missing.output=2
+compilers.p.build.output.library=1
+compilers.p.build.source.library=1
+compilers.p.build.src.includes=1
+compilers.p.deprecated=1
+compilers.p.discouraged-class=1
+compilers.p.internal=1
+compilers.p.missing-packages=1
+compilers.p.missing-version-export-package=1
+compilers.p.missing-version-import-package=1
+compilers.p.missing-version-require-bundle=1
+compilers.p.no-required-att=0
+compilers.p.not-externalized-att=2
+compilers.p.unknown-attribute=1
+compilers.p.unknown-class=1
+compilers.p.unknown-element=1
+compilers.p.unknown-identifier=1
+compilers.p.unknown-resource=1
+compilers.p.unresolved-ex-points=0
+compilers.p.unresolved-import=0
+compilers.s.create-docs=false
+compilers.s.doc-folder=doc
+compilers.s.open-tags=1
+eclipse.preferences.version=1
diff --git a/plugins/org.eclipse.emf.cdo.workspace/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.cdo.workspace/META-INF/MANIFEST.MF
new file mode 100644
index 0000000000..50fa1fb0b9
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.workspace/META-INF/MANIFEST.MF
@@ -0,0 +1,15 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.emf.cdo.workspace;singleton:=true
+Bundle-Version: 4.0.0.qualifier
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.4.0,4.0.0)";resolution:=optional,
+ org.eclipse.emf.cdo.server.net4j;bundle-version="[4.0.0,5.0.0)",
+ org.eclipse.emf.cdo.net4j;bundle-version="[4.0.0,5.0.0)",
+ org.eclipse.net4j.jvm;bundle-version="[4.0.0,5.0.0)"
+Export-Package: org.eclipse.emf.cdo.internal.workspace;version="4.0.0";x-friends:="org.eclipse.emf.cdo.tests,org.eclipse.emf.cdo.tests.db",
+ org.eclipse.emf.cdo.internal.workspace.bundle;version="4.0.0";x-internal:=true,
+ org.eclipse.emf.cdo.workspace;version="4.0.0"
+Bundle-Vendor: %providerName
+Bundle-ActivationPolicy: lazy
diff --git a/plugins/org.eclipse.emf.cdo.workspace/about.html b/plugins/org.eclipse.emf.cdo.workspace/about.html
new file mode 100644
index 0000000000..d35d5aed64
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.workspace/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 5, 2007</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
diff --git a/plugins/org.eclipse.emf.cdo.workspace/build.properties b/plugins/org.eclipse.emf.cdo.workspace/build.properties
new file mode 100644
index 0000000000..a3a3d2ff2c
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.workspace/build.properties
@@ -0,0 +1,10 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ .options,\
+ about.html,\
+ copyright.txt,\
+ plugin.properties
+src.includes = about.html,\
+ copyright.txt
diff --git a/plugins/org.eclipse.emf.cdo.workspace/copyright.txt b/plugins/org.eclipse.emf.cdo.workspace/copyright.txt
new file mode 100644
index 0000000000..77d945dca6
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.workspace/copyright.txt
@@ -0,0 +1,8 @@
+Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany) and others.
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+
+Contributors:
+ Eike Stepper - initial API and implementation \ No newline at end of file
diff --git a/plugins/org.eclipse.emf.cdo.workspace/plugin.properties b/plugins/org.eclipse.emf.cdo.workspace/plugin.properties
new file mode 100644
index 0000000000..df4b0944bc
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.workspace/plugin.properties
@@ -0,0 +1,11 @@
+# Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany) and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Eike Stepper - initial API and implementation
+
+pluginName = CDO Model Repository Workspace
+providerName = Eclipse Modeling Project
diff --git a/plugins/org.eclipse.emf.cdo.workspace/src/org/eclipse/emf/cdo/internal/workspace/CDOWorkspaceImpl.java b/plugins/org.eclipse.emf.cdo.workspace/src/org/eclipse/emf/cdo/internal/workspace/CDOWorkspaceImpl.java
new file mode 100644
index 0000000000..18f6df445f
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.workspace/src/org/eclipse/emf/cdo/internal/workspace/CDOWorkspaceImpl.java
@@ -0,0 +1,369 @@
+/**
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany) and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.emf.cdo.internal.workspace;
+
+import org.eclipse.emf.cdo.common.branch.CDOBranch;
+import org.eclipse.emf.cdo.common.branch.CDOBranchPoint;
+import org.eclipse.emf.cdo.common.revision.CDORevision;
+import org.eclipse.emf.cdo.common.revision.CDORevisionHandler;
+import org.eclipse.emf.cdo.internal.server.Repository;
+import org.eclipse.emf.cdo.net4j.CDONet4jUtil;
+import org.eclipse.emf.cdo.server.CDOServerUtil;
+import org.eclipse.emf.cdo.server.IRepository.Props;
+import org.eclipse.emf.cdo.server.IStore;
+import org.eclipse.emf.cdo.server.IStoreAccessor;
+import org.eclipse.emf.cdo.server.StoreThreadLocal;
+import org.eclipse.emf.cdo.server.net4j.CDONet4jServerUtil;
+import org.eclipse.emf.cdo.session.CDOSessionConfiguration;
+import org.eclipse.emf.cdo.session.CDOSessionConfigurationFactory;
+import org.eclipse.emf.cdo.spi.common.branch.InternalCDOBranchManager;
+import org.eclipse.emf.cdo.spi.common.model.InternalCDOPackageRegistry;
+import org.eclipse.emf.cdo.spi.common.model.InternalCDOPackageUnit;
+import org.eclipse.emf.cdo.spi.common.revision.InternalCDORevision;
+import org.eclipse.emf.cdo.spi.server.InternalRepository;
+import org.eclipse.emf.cdo.spi.server.InternalStore;
+import org.eclipse.emf.cdo.transaction.CDOCommitContext;
+import org.eclipse.emf.cdo.transaction.CDODefaultTransactionHandler;
+import org.eclipse.emf.cdo.transaction.CDOMerger;
+import org.eclipse.emf.cdo.transaction.CDOTransaction;
+import org.eclipse.emf.cdo.view.CDOView;
+import org.eclipse.emf.cdo.workspace.CDOWorkspace;
+
+import org.eclipse.net4j.Net4jUtil;
+import org.eclipse.net4j.jvm.IJVMAcceptor;
+import org.eclipse.net4j.jvm.IJVMConnector;
+import org.eclipse.net4j.jvm.JVMUtil;
+import org.eclipse.net4j.util.container.ContainerUtil;
+import org.eclipse.net4j.util.container.IManagedContainer;
+import org.eclipse.net4j.util.lifecycle.LifecycleUtil;
+import org.eclipse.net4j.util.om.monitor.Monitor;
+import org.eclipse.net4j.util.om.monitor.OMMonitor;
+
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.spi.cdo.InternalCDOObject;
+import org.eclipse.emf.spi.cdo.InternalCDOSession;
+import org.eclipse.emf.spi.cdo.InternalCDOTransaction;
+
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * @author Eike Stepper
+ */
+public class CDOWorkspaceImpl implements CDOWorkspace
+{
+ private static final String PROP_BRANCH_PATH = "org.eclipse.emf.cdo.workspace.branchPath"; //$NON-NLS-1$
+
+ private static final String PROP_TIME_STAMP = "org.eclipse.emf.cdo.workspace.timeSTamp"; //$NON-NLS-1$
+
+ private IManagedContainer container;
+
+ private InternalRepository localRepository;
+
+ private IJVMAcceptor localAcceptor;
+
+ private InternalCDOSession localSession;
+
+ private CDOSessionConfigurationFactory remoteSessionConfigurationFactory;
+
+ private String baselineBranch;
+
+ private long baselineTime;
+
+ private CDOWorkspaceImpl(IStore local)
+ {
+ container = createContainer(local);
+ localRepository = createLocalRepository(local);
+ localAcceptor = getLocalAcceptor();
+ localSession = openLocalSession();
+ }
+
+ public CDOWorkspaceImpl(IStore local, CDOSessionConfigurationFactory remote, String branchPath, long timeStamp)
+ {
+ this(local);
+ remoteSessionConfigurationFactory = remote;
+ baselineBranch = branchPath;
+ baselineTime = timeStamp;
+ checkout();
+ }
+
+ public CDOWorkspaceImpl(IStore local, CDOSessionConfigurationFactory remote)
+ {
+ this(local);
+ remoteSessionConfigurationFactory = remote;
+ open();
+ }
+
+ protected void checkout()
+ {
+ final OMMonitor monitor = new Monitor();
+ final Object[] context = { null };
+
+ final IStoreAccessor accessor = localRepository.getStore().getWriter(null);
+ StoreThreadLocal.setAccessor(accessor);
+
+ try
+ {
+ InternalCDOSession session = openRemoteSession();
+
+ try
+ {
+ InternalCDOPackageUnit[] packageUnits = session.getPackageRegistry().getPackageUnits();
+ context[0] = accessor.rawStore(packageUnits, context[0], monitor);
+
+ InternalCDOPackageRegistry repositoryPackageRegistry = localRepository.getPackageRegistry(false);
+ InternalCDOPackageRegistry sessionPackageRegistry = localSession.getPackageRegistry();
+ for (InternalCDOPackageUnit packageUnit : packageUnits)
+ {
+ repositoryPackageRegistry.putPackageUnit(packageUnit);
+ sessionPackageRegistry.putPackageUnit(packageUnit);
+ }
+
+ CDORevisionHandler handler = new CDORevisionHandler()
+ {
+ public boolean handleRevision(CDORevision revision)
+ {
+ context[0] = accessor.rawStore((InternalCDORevision)revision, context[0], monitor);
+ return true;
+ }
+ };
+
+ CDOBranch branch = session.getBranchManager().getBranch(baselineBranch);
+ session.getSessionProtocol().handleRevisions(null, branch, false, baselineTime, false, handler);
+ }
+ finally
+ {
+ LifecycleUtil.deactivate(session);
+ }
+
+ accessor.rawCommit(context[0], monitor);
+ storeBranchPoint(baselineBranch, baselineTime);
+ }
+ finally
+ {
+ StoreThreadLocal.release();
+ monitor.done();
+ }
+ }
+
+ protected void open()
+ {
+ }
+
+ public InternalRepository getLocalRepository()
+ {
+ return localRepository;
+ }
+
+ public CDOView openView()
+ {
+ CDOView view = localSession.openView();
+ initView(view);
+ return view;
+ }
+
+ public CDOView openView(ResourceSet resourceSet)
+ {
+ CDOView view = localSession.openView(resourceSet);
+ initView(view);
+ return view;
+ }
+
+ public CDOTransaction openTransaction()
+ {
+ CDOTransaction transaction = localSession.openTransaction();
+ initView(transaction);
+ return transaction;
+ }
+
+ public CDOTransaction openTransaction(ResourceSet resourceSet)
+ {
+ CDOTransaction transaction = localSession.openTransaction(resourceSet);
+ initView(transaction);
+ return transaction;
+ }
+
+ public CDOTransaction update(CDOMerger merger)
+ {
+ return update(merger, CDOBranch.MAIN_BRANCH_NAME);
+ }
+
+ public CDOTransaction update(CDOMerger merger, String branchPath)
+ {
+ return update(merger, branchPath, CDOBranchPoint.UNSPECIFIED_DATE);
+ }
+
+ public CDOTransaction update(CDOMerger merger, String branchPath, long timeStamp)
+ {
+ // TODO: implement CDOWorkspaceImpl.update(merger, branchPath, timeStamp)
+ throw new UnsupportedOperationException();
+ }
+
+ public void revert()
+ {
+ // TODO: implement CDOWorkspaceImpl.revert()
+ throw new UnsupportedOperationException();
+ }
+
+ public void replace(String branchPath, long timeStamp)
+ {
+ // TODO: implement CDOWorkspaceImpl.replace(branchPath, timeStamp)
+ throw new UnsupportedOperationException();
+ }
+
+ public void commit(String comment)
+ {
+ // TODO: implement CDOWorkspaceImpl.commit(comment)
+ throw new UnsupportedOperationException();
+ }
+
+ public synchronized void close()
+ {
+ LifecycleUtil.deactivate(localSession);
+ localSession = null;
+
+ LifecycleUtil.deactivate(localAcceptor);
+ localAcceptor = null;
+
+ LifecycleUtil.deactivate(localRepository);
+ localRepository = null;
+ }
+
+ public synchronized boolean isClosed()
+ {
+ return localRepository == null;
+ }
+
+ protected IManagedContainer getContainer()
+ {
+ return container;
+ }
+
+ protected String getLocalAcceptorName()
+ {
+ return "acceptor-for-" + localRepository.getUUID();
+ }
+
+ protected IJVMAcceptor getLocalAcceptor()
+ {
+ String localAcceptorName = getLocalAcceptorName();
+ IJVMAcceptor acceptor = JVMUtil.getAcceptor(container, localAcceptorName);
+ return acceptor;
+ }
+
+ protected IJVMConnector getLocalConnector()
+ {
+ String localAcceptorName = getLocalAcceptorName();
+ return JVMUtil.getConnector(container, localAcceptorName);
+ }
+
+ protected InternalCDOSession getLocalSession()
+ {
+ return localSession;
+ }
+
+ protected IManagedContainer createContainer(IStore local)
+ {
+ IManagedContainer container = ContainerUtil.createContainer();
+ Net4jUtil.prepareContainer(container);
+ JVMUtil.prepareContainer(container);
+ CDONet4jServerUtil.prepareContainer(container);
+ container.activate();
+ return container;
+ }
+
+ protected InternalRepository createLocalRepository(IStore store)
+ {
+ Map<String, String> props = new HashMap<String, String>();
+ props.put(Props.OVERRIDE_UUID, ""); // UUID := name !!!
+ props.put(Props.SUPPORTING_AUDITS, "false");
+ props.put(Props.SUPPORTING_BRANCHES, "false");
+
+ Repository repository = new Repository.Default()
+ {
+ @Override
+ protected void initMainBranch(InternalCDOBranchManager branchManager, long lastCommitTimeStamp)
+ {
+ // Mark the main branch local so that new objects get local IDs
+ branchManager.initMainBranch(true, lastCommitTimeStamp);
+ }
+
+ @Override
+ protected void initRootResource()
+ {
+ // Don't create the root resource as it will be checked out
+ setState(State.INITIAL);
+ }
+ };
+
+ repository.setName("local");
+ repository.setStore((InternalStore)store);
+ repository.setProperties(props);
+
+ CDOServerUtil.addRepository(container, repository);
+ return repository;
+ }
+
+ protected InternalCDOSession openLocalSession()
+ {
+ IJVMConnector connector = getLocalConnector();
+ String repositoryName = localRepository.getName();
+
+ org.eclipse.emf.cdo.net4j.CDOSessionConfiguration configuration = CDONet4jUtil.createSessionConfiguration();
+ configuration.setConnector(connector);
+ configuration.setRepositoryName(repositoryName);
+ return (InternalCDOSession)configuration.openSession();
+ }
+
+ protected void initView(CDOView view)
+ {
+ if (view instanceof CDOTransaction)
+ {
+ CDOTransaction transaction = (CDOTransaction)view;
+ transaction.addTransactionHandler(new CDODefaultTransactionHandler()
+ {
+ @Override
+ public void committedTransaction(CDOTransaction transaction, CDOCommitContext commitContext)
+ {
+ Map<InternalCDOObject, InternalCDORevision> cleanRevisions = ((InternalCDOTransaction)transaction)
+ .getCleanRevisions();
+ addToBaseline(cleanRevisions.values());
+ }
+ });
+ }
+ }
+
+ protected CDOSessionConfigurationFactory getRemoteSessionConfigurationFactory()
+ {
+ return remoteSessionConfigurationFactory;
+ }
+
+ protected InternalCDOSession openRemoteSession()
+ {
+ CDOSessionConfiguration configuration = remoteSessionConfigurationFactory.createSessionConfiguration();
+ return (InternalCDOSession)configuration.openSession();
+ }
+
+ protected void storeBranchPoint(String branchPath, long timeStamp)
+ {
+ Map<String, String> props = new HashMap<String, String>();
+ props.put(PROP_BRANCH_PATH, branchPath);
+ props.put(PROP_TIME_STAMP, String.valueOf(timeStamp));
+ localRepository.setProperties(props);
+ }
+
+ protected void addToBaseline(Collection<InternalCDORevision> revisions)
+ {
+ // TODO: implement CDOWorkspaceImpl.addToBaseline(revisions)
+ // throw new UnsupportedOperationException();
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.workspace/src/org/eclipse/emf/cdo/internal/workspace/bundle/OM.java b/plugins/org.eclipse.emf.cdo.workspace/src/org/eclipse/emf/cdo/internal/workspace/bundle/OM.java
new file mode 100644
index 0000000000..9e27a1ce8d
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.workspace/src/org/eclipse/emf/cdo/internal/workspace/bundle/OM.java
@@ -0,0 +1,44 @@
+/**
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany) and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.emf.cdo.internal.workspace.bundle;
+
+import org.eclipse.net4j.util.om.OMBundle;
+import org.eclipse.net4j.util.om.OMPlatform;
+import org.eclipse.net4j.util.om.OSGiActivator;
+import org.eclipse.net4j.util.om.log.OMLogger;
+import org.eclipse.net4j.util.om.trace.OMTracer;
+
+/**
+ * The <em>Operations & Maintenance</em> class of this bundle.
+ *
+ * @author Eike Stepper
+ */
+public abstract class OM
+{
+ public static final String BUNDLE_ID = "org.eclipse.emf.cdo.workspace"; //$NON-NLS-1$
+
+ public static final OMBundle BUNDLE = OMPlatform.INSTANCE.bundle(BUNDLE_ID, OM.class);
+
+ public static final OMTracer DEBUG = BUNDLE.tracer("debug"); //$NON-NLS-1$
+
+ public static final OMLogger LOG = BUNDLE.logger();
+
+ /**
+ * @author Eike Stepper
+ */
+ public static final class Activator extends OSGiActivator
+ {
+ public Activator()
+ {
+ super(BUNDLE);
+ }
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.workspace/src/org/eclipse/emf/cdo/workspace/CDOWorkspace.java b/plugins/org.eclipse.emf.cdo.workspace/src/org/eclipse/emf/cdo/workspace/CDOWorkspace.java
new file mode 100644
index 0000000000..cd67faff48
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.workspace/src/org/eclipse/emf/cdo/workspace/CDOWorkspace.java
@@ -0,0 +1,48 @@
+/**
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany) and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.emf.cdo.workspace;
+
+import org.eclipse.emf.cdo.server.IRepository;
+import org.eclipse.emf.cdo.transaction.CDOMerger;
+import org.eclipse.emf.cdo.transaction.CDOTransaction;
+import org.eclipse.emf.cdo.view.CDOView;
+
+import org.eclipse.net4j.util.collection.Closeable;
+
+import org.eclipse.emf.ecore.resource.ResourceSet;
+
+/**
+ * @author Eike Stepper
+ */
+public interface CDOWorkspace extends Closeable
+{
+ public IRepository getLocalRepository();
+
+ public CDOView openView();
+
+ public CDOView openView(ResourceSet resourceSet);
+
+ public CDOTransaction openTransaction();
+
+ public CDOTransaction openTransaction(ResourceSet resourceSet);
+
+ public CDOTransaction update(CDOMerger merger);
+
+ public CDOTransaction update(CDOMerger merger, String branchPath);
+
+ public CDOTransaction update(CDOMerger merger, String branchPath, long timeStamp);
+
+ public void revert();
+
+ public void replace(String branchPath, long timeStamp);
+
+ public void commit(String comment);
+}
diff --git a/plugins/org.eclipse.emf.cdo.workspace/src/org/eclipse/emf/cdo/workspace/CDOWorkspaceUtil.java b/plugins/org.eclipse.emf.cdo.workspace/src/org/eclipse/emf/cdo/workspace/CDOWorkspaceUtil.java
new file mode 100644
index 0000000000..ff390266fc
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.workspace/src/org/eclipse/emf/cdo/workspace/CDOWorkspaceUtil.java
@@ -0,0 +1,36 @@
+/**
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany) and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.emf.cdo.workspace;
+
+import org.eclipse.emf.cdo.internal.workspace.CDOWorkspaceImpl;
+import org.eclipse.emf.cdo.server.IStore;
+import org.eclipse.emf.cdo.session.CDOSessionConfigurationFactory;
+
+/**
+ * @author Eike Stepper
+ */
+public final class CDOWorkspaceUtil
+{
+ private CDOWorkspaceUtil()
+ {
+ }
+
+ public static CDOWorkspace checkout(IStore local, CDOSessionConfigurationFactory remote, String branchPath,
+ long timeStamp)
+ {
+ return new CDOWorkspaceImpl(local, remote, branchPath, timeStamp);
+ }
+
+ public static CDOWorkspace open(IStore local, CDOSessionConfigurationFactory remote)
+ {
+ return new CDOWorkspaceImpl(local, remote);
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/session/CDOSession.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/session/CDOSession.java
index c6ecf9acf1..182ec515e1 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/session/CDOSession.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/session/CDOSession.java
@@ -181,6 +181,14 @@ public interface CDOSession extends CDOCommonSession, CDOUpdatable, IContainer<C
public CDOView openView(long timeStamp);
/**
+ * Opens and returns a new {@link CDOView view} on the given EMF {@link ResourceSet resource set}.
+ *
+ * @see #openView(CDOBranch, long, ResourceSet)
+ * @since 4.0
+ */
+ public CDOView openView(ResourceSet resourceSet);
+
+ /**
* Opens and returns a new {@link CDOView view} on a new EMF {@link ResourceSet resource set}.
* <p>
* Same as calling <code>openView(new ResourceSetImpl())</code>.
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/session/CDOSessionImpl.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/session/CDOSessionImpl.java
index 088a6ab58a..e627d0351b 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/session/CDOSessionImpl.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/session/CDOSessionImpl.java
@@ -38,6 +38,7 @@ import org.eclipse.emf.cdo.common.model.lob.CDOLobInfo;
import org.eclipse.emf.cdo.common.model.lob.CDOLobStore;
import org.eclipse.emf.cdo.common.protocol.CDOAuthenticator;
import org.eclipse.emf.cdo.common.revision.CDORevision;
+import org.eclipse.emf.cdo.common.revision.CDORevisionHandler;
import org.eclipse.emf.cdo.common.revision.CDORevisionKey;
import org.eclipse.emf.cdo.common.revision.delta.CDOAddFeatureDelta;
import org.eclipse.emf.cdo.common.revision.delta.CDOClearFeatureDelta;
@@ -536,6 +537,11 @@ public abstract class CDOSessionImpl extends Container<CDOView> implements Inter
return openView(getBranchManager().getMainBranch(), timeStamp);
}
+ public InternalCDOView openView(ResourceSet resourceSet)
+ {
+ return openView(getBranchManager().getMainBranch(), CDOBranchPoint.UNSPECIFIED_DATE, resourceSet);
+ }
+
/**
* @since 2.0
*/
@@ -1752,6 +1758,23 @@ public abstract class CDOSessionImpl extends Container<CDOView> implements Inter
}
}
+ public void handleRevisions(EClass eClass, CDOBranch branch, boolean exactBranch, long timeStamp,
+ boolean exactTime, CDORevisionHandler handler)
+ {
+ int attempt = 0;
+ for (;;)
+ {
+ try
+ {
+ delegate.handleRevisions(eClass, branch, exactBranch, timeStamp, exactTime, handler);
+ }
+ catch (Exception ex)
+ {
+ handleException(++attempt, ex);
+ }
+ }
+ }
+
public CommitTransactionResult commitTransaction(int transactionID, String comment, boolean releaseLocks,
CDOIDProvider idProvider, CDOCommitData commitData, Collection<CDOLob<?>> lobs, OMMonitor monitor)
{
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/spi/cdo/CDOSessionProtocol.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/spi/cdo/CDOSessionProtocol.java
index 8a9fc59584..e7ec7a0382 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/spi/cdo/CDOSessionProtocol.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/spi/cdo/CDOSessionProtocol.java
@@ -26,6 +26,7 @@ import org.eclipse.emf.cdo.common.model.lob.CDOLob;
import org.eclipse.emf.cdo.common.model.lob.CDOLobInfo;
import org.eclipse.emf.cdo.common.protocol.CDOProtocol;
import org.eclipse.emf.cdo.common.revision.CDOReferenceAdjuster;
+import org.eclipse.emf.cdo.common.revision.CDORevisionHandler;
import org.eclipse.emf.cdo.common.revision.CDORevisionKey;
import org.eclipse.emf.cdo.common.util.CDOCommonUtil;
import org.eclipse.emf.cdo.session.remote.CDORemoteSession;
@@ -212,6 +213,12 @@ public interface CDOSessionProtocol extends CDOProtocol, PackageLoader, BranchLo
CDORevisionAvailabilityInfo sourceInfo);
/**
+ * @since 4.0
+ */
+ public void handleRevisions(EClass eClass, CDOBranch branch, boolean exactBranch, long timeStamp, boolean exactTime,
+ CDORevisionHandler handler);
+
+ /**
* @author Eike Stepper
* @since 3.0
* @noinstantiate This class is not intended to be instantiated by clients.
diff --git a/plugins/org.eclipse.net4j.jvm/src/org/eclipse/net4j/jvm/JVMUtil.java b/plugins/org.eclipse.net4j.jvm/src/org/eclipse/net4j/jvm/JVMUtil.java
index 0fdc49a545..6de7687c3b 100644
--- a/plugins/org.eclipse.net4j.jvm/src/org/eclipse/net4j/jvm/JVMUtil.java
+++ b/plugins/org.eclipse.net4j.jvm/src/org/eclipse/net4j/jvm/JVMUtil.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Eike Stepper - initial API and implementation
*/

Back to the top