You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by jd...@apache.org on 2008/09/11 17:36:06 UTC
svn commit: r694308 - in
/geronimo/gshell/trunk/gshell-commands/gshell-builtins: pom.xml
src/main/java/org/apache/geronimo/gshell/commands/builtins/HelpCommand.java
src/main/resources/META-INF/spring/components.xml
Author: jdillon
Date: Thu Sep 11 08:36:00 2008
New Revision: 694308
URL: http://svn.apache.org/viewvc?rev=694308&view=rev
Log:
Hook up the help command and wire its dependencies
Modified:
geronimo/gshell/trunk/gshell-commands/gshell-builtins/pom.xml
geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/HelpCommand.java
geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/resources/META-INF/spring/components.xml
Modified: geronimo/gshell/trunk/gshell-commands/gshell-builtins/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-commands/gshell-builtins/pom.xml?rev=694308&r1=694307&r2=694308&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-commands/gshell-builtins/pom.xml (original)
+++ geronimo/gshell/trunk/gshell-commands/gshell-builtins/pom.xml Thu Sep 11 08:36:00 2008
@@ -39,6 +39,11 @@
<dependencies>
<dependency>
+ <groupId>org.apache.geronimo.gshell.support</groupId>
+ <artifactId>gshell-spring</artifactId>
+ </dependency>
+
+ <dependency>
<groupId>org.apache.geronimo.gshell</groupId>
<artifactId>gshell-model</artifactId>
</dependency>
Modified: geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/HelpCommand.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/HelpCommand.java?rev=694308&r1=694307&r2=694308&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/HelpCommand.java (original)
+++ geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/HelpCommand.java Thu Sep 11 08:36:00 2008
@@ -42,6 +42,7 @@
import org.codehaus.plexus.util.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
/**
* Display help
@@ -54,13 +55,13 @@
{
private final Logger log = LoggerFactory.getLogger(getClass());
- // @Autowired
+ @Autowired
private ApplicationManager applicationManager;
- // @Autowired
+ @Autowired
private CommandResolver commandResolver;
- // @Autowired
+ @Autowired
private LayoutManager layoutManager;
@Argument(metaVar="COMMAND", required=true, description="Display help for COMMAND")
Modified: geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/resources/META-INF/spring/components.xml
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/resources/META-INF/spring/components.xml?rev=694308&r1=694307&r2=694308&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/resources/META-INF/spring/components.xml (original)
+++ geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/resources/META-INF/spring/components.xml Thu Sep 11 08:36:00 2008
@@ -31,13 +31,32 @@
<context:annotation-config/>
- <!-- TODO: Need CommandContainerAware interface for all components -->
+ <bean class="org.apache.geronimo.gshell.wisdom.command.CommandContainerImpl">
+ <property name="id" value="gshell-builtins:exit"/>
+
+ <property name="action">
+ <bean class="org.apache.geronimo.gshell.commands.builtins.ExitCommand"/>
+ </property>
+
+ <property name="completer">
+ <bean class="org.apache.geronimo.gshell.wisdom.command.CommandCompleterImpl"/>
+ </property>
+
+ <property name="documenter">
+ <bean class="org.apache.geronimo.gshell.wisdom.command.CommandDocumenterImpl">
+ <!--
+ <property name="name" value="echo"/>
+ <property name="description" value="Blah, blah, blah"/>
+ -->
+ </bean>
+ </property>
+ </bean>
<bean class="org.apache.geronimo.gshell.wisdom.command.CommandContainerImpl">
- <property name="id" value="gshell-builtins:echo"/>
+ <property name="id" value="gshell-builtins:help"/>
<property name="action">
- <bean class="org.apache.geronimo.gshell.commands.builtins.EchoCommand"/>
+ <bean class="org.apache.geronimo.gshell.commands.builtins.HelpCommand"/>
</property>
<property name="completer">
@@ -55,10 +74,10 @@
</bean>
<bean class="org.apache.geronimo.gshell.wisdom.command.CommandContainerImpl">
- <property name="id" value="gshell-builtins:exit"/>
+ <property name="id" value="gshell-builtins:echo"/>
<property name="action">
- <bean class="org.apache.geronimo.gshell.commands.builtins.ExitCommand"/>
+ <bean class="org.apache.geronimo.gshell.commands.builtins.EchoCommand"/>
</property>
<property name="completer">