Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2013-09-18 06:30:57 +0000
committerEike Stepper2013-09-18 07:13:54 +0000
commit20e19f399621f269e44e135fd9fcf62ff99a8201 (patch)
tree66033bcfb6bd52beaa0c2595917a3d09942d8ca6 /plugins/org.eclipse.emf.cdo.server
parent8e90a7d8a6b2f13b97a11f5f5e999fc4ff6acdff (diff)
downloadcdo-20e19f399621f269e44e135fd9fcf62ff99a8201.tar.gz
cdo-20e19f399621f269e44e135fd9fcf62ff99a8201.tar.xz
cdo-20e19f399621f269e44e135fd9fcf62ff99a8201.zip
[417469] [Security] Provide console command to change user passwords
https://bugs.eclipse.org/bugs/show_bug.cgi?id=417469
Diffstat (limited to 'plugins/org.eclipse.emf.cdo.server')
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/bundle/CDOCommandProvider.java4
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/CDOCommand.java43
2 files changed, 25 insertions, 22 deletions
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/bundle/CDOCommandProvider.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/bundle/CDOCommandProvider.java
index 374528b2c5..4dbf55d284 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/bundle/CDOCommandProvider.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/bundle/CDOCommandProvider.java
@@ -358,7 +358,7 @@ public class CDOCommandProvider implements CommandProvider
try
{
- for (String name : IPluginContainer.INSTANCE.getFactoryTypes(CDOCommand.Factory.PRODUCT_GROUP))
+ for (String name : IPluginContainer.INSTANCE.getFactoryTypes(CDOCommand.PRODUCT_GROUP))
{
try
{
@@ -381,7 +381,7 @@ public class CDOCommandProvider implements CommandProvider
protected CDOCommand createCommand(String name)
{
- return (CDOCommand)IPluginContainer.INSTANCE.getElement(CDOCommand.Factory.PRODUCT_GROUP, name, null);
+ return (CDOCommand)IPluginContainer.INSTANCE.getElement(CDOCommand.PRODUCT_GROUP, name, null);
}
private void addCommand(Map<String, CDOCommand> commands, CDOCommand command)
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/CDOCommand.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/CDOCommand.java
index 61a6c49dfd..2186fc0553 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/CDOCommand.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/CDOCommand.java
@@ -27,14 +27,14 @@ import java.util.Dictionary;
* @author Eike Stepper
* @since 4.3
*/
-public abstract class CDOCommand
+public abstract class CDOCommand extends org.eclipse.net4j.util.factory.Factory
{
+ public static final String PRODUCT_GROUP = "org.eclipse.emf.cdo.server.commands";
+
public static final String INDENT = " "; //$NON-NLS-1$
private static final CommandParameter[] NO_PARAMETERS = new CommandParameter[0];
- private final String name;
-
private final String description;
private final CommandParameter[] parameters;
@@ -43,7 +43,7 @@ public abstract class CDOCommand
public CDOCommand(String name, String description, CommandParameter... parameters)
{
- this.name = name;
+ super(PRODUCT_GROUP, name);
this.description = description;
this.parameters = parameters == null ? NO_PARAMETERS : parameters;
}
@@ -53,6 +53,11 @@ public abstract class CDOCommand
this(name, description, NO_PARAMETERS);
}
+ public final CDOCommand create(String description) throws ProductCreationException
+ {
+ return this;
+ }
+
public final CommandInterpreter getInterpreter()
{
return interpreter;
@@ -65,7 +70,7 @@ public abstract class CDOCommand
public final String getName()
{
- return name;
+ return getType();
}
public final String getDescription()
@@ -82,7 +87,7 @@ public abstract class CDOCommand
{
StringBuilder builder = new StringBuilder();
builder.append("cdo ");
- builder.append(name);
+ builder.append(getName());
for (CommandParameter parameter : parameters)
{
@@ -341,18 +346,16 @@ public abstract class CDOCommand
}
}
- /**
- * @author Eike Stepper
- */
- public static abstract class Factory extends org.eclipse.net4j.util.factory.Factory
- {
- public static final String PRODUCT_GROUP = "org.eclipse.emf.cdo.server.commands";
-
- public Factory(String type)
- {
- super(PRODUCT_GROUP, type);
- }
-
- public abstract CDOCommand create(String description) throws ProductCreationException;
- }
+ // /**
+ // * @author Eike Stepper
+ // */
+ // public static abstract class Factory extends org.eclipse.net4j.util.factory.Factory
+ // {
+ // public Factory(String type)
+ // {
+ // super(CDOCommand.PRODUCT_GROUP, type);
+ // }
+ //
+ // public abstract CDOCommand create(String description) throws ProductCreationException;
+ // }
}

Back to the top