Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMathilde Ffrench2015-08-04 07:18:55 -0400
committerFlorian Waibel2015-08-04 07:21:33 -0400
commit21b8ce990e084f184ac3e9231bcfcd13698dab53 (patch)
tree0d88ded5a537c22a9a8418f1317a73e1f4b407d5
parent44b512912d06933bf68b584087b057821e6f9611 (diff)
downloadorg.eclipse.virgo.kernel-21b8ce990e084f184ac3e9231bcfcd13698dab53.tar.gz
org.eclipse.virgo.kernel-21b8ce990e084f184ac3e9231bcfcd13698dab53.tar.xz
org.eclipse.virgo.kernel-21b8ce990e084f184ac3e9231bcfcd13698dab53.zip
437526 - Fixes "Incorrect number of parameters" for plan commands
Signed-off-by: Mathilde Ffrench <mathilde.ffrench@echinopsii.net>
-rw-r--r--org.eclipse.virgo.shell.command/src/main/java/org/eclipse/virgo/shell/internal/commands/PlanCommands.java34
-rw-r--r--org.eclipse.virgo.shell.command/src/main/resources/META-INF/spring/module-context.xml1
2 files changed, 33 insertions, 2 deletions
diff --git a/org.eclipse.virgo.shell.command/src/main/java/org/eclipse/virgo/shell/internal/commands/PlanCommands.java b/org.eclipse.virgo.shell.command/src/main/java/org/eclipse/virgo/shell/internal/commands/PlanCommands.java
index 819be134..dfb70abe 100644
--- a/org.eclipse.virgo.shell.command/src/main/java/org/eclipse/virgo/shell/internal/commands/PlanCommands.java
+++ b/org.eclipse.virgo.shell.command/src/main/java/org/eclipse/virgo/shell/internal/commands/PlanCommands.java
@@ -11,6 +11,9 @@
package org.eclipse.virgo.shell.internal.commands;
+import java.util.List;
+
+import org.eclipse.equinox.region.RegionDigraph;
import org.eclipse.virgo.kernel.model.management.ManageableCompositeArtifact;
import org.eclipse.virgo.kernel.model.management.RuntimeArtifactModelObjectNameCreator;
import org.eclipse.virgo.shell.Command;
@@ -21,8 +24,35 @@ final class PlanCommands extends AbstractInstallArtifactBasedCommands<Manageable
private static final String TYPE = "plan";
- public PlanCommands(RuntimeArtifactModelObjectNameCreator objectNameCreator) {
- super(TYPE, objectNameCreator, new CompositeInstallArtifactCommandFormatter(), ManageableCompositeArtifact.class, null);
+ private static final String GLOBAL_REGION_NAME = "global";
+
+ public PlanCommands(RuntimeArtifactModelObjectNameCreator objectNameCreator, RegionDigraph regionDigraph) {
+ super(TYPE, objectNameCreator, new CompositeInstallArtifactCommandFormatter(), ManageableCompositeArtifact.class, regionDigraph);
+ }
+
+ @Command("examine")
+ public List<String> examine(String name, String version) {
+ return examine(name, version, GLOBAL_REGION_NAME);
+ }
+
+ @Command("start")
+ public List<String> start(String name, String version) {
+ return start(name, version, GLOBAL_REGION_NAME);
+ }
+
+ @Command("stop")
+ public List<String> stop(String name, String version) {
+ return stop(name, version, GLOBAL_REGION_NAME);
+ }
+
+ @Command("refresh")
+ public List<String> refresh(String name, String version) {
+ return refresh(name, version, GLOBAL_REGION_NAME);
+ }
+
+ @Command("uninstall")
+ public List<String> uninstall(String name, String version) {
+ return uninstall(name, version, GLOBAL_REGION_NAME);
}
}
diff --git a/org.eclipse.virgo.shell.command/src/main/resources/META-INF/spring/module-context.xml b/org.eclipse.virgo.shell.command/src/main/resources/META-INF/spring/module-context.xml
index 22a8a40d..b7f32951 100644
--- a/org.eclipse.virgo.shell.command/src/main/resources/META-INF/spring/module-context.xml
+++ b/org.eclipse.virgo.shell.command/src/main/resources/META-INF/spring/module-context.xml
@@ -57,6 +57,7 @@
<bean id="planCommands" class="org.eclipse.virgo.shell.internal.commands.PlanCommands">
<constructor-arg ref="objectNameCreator"/>
+ <constructor-arg ref="regionDigraph" />
</bean>
<bean id="parCommands" class="org.eclipse.virgo.shell.internal.commands.ParCommands">

Back to the top