Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2009-01-10 03:37:35 -0500
committerEike Stepper2009-01-10 03:37:35 -0500
commit028519bae395b3007e042fac9fe9a76afd79c9f6 (patch)
tree3d45a71b0da3c966818df7910013dac69c9f981b
parent3393427a1e48da2a46ea4fa5df185e465431743a (diff)
downloadcdo-028519bae395b3007e042fac9fe9a76afd79c9f6.tar.gz
cdo-028519bae395b3007e042fac9fe9a76afd79c9f6.tar.xz
cdo-028519bae395b3007e042fac9fe9a76afd79c9f6.zip
[260613] Cleanup cdo.common plugin
https://bugs.eclipse.org/bugs/show_bug.cgi?id=260613
-rw-r--r--plugins/org.eclipse.emf.cdo.defs/src/org/eclipse/emf/cdo/defs/impl/CDOSessionDefImpl.java6
-rw-r--r--plugins/org.eclipse.emf.cdo.examples/src/org/eclipse/emf/cdo/examples/StandaloneContainerExample.java5
-rw-r--r--plugins/org.eclipse.emf.cdo.examples/src/org/eclipse/emf/cdo/examples/StandaloneManualExample.java3
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/ImportXML.java5
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/LegacyTest.java14
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/PackageRegistryTest.java6
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/TransactionMonitoringTest.java5
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/config/impl/ContainerConfig.java5
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/config/impl/SessionConfig.java4
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/editor/CDOEditor.java2
-rw-r--r--plugins/org.eclipse.emf.cdo/META-INF/MANIFEST.MF1
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/net4j/CDONet4jUtil.java41
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/net4j/CDOSession.java38
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/net4j/CDOSessionConfiguration.java46
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/net4j/CDOSessionProtocol.java (renamed from plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/session/CDOSessionProtocol.java)3
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/session/CDOSession.java3
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/session/CDOSessionConfiguration.java10
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/util/CDOUtil.java63
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/util/EMFUtil.java42
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/view/CDOView.java2
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/CDOClientProtocol.java2
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/spi/cdo/InternalCDOSession.java2
22 files changed, 205 insertions, 103 deletions
diff --git a/plugins/org.eclipse.emf.cdo.defs/src/org/eclipse/emf/cdo/defs/impl/CDOSessionDefImpl.java b/plugins/org.eclipse.emf.cdo.defs/src/org/eclipse/emf/cdo/defs/impl/CDOSessionDefImpl.java
index 85d4f0dff0..b42a7cf482 100644
--- a/plugins/org.eclipse.emf.cdo.defs/src/org/eclipse/emf/cdo/defs/impl/CDOSessionDefImpl.java
+++ b/plugins/org.eclipse.emf.cdo.defs/src/org/eclipse/emf/cdo/defs/impl/CDOSessionDefImpl.java
@@ -10,7 +10,7 @@
* André Dietisheim - initial API and implementation
* </copyright>
*
- * $Id: CDOSessionDefImpl.java,v 1.2 2009-01-10 07:56:10 estepper Exp $
+ * $Id: CDOSessionDefImpl.java,v 1.2.2.1 2009-01-10 08:37:30 estepper Exp $
*/
package org.eclipse.emf.cdo.defs.impl;
@@ -18,10 +18,10 @@ import org.eclipse.emf.cdo.defs.CDODefsPackage;
import org.eclipse.emf.cdo.defs.CDOPackageRegistryDef;
import org.eclipse.emf.cdo.defs.CDOSessionDef;
import org.eclipse.emf.cdo.defs.FailOverStrategyDef;
+import org.eclipse.emf.cdo.net4j.CDONet4jUtil;
import org.eclipse.emf.cdo.session.CDOPackageRegistry;
import org.eclipse.emf.cdo.session.CDOSession;
import org.eclipse.emf.cdo.session.CDOSessionConfiguration;
-import org.eclipse.emf.cdo.util.CDOUtil;
import org.eclipse.emf.internal.cdo.session.CDOSessionConfigurationImpl;
@@ -580,7 +580,7 @@ public class CDOSessionDefImpl extends DefImpl implements CDOSessionDef
@Override
protected CDOSession createInstance()
{
- CDOSessionConfiguration configuration = CDOUtil.createSessionConfiguration();
+ CDOSessionConfiguration configuration = CDONet4jUtil.createSessionConfiguration();
if (isSetConnectorDef())
{
diff --git a/plugins/org.eclipse.emf.cdo.examples/src/org/eclipse/emf/cdo/examples/StandaloneContainerExample.java b/plugins/org.eclipse.emf.cdo.examples/src/org/eclipse/emf/cdo/examples/StandaloneContainerExample.java
index febd6a4096..eb9a8701dc 100644
--- a/plugins/org.eclipse.emf.cdo.examples/src/org/eclipse/emf/cdo/examples/StandaloneContainerExample.java
+++ b/plugins/org.eclipse.emf.cdo.examples/src/org/eclipse/emf/cdo/examples/StandaloneContainerExample.java
@@ -16,7 +16,6 @@ import org.eclipse.emf.cdo.session.CDOSessionConfiguration;
import org.eclipse.emf.cdo.tests.model1.Model1Factory;
import org.eclipse.emf.cdo.tests.model1.Model1Package;
import org.eclipse.emf.cdo.transaction.CDOTransaction;
-import org.eclipse.emf.cdo.util.CDOUtil;
import org.eclipse.net4j.Net4jUtil;
import org.eclipse.net4j.connector.IConnector;
@@ -45,14 +44,14 @@ public class StandaloneContainerExample
IManagedContainer container = ContainerUtil.createContainer();
Net4jUtil.prepareContainer(container); // Register Net4j factories
TCPUtil.prepareContainer(container); // Register TCP factories
- CDOUtil.prepareContainer(container); // Register CDO factories
+ org.eclipse.emf.cdo.net4j.CDONet4jUtil.prepareContainer(container); // Register CDO factories
container.activate();
// Create connector
IConnector connector = TCPUtil.getConnector(container, "localhost:2036");
// Create configuration
- CDOSessionConfiguration configuration = CDOUtil.createSessionConfiguration();
+ CDOSessionConfiguration configuration = org.eclipse.emf.cdo.net4j.CDONet4jUtil.createSessionConfiguration();
configuration.setConnector(connector);
configuration.setRepositoryName("repo1");
diff --git a/plugins/org.eclipse.emf.cdo.examples/src/org/eclipse/emf/cdo/examples/StandaloneManualExample.java b/plugins/org.eclipse.emf.cdo.examples/src/org/eclipse/emf/cdo/examples/StandaloneManualExample.java
index 5c231ca1a9..71d8d44e2f 100644
--- a/plugins/org.eclipse.emf.cdo.examples/src/org/eclipse/emf/cdo/examples/StandaloneManualExample.java
+++ b/plugins/org.eclipse.emf.cdo.examples/src/org/eclipse/emf/cdo/examples/StandaloneManualExample.java
@@ -16,7 +16,6 @@ import org.eclipse.emf.cdo.session.CDOSessionConfiguration;
import org.eclipse.emf.cdo.tests.model1.Model1Factory;
import org.eclipse.emf.cdo.tests.model1.Model1Package;
import org.eclipse.emf.cdo.transaction.CDOTransaction;
-import org.eclipse.emf.cdo.util.CDOUtil;
import org.eclipse.net4j.FactoriesProtocolProvider;
import org.eclipse.net4j.Net4jUtil;
@@ -81,7 +80,7 @@ public class StandaloneManualExample
connector.activate();
// Create configuration
- CDOSessionConfiguration configuration = CDOUtil.createSessionConfiguration();
+ CDOSessionConfiguration configuration = org.eclipse.emf.cdo.net4j.CDONet4jUtil.createSessionConfiguration();
configuration.setConnector(connector);
configuration.setRepositoryName("repo1");
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/ImportXML.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/ImportXML.java
index 89be376323..cdc918f158 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/ImportXML.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/ImportXML.java
@@ -22,7 +22,6 @@ import org.eclipse.emf.cdo.tests.model1.Model1Factory;
import org.eclipse.emf.cdo.tests.model1.Model1Package;
import org.eclipse.emf.cdo.tests.model1.Product1;
import org.eclipse.emf.cdo.transaction.CDOTransaction;
-import org.eclipse.emf.cdo.util.CDOUtil;
import org.eclipse.net4j.Net4jUtil;
import org.eclipse.net4j.connector.IConnector;
@@ -54,7 +53,7 @@ public class ImportXML
Net4jUtil.prepareContainer(container); // Prepare the Net4j kernel
JVMUtil.prepareContainer(container); // Prepare the JVM transport
CDOServerUtil.prepareContainer(container); // Prepare the CDO server
- CDOUtil.prepareContainer(container); // Prepare the CDO client
+ org.eclipse.emf.cdo.net4j.CDONet4jUtil.prepareContainer(container); // Prepare the CDO client
container.activate();
// Start the transport and create a repository
@@ -112,7 +111,7 @@ public class ImportXML
protected static CDOSession openSession(IConnector connector)
{
- CDOSessionConfiguration configuration = CDOUtil.createSessionConfiguration();
+ CDOSessionConfiguration configuration = org.eclipse.emf.cdo.net4j.CDONet4jUtil.createSessionConfiguration();
configuration.setConnector(connector);
configuration.setRepositoryName(REPOSITORY_NAME);
return configuration.openSession();
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/LegacyTest.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/LegacyTest.java
index 0da13051af..07a76698f5 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/LegacyTest.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/LegacyTest.java
@@ -26,7 +26,7 @@ public class LegacyTest extends AbstractCDOTest
// resource.getContents().add(hook);
// transaction.commit();
//
- // CDOObject cdoHook = CDOUtil.getCDOObject(hook);
+ // CDOObject cdoHook = CDONet4jUtil.getCDOObject(hook);
// assertEquals(false, CDOLegacyWrapper.isLegacyProxy(cdoHook));
// assertEquals(CDOState.CLEAN, cdoHook.cdoState());
// assertEquals(CDOState.CLEAN, resource.cdoState());
@@ -50,7 +50,7 @@ public class LegacyTest extends AbstractCDOTest
// EList<EObject> contents = resource.getContents();
//
// Hook hook = (Hook)contents.get(0);
- // CDOObject cdoHook = CDOUtil.getCDOObject(hook);
+ // CDOObject cdoHook = CDONet4jUtil.getCDOObject(hook);
// assertEquals(false, CDOLegacyWrapper.isLegacyProxy(cdoHook));
// assertEquals(CDOState.CLEAN, cdoHook.cdoState());
// assertEquals(CDOState.CLEAN, resource.cdoState());
@@ -76,7 +76,7 @@ public class LegacyTest extends AbstractCDOTest
// resource.getContents().add(hook);
// transaction.commit();
//
- // CDOObject cdoHook = CDOUtil.getCDOObject(hook);
+ // CDOObject cdoHook = CDONet4jUtil.getCDOObject(hook);
// assertEquals(false, CDOLegacyWrapper.isLegacyProxy(cdoHook));
// assertEquals(CDOState.CLEAN, cdoHook.cdoState());
// assertEquals(CDOState.CLEAN, resource.cdoState());
@@ -91,7 +91,7 @@ public class LegacyTest extends AbstractCDOTest
// Hook hook = (Hook)contents.get(0);
// assertNotProxy(hook);
//
- // CDOObject cdoHook = CDOUtil.getCDOObject(hook);
+ // CDOObject cdoHook = CDONet4jUtil.getCDOObject(hook);
// assertEquals(false, CDOLegacyWrapper.isLegacyProxy(cdoHook));
// assertEquals(CDOState.CLEAN, cdoHook.cdoState());
//
@@ -111,17 +111,17 @@ public class LegacyTest extends AbstractCDOTest
// Hook h0 = children.get(0);
// assertNotProxy(h0);
// assertEquals("Hook 1", h0.getName());
- // assertEquals(CDOState.CLEAN, CDOUtil.getCDOObject(h0).cdoState());
+ // assertEquals(CDOState.CLEAN, CDONet4jUtil.getCDOObject(h0).cdoState());
//
// Hook h1 = children.get(1);
// assertNotProxy(h1);
// assertEquals("Hook 2", h1.getName());
- // assertEquals(CDOState.CLEAN, CDOUtil.getCDOObject(h1).cdoState());
+ // assertEquals(CDOState.CLEAN, CDONet4jUtil.getCDOObject(h1).cdoState());
//
// Hook h2 = children.get(2);
// assertNotProxy(h2);
// assertEquals("Hook 3", h2.getName());
- // assertEquals(CDOState.CLEAN, CDOUtil.getCDOObject(h2).cdoState());
+ // assertEquals(CDOState.CLEAN, CDONet4jUtil.getCDOObject(h2).cdoState());
// session.close();
// }
//
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/PackageRegistryTest.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/PackageRegistryTest.java
index 4918c2d73c..5027157e12 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/PackageRegistryTest.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/PackageRegistryTest.java
@@ -13,6 +13,7 @@ package org.eclipse.emf.cdo.tests;
import org.eclipse.emf.cdo.CDOObject;
import org.eclipse.emf.cdo.common.model.CDOPackage;
import org.eclipse.emf.cdo.eresource.CDOResource;
+import org.eclipse.emf.cdo.net4j.CDONet4jUtil;
import org.eclipse.emf.cdo.session.CDOPackageTypeRegistry;
import org.eclipse.emf.cdo.session.CDOSession;
import org.eclipse.emf.cdo.session.CDOSessionConfiguration;
@@ -29,7 +30,6 @@ import org.eclipse.emf.cdo.tests.model3.subpackage.Class2;
import org.eclipse.emf.cdo.tests.model3.subpackage.SubpackageFactory;
import org.eclipse.emf.cdo.tests.model3.subpackage.SubpackagePackage;
import org.eclipse.emf.cdo.transaction.CDOTransaction;
-import org.eclipse.emf.cdo.util.CDOUtil;
import org.eclipse.emf.cdo.util.EMFUtil;
import org.eclipse.emf.common.util.URI;
@@ -237,7 +237,7 @@ public class PackageRegistryTest extends AbstractCDOTest
{
{
// Create resource in session 1
- CDOSessionConfiguration configuration = CDOUtil.createSessionConfiguration();
+ CDOSessionConfiguration configuration = CDONet4jUtil.createSessionConfiguration();
configuration.setConnector(getConnector());
configuration.setRepositoryName(IRepositoryConfig.REPOSITORY_NAME);
configuration.setEagerPackageRegistry();
@@ -270,7 +270,7 @@ public class PackageRegistryTest extends AbstractCDOTest
{
{
// Create resource in session 1
- CDOSessionConfiguration configuration = CDOUtil.createSessionConfiguration();
+ CDOSessionConfiguration configuration = CDONet4jUtil.createSessionConfiguration();
configuration.setConnector(getConnector());
configuration.setRepositoryName(IRepositoryConfig.REPOSITORY_NAME);
configuration.setLazyPackageRegistry();
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/TransactionMonitoringTest.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/TransactionMonitoringTest.java
index 78b7483248..9982119c7d 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/TransactionMonitoringTest.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/TransactionMonitoringTest.java
@@ -15,7 +15,6 @@ import org.eclipse.emf.cdo.session.CDOSessionConfiguration;
import org.eclipse.emf.cdo.tests.model1.Model1Factory;
import org.eclipse.emf.cdo.tests.model1.Model1Package;
import org.eclipse.emf.cdo.transaction.CDOTransaction;
-import org.eclipse.emf.cdo.util.CDOUtil;
import org.eclipse.net4j.Net4jUtil;
import org.eclipse.net4j.tcp.TCPUtil;
@@ -41,10 +40,10 @@ public class TransactionMonitoringTest
IManagedContainer container = ContainerUtil.createContainer();
Net4jUtil.prepareContainer(container);
TCPUtil.prepareContainer(container);
- CDOUtil.prepareContainer(container);
+ org.eclipse.emf.cdo.net4j.CDONet4jUtil.prepareContainer(container);
container.activate();
- CDOSessionConfiguration configuration = CDOUtil.createSessionConfiguration();
+ CDOSessionConfiguration configuration = org.eclipse.emf.cdo.net4j.CDONet4jUtil.createSessionConfiguration();
configuration.setConnector(TCPUtil.getConnector(container, "localhost"));
configuration.setRepositoryName("repo1");
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/config/impl/ContainerConfig.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/config/impl/ContainerConfig.java
index 31d08613a4..6325e5e20f 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/config/impl/ContainerConfig.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/config/impl/ContainerConfig.java
@@ -12,7 +12,6 @@ package org.eclipse.emf.cdo.tests.config.impl;
import org.eclipse.emf.cdo.server.CDOServerUtil;
import org.eclipse.emf.cdo.tests.config.IContainerConfig;
-import org.eclipse.emf.cdo.util.CDOUtil;
import org.eclipse.net4j.Net4jUtil;
import org.eclipse.net4j.util.container.ContainerUtil;
@@ -96,7 +95,7 @@ public abstract class ContainerConfig extends Config implements IContainerConfig
{
IManagedContainer container = ContainerUtil.createContainer();
Net4jUtil.prepareContainer(container);
- CDOUtil.prepareContainer(container);
+ org.eclipse.emf.cdo.net4j.CDONet4jUtil.prepareContainer(container);
CDOServerUtil.prepareContainer(container);
return container;
}
@@ -144,7 +143,7 @@ public abstract class ContainerConfig extends Config implements IContainerConfig
{
IManagedContainer container = ContainerUtil.createContainer();
Net4jUtil.prepareContainer(container);
- CDOUtil.prepareContainer(container);
+ org.eclipse.emf.cdo.net4j.CDONet4jUtil.prepareContainer(container);
return container;
}
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/config/impl/SessionConfig.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/config/impl/SessionConfig.java
index ab5ab78305..67ecdb3234 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/config/impl/SessionConfig.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/config/impl/SessionConfig.java
@@ -10,12 +10,12 @@
**************************************************************************/
package org.eclipse.emf.cdo.tests.config.impl;
+import org.eclipse.emf.cdo.net4j.CDONet4jUtil;
import org.eclipse.emf.cdo.session.CDOSession;
import org.eclipse.emf.cdo.session.CDOSessionConfiguration;
import org.eclipse.emf.cdo.tests.config.IConfig;
import org.eclipse.emf.cdo.tests.config.IRepositoryConfig;
import org.eclipse.emf.cdo.tests.config.ISessionConfig;
-import org.eclipse.emf.cdo.util.CDOUtil;
import org.eclipse.emf.internal.cdo.session.CDOPackageTypeRegistryImpl;
@@ -147,7 +147,7 @@ public abstract class SessionConfig extends Config implements ISessionConfig
private CDOSessionConfiguration createSessionConfiguration(String repositoryName)
{
- CDOSessionConfiguration configuration = CDOUtil.createSessionConfiguration();
+ CDOSessionConfiguration configuration = CDONet4jUtil.createSessionConfiguration();
configuration.setConnector(getConnector());
configuration.setRepositoryName(repositoryName);
return configuration;
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/editor/CDOEditor.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/editor/CDOEditor.java
index 23104118f2..e92cddd9dc 100644
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/editor/CDOEditor.java
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/editor/CDOEditor.java
@@ -1791,7 +1791,7 @@ public class CDOEditor extends MultiPageEditorPart implements IEditingDomainProv
{
throw new UnsupportedOperationException();
- // CDOUtil.getResources(editingDomain.getResourceSet()).get(0).setURI(uri);
+ // CDONet4jUtil.getResources(editingDomain.getResourceSet()).get(0).setURI(uri);
// setInputWithNotify(editorInput);
// setPartName(editorInput.getName());
// IProgressMonitor progressMonitor = getActionBars().getStatusLineManager() != null ? getActionBars()
diff --git a/plugins/org.eclipse.emf.cdo/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.cdo/META-INF/MANIFEST.MF
index 8011483dec..6ad41e252f 100644
--- a/plugins/org.eclipse.emf.cdo/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.emf.cdo/META-INF/MANIFEST.MF
@@ -17,6 +17,7 @@ Export-Package: org.eclipse.emf.cdo;version="2.0.0",
org.eclipse.emf.cdo.eresource.impl;version="2.0.0",
org.eclipse.emf.cdo.eresource.util;version="2.0.0",
org.eclipse.emf.cdo.eresource.validation;version="2.0.0",
+ org.eclipse.emf.cdo.net4j;version="2.0.0",
org.eclipse.emf.cdo.session;version="2.0.0",
org.eclipse.emf.cdo.transaction;version="2.0.0",
org.eclipse.emf.cdo.util;version="2.0.0",
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/net4j/CDONet4jUtil.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/net4j/CDONet4jUtil.java
new file mode 100644
index 0000000000..eda3d4ec2a
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/net4j/CDONet4jUtil.java
@@ -0,0 +1,41 @@
+/***************************************************************************
+ * Copyright (c) 2004 - 2008 Eike Stepper, Germany.
+ * 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
+ * Simon McDuff - maintenance
+ * Victor Roldan Betancort - maintenance
+ **************************************************************************/
+package org.eclipse.emf.cdo.net4j;
+
+import org.eclipse.emf.cdo.session.CDOSessionConfiguration;
+
+import org.eclipse.emf.internal.cdo.protocol.CDOClientProtocolFactory;
+import org.eclipse.emf.internal.cdo.session.CDOSessionConfigurationImpl;
+
+import org.eclipse.net4j.util.container.IManagedContainer;
+
+/**
+ * @since 2.0
+ * @author Eike Stepper
+ */
+public final class CDONet4jUtil
+{
+ private CDONet4jUtil()
+ {
+ }
+
+ public static CDOSessionConfiguration createSessionConfiguration()
+ {
+ return new CDOSessionConfigurationImpl();
+ }
+
+ public static void prepareContainer(IManagedContainer container)
+ {
+ container.registerFactory(new CDOClientProtocolFactory());
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/net4j/CDOSession.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/net4j/CDOSession.java
new file mode 100644
index 0000000000..9166df6b1f
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/net4j/CDOSession.java
@@ -0,0 +1,38 @@
+/***************************************************************************
+ * Copyright (c) 2004 - 2008 Eike Stepper, Germany.
+ * 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
+ * Simon McDuff - maintenance
+ * Victor Roldan Betancort - maintenance
+ **************************************************************************/
+package org.eclipse.emf.cdo.net4j;
+
+/**
+ * @since 2.0
+ * @author Eike Stepper
+ * @noimplement This interface is not intended to be implemented by clients.
+ */
+public interface CDOSession extends org.eclipse.emf.cdo.session.CDOSession
+{
+ /**
+ * Returns the {@link Options options} of this session.
+ */
+ public Options options();
+
+ /**
+ * @author Eike Stepper
+ */
+ public interface Options extends org.eclipse.emf.cdo.session.CDOSession.Options
+ {
+ /**
+ * Returns the Net4j {@link CDOSessionProtocol protocol} instance that represents the underlying
+ * <em>signalling connection</em> to the repository of this session.
+ */
+ public CDOSessionProtocol getProtocol();
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/net4j/CDOSessionConfiguration.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/net4j/CDOSessionConfiguration.java
new file mode 100644
index 0000000000..816aa7d970
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/net4j/CDOSessionConfiguration.java
@@ -0,0 +1,46 @@
+/***************************************************************************
+ * Copyright (c) 2004 - 2008 Eike Stepper, Germany.
+ * 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.net4j;
+
+import org.eclipse.net4j.connector.IConnector;
+import org.eclipse.net4j.signal.ISignalProtocol;
+import org.eclipse.net4j.signal.failover.IFailOverStrategy;
+
+/**
+ * @author Eike Stepper
+ * @noimplement This interface is not intended to be implemented by clients.
+ */
+public interface CDOSessionConfiguration extends org.eclipse.emf.cdo.session.CDOSessionConfiguration
+{
+ /**
+ * @see CDOSession#open(ISignalProtocol)
+ */
+ public IConnector getConnector();
+
+ /**
+ * @see CDOSession#open(ISignalProtocol)
+ */
+ public void setConnector(IConnector connector);
+
+ /**
+ * @see CDOSession#getFailOverStrategy()
+ */
+ public IFailOverStrategy getFailOverStrategy();
+
+ /**
+ * The fail-over strategy must be set <b>before</b> the session is opened and can not be changed thereafter.
+ *
+ * @see CDOSession#getFailOverStrategy()
+ */
+ public void setFailOverStrategy(IFailOverStrategy failOverStrategy);
+
+ public CDOSession openSession();
+}
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/session/CDOSessionProtocol.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/net4j/CDOSessionProtocol.java
index 77f2964de0..714ca2e907 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/session/CDOSessionProtocol.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/net4j/CDOSessionProtocol.java
@@ -8,9 +8,10 @@
* Contributors:
* Eike Stepper - initial API and implementation
**************************************************************************/
-package org.eclipse.emf.cdo.session;
+package org.eclipse.emf.cdo.net4j;
import org.eclipse.emf.cdo.common.CDOCommonSession;
+import org.eclipse.emf.cdo.session.CDOSession;
import org.eclipse.net4j.signal.ISignalProtocol;
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 823a511eaa..c1acbc03da 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
@@ -16,6 +16,7 @@ import org.eclipse.emf.cdo.common.CDOCommonSession;
import org.eclipse.emf.cdo.common.model.CDOPackage;
import org.eclipse.emf.cdo.common.revision.CDORevision;
import org.eclipse.emf.cdo.common.revision.CDORevisionFactory;
+import org.eclipse.emf.cdo.net4j.CDOSessionProtocol;
import org.eclipse.emf.cdo.transaction.CDOTimeStampContext;
import org.eclipse.emf.cdo.transaction.CDOTransaction;
import org.eclipse.emf.cdo.util.CDOEvent;
@@ -207,7 +208,7 @@ public interface CDOSession extends CDOCommonSession, IContainer<CDOView>, IOpti
* </ol>
* Example:
* <p>
- * <code>CDOUtil.createCollectionLoadingPolicy(initialElements, subsequentElements);</code>
+ * <code>CDONet4jUtil.createCollectionLoadingPolicy(initialElements, subsequentElements);</code>
* <p>
* The user can also provide its own implementation of the CDOCollectionLoadingPolicy interface.
*/
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/session/CDOSessionConfiguration.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/session/CDOSessionConfiguration.java
index c89f43b1f7..311349b7a0 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/session/CDOSessionConfiguration.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/session/CDOSessionConfiguration.java
@@ -101,13 +101,13 @@ public interface CDOSessionConfiguration
public void setRevisionCache(CDORevisionCache revisionCache);
/**
- * Opens the session for this configuration. Once the session is openend this method always returns the same session
- * instance. Therefore it is impossible to change this configuration while the session is open.
+ * Returns <code>true</code> if the session for this configuration is currently open, <code>false</code> otherwise.
*/
- public CDOSession openSession();
+ public boolean isSessionOpen();
/**
- * Returns <code>true</code> if the session for this configuration is currently open, <code>false</code> otherwise.
+ * Opens the session for this configuration. Once the session is openend this method always returns the same session
+ * instance. Therefore it is impossible to change this configuration while the session is open.
*/
- public boolean isSessionOpen();
+ public CDOSession openSession();
}
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/util/CDOUtil.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/util/CDOUtil.java
index a78a8e4fe7..871050703d 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/util/CDOUtil.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/util/CDOUtil.java
@@ -18,7 +18,6 @@ import org.eclipse.emf.cdo.eresource.CDOResource;
import org.eclipse.emf.cdo.session.CDOCollectionLoadingPolicy;
import org.eclipse.emf.cdo.session.CDOPackageRegistry;
import org.eclipse.emf.cdo.session.CDOSession;
-import org.eclipse.emf.cdo.session.CDOSessionConfiguration;
import org.eclipse.emf.cdo.transaction.CDOTransaction;
import org.eclipse.emf.cdo.transaction.CDOXATransaction;
import org.eclipse.emf.cdo.view.CDORevisionPrefetchingPolicy;
@@ -26,28 +25,19 @@ import org.eclipse.emf.cdo.view.CDOView;
import org.eclipse.emf.cdo.view.CDOViewSet;
import org.eclipse.emf.internal.cdo.CDOStateMachine;
-import org.eclipse.emf.internal.cdo.protocol.CDOClientProtocolFactory;
import org.eclipse.emf.internal.cdo.session.CDOCollectionLoadingPolicyImpl;
import org.eclipse.emf.internal.cdo.session.CDOPackageRegistryImpl;
-import org.eclipse.emf.internal.cdo.session.CDOSessionConfigurationImpl;
import org.eclipse.emf.internal.cdo.transaction.CDOXATransactionImpl;
import org.eclipse.emf.internal.cdo.util.FSMUtil;
import org.eclipse.emf.internal.cdo.view.CDORevisionPrefetchingPolicyImpl;
-import org.eclipse.net4j.util.container.IManagedContainer;
import org.eclipse.emf.common.notify.Adapter;
import org.eclipse.emf.common.util.BasicEList;
import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EClassifier;
import org.eclipse.emf.ecore.EGenericType;
import org.eclipse.emf.ecore.EModelElement;
import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.emf.ecore.EReference;
-import org.eclipse.emf.ecore.EcoreFactory;
import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.impl.EStringToStringMapEntryImpl;
import org.eclipse.emf.ecore.resource.Resource;
@@ -66,11 +56,6 @@ public final class CDOUtil
{
}
- public static CDOSessionConfiguration createSessionConfiguration()
- {
- return new CDOSessionConfigurationImpl();
- }
-
/**
* @since 2.0
*/
@@ -169,54 +154,6 @@ public final class CDOUtil
return null;
}
- /**
- * @since 2.0
- */
- public static void prepareContainer(IManagedContainer container)
- {
- container.registerFactory(new CDOClientProtocolFactory());
- }
-
- public static EPackage createEPackage(String name, String nsPrefix, String nsURI)
- {
- EPackage ePackage = EcoreFactory.eINSTANCE.createEPackage();
- ePackage.setName(name);
- ePackage.setNsPrefix(nsPrefix);
- ePackage.setNsURI(nsURI);
- return ePackage;
- }
-
- public static EClass createEClass(EPackage ePackage, String name, boolean isAbstract, boolean isInterface)
- {
- EClass eClass = EcoreFactory.eINSTANCE.createEClass();
- eClass.setName(name);
- eClass.setAbstract(isAbstract);
- eClass.setInterface(isInterface);
- ePackage.getEClassifiers().add(eClass);
- return eClass;
- }
-
- public static EAttribute createEAttribute(EClass eClass, String name, EClassifier type)
- {
- EAttribute eAttribute = EcoreFactory.eINSTANCE.createEAttribute();
- eAttribute.setName(name);
- eAttribute.setEType(type);
- eClass.getEStructuralFeatures().add(eAttribute);
- return eAttribute;
- }
-
- public static EReference createEReference(EClass eClass, String name, EClassifier type, boolean isRequired,
- boolean isMany)
- {
- EReference eReference = EcoreFactory.eINSTANCE.createEReference();
- eReference.setName(name);
- eReference.setEType(type);
- eReference.setLowerBound(isRequired ? 1 : 0);
- eReference.setUpperBound(isMany ? -1 : 0);
- eClass.getEStructuralFeatures().add(eReference);
- return eReference;
- }
-
public static void load(EObject eObject, CDOView view)
{
InternalCDOObject cdoObject = FSMUtil.adapt(eObject, view);
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/util/EMFUtil.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/util/EMFUtil.java
index cdc59d42d7..65e344138c 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/util/EMFUtil.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/util/EMFUtil.java
@@ -19,12 +19,14 @@ import org.eclipse.net4j.util.io.IORuntimeException;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.common.util.TreeIterator;
import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EClassifier;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.EcoreFactory;
import org.eclipse.emf.ecore.EcorePackage;
import org.eclipse.emf.ecore.EPackage.Registry;
import org.eclipse.emf.ecore.impl.EPackageImpl;
@@ -56,6 +58,46 @@ public final class EMFUtil
{
}
+ public static EPackage createEPackage(String name, String nsPrefix, String nsURI)
+ {
+ EPackage ePackage = EcoreFactory.eINSTANCE.createEPackage();
+ ePackage.setName(name);
+ ePackage.setNsPrefix(nsPrefix);
+ ePackage.setNsURI(nsURI);
+ return ePackage;
+ }
+
+ public static EClass createEClass(EPackage ePackage, String name, boolean isAbstract, boolean isInterface)
+ {
+ EClass eClass = EcoreFactory.eINSTANCE.createEClass();
+ eClass.setName(name);
+ eClass.setAbstract(isAbstract);
+ eClass.setInterface(isInterface);
+ ePackage.getEClassifiers().add(eClass);
+ return eClass;
+ }
+
+ public static EAttribute createEAttribute(EClass eClass, String name, EClassifier type)
+ {
+ EAttribute eAttribute = EcoreFactory.eINSTANCE.createEAttribute();
+ eAttribute.setName(name);
+ eAttribute.setEType(type);
+ eClass.getEStructuralFeatures().add(eAttribute);
+ return eAttribute;
+ }
+
+ public static EReference createEReference(EClass eClass, String name, EClassifier type, boolean isRequired,
+ boolean isMany)
+ {
+ EReference eReference = EcoreFactory.eINSTANCE.createEReference();
+ eReference.setName(name);
+ eReference.setEType(type);
+ eReference.setLowerBound(isRequired ? 1 : 0);
+ eReference.setUpperBound(isMany ? -1 : 0);
+ eClass.getEStructuralFeatures().add(eReference);
+ return eReference;
+ }
+
public static ResourceSet newResourceSet(Resource.Factory resourceFactory)
{
ResourceSet resourceSet = new ResourceSetImpl();
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/view/CDOView.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/view/CDOView.java
index 3c1e56df31..8f2cca4a7d 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/view/CDOView.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/view/CDOView.java
@@ -418,7 +418,7 @@ public interface CDOView extends CDOCommonView, INotifier, IOptionsContainer
* subtle. The CDOCollectionLoadingPolicy feature determines how and when to fetch CDOIDs, while the
* CDORevisionPrefetchingPolicy feature determines how and when to resolve CDOIDs (i.e. fetch the target objects).
* <p>
- * <code>view.options().setRevisionPrefetchingPolicy (CDOUtil.createRevisionPrefetchingPolicy(10));</code>
+ * <code>view.options().setRevisionPrefetchingPolicy (CDONet4jUtil.createRevisionPrefetchingPolicy(10));</code>
* <p>
* The end-user could provide its own implementation of the CDORevisionPrefetchingPolicy interface.
*/
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/CDOClientProtocol.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/CDOClientProtocol.java
index 99af108246..55f59eabf3 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/CDOClientProtocol.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/CDOClientProtocol.java
@@ -12,8 +12,8 @@ package org.eclipse.emf.internal.cdo.protocol;
import org.eclipse.emf.cdo.common.protocol.CDOProtocolConstants;
import org.eclipse.emf.cdo.internal.common.protocol.CDOProtocolImpl;
+import org.eclipse.emf.cdo.net4j.CDOSessionProtocol;
import org.eclipse.emf.cdo.session.CDOSession;
-import org.eclipse.emf.cdo.session.CDOSessionProtocol;
import org.eclipse.net4j.signal.SignalReactor;
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/spi/cdo/InternalCDOSession.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/spi/cdo/InternalCDOSession.java
index c8b5a53142..237324ec86 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/spi/cdo/InternalCDOSession.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/spi/cdo/InternalCDOSession.java
@@ -16,9 +16,9 @@ import org.eclipse.emf.cdo.common.id.CDOIDMetaRange;
import org.eclipse.emf.cdo.common.id.CDOIDObjectFactory;
import org.eclipse.emf.cdo.common.model.CDOPackageURICompressor;
import org.eclipse.emf.cdo.common.revision.delta.CDORevisionDelta;
+import org.eclipse.emf.cdo.net4j.CDOSessionProtocol;
import org.eclipse.emf.cdo.session.CDOPackageRegistry;
import org.eclipse.emf.cdo.session.CDOSession;
-import org.eclipse.emf.cdo.session.CDOSessionProtocol;
import org.eclipse.net4j.util.lifecycle.ILifecycle;

Back to the top