aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2013-11-05 06:07:27 -0500
committerEike Stepper2013-11-05 06:07:27 -0500
commit07c9214d12d124ec84bd81603ced8d80f2bb0e0d (patch)
tree517ab7daf3edfa172fdfc4ccfbc2843cd3892c9b
parent6ca07303d4d184c0dc8de6d10b1bf5835c168a96 (diff)
downloadcdo-bugs/418454a.tar.gz
cdo-bugs/418454a.tar.xz
cdo-bugs/418454a.zip
[418454] [Admin] Client API and UI for managing repositories in a serverbugs/418454a
https://bugs.eclipse.org/bugs/show_bug.cgi?id=418454
-rw-r--r--plugins/org.eclipse.emf.cdo.server.admin/src/org/eclipse/emf/cdo/server/admin/RepositoryConfigurationManager.java10
-rw-r--r--plugins/org.eclipse.emf.cdo.server.admin/src/org/eclipse/emf/cdo/server/internal/admin/DefaultCDOAdminHandler.java7
-rw-r--r--plugins/org.eclipse.emf.cdo.server.admin/src/org/eclipse/emf/cdo/server/internal/admin/DefaultRepositoryConfigurationManager.java11
-rw-r--r--plugins/org.eclipse.emf.cdo.server.admin/src/org/eclipse/emf/cdo/server/internal/admin/RepositoryConfigurationManagerExtension.java5
4 files changed, 12 insertions, 21 deletions
diff --git a/plugins/org.eclipse.emf.cdo.server.admin/src/org/eclipse/emf/cdo/server/admin/RepositoryConfigurationManager.java b/plugins/org.eclipse.emf.cdo.server.admin/src/org/eclipse/emf/cdo/server/admin/RepositoryConfigurationManager.java
index 183ee73477..903b109177 100644
--- a/plugins/org.eclipse.emf.cdo.server.admin/src/org/eclipse/emf/cdo/server/admin/RepositoryConfigurationManager.java
+++ b/plugins/org.eclipse.emf.cdo.server.admin/src/org/eclipse/emf/cdo/server/admin/RepositoryConfigurationManager.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:
* Christian W. Damus (CEA LIST) - initial API and implementation
*/
@@ -21,12 +21,11 @@ import java.util.Map;
/**
* @author Christian W. Damus (CEA LIST)
- *
+ *
* @since 4.2
*/
public interface RepositoryConfigurationManager extends ILifecycle
{
-
public Map<String, IRepository> getRepositories();
public IRepository addRepository(String name, Document configuration);
@@ -37,14 +36,14 @@ public interface RepositoryConfigurationManager extends ILifecycle
/**
* Authenticates the user as a server administrator, if applicable.
- *
+ *
* @throws SecurityException if authentication is required and fails
*/
public void authenticateAdministrator() throws SecurityException;
/**
* Specification of the factory API for {@link RepositoryConfigurationManager}s.
- *
+ *
* @author Christian W. Damus (CEA LIST)
*/
public static abstract class Factory extends org.eclipse.net4j.util.factory.Factory
@@ -58,5 +57,4 @@ public interface RepositoryConfigurationManager extends ILifecycle
public abstract RepositoryConfigurationManager create(String description) throws ProductCreationException;
}
-
}
diff --git a/plugins/org.eclipse.emf.cdo.server.admin/src/org/eclipse/emf/cdo/server/internal/admin/DefaultCDOAdminHandler.java b/plugins/org.eclipse.emf.cdo.server.admin/src/org/eclipse/emf/cdo/server/internal/admin/DefaultCDOAdminHandler.java
index 348779a747..03c27448c3 100644
--- a/plugins/org.eclipse.emf.cdo.server.admin/src/org/eclipse/emf/cdo/server/internal/admin/DefaultCDOAdminHandler.java
+++ b/plugins/org.eclipse.emf.cdo.server.admin/src/org/eclipse/emf/cdo/server/internal/admin/DefaultCDOAdminHandler.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:
* Christian W. Damus (CEA LIST) - initial API and implementation
*/
@@ -45,7 +45,6 @@ import java.util.Map;
*/
public class DefaultCDOAdminHandler implements CDOAdminHandler2, ContainerAware
{
-
private final String type;
private IManagedContainer container = IPluginContainer.INSTANCE;
@@ -150,7 +149,6 @@ public class DefaultCDOAdminHandler implements CDOAdminHandler2, ContainerAware
protected IManagedContainer requireContainer()
{
IManagedContainer result = getManagedContainer();
-
if (result == null)
{
throw new IllegalStateException("No container."); //$NON-NLS-1$
@@ -166,6 +164,7 @@ public class DefaultCDOAdminHandler implements CDOAdminHandler2, ContainerAware
{
throw new SecurityException("Remote administration of repositories requires a repository configuration manager."); //$NON-NLS-1$
}
+
return result;
}
@@ -209,8 +208,8 @@ public class DefaultCDOAdminHandler implements CDOAdminHandler2, ContainerAware
// OK, then import it (which creates a copy)
adopted = result.importNode(storeConfig, true);
}
- repository.appendChild(adopted);
+ repository.appendChild(adopted);
return result;
}
diff --git a/plugins/org.eclipse.emf.cdo.server.admin/src/org/eclipse/emf/cdo/server/internal/admin/DefaultRepositoryConfigurationManager.java b/plugins/org.eclipse.emf.cdo.server.admin/src/org/eclipse/emf/cdo/server/internal/admin/DefaultRepositoryConfigurationManager.java
index a07a6d6cc0..78f7f0fc1e 100644
--- a/plugins/org.eclipse.emf.cdo.server.admin/src/org/eclipse/emf/cdo/server/internal/admin/DefaultRepositoryConfigurationManager.java
+++ b/plugins/org.eclipse.emf.cdo.server.admin/src/org/eclipse/emf/cdo/server/internal/admin/DefaultRepositoryConfigurationManager.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:
* Christian W. Damus (CEA LIST) - initial API and implementation
*/
@@ -75,13 +75,12 @@ import java.util.Map;
/**
* A default implementation of the {@link RepositoryConfigurationManager} interface
* that stores dynamically created repositories' configurations in XML files.
- *
+ *
* @author Christian W. Damus (CEA LIST)
*/
public class DefaultRepositoryConfigurationManager extends Lifecycle implements InternalRepositoryConfigurationManager,
ContainerAware
{
-
private static final ContextTracer TRACER = new ContextTracer(OM.DEBUG, DefaultRepositoryConfigurationManager.class);
private IManagedContainer container = IPluginContainer.INSTANCE;
@@ -257,7 +256,6 @@ public class DefaultRepositoryConfigurationManager extends Lifecycle implements
protected IManagedContainer requireContainer()
{
IManagedContainer result = getManagedContainer();
-
if (result == null)
{
throw new IllegalStateException("No container."); //$NON-NLS-1$
@@ -270,7 +268,6 @@ public class DefaultRepositoryConfigurationManager extends Lifecycle implements
{
RepositoryConfigurator configurator = new RepositoryConfigurator(requireContainer());
IRepository[] result = configurator.configure(configuration.getConfigXML().getContents());
-
if (result.length == 1)
{
startExtensions(result[0], configuration);
@@ -296,10 +293,9 @@ public class DefaultRepositoryConfigurationManager extends Lifecycle implements
protected <T> T modify(final CatalogOperation<T> operation, boolean waitUntilReadable)
{
- final Object[] result = new Object[1];
-
checkActive();
+ final Object[] result = new Object[1];
requireSecurityManager().modify(new RealmOperation()
{
@@ -526,7 +522,6 @@ public class DefaultRepositoryConfigurationManager extends Lifecycle implements
// Get the read-only view of the catalog now from the security manager's view
requireSecurityManager().read(new RealmOperation()
{
-
public void execute(Realm realm)
{
catalog = realm.cdoView().getObject(catalog);
diff --git a/plugins/org.eclipse.emf.cdo.server.admin/src/org/eclipse/emf/cdo/server/internal/admin/RepositoryConfigurationManagerExtension.java b/plugins/org.eclipse.emf.cdo.server.admin/src/org/eclipse/emf/cdo/server/internal/admin/RepositoryConfigurationManagerExtension.java
index 870856faf1..e48f1efb79 100644
--- a/plugins/org.eclipse.emf.cdo.server.admin/src/org/eclipse/emf/cdo/server/internal/admin/RepositoryConfigurationManagerExtension.java
+++ b/plugins/org.eclipse.emf.cdo.server.admin/src/org/eclipse/emf/cdo/server/internal/admin/RepositoryConfigurationManagerExtension.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:
* Christian W. Damus (CEA LIST) - initial API and implementation
*/
@@ -35,7 +35,7 @@ import java.io.IOException;
/**
* An app extension that starts the {@link RepositoryConfigurationManager}
* (if any) configured in the administrative repository in the XML configuration.
- *
+ *
* @author Christian W. Damus (CEA LIST)
*/
public class RepositoryConfigurationManagerExtension implements IAppExtension
@@ -126,5 +126,4 @@ public class RepositoryConfigurationManagerExtension implements IAppExtension
return false;
}
-
}