geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdil...@apache.org
Subject svn commit: r695372 - in /geronimo/gshell/trunk: ./ gshell-api/src/main/java/org/apache/geronimo/gshell/command/ gshell-assembly/src/main/underlay/etc/ gshell-commands/gshell-builtins/ gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/g...
Date Mon, 15 Sep 2008 08:06:20 GMT
Author: jdillon
Date: Mon Sep 15 01:06:18 2008
New Revision: 695372

URL: http://svn.apache.org/viewvc?rev=695372&view=rev
Log:
Nuke gshell-layout, and the whole layout concept, its way to complicated asis
Nuke Command, CommandInfo, CommandResolver all which are layout related
Adding CommandContainerResolver to handle path -> container handling
Moved the CommandContext creation to the CommandContainerImpl
Dropped CommandContainerComponentSupport, it was stupid
Unpackage event stuff for now, not enough to warrant a sub-package
Added event when command container is registered

Added:
    geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/command/CommandContainerResolver.java
      - copied, changed from r694338, geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/command/CommandContainerRegistry.java
    geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/application/ApplicationConfiguredEvent.java   (contents, props changed)
      - copied, changed from r694356, geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/application/event/ApplicationConfiguredEvent.java
    geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/application/SettingsConfiguredEvent.java   (contents, props changed)
      - copied, changed from r694356, geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/application/event/SettingsConfiguredEvent.java
    geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/application/ShellCreatedEvent.java   (contents, props changed)
      - copied, changed from r694356, geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/application/event/ShellCreatedEvent.java
    geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/command/CommandContainerManager.java   (contents, props changed)
      - copied, changed from r694338, geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/command/CommandContainerFactoryImpl.java
    geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/command/CommandContainerRegisteredEvent.java   (with props)
    geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/plugin/PluginLoadedEvent.java   (contents, props changed)
      - copied, changed from r694633, geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/plugin/event/PluginLoadedEvent.java
Removed:
    geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/command/Command.java
    geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/command/CommandCreationException.java
    geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/command/CommandInfo.java
    geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/command/CommandResolver.java
    geronimo/gshell/trunk/gshell-layout/
    geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/layout/
    geronimo/gshell/trunk/gshell-model/src/test/java/org/apache/geronimo/gshell/model/layout/
    geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/application/event/
    geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/command/CommandContainerComponentSupport.java
    geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/command/CommandContainerFactoryImpl.java
    geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/command/CommandInfoImpl.java
    geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/command/CommandResolverImpl.java
    geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/plugin/event/
    geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/shell/LayoutManagerImpl.java
Modified:
    geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/command/CommandCompleter.java
    geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/command/CommandContainer.java
    geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/command/CommandContainerRegistry.java
    geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/command/CommandContext.java
    geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/command/CommandDocumenter.java
    geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/command/CommandResult.java
    geronimo/gshell/trunk/gshell-assembly/src/main/underlay/etc/application.xml
    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-model/src/main/java/org/apache/geronimo/gshell/model/application/ApplicationModel.java
    geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/application/ApplicationModelMarshaller.java
    geronimo/gshell/trunk/gshell-model/src/test/java/org/apache/geronimo/gshell/model/application/TestBranding.java
    geronimo/gshell/trunk/gshell-model/src/test/resources/org/apache/geronimo/gshell/model/application/application1.xml
    geronimo/gshell/trunk/gshell-rapture/gshell-rapture-core/pom.xml
    geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/application/ApplicationManagerImpl.java
    geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/application/SettingsManagerImpl.java
    geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/pom.xml
    geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/command/CommandCompleterImpl.java
    geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/command/CommandContainerImpl.java
    geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/command/CommandDocumenterImpl.java
    geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/plugin/PluginManagerImpl.java
    geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/shell/CommandLineBuilderImpl.java
    geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/shell/CommandLineExecutorImpl.java
    geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/shell/HistoryImpl.java
    geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/shell/ShellImpl.java
    geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/resources/META-INF/spring/components.xml
    geronimo/gshell/trunk/pom.xml

Modified: geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/command/CommandCompleter.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/command/CommandCompleter.java?rev=695372&r1=695371&r2=695372&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/command/CommandCompleter.java (original)
+++ geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/command/CommandCompleter.java Mon Sep 15 01:06:18 2008
@@ -32,5 +32,5 @@
     // TODO: Not really sure this is what we want to do, but for now...
     //
     
-    Completor createCompletor(CommandInfo info);
+    Completor createCompletor();
 }
\ No newline at end of file

Modified: geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/command/CommandContainer.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/command/CommandContainer.java?rev=695372&r1=695371&r2=695372&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/command/CommandContainer.java (original)
+++ geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/command/CommandContainer.java Mon Sep 15 01:06:18 2008
@@ -20,9 +20,10 @@
 package org.apache.geronimo.gshell.command;
 
 import org.apache.geronimo.gshell.i18n.MessageSource;
+import org.apache.geronimo.gshell.io.IO;
 
 /**
- * ???
+ * Provides facilites for a configured command instance.
  *
  * @version $Rev$ $Date$
  */
@@ -64,10 +65,12 @@
     MessageSource getMessages();
 
     /**
-     * Execute the command action.
-     *
-     * @param context   The execution context.
-     * @return          The result of the action execution.
+     * Executes the commands configured action.
+     * 
+     * @param args          The arguments to the command; must not be null.
+     * @param io            The I/O context for the command; must not be null.
+     * @param variables     The environment variables for the command; must not be null.
+     * @return              The command result; never null
      */
-    CommandResult execute(CommandContext context);
+    CommandResult execute(Object[] args, IO io, Variables variables);
 }
\ No newline at end of file

Modified: geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/command/CommandContainerRegistry.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/command/CommandContainerRegistry.java?rev=695372&r1=695371&r2=695372&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/command/CommandContainerRegistry.java (original)
+++ geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/command/CommandContainerRegistry.java Mon Sep 15 01:06:18 2008
@@ -26,5 +26,14 @@
  */
 public interface CommandContainerRegistry
 {
-    void register(CommandContainer commandContainer);
+    /**
+     * Registers a command-container.
+     *
+     * @param container     The command-container to register; must not be null.
+     */
+    void register(CommandContainer container);
+
+    //
+    // TODO: Expose registration details for help command support
+    //
 }
\ No newline at end of file

Copied: geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/command/CommandContainerResolver.java (from r694338, geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/command/CommandContainerRegistry.java)
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/command/CommandContainerResolver.java?p2=geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/command/CommandContainerResolver.java&p1=geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/command/CommandContainerRegistry.java&r1=694338&r2=695372&rev=695372&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/command/CommandContainerRegistry.java (original)
+++ geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/command/CommandContainerResolver.java Mon Sep 15 01:06:18 2008
@@ -20,11 +20,20 @@
 package org.apache.geronimo.gshell.command;
 
 /**
- * Provides registration facilities for {@link CommandContainer} instances.
+ * Resolves {@link CommandContainer} instances for a given path.
  *
  * @version $Rev$ $Date$
  */
-public interface CommandContainerRegistry
+public interface CommandContainerResolver
 {
-    void register(CommandContainer commandContainer);
+    /**
+     * Resolve the given path to a command container instance.
+     *
+     * @param variables     The current shell variables.
+     * @param path          The path of the command to resolve.
+     * @return              The resolved command container instance; never null.
+     *
+     * @throws CommandException     Failed to resolve command container.
+     */
+    CommandContainer resolve(Variables variables, String path) throws CommandException;
 }
\ No newline at end of file

Modified: geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/command/CommandContext.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/command/CommandContext.java?rev=695372&r1=695371&r2=695372&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/command/CommandContext.java (original)
+++ geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/command/CommandContext.java Mon Sep 15 01:06:18 2008
@@ -48,11 +48,4 @@
      * @return Command variables; never null.
      */
     Variables getVariables();
-
-    /**
-     * Provides details about the runtime configuration of the command.
-     *
-     * @return Command runtime information; never null.
-     */
-    CommandInfo getInfo();
 }
\ No newline at end of file

Modified: geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/command/CommandDocumenter.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/command/CommandDocumenter.java?rev=695372&r1=695371&r2=695372&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/command/CommandDocumenter.java (original)
+++ geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/command/CommandDocumenter.java Mon Sep 15 01:06:18 2008
@@ -54,12 +54,12 @@
      *
      * @param out   Write the usage to this writer.
      */
-    void renderUsage(CommandInfo info, PrintWriter out);
+    void renderUsage(PrintWriter out);
 
     /**
      * Render the full command manual.
      *
      * @param out   Write the manual to this writer.
      */
-    void renderManual(CommandInfo info, PrintWriter out);
+    void renderManual(PrintWriter out);
 }
\ No newline at end of file

Modified: geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/command/CommandResult.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/command/CommandResult.java?rev=695372&r1=695371&r2=695372&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/command/CommandResult.java (original)
+++ geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/command/CommandResult.java Mon Sep 15 01:06:18 2008
@@ -32,8 +32,7 @@
 {
     private final Object value;
 
-    // TODO: Change this to Throwable, requires some interface updates
-    private final Exception failure;
+    private final Throwable failure;
 
     private final Notification notification;
 
@@ -84,7 +83,7 @@
      *
      * @return  The command failure cause; or null if there was no failure.
      */
-    public Exception getFailure() {
+    public Throwable getFailure() {
         return failure;
     }
 

Modified: geronimo/gshell/trunk/gshell-assembly/src/main/underlay/etc/application.xml
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-assembly/src/main/underlay/etc/application.xml?rev=695372&r1=695371&r2=695372&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-assembly/src/main/underlay/etc/application.xml (original)
+++ geronimo/gshell/trunk/gshell-assembly/src/main/underlay/etc/application.xml Mon Sep 15 01:06:18 2008
@@ -85,143 +85,4 @@
         <name>gshell</name>
     </branding>
 
-    <layout>
-        <nodes>
-            <command>
-                <name>help</name>
-                <id>gshell-builtins:help</id>
-            </command>
-
-            <alias>
-                <name>?</name>
-                <command>help</command>
-            </alias>
-
-            <command>
-                <name>exit</name>
-                <id>gshell-builtins:exit</id>
-            </command>
-
-            <alias>
-                <name>quit</name>
-                <command>exit</command>
-            </alias>
-
-            <command>
-                <name>echo</name>
-                <id>gshell-builtins:echo</id>
-            </command>
-
-            <alias>
-                <name>print</name>
-                <command>echo</command>
-            </alias>
-
-            <command>
-                <name>clear</name>
-                <id>gshell-builtins:clear</id>
-            </command>
-
-            <command>
-                <name>source</name>
-                <id>gshell-builtins:source</id>
-            </command>
-
-            <alias>
-                <name>.</name>
-                <command>source</command>
-            </alias>
-
-            <command>
-                <name>set</name>
-                <id>gshell-builtins:set</id>
-            </command>
-
-            <command>
-                <name>unset</name>
-                <id>gshell-builtins:unset</id>
-            </command>
-
-            <group>
-                <name>optional</name>
-                <nodes>
-                    <command>
-                        <name>cat</name>
-                        <id>gshell-optional:cat</id>
-                    </command>
-
-                    <command>
-                        <name>exec</name>
-                        <id>gshell-optional:exec</id>
-                    </command>
-
-                    <command>
-                        <name>java</name>
-                        <id>gshell-optional:java</id>
-                    </command>
-
-                    <command>
-                        <name>sleep</name>
-                        <id>gshell-optional:sleep</id>
-                    </command>
-
-                    <command>
-                        <name>wait</name>
-                        <id>gshell-optional:wait</id>
-                    </command>
-                </nodes>
-            </group>
-
-            <group>
-                <name>repository</name>
-                <nodes>
-                    <command>
-                        <name>resolve</name>
-                        <id>gshell-repository:resolve</id>
-                    </command>
-                </nodes>
-            </group>
-
-            <group>
-                <name>bsf</name>
-                <nodes>
-                    <command>
-                        <name>script</name>
-                        <id>gshell-bsf:script</id>
-                    </command>
-                </nodes>
-            </group>
-
-            <group>
-                <name>vfs</name>
-                <nodes>
-                    <command>
-                        <name>copy</name>
-                        <id>gshell-vfs:copy</id>
-                    </command>
-                </nodes>
-            </group>
-
-            <group>
-                <name>remote</name>
-                <nodes>
-                    <command>
-                        <name>rsh</name>
-                        <id>gshell-remote:rsh</id>
-                    </command>
-
-                    <command>
-                        <name>rsh-server</name>
-                        <id>gshell-remote:rsh-server</id>
-                    </command>
-
-                    <alias>
-                        <name>rshd</name>
-                        <command>remote/rsh-server</command>
-                    </alias>
-                </nodes>
-            </group>
-        </nodes>
-    </layout>
-
 </application>
\ No newline at end of file

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=695372&r1=695371&r2=695372&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-commands/gshell-builtins/pom.xml (original)
+++ geronimo/gshell/trunk/gshell-commands/gshell-builtins/pom.xml Mon Sep 15 01:06:18 2008
@@ -52,11 +52,6 @@
             <groupId>org.apache.geronimo.gshell</groupId>
             <artifactId>gshell-application</artifactId>
         </dependency>
-
-        <dependency>
-            <groupId>org.apache.geronimo.gshell</groupId>
-            <artifactId>gshell-layout</artifactId>
-        </dependency>
     </dependencies>
 
 </project>
\ No newline at end of file

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=695372&r1=695371&r2=695372&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 Mon Sep 15 01:06:18 2008
@@ -19,25 +19,11 @@
 
 package org.apache.geronimo.gshell.commands.builtins;
 
-import org.apache.geronimo.gshell.ansi.Code;
 import org.apache.geronimo.gshell.ansi.Renderer;
 import org.apache.geronimo.gshell.application.ApplicationManager;
 import org.apache.geronimo.gshell.clp.Argument;
-import org.apache.geronimo.gshell.command.Command;
 import org.apache.geronimo.gshell.command.CommandAction;
 import org.apache.geronimo.gshell.command.CommandContext;
-import org.apache.geronimo.gshell.command.CommandDocumenter;
-import org.apache.geronimo.gshell.command.CommandException;
-import org.apache.geronimo.gshell.command.CommandInfo;
-import org.apache.geronimo.gshell.command.CommandResolver;
-import org.apache.geronimo.gshell.command.Variables;
-import org.apache.geronimo.gshell.io.IO;
-import org.apache.geronimo.gshell.layout.LayoutManager;
-import org.apache.geronimo.gshell.model.layout.AliasNode;
-import org.apache.geronimo.gshell.model.layout.CommandNode;
-import org.apache.geronimo.gshell.model.layout.GroupNode;
-import org.apache.geronimo.gshell.model.layout.Node;
-import org.codehaus.plexus.util.StringUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -55,12 +41,6 @@
     @Autowired
     private ApplicationManager applicationManager;
 
-    @Autowired
-    private CommandResolver commandResolver;
-
-    @Autowired
-    private LayoutManager layoutManager;
-
     @Argument(metaVar="COMMAND", required=true)
     private String command;
 
@@ -68,27 +48,24 @@
 
     public HelpCommand() {}
 
-    public HelpCommand(final CommandResolver commandResolver, final LayoutManager layoutManager) {
-        assert commandResolver != null;
-        assert layoutManager != null;
-
-        this.commandResolver = commandResolver;
-        this.layoutManager = layoutManager;
-    }
-
     public Object execute(final CommandContext context) throws Exception {
         assert context != null;
 
+        /*
         if (command == null) {
             displayAvailableCommands(context);
         }
         else {
             displayCommandManual(context.getIo(), command, context.getVariables());
         }
+        */
 
+        if (true) throw new Error();
+        
         return Result.SUCCESS;
     }
 
+    /*
     private void displayAvailableCommands(final CommandContext context) throws Exception {
         assert context != null;
 
@@ -191,4 +168,5 @@
 
         documenter.renderManual(info, io.out);
     }
+    */
 }

Modified: geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/application/ApplicationModel.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/application/ApplicationModel.java?rev=695372&r1=695371&r2=695372&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/application/ApplicationModel.java (original)
+++ geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/application/ApplicationModel.java Mon Sep 15 01:06:18 2008
@@ -25,9 +25,6 @@
 import org.apache.geronimo.gshell.model.common.DescriptorSupport;
 import org.apache.geronimo.gshell.model.common.LocalRepository;
 import org.apache.geronimo.gshell.model.common.RemoteRepository;
-import org.apache.geronimo.gshell.model.application.Plugin;
-import org.apache.geronimo.gshell.model.application.PluginGroup;
-import org.apache.geronimo.gshell.model.layout.Layout;
 
 import java.util.ArrayList;
 import java.util.List;
@@ -55,8 +52,6 @@
 
     private Branding branding;
 
-    private Layout layout;
-
     // LocalRepository
 
     public LocalRepository getLocalRepository() {
@@ -192,17 +187,7 @@
     public void setBranding(final Branding branding) {
         this.branding = branding;
     }
-
-    // Layout
     
-    public Layout getLayout() {
-        return layout;
-    }
-
-    public void setLayout(final Layout layout) {
-        this.layout = layout;
-    }
-
     /**
      * Link children to their parent when deserializing.
      */

Modified: geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/application/ApplicationModelMarshaller.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/application/ApplicationModelMarshaller.java?rev=695372&r1=695371&r2=695372&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/application/ApplicationModelMarshaller.java (original)
+++ geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/application/ApplicationModelMarshaller.java Mon Sep 15 01:06:18 2008
@@ -19,9 +19,6 @@
 
 package org.apache.geronimo.gshell.model.application;
 
-import com.thoughtworks.xstream.XStream;
-import org.apache.geronimo.gshell.model.layout.AliasNode;
-import org.apache.geronimo.gshell.model.layout.CommandNode;
 import org.apache.geronimo.gshell.model.marshal.MarshallerSupport;
 
 /**
@@ -35,12 +32,4 @@
     public ApplicationModelMarshaller() {
         super(ApplicationModel.class);
     }
-
-    @Override
-    protected void configure(final XStream xs) {
-        super.configure(xs);
-
-        // Need to provide some additional configuration to tell XStream about the Layout's node sub-classes
-        configureAnnotations(xs, CommandNode.class, AliasNode.class);
-    }
 }
\ No newline at end of file

Modified: geronimo/gshell/trunk/gshell-model/src/test/java/org/apache/geronimo/gshell/model/application/TestBranding.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-model/src/test/java/org/apache/geronimo/gshell/model/application/TestBranding.java?rev=695372&r1=695371&r2=695372&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-model/src/test/java/org/apache/geronimo/gshell/model/application/TestBranding.java (original)
+++ geronimo/gshell/trunk/gshell-model/src/test/java/org/apache/geronimo/gshell/model/application/TestBranding.java Mon Sep 15 01:06:18 2008
@@ -20,7 +20,7 @@
 package org.apache.geronimo.gshell.model.application;
 
 /**
- * ???
+ * A custom branding class.
  *
  * @version $Rev$ $Date$
  */

Modified: geronimo/gshell/trunk/gshell-model/src/test/resources/org/apache/geronimo/gshell/model/application/application1.xml
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-model/src/test/resources/org/apache/geronimo/gshell/model/application/application1.xml?rev=695372&r1=695371&r2=695372&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-model/src/test/resources/org/apache/geronimo/gshell/model/application/application1.xml (original)
+++ geronimo/gshell/trunk/gshell-model/src/test/resources/org/apache/geronimo/gshell/model/application/application1.xml Mon Sep 15 01:06:18 2008
@@ -78,137 +78,4 @@
         <programName>foo</programName>
     </branding>
 
-    <layout>
-        <nodes>
-            <command>
-                <name>help</name>
-                <id>gshell-builtins:help</id>
-            </command>
-
-            <alias>
-                <name>?</name>
-                <command>help</command>
-            </alias>
-
-            <command>
-                <name>exit</name>
-                <id>gshell-builtins:exit</id>
-            </command>
-
-            <alias>
-                <name>quit</name>
-                <command>exit</command>
-            </alias>
-
-            <command>
-                <name>echo</name>
-                <id>gshell-builtins:echo</id>
-            </command>
-
-            <alias>
-                <name>print</name>
-                <command>echo</command>
-            </alias>
-
-            <command>
-                <name>clear</name>
-                <id>gshell-builtins:clear</id>
-            </command>
-
-            <command>
-                <name>source</name>
-                <id>gshell-builtins:source</id>
-            </command>
-
-            <alias>
-                <name>.</name>
-                <command>source</command>
-            </alias>
-
-            <command>
-                <name>set</name>
-                <id>gshell-builtins:set</id>
-            </command>
-
-            <command>
-                <name>unset</name>
-                <id>gshell-builtins:unset</id>
-            </command>
-
-            <group>
-                <name>optional</name>
-
-                <nodes>
-                    <command>
-                        <name>cat</name>
-                        <id>gshell-optional:cat</id>
-                    </command>
-
-                    <command>
-                        <name>exec</name>
-                        <id>gshell-optional:exec</id>
-                    </command>
-
-                    <command>
-                        <name>java</name>
-                        <id>gshell-optional:java</id>
-                    </command>
-
-                    <command>
-                        <name>sleep</name>
-                        <id>gshell-optional:sleep</id>
-                    </command>
-
-                    <command>
-                        <name>wait</name>
-                        <id>gshell-optional:wait</id>
-                    </command>
-                </nodes>
-            </group>
-
-            <group>
-                <name>bsf</name>
-
-                <nodes>
-                    <command>
-                        <name>script</name>
-                        <id>gshell-bsf:script</id>
-                    </command>
-                </nodes>
-            </group>
-
-            <group>
-                <name>vfs</name>
-
-                <nodes>
-                    <command>
-                        <name>copy</name>
-                        <id>gshell-vfs:copy</id>
-                    </command>
-                </nodes>
-            </group>
-
-            <group>
-                <name>remote</name>
-
-                <nodes>
-                    <command>
-                        <name>rsh</name>
-                        <id>gshell-remote:rsh</id>
-                    </command>
-
-                    <command>
-                        <name>rsh-server</name>
-                        <id>gshell-remote:rsh-server</id>
-                    </command>
-
-                    <alias>
-                        <name>rshd</name>
-                        <command>remote/rsh-server</command>
-                    </alias>
-                </nodes>
-            </group>
-        </nodes>
-    </layout>
-    
 </application>
\ No newline at end of file

Modified: geronimo/gshell/trunk/gshell-rapture/gshell-rapture-core/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-rapture/gshell-rapture-core/pom.xml?rev=695372&r1=695371&r2=695372&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-rapture/gshell-rapture-core/pom.xml (original)
+++ geronimo/gshell/trunk/gshell-rapture/gshell-rapture-core/pom.xml Mon Sep 15 01:06:18 2008
@@ -64,11 +64,6 @@
         </dependency>
 
         <dependency>
-            <groupId>org.apache.geronimo.gshell</groupId>
-            <artifactId>gshell-layout</artifactId>
-        </dependency>
-        
-        <dependency>
             <groupId>org.codehaus.plexus</groupId>
             <artifactId>plexus-interpolation</artifactId>
         </dependency>

Copied: geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/application/ApplicationConfiguredEvent.java (from r694356, geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/application/event/ApplicationConfiguredEvent.java)
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/application/ApplicationConfiguredEvent.java?p2=geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/application/ApplicationConfiguredEvent.java&p1=geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/application/event/ApplicationConfiguredEvent.java&r1=694356&r2=695372&rev=695372&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/application/event/ApplicationConfiguredEvent.java (original)
+++ geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/application/ApplicationConfiguredEvent.java Mon Sep 15 01:06:18 2008
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.apache.geronimo.gshell.wisdom.application.event;
+package org.apache.geronimo.gshell.wisdom.application;
 
 import org.springframework.context.ApplicationEvent;
 import org.apache.geronimo.gshell.application.ApplicationManager;

Propchange: geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/application/ApplicationConfiguredEvent.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/application/ApplicationConfiguredEvent.java
------------------------------------------------------------------------------
    svn:executable = *

Propchange: geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/application/ApplicationConfiguredEvent.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/application/ApplicationConfiguredEvent.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/application/ApplicationManagerImpl.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/application/ApplicationManagerImpl.java?rev=695372&r1=695371&r2=695372&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/application/ApplicationManagerImpl.java (original)
+++ geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/application/ApplicationManagerImpl.java Mon Sep 15 01:06:18 2008
@@ -37,8 +37,8 @@
 import org.apache.geronimo.gshell.shell.Shell;
 import org.apache.geronimo.gshell.spring.BeanContainer;
 import org.apache.geronimo.gshell.spring.BeanContainerAware;
-import org.apache.geronimo.gshell.wisdom.application.event.ApplicationConfiguredEvent;
-import org.apache.geronimo.gshell.wisdom.application.event.ShellCreatedEvent;
+import org.apache.geronimo.gshell.wisdom.application.ApplicationConfiguredEvent;
+import org.apache.geronimo.gshell.wisdom.application.ShellCreatedEvent;
 import org.apache.maven.artifact.Artifact;
 import org.apache.maven.artifact.factory.ArtifactFactory;
 import org.apache.maven.artifact.resolver.ArtifactResolutionRequest;

Copied: geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/application/SettingsConfiguredEvent.java (from r694356, geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/application/event/SettingsConfiguredEvent.java)
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/application/SettingsConfiguredEvent.java?p2=geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/application/SettingsConfiguredEvent.java&p1=geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/application/event/SettingsConfiguredEvent.java&r1=694356&r2=695372&rev=695372&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/application/event/SettingsConfiguredEvent.java (original)
+++ geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/application/SettingsConfiguredEvent.java Mon Sep 15 01:06:18 2008
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.apache.geronimo.gshell.wisdom.application.event;
+package org.apache.geronimo.gshell.wisdom.application;
 
 import org.springframework.context.ApplicationEvent;
 import org.apache.geronimo.gshell.application.settings.SettingsManager;

Propchange: geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/application/SettingsConfiguredEvent.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/application/SettingsConfiguredEvent.java
------------------------------------------------------------------------------
    svn:executable = *

Propchange: geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/application/SettingsConfiguredEvent.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/application/SettingsConfiguredEvent.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/application/SettingsManagerImpl.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/application/SettingsManagerImpl.java?rev=695372&r1=695371&r2=695372&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/application/SettingsManagerImpl.java (original)
+++ geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/application/SettingsManagerImpl.java Mon Sep 15 01:06:18 2008
@@ -29,7 +29,7 @@
 import org.apache.geronimo.gshell.model.settings.SettingsModel;
 import org.apache.geronimo.gshell.spring.BeanContainerAware;
 import org.apache.geronimo.gshell.spring.BeanContainer;
-import org.apache.geronimo.gshell.wisdom.application.event.SettingsConfiguredEvent;
+import org.apache.geronimo.gshell.wisdom.application.SettingsConfiguredEvent;
 import org.codehaus.plexus.interpolation.PropertiesBasedValueSource;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;

Copied: geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/application/ShellCreatedEvent.java (from r694356, geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/application/event/ShellCreatedEvent.java)
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/application/ShellCreatedEvent.java?p2=geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/application/ShellCreatedEvent.java&p1=geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/application/event/ShellCreatedEvent.java&r1=694356&r2=695372&rev=695372&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/application/event/ShellCreatedEvent.java (original)
+++ geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/application/ShellCreatedEvent.java Mon Sep 15 01:06:18 2008
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.apache.geronimo.gshell.wisdom.application.event;
+package org.apache.geronimo.gshell.wisdom.application;
 
 import org.apache.geronimo.gshell.shell.Shell;
 import org.springframework.context.ApplicationEvent;

Propchange: geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/application/ShellCreatedEvent.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/application/ShellCreatedEvent.java
------------------------------------------------------------------------------
    svn:executable = *

Propchange: geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/application/ShellCreatedEvent.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/application/ShellCreatedEvent.java
------------------------------------------------------------------------------
    svn:mergeinfo = 

Propchange: geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/application/ShellCreatedEvent.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/pom.xml?rev=695372&r1=695371&r2=695372&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/pom.xml (original)
+++ geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/pom.xml Mon Sep 15 01:06:18 2008
@@ -72,11 +72,6 @@
             <groupId>org.apache.geronimo.gshell</groupId>
             <artifactId>gshell-parser</artifactId>
         </dependency>
-        
-        <dependency>
-            <groupId>org.apache.geronimo.gshell</groupId>
-            <artifactId>gshell-layout</artifactId>
-        </dependency>
     </dependencies>
 
 </project>

Modified: geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/command/CommandCompleterImpl.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/command/CommandCompleterImpl.java?rev=695372&r1=695371&r2=695372&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/command/CommandCompleterImpl.java (original)
+++ geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/command/CommandCompleterImpl.java Mon Sep 15 01:06:18 2008
@@ -21,9 +21,6 @@
 
 import jline.Completor;
 import org.apache.geronimo.gshell.command.CommandCompleter;
-import org.apache.geronimo.gshell.command.CommandInfo;
-import org.apache.geronimo.gshell.command.CommandContainerAware;
-import org.apache.geronimo.gshell.command.CommandContainer;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -33,12 +30,11 @@
  * @version $Rev$ $Date$
  */
 public class CommandCompleterImpl
-    extends CommandContainerComponentSupport
     implements CommandCompleter
 {
-    public Completor createCompletor(final CommandInfo info) {
-        assert info != null;
+    private final Logger log = LoggerFactory.getLogger(getClass());
 
+    public Completor createCompletor() {
         // TODO:
 
         throw new Error("Not implemented");

Modified: geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/command/CommandContainerImpl.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/command/CommandContainerImpl.java?rev=695372&r1=695371&r2=695372&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/command/CommandContainerImpl.java (original)
+++ geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/command/CommandContainerImpl.java Mon Sep 15 01:06:18 2008
@@ -21,20 +21,20 @@
 
 import org.apache.geronimo.gshell.clp.CommandLineProcessor;
 import org.apache.geronimo.gshell.clp.Option;
-import org.apache.geronimo.gshell.clp.ProcessingException;
 import org.apache.geronimo.gshell.command.Arguments;
 import org.apache.geronimo.gshell.command.CommandAction;
 import org.apache.geronimo.gshell.command.CommandCompleter;
 import org.apache.geronimo.gshell.command.CommandContainer;
+import org.apache.geronimo.gshell.command.CommandContainerAware;
+import org.apache.geronimo.gshell.command.CommandContainerRegistry;
 import org.apache.geronimo.gshell.command.CommandContext;
 import org.apache.geronimo.gshell.command.CommandDocumenter;
 import org.apache.geronimo.gshell.command.CommandResult;
-import org.apache.geronimo.gshell.command.CommandContainerRegistry;
-import org.apache.geronimo.gshell.command.CommandContainerAware;
-import org.apache.geronimo.gshell.notification.Notification;
-import org.apache.geronimo.gshell.prefs.PreferencesProcessor;
+import org.apache.geronimo.gshell.command.Variables;
 import org.apache.geronimo.gshell.i18n.MessageSource;
 import org.apache.geronimo.gshell.i18n.ResourceBundleMessageSource;
+import org.apache.geronimo.gshell.io.IO;
+import org.apache.geronimo.gshell.notification.Notification;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.slf4j.MDC;
@@ -151,8 +151,10 @@
         registry.register(this);
     }
     
-    public CommandResult execute(final CommandContext context) {
-        assert context != null;
+    public CommandResult execute(final Object[] args, final IO io, final Variables variables) {
+        assert args != null;
+        assert io != null;
+        assert variables != null;
 
         log.trace("Executing; context={}");
 
@@ -164,23 +166,37 @@
         try {
             CommandAction action = getAction();
 
+            // Setup the command action
             try {
                 // Process command line options/arguments
-                if (processArguments(context, action, context.getArguments())) {
+                if (processArguments(io, action, args)) {
                     // return if we have been asked to display --help
                     return new CommandResult(CommandAction.Result.SUCCESS);
                 }
 
-                /*
-                PreferencesProcessor pp = new PreferencesProcessor();
-                pp.addBean(action);
-                pp.process();
-                */
+                // TODO: Add preferences processor
             }
             catch (Exception e) {
                 return new CommandResult(e);
             }
 
+            // Setup the command context
+            CommandContext context = new CommandContext()
+            {
+                public Object[] getArguments() {
+                    return args;
+                }
+
+                public IO getIo() {
+                    return io;
+                }
+
+                public Variables getVariables() {
+                    return variables;
+                }
+            };
+
+            // Execute the action
             try {
                 log.trace("Executing action: {}", action);
 
@@ -208,18 +224,8 @@
         return result;
     }
 
-    /**
-     * Process command-line arguments for the action.
-     *
-     * @param context   The command context.
-     * @param action    The action being executed.
-     * @param args      The arguments to the action.
-     * @return          True if --help was detetected, else execute the action.
-     *
-     * @throws ProcessingException  A failure occured while processing the command-line.
-     */
-    private boolean processArguments(final CommandContext context, final CommandAction action, final Object[] args) throws Exception {
-        assert context != null;
+    private boolean processArguments(final IO io, final CommandAction action, final Object[] args) throws Exception {
+        assert io != null;
         assert action != null;
         assert args != null;
 
@@ -244,7 +250,7 @@
         if (help.displayHelp) {
             log.trace("Render command-line usage");
             
-            documenter.renderUsage(context.getInfo(), context.getIo().out);
+            documenter.renderUsage(io.out);
             return true;
         }
 
@@ -256,6 +262,10 @@
      */
     static class HelpSupport
     {
+        //
+        // TODO: Need to get this description into an i18n message source
+        //
+        
         @Option(name="-h", aliases={"--help"}, description="Display this help message", requireOverride=true)
         public boolean displayHelp;
     }

Copied: geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/command/CommandContainerManager.java (from r694338, geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/command/CommandContainerFactoryImpl.java)
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/command/CommandContainerManager.java?p2=geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/command/CommandContainerManager.java&p1=geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/command/CommandContainerFactoryImpl.java&r1=694338&r2=695372&rev=695372&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/command/CommandContainerFactoryImpl.java (original)
+++ geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/command/CommandContainerManager.java Mon Sep 15 01:06:18 2008
@@ -22,49 +22,93 @@
 import org.apache.geronimo.gshell.command.CommandContainer;
 import org.apache.geronimo.gshell.command.CommandContainerFactory;
 import org.apache.geronimo.gshell.command.CommandContainerRegistry;
+import org.apache.geronimo.gshell.command.CommandContainerResolver;
+import org.apache.geronimo.gshell.command.CommandException;
+import org.apache.geronimo.gshell.command.CommandNotFoundException;
+import org.apache.geronimo.gshell.command.Variables;
+import org.apache.geronimo.gshell.spring.BeanContainer;
+import org.apache.geronimo.gshell.spring.BeanContainerAware;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import java.util.Map;
 import java.util.HashMap;
+import java.util.Map;
 
 /**
- * Default implementation of a {@link CommandContainerFactory} and {@link CommandContainerRegistry} components.
+ * Provides management of {@link CommandContainer} instances.
  *
  * @version $Rev$ $Date$
  */
-public class CommandContainerFactoryImpl
-    implements CommandContainerRegistry, CommandContainerFactory
+public class CommandContainerManager
+    implements BeanContainerAware, CommandContainerRegistry, CommandContainerFactory, CommandContainerResolver
 {
     private final Logger log = LoggerFactory.getLogger(getClass());
 
-    // CommandContainerRegistry
-
+    private BeanContainer beanContainer;
+    
     private Map<String,CommandContainer> registrations = new HashMap<String,CommandContainer>();
 
-    public void register(final CommandContainer commandContainer) {
-        assert commandContainer != null;
+    //
+    // BeanContainerAware
+    //
+    
+    public void setBeanContainer(final BeanContainer container) {
+        assert container != null;
+
+        this.beanContainer = container;
+    }
+
+    //
+    // CommandContainerRegistry
+    //
+
+    public void register(final CommandContainer container) {
+        assert container != null;
 
-        String id = commandContainer.getId();
+        String id = container.getId();
 
         log.debug("Registering command container: {}", id);
         
-        registrations.put(id, commandContainer);
+        registrations.put(id, container);
+
+        beanContainer.publish(new CommandContainerRegisteredEvent(this, container));
     }
 
+    //
     // CommandContainerFactory
+    //
 
     public CommandContainer create(final String id) throws Exception {
         assert id != null;
 
         log.debug("Locating container for ID: {}", id);
 
-        CommandContainer commandContainer = registrations.get(id);
+        CommandContainer container = registrations.get(id);
 
-        if (commandContainer == null) {
+        if (container == null) {
             throw new RuntimeException("No command container registered for id: " + id);
         }
 
-        return commandContainer;
+        return container;
+    }
+
+    //
+    // CommandContainerResolver
+    //
+
+    public CommandContainer resolve(final Variables variables, final String path) throws CommandException {
+        assert variables != null;
+        assert path != null;
+
+        log.debug("Resolving container for path: {}", path);
+
+        // HACK: For now, there is no nested muck, just use the name
+        for (CommandContainer container : registrations.values()) {
+            if (path.equals(container.getDocumenter().getName())) {
+                return container;
+            }
+        }
+        
+        throw new CommandNotFoundException(path);
     }
 }
\ No newline at end of file

Propchange: geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/command/CommandContainerManager.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/command/CommandContainerManager.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/command/CommandContainerManager.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/command/CommandContainerRegisteredEvent.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/command/CommandContainerRegisteredEvent.java?rev=695372&view=auto
==============================================================================
--- geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/command/CommandContainerRegisteredEvent.java (added)
+++ geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/command/CommandContainerRegisteredEvent.java Mon Sep 15 01:06:18 2008
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.geronimo.gshell.wisdom.command;
+
+import org.apache.geronimo.gshell.command.CommandContainer;
+import org.springframework.context.ApplicationEvent;
+
+/**
+ * Event fired once a command container has been registered.
+ * 
+ * @version $Rev$ $Date$
+ */
+public class CommandContainerRegisteredEvent
+    extends ApplicationEvent
+{
+    private CommandContainer container;
+
+    public CommandContainerRegisteredEvent(final CommandContainerManager source, final CommandContainer container) {
+        super(source);
+
+        this.container = container;
+    }
+
+    public CommandContainer getContainer() {
+        return container;
+    }
+}
\ No newline at end of file

Propchange: geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/command/CommandContainerRegisteredEvent.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/command/CommandContainerRegisteredEvent.java
------------------------------------------------------------------------------
    svn:executable = *

Propchange: geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/command/CommandContainerRegisteredEvent.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/command/CommandContainerRegisteredEvent.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/command/CommandDocumenterImpl.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/command/CommandDocumenterImpl.java?rev=695372&r1=695371&r2=695372&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/command/CommandDocumenterImpl.java (original)
+++ geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/command/CommandDocumenterImpl.java Mon Sep 15 01:06:18 2008
@@ -22,10 +22,12 @@
 import org.apache.geronimo.gshell.clp.CommandLineProcessor;
 import org.apache.geronimo.gshell.clp.Printer;
 import org.apache.geronimo.gshell.command.CommandAction;
+import org.apache.geronimo.gshell.command.CommandContainer;
+import org.apache.geronimo.gshell.command.CommandContainerAware;
 import org.apache.geronimo.gshell.command.CommandDocumenter;
-import org.apache.geronimo.gshell.command.CommandInfo;
-import org.apache.geronimo.gshell.i18n.MessageSource;
 import org.apache.geronimo.gshell.i18n.PrefixingMessageSource;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import java.io.PrintWriter;
 
@@ -35,9 +37,12 @@
  * @version $Rev$ $Date$
  */
 public class CommandDocumenterImpl
-    extends CommandContainerComponentSupport
-    implements CommandDocumenter
+    implements CommandDocumenter, CommandContainerAware
 {
+    private final Logger log = LoggerFactory.getLogger(getClass());
+
+    private CommandContainer container;
+
     private String name;
 
     private String description;
@@ -77,10 +82,27 @@
         this.manual = manual;
     }
 
+    //
+    // CommandContainerAware
+    //
+
+    public void setCommandContainer(final CommandContainer container) {
+        assert container != null;
+
+        this.container = container;
+    }
+
+    private CommandContainer getContainer() {
+        assert container != null;
+
+        return container;
+    }
+
+    //
     // CommandDocumenter
+    //
 
-    public void renderUsage(final CommandInfo info, final PrintWriter out) {
-        assert info != null;
+    public void renderUsage(final PrintWriter out) {
         assert out != null;
 
         log.debug("Rendering command usage");
@@ -95,28 +117,21 @@
         CommandAction action = getContainer().getAction();
         clp.addBean(action);
 
-        // Fetch the details
-        String name = getName();
-        String desc = getDescription();
-
         // Render the help
-        out.println(desc);
+        out.println(getDescription());
         out.println();
 
         Printer printer = new Printer(clp);
         printer.setMessageSource(new PrefixingMessageSource(getContainer().getMessages(), "command."));
-        printer.printUsage(out, name);
-
-        out.flush();
+        printer.printUsage(out, getName());
     }
 
-    public void renderManual(final CommandInfo info, final PrintWriter out) {
-        assert info != null;
+    public void renderManual(final PrintWriter out) {
         assert out != null;
 
         log.debug("Rendering command manual");
 
-        out.println(info.getName());
+        out.println(getName());
         out.println();
 
         String manual = getManual();

Copied: geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/plugin/PluginLoadedEvent.java (from r694633, geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/plugin/event/PluginLoadedEvent.java)
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/plugin/PluginLoadedEvent.java?p2=geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/plugin/PluginLoadedEvent.java&p1=geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/plugin/event/PluginLoadedEvent.java&r1=694633&r2=695372&rev=695372&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/plugin/event/PluginLoadedEvent.java (original)
+++ geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/plugin/PluginLoadedEvent.java Mon Sep 15 01:06:18 2008
@@ -17,14 +17,14 @@
  * under the License.
  */
 
-package org.apache.geronimo.gshell.wisdom.plugin.event;
+package org.apache.geronimo.gshell.wisdom.plugin;
 
-import org.springframework.context.ApplicationEvent;
 import org.apache.geronimo.gshell.application.plugin.PluginManager;
 import org.apache.geronimo.gshell.model.application.Plugin;
+import org.springframework.context.ApplicationEvent;
 
 /**
- * Event fire once a plugin has been loaded.
+ * Event fired once a plugin has been loaded.
  *
  * @version $Rev$ $Date$
  */

Propchange: geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/plugin/PluginLoadedEvent.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/plugin/PluginLoadedEvent.java
------------------------------------------------------------------------------
    svn:executable = *

Propchange: geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/plugin/PluginLoadedEvent.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/plugin/PluginLoadedEvent.java
------------------------------------------------------------------------------
    svn:mergeinfo = 

Propchange: geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/plugin/PluginLoadedEvent.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/plugin/PluginManagerImpl.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/plugin/PluginManagerImpl.java?rev=695372&r1=695371&r2=695372&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/plugin/PluginManagerImpl.java (original)
+++ geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/plugin/PluginManagerImpl.java Mon Sep 15 01:06:18 2008
@@ -19,33 +19,32 @@
 
 package org.apache.geronimo.gshell.wisdom.plugin;
 
-import org.apache.geronimo.gshell.spring.BeanContainerAware;
-import org.apache.geronimo.gshell.spring.BeanContainer;
-import org.apache.geronimo.gshell.application.plugin.PluginManager;
 import org.apache.geronimo.gshell.application.Application;
+import org.apache.geronimo.gshell.application.plugin.PluginManager;
 import org.apache.geronimo.gshell.artifact.ArtifactManager;
-import org.apache.geronimo.gshell.wisdom.application.event.ApplicationConfiguredEvent;
-import org.apache.geronimo.gshell.wisdom.plugin.event.PluginLoadedEvent;
 import org.apache.geronimo.gshell.model.application.Plugin;
+import org.apache.geronimo.gshell.spring.BeanContainer;
+import org.apache.geronimo.gshell.spring.BeanContainerAware;
+import org.apache.geronimo.gshell.wisdom.application.ApplicationConfiguredEvent;
+import org.apache.maven.artifact.Artifact;
+import org.apache.maven.artifact.factory.ArtifactFactory;
 import org.apache.maven.artifact.resolver.ArtifactResolutionRequest;
 import org.apache.maven.artifact.resolver.ArtifactResolutionResult;
 import org.apache.maven.artifact.resolver.filter.AndArtifactFilter;
-import org.apache.maven.artifact.resolver.filter.ScopeArtifactFilter;
 import org.apache.maven.artifact.resolver.filter.ExclusionSetFilter;
-import org.apache.maven.artifact.Artifact;
-import org.apache.maven.artifact.factory.ArtifactFactory;
-import org.slf4j.LoggerFactory;
+import org.apache.maven.artifact.resolver.filter.ScopeArtifactFilter;
 import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.context.ApplicationListener;
 import org.springframework.context.ApplicationEvent;
+import org.springframework.context.ApplicationListener;
 
-import java.util.List;
-import java.util.Set;
+import java.io.File;
+import java.net.URL;
 import java.util.LinkedHashSet;
 import java.util.LinkedList;
-import java.net.URL;
-import java.io.File;
+import java.util.List;
+import java.util.Set;
 
 /**
  * Default implementation of the {@link PluginManager} component.

Modified: geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/shell/CommandLineBuilderImpl.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/shell/CommandLineBuilderImpl.java?rev=695372&r1=695371&r2=695372&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/shell/CommandLineBuilderImpl.java (original)
+++ geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/shell/CommandLineBuilderImpl.java Mon Sep 15 01:06:18 2008
@@ -28,8 +28,8 @@
 import org.apache.geronimo.gshell.parser.ASTCommandLine;
 import org.apache.geronimo.gshell.parser.CommandLineParser;
 import org.apache.geronimo.gshell.parser.ParseException;
-import org.apache.geronimo.gshell.parser.visitor.LoggingVisitor;
 import org.apache.geronimo.gshell.parser.visitor.ExecutingVisitor;
+import org.apache.geronimo.gshell.parser.visitor.LoggingVisitor;
 import org.codehaus.plexus.util.IOUtil;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;

Modified: geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/shell/CommandLineExecutorImpl.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/shell/CommandLineExecutorImpl.java?rev=695372&r1=695371&r2=695372&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/shell/CommandLineExecutorImpl.java (original)
+++ geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/shell/CommandLineExecutorImpl.java Mon Sep 15 01:06:18 2008
@@ -22,10 +22,9 @@
 import org.apache.geronimo.gshell.application.ApplicationManager;
 import org.apache.geronimo.gshell.chronos.StopWatch;
 import org.apache.geronimo.gshell.command.Arguments;
-import org.apache.geronimo.gshell.command.Command;
-import org.apache.geronimo.gshell.command.CommandContext;
-import org.apache.geronimo.gshell.command.CommandInfo;
-import org.apache.geronimo.gshell.command.CommandResolver;
+import org.apache.geronimo.gshell.command.CommandContainer;
+import org.apache.geronimo.gshell.command.CommandContainerResolver;
+import org.apache.geronimo.gshell.command.CommandException;
 import org.apache.geronimo.gshell.command.CommandResult;
 import org.apache.geronimo.gshell.command.Variables;
 import org.apache.geronimo.gshell.commandline.CommandLine;
@@ -64,7 +63,7 @@
     private ApplicationManager applicationManager;
 
     @Autowired
-    private CommandResolver commandResolver;
+    private CommandContainerResolver commandContainerResolver;
 
     @Autowired
     private CommandLineBuilder commandLineBuilder;
@@ -193,49 +192,25 @@
         return new Thread(run);
     }
 
-    //
-    // TODO: Let the CommandContext creation happen in the child, pass in the ShellContext here...
-    //
-
     protected Object execute(final String path, final Object[] args, final IO io) throws Exception {
         log.debug("Executing");
 
-        final Variables variables = applicationManager.getApplication().getVariables();
-
-        final Command command = commandResolver.resolve(variables, path);
-
-        // Setup the command context and pass it to the command instance
-        CommandContext context = new CommandContext()
-        {
-            // Command instances get their own namespace with defaults from the current
-            final Variables vars = new Variables(variables);
-
-            public Object[] getArguments() {
-                return args;
-            }
-
-            public IO getIo() {
-                return io;
-            }
-
-            public Variables getVariables() {
-                return vars;
-            }
+        Variables variables = applicationManager.getApplication().getVariables();
 
-            public CommandInfo getInfo() {
-                return command.getInfo();
-            }
-        };
+        CommandContainer container = commandContainerResolver.resolve(variables, path);
 
-        // Setup command timings
-        StopWatch watch = new StopWatch(true);
+        // Instances get their own namespace with defaults from the current
+        Variables vars = new Variables(variables);
 
         // Hijack the system streams in the current thread's context
         SystemOutputHijacker.register(io.outputStream, io.errorStream);
 
+        // Setup command timings
+        StopWatch watch = new StopWatch(true);
+        
         CommandResult result;
         try {
-            result = command.execute(context);
+            result = container.execute(args, io, vars);
 
             log.debug("Command completed with result: {}, after: {}", result, watch);
         }
@@ -255,7 +230,8 @@
             throw result.getNotification();
         }
         else if (result.hasFailed()) {
-            throw result.getFailure();
+            //noinspection ThrowableResultOfMethodCallIgnored
+            throw new CommandException(result.getFailure());
         }
         else {
             return result.getValue();

Modified: geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/shell/HistoryImpl.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/shell/HistoryImpl.java?rev=695372&r1=695371&r2=695372&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/shell/HistoryImpl.java (original)
+++ geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/shell/HistoryImpl.java Mon Sep 15 01:06:18 2008
@@ -20,7 +20,7 @@
 package org.apache.geronimo.gshell.wisdom.shell;
 
 import jline.History;
-import org.apache.geronimo.gshell.wisdom.application.event.ApplicationConfiguredEvent;
+import org.apache.geronimo.gshell.wisdom.application.ApplicationConfiguredEvent;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.context.ApplicationEvent;

Modified: geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/shell/ShellImpl.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/shell/ShellImpl.java?rev=695372&r1=695371&r2=695372&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/shell/ShellImpl.java (original)
+++ geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/shell/ShellImpl.java Mon Sep 15 01:06:18 2008
@@ -34,7 +34,7 @@
 import org.apache.geronimo.gshell.notification.ExitNotification;
 import org.apache.geronimo.gshell.shell.Shell;
 import org.apache.geronimo.gshell.shell.ShellInfo;
-import org.apache.geronimo.gshell.wisdom.application.event.ApplicationConfiguredEvent;
+import org.apache.geronimo.gshell.wisdom.application.ApplicationConfiguredEvent;
 import org.codehaus.plexus.util.IOUtil;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;

Modified: geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/resources/META-INF/spring/components.xml
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/resources/META-INF/spring/components.xml?rev=695372&r1=695371&r2=695372&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/resources/META-INF/spring/components.xml (original)
+++ geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/resources/META-INF/spring/components.xml Mon Sep 15 01:06:18 2008
@@ -31,20 +31,19 @@
 
     <bean id="pluginManager" class="org.apache.geronimo.gshell.wisdom.plugin.PluginManagerImpl"/>
     
-    <bean id="commandContainerFactory" class="org.apache.geronimo.gshell.wisdom.command.CommandContainerFactoryImpl"/>
-
-    <bean id="commandResolver" class="org.apache.geronimo.gshell.wisdom.command.CommandResolverImpl"/>
+    <bean id="commandContainerManager" class="org.apache.geronimo.gshell.wisdom.command.CommandContainerManager"/>
 
     <bean id="commandLineBuilder" class="org.apache.geronimo.gshell.wisdom.shell.CommandLineBuilderImpl"/>
 
     <bean id="commandLineExecutor" class="org.apache.geronimo.gshell.wisdom.shell.CommandLineExecutorImpl">
+        <!--
+        FIXME: See how we can refactor CommandLineExecutor and Shell to avoid the need for this qualifier.
+        -->
         <qualifier value="default"/>
     </bean>
 
     <bean id="history" class="org.apache.geronimo.gshell.wisdom.shell.HistoryImpl"/>
 
-    <bean id="layoutManager" class="org.apache.geronimo.gshell.wisdom.shell.LayoutManagerImpl"/>
-
     <bean id="shellInfo" class="org.apache.geronimo.gshell.wisdom.shell.ShellInfoImpl"/>
 
     <bean id="shell" class="org.apache.geronimo.gshell.wisdom.shell.ShellImpl"/>

Modified: geronimo/gshell/trunk/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/pom.xml?rev=695372&r1=695371&r2=695372&view=diff
==============================================================================
--- geronimo/gshell/trunk/pom.xml (original)
+++ geronimo/gshell/trunk/pom.xml Mon Sep 15 01:06:18 2008
@@ -525,12 +525,6 @@
                 <artifactId>gshell-cli</artifactId>
                 <version>1.0-alpha-2-SNAPSHOT</version>
             </dependency>
-
-            <dependency>
-                <groupId>org.apache.geronimo.gshell</groupId>
-                <artifactId>gshell-layout</artifactId>
-                <version>1.0-alpha-2-SNAPSHOT</version>
-            </dependency>
             
             <dependency>
                 <groupId>org.apache.geronimo.gshell.remote</groupId>
@@ -634,7 +628,6 @@
         <module>gshell-model</module>
         <module>gshell-application</module>
         <module>gshell-parser</module>
-        <module>gshell-layout</module>
         <!--
         <module>gshell-rapture</module>
         -->



Mime
View raw message