geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdil...@apache.org
Subject svn commit: r670207 [2/2] - in /geronimo/gshell/trunk: ./ gshell-api/src/main/java/org/apache/geronimo/gshell/command/ gshell-api/src/main/java/org/apache/geronimo/gshell/shell/ gshell-assembly/ gshell-assembly/src/main/underlay/etc/ gshell-cli/ gshell...
Date Sat, 21 Jun 2008 14:55:49 GMT
Copied: geronimo/gshell/trunk/gshell-rapture/src/main/java/org/apache/geronimo/gshell/rapture/shell/DefaultCommandLineBuilder.java
(from r670155, geronimo/gshell/trunk/gshell-rapture/src/main/java/org/apache/geronimo/gshell/rapture/DefaultCommandLineBuilder.java)
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-rapture/src/main/java/org/apache/geronimo/gshell/rapture/shell/DefaultCommandLineBuilder.java?p2=geronimo/gshell/trunk/gshell-rapture/src/main/java/org/apache/geronimo/gshell/rapture/shell/DefaultCommandLineBuilder.java&p1=geronimo/gshell/trunk/gshell-rapture/src/main/java/org/apache/geronimo/gshell/rapture/DefaultCommandLineBuilder.java&r1=670155&r2=670207&rev=670207&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-rapture/src/main/java/org/apache/geronimo/gshell/rapture/DefaultCommandLineBuilder.java
(original)
+++ geronimo/gshell/trunk/gshell-rapture/src/main/java/org/apache/geronimo/gshell/rapture/shell/DefaultCommandLineBuilder.java
Sat Jun 21 07:55:47 2008
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.apache.geronimo.gshell.rapture;
+package org.apache.geronimo.gshell.rapture.shell;
 
 import org.apache.geronimo.gshell.application.ApplicationManager;
 import org.apache.geronimo.gshell.commandline.CommandLine;
@@ -27,7 +27,9 @@
 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.shell.ShellContext;
+import org.apache.geronimo.gshell.command.Variables;
+import org.apache.geronimo.gshell.rapture.shell.ExecutingVisitor;
+import org.apache.geronimo.gshell.rapture.shell.LoggingVisitor;
 import org.codehaus.plexus.PlexusContainer;
 import org.codehaus.plexus.component.annotations.Component;
 import org.codehaus.plexus.component.annotations.Requirement;
@@ -100,9 +102,9 @@
             CommandLineExecutor executor = (CommandLineExecutor) container.lookup(CommandLineExecutor.class);
 
             assert applicationManager != null;
-            ShellContext env = applicationManager.getContext().getEnvironment();
+            Variables vars = applicationManager.getContext().getVariables();
 
-            final ExecutingVisitor visitor = new ExecutingVisitor(executor, env);
+            final ExecutingVisitor visitor = new ExecutingVisitor(executor, vars);
             final ASTCommandLine root = parse(commandLine);
 
             return new CommandLine() {

Propchange: geronimo/gshell/trunk/gshell-rapture/src/main/java/org/apache/geronimo/gshell/rapture/shell/DefaultCommandLineBuilder.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/gshell/trunk/gshell-rapture/src/main/java/org/apache/geronimo/gshell/rapture/shell/DefaultCommandLineBuilder.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: geronimo/gshell/trunk/gshell-rapture/src/main/java/org/apache/geronimo/gshell/rapture/shell/DefaultCommandLineBuilder.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Copied: geronimo/gshell/trunk/gshell-rapture/src/main/java/org/apache/geronimo/gshell/rapture/shell/DefaultCommandLineExecutor.java
(from r670187, geronimo/gshell/trunk/gshell-rapture/src/main/java/org/apache/geronimo/gshell/rapture/DefaultCommandLineExecutor.java)
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-rapture/src/main/java/org/apache/geronimo/gshell/rapture/shell/DefaultCommandLineExecutor.java?p2=geronimo/gshell/trunk/gshell-rapture/src/main/java/org/apache/geronimo/gshell/rapture/shell/DefaultCommandLineExecutor.java&p1=geronimo/gshell/trunk/gshell-rapture/src/main/java/org/apache/geronimo/gshell/rapture/DefaultCommandLineExecutor.java&r1=670187&r2=670207&rev=670207&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-rapture/src/main/java/org/apache/geronimo/gshell/rapture/DefaultCommandLineExecutor.java
(original)
+++ geronimo/gshell/trunk/gshell-rapture/src/main/java/org/apache/geronimo/gshell/rapture/shell/DefaultCommandLineExecutor.java
Sat Jun 21 07:55:47 2008
@@ -17,17 +17,11 @@
  * under the License.
  */
 
-package org.apache.geronimo.gshell.rapture;
+package org.apache.geronimo.gshell.rapture.shell;
 
 import org.apache.geronimo.gshell.application.ApplicationManager;
-import org.apache.geronimo.gshell.application.DefaultVariables;
 import org.apache.geronimo.gshell.chronos.StopWatch;
-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.CommandResult;
-import org.apache.geronimo.gshell.command.Variables;
+import org.apache.geronimo.gshell.command.*;
 import org.apache.geronimo.gshell.commandline.CommandLine;
 import org.apache.geronimo.gshell.commandline.CommandLineBuilder;
 import org.apache.geronimo.gshell.commandline.CommandLineExecutionFailied;
@@ -36,8 +30,8 @@
 import org.apache.geronimo.gshell.io.SystemOutputHijacker;
 import org.apache.geronimo.gshell.notification.ErrorNotification;
 import org.apache.geronimo.gshell.notification.Notification;
-import org.apache.geronimo.gshell.shell.ShellContext;
 import org.apache.geronimo.gshell.util.Arguments;
+import org.apache.geronimo.gshell.rapture.command.DefaultVariables;
 import org.codehaus.plexus.component.annotations.Component;
 import org.codehaus.plexus.component.annotations.Requirement;
 import org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable;
@@ -46,11 +40,7 @@
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.io.PipedInputStream;
-import java.io.PipedOutputStream;
-import java.io.PrintStream;
+import java.io.*;
 import java.util.List;
 import java.util.concurrent.CopyOnWriteArrayList;
 import java.util.concurrent.atomic.AtomicReference;
@@ -75,7 +65,9 @@
     @Requirement
     private CommandLineBuilder commandLineBuilder;
 
-    private ShellContext shellContext;
+    private Variables variables;
+
+    private IO io;
 
     public DefaultCommandLineExecutor() {}
     
@@ -90,7 +82,8 @@
     public void initialize() throws InitializationException {
         assert applicationManager != null;
         
-        this.shellContext = applicationManager.getContext().getEnvironment();
+        this.variables = applicationManager.getContext().getVariables();
+        this.io = applicationManager.getContext().getIo();
     }
 
     public Object execute(final String line) throws Exception {
@@ -126,7 +119,7 @@
 
         log.info("Executing (Object...): [{}]", Arguments.asString(args));
 
-        return execute(String.valueOf(args[0]), Arguments.shift(args), shellContext.getIo());
+        return execute(String.valueOf(args[0]), Arguments.shift(args), io);
     }
 
     public Object execute(final String path, final Object[] args) throws Exception {
@@ -135,7 +128,7 @@
 
         log.info("Executing ({}): [{}]", path, Arguments.asString(args));
 
-        return execute(path, args, shellContext.getIo());
+        return execute(path, args, io);
     }
 
     public Object execute(final Object[][] commands) throws Exception {
@@ -146,17 +139,17 @@
         PipedOutputStream pos = null;
 
         for (int i = 0; i < ios.length; i++) {
-            InputStream is = (i == 0) ? shellContext.getIo().inputStream : new PipedInputStream(pos);
+            InputStream is = (i == 0) ? io.inputStream : new PipedInputStream(pos);
             OutputStream os;
 
             if (i == ios.length - 1) {
-                os = shellContext.getIo().outputStream;
+                os = io.outputStream;
             }
             else {
                 os = pos = new PipedOutputStream();
             }
 
-            ios[i] = new IO(is, new PrintStream(os), shellContext.getIo().errorStream);
+            ios[i] = new IO(is, new PrintStream(os), io.errorStream);
         }
 
         Thread[] threads = new Thread[commands.length];
@@ -222,13 +215,13 @@
     protected Object execute(final String path, final Object[] args, final IO io) throws
Exception {
         log.debug("Executing");
 
-        final Command command = commandResolver.resolve(shellContext, path);
+        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 DefaultVariables(shellContext.getVariables());
+            final Variables vars = new DefaultVariables(variables);
 
             public Object[] getArguments() {
                 return args;
@@ -245,10 +238,6 @@
             public CommandInfo getInfo() {
                 return command.getInfo();
             }
-
-            public ShellContext getShellContext() {
-                return shellContext;
-            }
         };
         
         // Setup command timings

Propchange: geronimo/gshell/trunk/gshell-rapture/src/main/java/org/apache/geronimo/gshell/rapture/shell/DefaultCommandLineExecutor.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/gshell/trunk/gshell-rapture/src/main/java/org/apache/geronimo/gshell/rapture/shell/DefaultCommandLineExecutor.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: geronimo/gshell/trunk/gshell-rapture/src/main/java/org/apache/geronimo/gshell/rapture/shell/DefaultCommandLineExecutor.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Copied: geronimo/gshell/trunk/gshell-rapture/src/main/java/org/apache/geronimo/gshell/rapture/shell/DefaultHistory.java
(from r670155, geronimo/gshell/trunk/gshell-rapture/src/main/java/org/apache/geronimo/gshell/rapture/DefaultHistory.java)
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-rapture/src/main/java/org/apache/geronimo/gshell/rapture/shell/DefaultHistory.java?p2=geronimo/gshell/trunk/gshell-rapture/src/main/java/org/apache/geronimo/gshell/rapture/shell/DefaultHistory.java&p1=geronimo/gshell/trunk/gshell-rapture/src/main/java/org/apache/geronimo/gshell/rapture/DefaultHistory.java&r1=670155&r2=670207&rev=670207&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-rapture/src/main/java/org/apache/geronimo/gshell/rapture/DefaultHistory.java
(original)
+++ geronimo/gshell/trunk/gshell-rapture/src/main/java/org/apache/geronimo/gshell/rapture/shell/DefaultHistory.java
Sat Jun 21 07:55:47 2008
@@ -17,10 +17,11 @@
  * under the License.
  */
 
-package org.apache.geronimo.gshell.rapture;
+package org.apache.geronimo.gshell.rapture.shell;
 
 import jline.History;
 import org.codehaus.plexus.component.annotations.Component;
+import org.apache.geronimo.gshell.rapture.shell.FileHistory;
 
 /**
  * Default implementation of the {@link History} component.

Propchange: geronimo/gshell/trunk/gshell-rapture/src/main/java/org/apache/geronimo/gshell/rapture/shell/DefaultHistory.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/gshell/trunk/gshell-rapture/src/main/java/org/apache/geronimo/gshell/rapture/shell/DefaultHistory.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: geronimo/gshell/trunk/gshell-rapture/src/main/java/org/apache/geronimo/gshell/rapture/shell/DefaultHistory.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Copied: geronimo/gshell/trunk/gshell-rapture/src/main/java/org/apache/geronimo/gshell/rapture/shell/DefaultLayoutManager.java
(from r670155, geronimo/gshell/trunk/gshell-rapture/src/main/java/org/apache/geronimo/gshell/rapture/DefaultLayoutManager.java)
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-rapture/src/main/java/org/apache/geronimo/gshell/rapture/shell/DefaultLayoutManager.java?p2=geronimo/gshell/trunk/gshell-rapture/src/main/java/org/apache/geronimo/gshell/rapture/shell/DefaultLayoutManager.java&p1=geronimo/gshell/trunk/gshell-rapture/src/main/java/org/apache/geronimo/gshell/rapture/DefaultLayoutManager.java&r1=670155&r2=670207&rev=670207&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-rapture/src/main/java/org/apache/geronimo/gshell/rapture/DefaultLayoutManager.java
(original)
+++ geronimo/gshell/trunk/gshell-rapture/src/main/java/org/apache/geronimo/gshell/rapture/shell/DefaultLayoutManager.java
Sat Jun 21 07:55:47 2008
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.apache.geronimo.gshell.rapture;
+package org.apache.geronimo.gshell.rapture.shell;
 
 import org.apache.geronimo.gshell.application.ApplicationManager;
 import org.apache.geronimo.gshell.layout.LayoutManager;
@@ -119,7 +119,7 @@
         else {
             assert applicationManager != null;
             
-            start = (Node) applicationManager.getContext().getEnvironment().getVariables().get(CURRENT_NODE);
+            start = (Node) applicationManager.getContext().getVariables().get(CURRENT_NODE);
 
             if (start == null) {
                 start = layout;

Propchange: geronimo/gshell/trunk/gshell-rapture/src/main/java/org/apache/geronimo/gshell/rapture/shell/DefaultLayoutManager.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/gshell/trunk/gshell-rapture/src/main/java/org/apache/geronimo/gshell/rapture/shell/DefaultLayoutManager.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: geronimo/gshell/trunk/gshell-rapture/src/main/java/org/apache/geronimo/gshell/rapture/shell/DefaultLayoutManager.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Copied: geronimo/gshell/trunk/gshell-rapture/src/main/java/org/apache/geronimo/gshell/rapture/shell/DefaultShell.java
(from r670155, geronimo/gshell/trunk/gshell-rapture/src/main/java/org/apache/geronimo/gshell/rapture/DefaultShell.java)
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-rapture/src/main/java/org/apache/geronimo/gshell/rapture/shell/DefaultShell.java?p2=geronimo/gshell/trunk/gshell-rapture/src/main/java/org/apache/geronimo/gshell/rapture/shell/DefaultShell.java&p1=geronimo/gshell/trunk/gshell-rapture/src/main/java/org/apache/geronimo/gshell/rapture/DefaultShell.java&r1=670155&r2=670207&rev=670207&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-rapture/src/main/java/org/apache/geronimo/gshell/rapture/DefaultShell.java
(original)
+++ geronimo/gshell/trunk/gshell-rapture/src/main/java/org/apache/geronimo/gshell/rapture/shell/DefaultShell.java
Sat Jun 21 07:55:47 2008
@@ -17,12 +17,13 @@
  * under the License.
  */
 
-package org.apache.geronimo.gshell.rapture;
+package org.apache.geronimo.gshell.rapture.shell;
 
 import jline.History;
 import org.apache.geronimo.gshell.ansi.Renderer;
 import org.apache.geronimo.gshell.application.ApplicationContext;
 import org.apache.geronimo.gshell.application.ApplicationManager;
+import org.apache.geronimo.gshell.command.Variables;
 import org.apache.geronimo.gshell.commandline.CommandLineExecutor;
 import org.apache.geronimo.gshell.console.Console;
 import org.apache.geronimo.gshell.console.Console.ErrorHandler;
@@ -32,7 +33,6 @@
 import org.apache.geronimo.gshell.model.application.Branding;
 import org.apache.geronimo.gshell.notification.ErrorNotification;
 import org.apache.geronimo.gshell.notification.ExitNotification;
-import org.apache.geronimo.gshell.shell.ShellContext;
 import org.apache.geronimo.gshell.shell.Shell;
 import org.apache.geronimo.gshell.shell.ShellInfo;
 import org.codehaus.plexus.component.annotations.Component;
@@ -71,7 +71,7 @@
     @Requirement
     private History history;
 
-    private ShellContext shellContext;
+    private Variables variables;
 
     private IO io;
 
@@ -82,7 +82,7 @@
     private ErrorHandler errorHandler;
 
     public DefaultShell() {}
-    
+
     public DefaultShell(final ApplicationManager applicationManager, final ShellInfo shellInfo,
final CommandLineExecutor executor, final History history) {
         assert applicationManager != null;
         assert shellInfo != null;
@@ -95,8 +95,8 @@
         this.history = history;
     }
 
-    public ShellContext getContext() {
-        return shellContext;
+    public Variables getVariables() {
+        return variables;
     }
 
     public ShellInfo getInfo() {
@@ -109,13 +109,13 @@
 
     public void initialize() throws InitializationException {
         assert applicationManager != null;
-        
+
         // Dereference some bits from the applciation context
         ApplicationContext context = applicationManager.getContext();
         this.io = context.getIo();
-        this.shellContext = context.getEnvironment();
+        this.variables = context.getVariables();
         this.branding = context.getApplication().getBranding();
-        
+
         try {
             loadProfileScripts();
         }
@@ -127,7 +127,7 @@
     //
     // Command Execution (all delegates)
     //
-    
+
     public Object execute(final String line) throws Exception {
         return executor.execute(line);
     }
@@ -164,15 +164,15 @@
         Console.Executor executor = new Console.Executor() {
             public Result execute(final String line) throws Exception {
                 assert line != null;
-                
+
                 try {
                     Object result = DefaultShell.this.execute(line);
-                    
+
                     lastResultHolder.set(result);
                 }
                 catch (ExitNotification n) {
                     exitNotifHolder.set(n);
-                    
+
                     return Result.STOP;
                 }
 
@@ -189,7 +189,7 @@
         // Delegate errors for display and then continue
         console.setErrorHandler(getErrorHandler());
 
-        // Hook up a nice history file (we gotta hold on to the history object at some point
so the 'history' command can get to it) 
+        // Hook up a nice history file (we gotta hold on to the history object at some point
so the 'history' command can get to it)
         console.setHistory(history);
 
         // Unless the user wants us to shut up, then display a nice welcome banner
@@ -225,18 +225,20 @@
         }
         return prompter;
     }
-    
+
     public void setPrompter(final Prompter prompter) {
         this.prompter = prompter;
     }
 
     /**
      * Allow subclasses to override the default Prompter implementation used.
+     *
+     * @return Interactive properter.
      */
     protected Prompter createPrompter() {
         return new Prompter() {
             Renderer renderer = new Renderer();
-            
+
             public String prompt() {
                 assert shellInfo != null;
 
@@ -300,7 +302,7 @@
         if (stackTraceProperty != null) {
         	stackTraceFlag = stackTraceProperty.trim().equals("true");
         }
-        
+
         if (io.isDebug()) {
             // If we have debug enabled then skip the fancy bits below, and log the full
error, don't decode shit
             log.debug(error.toString(), error);
@@ -326,7 +328,7 @@
                 //
                 // FIXME: This does not properly display the full exception detail when cause
contains nested exceptions
                 //
-                
+
                 io.err.println(buff);
 
                 buff.setLength(0);

Propchange: geronimo/gshell/trunk/gshell-rapture/src/main/java/org/apache/geronimo/gshell/rapture/shell/DefaultShell.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/gshell/trunk/gshell-rapture/src/main/java/org/apache/geronimo/gshell/rapture/shell/DefaultShell.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: geronimo/gshell/trunk/gshell-rapture/src/main/java/org/apache/geronimo/gshell/rapture/shell/DefaultShell.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Copied: geronimo/gshell/trunk/gshell-rapture/src/main/java/org/apache/geronimo/gshell/rapture/shell/DefaultShellContext.java
(from r670155, geronimo/gshell/trunk/gshell-plugin/src/main/java/org/apache/geronimo/gshell/application/DefaultShellContext.java)
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-rapture/src/main/java/org/apache/geronimo/gshell/rapture/shell/DefaultShellContext.java?p2=geronimo/gshell/trunk/gshell-rapture/src/main/java/org/apache/geronimo/gshell/rapture/shell/DefaultShellContext.java&p1=geronimo/gshell/trunk/gshell-plugin/src/main/java/org/apache/geronimo/gshell/application/DefaultShellContext.java&r1=670155&r2=670207&rev=670207&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-plugin/src/main/java/org/apache/geronimo/gshell/application/DefaultShellContext.java
(original)
+++ geronimo/gshell/trunk/gshell-rapture/src/main/java/org/apache/geronimo/gshell/rapture/shell/DefaultShellContext.java
Sat Jun 21 07:55:47 2008
@@ -17,12 +17,13 @@
  * under the License.
  */
 
-package org.apache.geronimo.gshell.application;
+package org.apache.geronimo.gshell.rapture.shell;
 
 import org.apache.geronimo.gshell.command.Variables;
 import org.apache.geronimo.gshell.yarn.ReflectionToStringBuilder;
 import org.apache.geronimo.gshell.io.IO;
 import org.apache.geronimo.gshell.shell.ShellContext;
+import org.apache.geronimo.gshell.rapture.command.DefaultVariables;
 
 /**
  * Default {@link org.apache.geronimo.gshell.shell.ShellContext} implementation.

Propchange: geronimo/gshell/trunk/gshell-rapture/src/main/java/org/apache/geronimo/gshell/rapture/shell/DefaultShellContext.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/gshell/trunk/gshell-rapture/src/main/java/org/apache/geronimo/gshell/rapture/shell/DefaultShellContext.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: geronimo/gshell/trunk/gshell-rapture/src/main/java/org/apache/geronimo/gshell/rapture/shell/DefaultShellContext.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Copied: geronimo/gshell/trunk/gshell-rapture/src/main/java/org/apache/geronimo/gshell/rapture/shell/DefaultShellInfo.java
(from r670155, geronimo/gshell/trunk/gshell-rapture/src/main/java/org/apache/geronimo/gshell/rapture/DefaultShellInfo.java)
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-rapture/src/main/java/org/apache/geronimo/gshell/rapture/shell/DefaultShellInfo.java?p2=geronimo/gshell/trunk/gshell-rapture/src/main/java/org/apache/geronimo/gshell/rapture/shell/DefaultShellInfo.java&p1=geronimo/gshell/trunk/gshell-rapture/src/main/java/org/apache/geronimo/gshell/rapture/DefaultShellInfo.java&r1=670155&r2=670207&rev=670207&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-rapture/src/main/java/org/apache/geronimo/gshell/rapture/DefaultShellInfo.java
(original)
+++ geronimo/gshell/trunk/gshell-rapture/src/main/java/org/apache/geronimo/gshell/rapture/shell/DefaultShellInfo.java
Sat Jun 21 07:55:47 2008
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.apache.geronimo.gshell.rapture;
+package org.apache.geronimo.gshell.rapture.shell;
 
 import org.apache.geronimo.gshell.shell.ShellInfo;
 import org.codehaus.plexus.component.annotations.Component;

Propchange: geronimo/gshell/trunk/gshell-rapture/src/main/java/org/apache/geronimo/gshell/rapture/shell/DefaultShellInfo.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/gshell/trunk/gshell-rapture/src/main/java/org/apache/geronimo/gshell/rapture/shell/DefaultShellInfo.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: geronimo/gshell/trunk/gshell-rapture/src/main/java/org/apache/geronimo/gshell/rapture/shell/DefaultShellInfo.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Copied: geronimo/gshell/trunk/gshell-rapture/src/main/java/org/apache/geronimo/gshell/rapture/shell/ExecutingVisitor.java
(from r670155, geronimo/gshell/trunk/gshell-rapture/src/main/java/org/apache/geronimo/gshell/rapture/ExecutingVisitor.java)
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-rapture/src/main/java/org/apache/geronimo/gshell/rapture/shell/ExecutingVisitor.java?p2=geronimo/gshell/trunk/gshell-rapture/src/main/java/org/apache/geronimo/gshell/rapture/shell/ExecutingVisitor.java&p1=geronimo/gshell/trunk/gshell-rapture/src/main/java/org/apache/geronimo/gshell/rapture/ExecutingVisitor.java&r1=670155&r2=670207&rev=670207&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-rapture/src/main/java/org/apache/geronimo/gshell/rapture/ExecutingVisitor.java
(original)
+++ geronimo/gshell/trunk/gshell-rapture/src/main/java/org/apache/geronimo/gshell/rapture/shell/ExecutingVisitor.java
Sat Jun 21 07:55:47 2008
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.apache.geronimo.gshell.rapture;
+package org.apache.geronimo.gshell.rapture.shell;
 
 import org.apache.geronimo.gshell.commandline.CommandLineExecutor;
 import org.apache.geronimo.gshell.notification.ErrorNotification;
@@ -29,8 +29,8 @@
 import org.apache.geronimo.gshell.parser.ASTQuotedString;
 import org.apache.geronimo.gshell.parser.CommandLineParserVisitor;
 import org.apache.geronimo.gshell.parser.SimpleNode;
-import org.apache.geronimo.gshell.shell.ShellContext;
 import org.apache.geronimo.gshell.util.Arguments;
+import org.apache.geronimo.gshell.command.Variables;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -47,18 +47,18 @@
 {
     private final Logger log = LoggerFactory.getLogger(getClass());
 
-    private final ShellContext env;
+    private final Variables variables;
     
     private final CommandLineExecutor executor;
 
     private final VariableInterpolator interp = new VariableInterpolator();
 
-    public ExecutingVisitor(final CommandLineExecutor executor, final ShellContext env) {
+    public ExecutingVisitor(final CommandLineExecutor executor, final Variables variables)
{
         assert executor != null;
-        assert env != null;
+        assert variables != null;
 
         this.executor = executor;
-        this.env = env;
+        this.variables = variables;
     }
 
     public Object visit(final SimpleNode node, final Object data) {
@@ -119,7 +119,7 @@
     public Object visit(final ASTQuotedString node, final Object data) {
         assert node != null;
 
-        String value = interp.interpolate(node.getValue(), env.getVariables());
+        String value = interp.interpolate(node.getValue(), variables);
 
         return appendString(value, data);
     }
@@ -127,7 +127,7 @@
     public Object visit(final ASTPlainString node, final Object data) {
         assert node != null;
 
-        String value = interp.interpolate(node.getValue(), env.getVariables());
+        String value = interp.interpolate(node.getValue(), variables);
         
         return appendString(value, data);
     }

Propchange: geronimo/gshell/trunk/gshell-rapture/src/main/java/org/apache/geronimo/gshell/rapture/shell/ExecutingVisitor.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/gshell/trunk/gshell-rapture/src/main/java/org/apache/geronimo/gshell/rapture/shell/ExecutingVisitor.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: geronimo/gshell/trunk/gshell-rapture/src/main/java/org/apache/geronimo/gshell/rapture/shell/ExecutingVisitor.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Copied: geronimo/gshell/trunk/gshell-rapture/src/main/java/org/apache/geronimo/gshell/rapture/shell/FileHistory.java
(from r670155, geronimo/gshell/trunk/gshell-rapture/src/main/java/org/apache/geronimo/gshell/rapture/FileHistory.java)
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-rapture/src/main/java/org/apache/geronimo/gshell/rapture/shell/FileHistory.java?p2=geronimo/gshell/trunk/gshell-rapture/src/main/java/org/apache/geronimo/gshell/rapture/shell/FileHistory.java&p1=geronimo/gshell/trunk/gshell-rapture/src/main/java/org/apache/geronimo/gshell/rapture/FileHistory.java&r1=670155&r2=670207&rev=670207&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-rapture/src/main/java/org/apache/geronimo/gshell/rapture/FileHistory.java
(original)
+++ geronimo/gshell/trunk/gshell-rapture/src/main/java/org/apache/geronimo/gshell/rapture/shell/FileHistory.java
Sat Jun 21 07:55:47 2008
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.apache.geronimo.gshell.rapture;
+package org.apache.geronimo.gshell.rapture.shell;
 
 import jline.History;
 import org.apache.geronimo.gshell.application.ApplicationManager;

Copied: geronimo/gshell/trunk/gshell-rapture/src/main/java/org/apache/geronimo/gshell/rapture/shell/LoggingVisitor.java
(from r670155, geronimo/gshell/trunk/gshell-rapture/src/main/java/org/apache/geronimo/gshell/rapture/LoggingVisitor.java)
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-rapture/src/main/java/org/apache/geronimo/gshell/rapture/shell/LoggingVisitor.java?p2=geronimo/gshell/trunk/gshell-rapture/src/main/java/org/apache/geronimo/gshell/rapture/shell/LoggingVisitor.java&p1=geronimo/gshell/trunk/gshell-rapture/src/main/java/org/apache/geronimo/gshell/rapture/LoggingVisitor.java&r1=670155&r2=670207&rev=670207&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-rapture/src/main/java/org/apache/geronimo/gshell/rapture/LoggingVisitor.java
(original)
+++ geronimo/gshell/trunk/gshell-rapture/src/main/java/org/apache/geronimo/gshell/rapture/shell/LoggingVisitor.java
Sat Jun 21 07:55:47 2008
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.apache.geronimo.gshell.rapture;
+package org.apache.geronimo.gshell.rapture.shell;
 
 import org.apache.geronimo.gshell.parser.ASTCommandLine;
 import org.apache.geronimo.gshell.parser.ASTExpression;

Propchange: geronimo/gshell/trunk/gshell-rapture/src/main/java/org/apache/geronimo/gshell/rapture/shell/LoggingVisitor.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/gshell/trunk/gshell-rapture/src/main/java/org/apache/geronimo/gshell/rapture/shell/LoggingVisitor.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: geronimo/gshell/trunk/gshell-rapture/src/main/java/org/apache/geronimo/gshell/rapture/shell/LoggingVisitor.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Copied: geronimo/gshell/trunk/gshell-rapture/src/main/java/org/apache/geronimo/gshell/rapture/shell/VariableInterpolator.java
(from r670155, geronimo/gshell/trunk/gshell-rapture/src/main/java/org/apache/geronimo/gshell/rapture/VariableInterpolator.java)
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-rapture/src/main/java/org/apache/geronimo/gshell/rapture/shell/VariableInterpolator.java?p2=geronimo/gshell/trunk/gshell-rapture/src/main/java/org/apache/geronimo/gshell/rapture/shell/VariableInterpolator.java&p1=geronimo/gshell/trunk/gshell-rapture/src/main/java/org/apache/geronimo/gshell/rapture/VariableInterpolator.java&r1=670155&r2=670207&rev=670207&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-rapture/src/main/java/org/apache/geronimo/gshell/rapture/VariableInterpolator.java
(original)
+++ geronimo/gshell/trunk/gshell-rapture/src/main/java/org/apache/geronimo/gshell/rapture/shell/VariableInterpolator.java
Sat Jun 21 07:55:47 2008
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.apache.geronimo.gshell.rapture;
+package org.apache.geronimo.gshell.rapture.shell;
 
 import org.apache.commons.jexl.Expression;
 import org.apache.commons.jexl.ExpressionFactory;

Propchange: geronimo/gshell/trunk/gshell-rapture/src/main/java/org/apache/geronimo/gshell/rapture/shell/VariableInterpolator.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/gshell/trunk/gshell-rapture/src/main/java/org/apache/geronimo/gshell/rapture/shell/VariableInterpolator.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: geronimo/gshell/trunk/gshell-rapture/src/main/java/org/apache/geronimo/gshell/rapture/shell/VariableInterpolator.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Copied: geronimo/gshell/trunk/gshell-rapture/src/test/java/org/apache/geronimo/gshell/rapture/builder/ShellBuilderTest.java
(from r670155, geronimo/gshell/trunk/gshell-plugin/src/test/java/org/apache/geronimo/gshell/builder/ShellBuilderTest.java)
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-rapture/src/test/java/org/apache/geronimo/gshell/rapture/builder/ShellBuilderTest.java?p2=geronimo/gshell/trunk/gshell-rapture/src/test/java/org/apache/geronimo/gshell/rapture/builder/ShellBuilderTest.java&p1=geronimo/gshell/trunk/gshell-plugin/src/test/java/org/apache/geronimo/gshell/builder/ShellBuilderTest.java&r1=670155&r2=670207&rev=670207&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-plugin/src/test/java/org/apache/geronimo/gshell/builder/ShellBuilderTest.java
(original)
+++ geronimo/gshell/trunk/gshell-rapture/src/test/java/org/apache/geronimo/gshell/rapture/builder/ShellBuilderTest.java
Sat Jun 21 07:55:47 2008
@@ -17,19 +17,19 @@
  * under the License.
  */
 
-package org.apache.geronimo.gshell.builder;
+package org.apache.geronimo.gshell.rapture.builder;
 
 import junit.framework.TestCase;
 import org.apache.geronimo.gshell.model.application.Application;
 import org.apache.geronimo.gshell.model.application.ApplicationMarshaller;
 import org.apache.geronimo.gshell.model.settings.Settings;
 import org.apache.geronimo.gshell.model.settings.SettingsMarshaller;
-import org.apache.geronimo.gshell.builder.ShellBuilder;
+import org.apache.geronimo.gshell.rapture.builder.ShellBuilder;
 
 import java.net.URL;
 
 /**
- * Unit tests for the {@link ShellBuilder} class.
+ * Unit tests for the {@link org.apache.geronimo.gshell.rapture.builder.ShellBuilder} class.
  *
  * @version $Rev$ $Date$
  */

Propchange: geronimo/gshell/trunk/gshell-rapture/src/test/java/org/apache/geronimo/gshell/rapture/builder/ShellBuilderTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/gshell/trunk/gshell-rapture/src/test/java/org/apache/geronimo/gshell/rapture/builder/ShellBuilderTest.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: geronimo/gshell/trunk/gshell-rapture/src/test/java/org/apache/geronimo/gshell/rapture/builder/ShellBuilderTest.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Copied: geronimo/gshell/trunk/gshell-rapture/src/test/java/org/apache/geronimo/gshell/rapture/command/DefaultVariablesTest.java
(from r670155, geronimo/gshell/trunk/gshell-plugin/src/test/java/org/apache/geronimo/gshell/application/DefaultVariablesTest.java)
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-rapture/src/test/java/org/apache/geronimo/gshell/rapture/command/DefaultVariablesTest.java?p2=geronimo/gshell/trunk/gshell-rapture/src/test/java/org/apache/geronimo/gshell/rapture/command/DefaultVariablesTest.java&p1=geronimo/gshell/trunk/gshell-plugin/src/test/java/org/apache/geronimo/gshell/application/DefaultVariablesTest.java&r1=670155&r2=670207&rev=670207&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-plugin/src/test/java/org/apache/geronimo/gshell/application/DefaultVariablesTest.java
(original)
+++ geronimo/gshell/trunk/gshell-rapture/src/test/java/org/apache/geronimo/gshell/rapture/command/DefaultVariablesTest.java
Sat Jun 21 07:55:47 2008
@@ -17,10 +17,11 @@
  * under the License.
  */
 
-package org.apache.geronimo.gshell.application;
+package org.apache.geronimo.gshell.rapture.command;
 
 import junit.framework.TestCase;
 import org.apache.geronimo.gshell.command.Variables;
+import org.apache.geronimo.gshell.rapture.command.DefaultVariables;
 
 import java.util.Iterator;
 

Propchange: geronimo/gshell/trunk/gshell-rapture/src/test/java/org/apache/geronimo/gshell/rapture/command/DefaultVariablesTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/gshell/trunk/gshell-rapture/src/test/java/org/apache/geronimo/gshell/rapture/command/DefaultVariablesTest.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: geronimo/gshell/trunk/gshell-rapture/src/test/java/org/apache/geronimo/gshell/rapture/command/DefaultVariablesTest.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Propchange: geronimo/gshell/trunk/gshell-rapture/src/test/resources/org/apache/geronimo/gshell/rapture/builder/application1.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/gshell/trunk/gshell-rapture/src/test/resources/org/apache/geronimo/gshell/rapture/builder/application1.xml
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: geronimo/gshell/trunk/gshell-rapture/src/test/resources/org/apache/geronimo/gshell/rapture/builder/application1.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Propchange: geronimo/gshell/trunk/gshell-rapture/src/test/resources/org/apache/geronimo/gshell/rapture/builder/settings1.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/gshell/trunk/gshell-rapture/src/test/resources/org/apache/geronimo/gshell/rapture/builder/settings1.xml
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: geronimo/gshell/trunk/gshell-rapture/src/test/resources/org/apache/geronimo/gshell/rapture/builder/settings1.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Modified: geronimo/gshell/trunk/gshell-remote/gshell-remote-client/src/main/java/org/apache/geronimo/gshell/remote/client/proxy/RemoteShellProxy.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-remote/gshell-remote-client/src/main/java/org/apache/geronimo/gshell/remote/client/proxy/RemoteShellProxy.java?rev=670207&r1=670206&r2=670207&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-remote/gshell-remote-client/src/main/java/org/apache/geronimo/gshell/remote/client/proxy/RemoteShellProxy.java
(original)
+++ geronimo/gshell/trunk/gshell-remote/gshell-remote-client/src/main/java/org/apache/geronimo/gshell/remote/client/proxy/RemoteShellProxy.java
Sat Jun 21 07:55:47 2008
@@ -20,6 +20,7 @@
 package org.apache.geronimo.gshell.remote.client.proxy;
 
 import org.apache.geronimo.gshell.ansi.Renderer;
+import org.apache.geronimo.gshell.command.Variables;
 import org.apache.geronimo.gshell.console.Console;
 import org.apache.geronimo.gshell.console.JLineConsole;
 import org.apache.geronimo.gshell.io.IO;
@@ -27,7 +28,6 @@
 import org.apache.geronimo.gshell.remote.RemoteShell;
 import org.apache.geronimo.gshell.remote.client.RshClient;
 import org.apache.geronimo.gshell.shell.Shell;
-import org.apache.geronimo.gshell.shell.ShellContext;
 import org.apache.geronimo.gshell.shell.ShellInfo;
 import org.apache.geronimo.gshell.whisper.stream.StreamFeeder;
 import org.slf4j.Logger;
@@ -89,10 +89,10 @@
         return true;
     }
 
-    public ShellContext getContext() {
+    public Variables getVariables() {
         ensureOpened();
 
-        return context;
+        return context.getVariables();
     }
 
     public ShellInfo getInfo() {

Modified: geronimo/gshell/trunk/gshell-remote/gshell-remote-server/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-remote/gshell-remote-server/pom.xml?rev=670207&r1=670206&r2=670207&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-remote/gshell-remote-server/pom.xml (original)
+++ geronimo/gshell/trunk/gshell-remote/gshell-remote-server/pom.xml Sat Jun 21 07:55:47 2008
@@ -60,7 +60,7 @@
         
         <dependency>
             <groupId>org.apache.geronimo.gshell</groupId>
-            <artifactId>gshell-plugin</artifactId>
+            <artifactId>gshell-rapture</artifactId>
         </dependency>
     </dependencies>
 

Modified: geronimo/gshell/trunk/gshell-remote/gshell-remote-server/src/main/java/org/apache/geronimo/gshell/remote/server/DefaultRemoteShell.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-remote/gshell-remote-server/src/main/java/org/apache/geronimo/gshell/remote/server/DefaultRemoteShell.java?rev=670207&r1=670206&r2=670207&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-remote/gshell-remote-server/src/main/java/org/apache/geronimo/gshell/remote/server/DefaultRemoteShell.java
(original)
+++ geronimo/gshell/trunk/gshell-remote/gshell-remote-server/src/main/java/org/apache/geronimo/gshell/remote/server/DefaultRemoteShell.java
Sat Jun 21 07:55:47 2008
@@ -23,6 +23,7 @@
 import org.apache.geronimo.gshell.remote.RemoteShell;
 import org.apache.geronimo.gshell.shell.ShellContext;
 import org.apache.geronimo.gshell.shell.ShellInfo;
+import org.apache.geronimo.gshell.command.Variables;
 import org.codehaus.plexus.component.annotations.Component;
 import org.codehaus.plexus.component.annotations.Requirement;
 import org.slf4j.Logger;
@@ -84,10 +85,10 @@
         return false;
     }
 
-    public ShellContext getContext() {
+    public Variables getVariables() {
         ensureOpened();
         
-        return context;
+        return context.getVariables();
     }
 
     public ShellInfo getInfo() {

Modified: geronimo/gshell/trunk/gshell-remote/gshell-remote-server/src/main/java/org/apache/geronimo/gshell/remote/server/handler/OpenShellHandler.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-remote/gshell-remote-server/src/main/java/org/apache/geronimo/gshell/remote/server/handler/OpenShellHandler.java?rev=670207&r1=670206&r2=670207&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-remote/gshell-remote-server/src/main/java/org/apache/geronimo/gshell/remote/server/handler/OpenShellHandler.java
(original)
+++ geronimo/gshell/trunk/gshell-remote/gshell-remote-server/src/main/java/org/apache/geronimo/gshell/remote/server/handler/OpenShellHandler.java
Sat Jun 21 07:55:47 2008
@@ -19,13 +19,13 @@
 
 package org.apache.geronimo.gshell.remote.server.handler;
 
-import org.apache.geronimo.gshell.application.DefaultShellContext;
 import org.apache.geronimo.gshell.remote.RemoteShell;
 import org.apache.geronimo.gshell.remote.message.EchoMessage;
 import org.apache.geronimo.gshell.remote.message.OpenShellMessage;
 import org.apache.geronimo.gshell.remote.server.RemoteIO;
 import org.apache.geronimo.gshell.remote.server.RemoteShellContainer;
 import org.apache.geronimo.gshell.whisper.transport.Session;
+import org.apache.geronimo.gshell.rapture.shell.DefaultShellContext;
 import org.codehaus.plexus.PlexusContainer;
 import org.codehaus.plexus.classworlds.ClassWorld;
 import org.codehaus.plexus.component.annotations.Component;

Modified: geronimo/gshell/trunk/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/pom.xml?rev=670207&r1=670206&r2=670207&view=diff
==============================================================================
--- geronimo/gshell/trunk/pom.xml (original)
+++ geronimo/gshell/trunk/pom.xml Sat Jun 21 07:55:47 2008
@@ -135,6 +135,10 @@
                         <groupId>junit</groupId>
                         <artifactId>junit</artifactId>
                     </exclusion>
+                    <exclusion>
+                        <groupId>commons-logging</groupId>
+                        <artifactId>commons-logging-api</artifactId>
+                    </exclusion>
                 </exclusions>
             </dependency>
 



Mime
View raw message