Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2012-06-14 05:44:50 +0000
committerEike Stepper2012-06-14 05:44:50 +0000
commitfb2c46d946826a3f1db4cfa5c03778c1b28c71bd (patch)
treeb72456e546adf5acd06a21b0ae7b5e58bff336d4
parent826d5219f0b8b678f843c0c364017bfd48983036 (diff)
downloadcdo-drops/I20120615-0411.tar.gz
cdo-drops/I20120615-0411.tar.xz
cdo-drops/I20120615-0411.zip
-rw-r--r--plugins/org.eclipse.emf.cdo.server.admin/src/org/eclipse/emf/cdo/server/spi/admin/CDOAdminHandler.java10
-rw-r--r--plugins/org.eclipse.emf.cdo.server.hibernate/src/org/eclipse/emf/cdo/server/hibernate/CDOHibernateUtil.java98
-rw-r--r--plugins/org.eclipse.emf.cdo.server.hibernate/src/org/eclipse/emf/cdo/server/hibernate/IHibernateMappingProvider.java104
3 files changed, 113 insertions, 99 deletions
diff --git a/plugins/org.eclipse.emf.cdo.server.admin/src/org/eclipse/emf/cdo/server/spi/admin/CDOAdminHandler.java b/plugins/org.eclipse.emf.cdo.server.admin/src/org/eclipse/emf/cdo/server/spi/admin/CDOAdminHandler.java
index e8dbdcb5db..19db870549 100644
--- a/plugins/org.eclipse.emf.cdo.server.admin/src/org/eclipse/emf/cdo/server/spi/admin/CDOAdminHandler.java
+++ b/plugins/org.eclipse.emf.cdo.server.admin/src/org/eclipse/emf/cdo/server/spi/admin/CDOAdminHandler.java
@@ -10,13 +10,21 @@
*/
package org.eclipse.emf.cdo.server.spi.admin;
+import org.eclipse.emf.cdo.common.admin.CDOAdmin;
import org.eclipse.emf.cdo.server.IRepository;
+import org.eclipse.net4j.util.container.IManagedContainer;
import org.eclipse.net4j.util.factory.ProductCreationException;
import java.util.Map;
/**
+ * Handles requests from server-side {@link CDOAdmin} instances to {@link #createRepository(String, Map) create} or
+ * {@link #deleteRepository(IRepository) delete} repositories.
+ * <p>
+ * A handler can be contributed by {@link IManagedContainer#registerFactory(org.eclipse.net4j.util.factory.IFactory) registering}
+ * a {@link CDOAdminHandler.Factory factory} with the {@link IManagedContainer managed container}.
+ *
* @author Eike Stepper
* @since 4.1
*/
@@ -29,6 +37,8 @@ public interface CDOAdminHandler
public void deleteRepository(IRepository delegate);
/**
+ * Creates {@link CDOAdminHandler} instances.
+ *
* @author Eike Stepper
*/
public static abstract class Factory extends org.eclipse.net4j.util.factory.Factory
diff --git a/plugins/org.eclipse.emf.cdo.server.hibernate/src/org/eclipse/emf/cdo/server/hibernate/CDOHibernateUtil.java b/plugins/org.eclipse.emf.cdo.server.hibernate/src/org/eclipse/emf/cdo/server/hibernate/CDOHibernateUtil.java
index 8e34e97498..c5693a56b7 100644
--- a/plugins/org.eclipse.emf.cdo.server.hibernate/src/org/eclipse/emf/cdo/server/hibernate/CDOHibernateUtil.java
+++ b/plugins/org.eclipse.emf.cdo.server.hibernate/src/org/eclipse/emf/cdo/server/hibernate/CDOHibernateUtil.java
@@ -1,48 +1,50 @@
-/*
- * Copyright (c) 2004 - 2012 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
- * Martin Taal - added mappingProvider support
- */
-package org.eclipse.emf.cdo.server.hibernate;
-
-import org.eclipse.emf.cdo.server.internal.hibernate.HibernateStore;
-import org.eclipse.emf.cdo.server.internal.hibernate.HibernateUtil;
-
-/**
- * @author Eike Stepper
- * @author Martin Taal
- */
-public final class CDOHibernateUtil
-{
- private CDOHibernateUtil()
- {
- }
-
- /**
- * @since 4.1
- */
- public static IHibernateMappingProvider.Factory getMappingProviderFactoryInstance()
- {
- return HibernateUtil.getMappingProviderFactoryInstance();
- }
-
- /**
- * @since 4.1
- */
- public static void setMappingProviderFactoryInstance(
- IHibernateMappingProvider.Factory theMappingProviderFactoryInstance)
- {
- HibernateUtil.setMappingProviderFactoryInstance(theMappingProviderFactoryInstance);
- }
-
- public static IHibernateStore createStore(IHibernateMappingProvider mappingProvider)
- {
- return new HibernateStore(mappingProvider);
- }
-}
+/*
+ * Copyright (c) 2004 - 2012 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
+ * Martin Taal - added mappingProvider support
+ */
+package org.eclipse.emf.cdo.server.hibernate;
+
+import org.eclipse.emf.cdo.server.internal.hibernate.HibernateStore;
+import org.eclipse.emf.cdo.server.internal.hibernate.HibernateUtil;
+
+/**
+ * Various static methods that may help in setting up and dealing with {@link IHibernateStore Hibernate stores}.
+ *
+ * @author Eike Stepper
+ * @author Martin Taal
+ */
+public final class CDOHibernateUtil
+{
+ private CDOHibernateUtil()
+ {
+ }
+
+ /**
+ * @since 4.1
+ */
+ public static IHibernateMappingProvider.Factory getMappingProviderFactoryInstance()
+ {
+ return HibernateUtil.getMappingProviderFactoryInstance();
+ }
+
+ /**
+ * @since 4.1
+ */
+ public static void setMappingProviderFactoryInstance(
+ IHibernateMappingProvider.Factory theMappingProviderFactoryInstance)
+ {
+ HibernateUtil.setMappingProviderFactoryInstance(theMappingProviderFactoryInstance);
+ }
+
+ public static IHibernateStore createStore(IHibernateMappingProvider mappingProvider)
+ {
+ return new HibernateStore(mappingProvider);
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.server.hibernate/src/org/eclipse/emf/cdo/server/hibernate/IHibernateMappingProvider.java b/plugins/org.eclipse.emf.cdo.server.hibernate/src/org/eclipse/emf/cdo/server/hibernate/IHibernateMappingProvider.java
index 8ec5bd551c..0f559c2cbb 100644
--- a/plugins/org.eclipse.emf.cdo.server.hibernate/src/org/eclipse/emf/cdo/server/hibernate/IHibernateMappingProvider.java
+++ b/plugins/org.eclipse.emf.cdo.server.hibernate/src/org/eclipse/emf/cdo/server/hibernate/IHibernateMappingProvider.java
@@ -1,51 +1,53 @@
-/*
- * Copyright (c) 2004 - 2012 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:
- * Martin Taal - initial API and implementation
- * Eike Stepper - maintenance
- */
-package org.eclipse.emf.cdo.server.hibernate;
-
-import org.w3c.dom.Element;
-
-/**
- * A mappingprovider adds a hibernate mapping to a hibernate configuration object.
- *
- * @author Martin Taal
- */
-public interface IHibernateMappingProvider
-{
- /**
- * @return the mapping as a String.
- * @since 3.0
- */
- public String getMapping();
-
- /**
- * Sets the Store in the mapping provider, is called before addMapping.
- */
- public void setHibernateStore(IHibernateStore hibernateStore);
-
- /**
- * @author Eike Stepper
- * @since 2.0
- */
- public interface Factory
- {
- /**
- * Returns the type of the mapping providers this factory can create.
- */
- public String getType();
-
- /**
- * Creates a Hibernate mapping provider from the given element of the <code>cdo-server.xml</code> configuration
- * file.
- */
- public IHibernateMappingProvider create(Element config);
- }
-}
+/*
+ * Copyright (c) 2004 - 2012 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:
+ * Martin Taal - initial API and implementation
+ * Eike Stepper - maintenance
+ */
+package org.eclipse.emf.cdo.server.hibernate;
+
+import org.w3c.dom.Element;
+
+/**
+ * A mapping provider adds a hibernate mapping to a hibernate configuration object.
+ *
+ * @author Martin Taal
+ */
+public interface IHibernateMappingProvider
+{
+ /**
+ * @return the mapping as a String.
+ * @since 3.0
+ */
+ public String getMapping();
+
+ /**
+ * Sets the Store in the mapping provider, is called before addMapping.
+ */
+ public void setHibernateStore(IHibernateStore hibernateStore);
+
+ /**
+ * Creates {@link IHibernateMappingProvider mapping provider} instances.
+ *
+ * @author Eike Stepper
+ * @since 2.0
+ */
+ public interface Factory
+ {
+ /**
+ * Returns the type of the mapping providers this factory can create.
+ */
+ public String getType();
+
+ /**
+ * Creates a Hibernate mapping provider from the given element of the <code>cdo-server.xml</code> configuration
+ * file.
+ */
+ public IHibernateMappingProvider create(Element config);
+ }
+}

Back to the top