You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by jd...@apache.org on 2008/06/20 16:10:47 UTC

svn commit: r669903 [1/2] - in /geronimo/gshell/trunk: gshell-api/src/main/java/org/apache/geronimo/gshell/command/ gshell-api/src/main/java/org/apache/geronimo/gshell/notification/ gshell-api/src/main/java/org/apache/geronimo/gshell/shell/ gshell-plug...

Author: jdillon
Date: Fri Jun 20 07:10:47 2008
New Revision: 669903

URL: http://svn.apache.org/viewvc?rev=669903&view=rev
Log:
Add more javadoc, clean up naming muck

Modified:
    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/CommandException.java
    geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/notification/ErrorNotification.java
    geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/notification/ExitNotification.java
    geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/notification/Notification.java
    geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/shell/Shell.java
    geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/shell/ShellContext.java
    geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/shell/ShellFactory.java
    geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/shell/ShellInfo.java
    geronimo/gshell/trunk/gshell-plugin/src/main/java/org/apache/geronimo/gshell/application/DefaultShellContext.java
    geronimo/gshell/trunk/gshell-rapture/src/main/java/org/apache/geronimo/gshell/rapture/DefaultCommandLineExecutor.java
    geronimo/gshell/trunk/gshell-remote/gshell-remote-client/src/main/java/org/apache/geronimo/gshell/remote/client/proxy/RemoteShellContextProxy.java
    geronimo/gshell/trunk/src/uml/GShell.mdxml

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=669903&r1=669902&r2=669903&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 Fri Jun 20 07:10:47 2008
@@ -31,28 +31,28 @@
     /**
      * Provides access to the arguments to the command.
      *
-     * @return The command arguments.
+     * @return The command arguments; never null.
      */
     Object[] getArguments();
 
     /**
      * The Input/Output context for the command.
      *
-     * @return Command Input/Output context.
+     * @return Command Input/Output context; never null.
      */
     IO getIo();
 
     /**
      * The variables for the command.
      *
-     * @return Command variables.
+     * @return Command variables; never null.
      */
     Variables getVariables();
 
     /**
      * Provides details about the runtime configuration of the command.
      *
-     * @return Command runtime information.
+     * @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/CommandException.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/command/CommandException.java?rev=669903&r1=669902&r2=669903&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/command/CommandException.java (original)
+++ geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/command/CommandException.java Fri Jun 20 07:10:47 2008
@@ -27,8 +27,6 @@
 public class CommandException
     extends Exception
 {
-    ///CLOVER:OFF
-    
     public CommandException(final String msg) {
         super(msg);
     }

Modified: geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/notification/ErrorNotification.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/notification/ErrorNotification.java?rev=669903&r1=669902&r2=669903&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/notification/ErrorNotification.java (original)
+++ geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/notification/ErrorNotification.java Fri Jun 20 07:10:47 2008
@@ -24,11 +24,9 @@
  *
  * @version $Rev$ $Date$
  */
-public class ErrorNotification
+public final class ErrorNotification
     extends Notification
 {
-    ///CLOVER:OFF
-
     public ErrorNotification(final String msg) {
         super(msg);
     }

Modified: geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/notification/ExitNotification.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/notification/ExitNotification.java?rev=669903&r1=669902&r2=669903&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/notification/ExitNotification.java (original)
+++ geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/notification/ExitNotification.java Fri Jun 20 07:10:47 2008
@@ -24,11 +24,9 @@
  *
  * @version $Rev$ $Date$
  */
-public class ExitNotification
+public final class ExitNotification
     extends Notification
 {
-    ///CLOVER:OFF
-
     public static final int DEFAULT_CODE = 0;
 
     public static final int ERROR_CODE = 1;

Modified: geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/notification/Notification.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/notification/Notification.java?rev=669903&r1=669902&r2=669903&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/notification/Notification.java (original)
+++ geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/notification/Notification.java Fri Jun 20 07:10:47 2008
@@ -30,8 +30,6 @@
 public abstract class Notification
     extends Error
 {
-    ///CLOVER:OFF
-
     public Notification(final String msg, final Throwable cause) {
         super(msg, cause);
     }

Modified: geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/shell/Shell.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/shell/Shell.java?rev=669903&r1=669902&r2=669903&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/shell/Shell.java (original)
+++ geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/shell/Shell.java Fri Jun 20 07:10:47 2008
@@ -54,7 +54,8 @@
      * Run the shell iteractivly.
      *
      * @param args  The initial commands to execute iteractivly.
-     * @throws Exception    Failed to execute commands.
+     *
+     * @throws Exception                        Failed to execute commands.
      * @throws UnsupportedOperationException    The shell does not support iteractive execution.
      */
     void run(Object... args) throws UnsupportedOperationException, Exception;

Modified: geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/shell/ShellContext.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/shell/ShellContext.java?rev=669903&r1=669902&r2=669903&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/shell/ShellContext.java (original)
+++ geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/shell/ShellContext.java Fri Jun 20 07:10:47 2008
@@ -29,7 +29,17 @@
  */
 public interface ShellContext
 {
-    IO getIO();
+    /**
+     * Provides access to the input/output streams for the shell.
+     *
+     * @return  Shell input/output streams.
+     */
+    IO getIo();
 
+    /**
+     * Provides access to the variables for the shell.
+     *
+     * @return  Shell variables.
+     */
     Variables getVariables();
 }
\ No newline at end of file

Modified: geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/shell/ShellFactory.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/shell/ShellFactory.java?rev=669903&r1=669902&r2=669903&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/shell/ShellFactory.java (original)
+++ geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/shell/ShellFactory.java Fri Jun 20 07:10:47 2008
@@ -30,6 +30,7 @@
      * Create a new shell instance.
      *
      * @return  A new shell instance.
+     * 
      * @throws Exception    Failed to create shell instance.
      */
     Shell create() throws Exception;

Modified: geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/shell/ShellInfo.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/shell/ShellInfo.java?rev=669903&r1=669902&r2=669903&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/shell/ShellInfo.java (original)
+++ geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/shell/ShellInfo.java Fri Jun 20 07:10:47 2008
@@ -32,21 +32,21 @@
     /**
      * Returns the home directory of the shell.
      *
-     * @return  Shell home directory.
+     * @return  Shell home directory; never null;
      */
     File getHomeDir();
 
     /**
      * Returns the local IP address of the shell.
      *
-     * @return  The local IP address of the shell.
+     * @return  The local IP address of the shell; never null;
      */
     InetAddress getLocalHost();
 
     /**
      * Returns the name of the current user.
      *
-     * @return  The current user name.
+     * @return  The current user name; never null;
      */
     String getUserName();
 }
\ No newline at end of file

Modified: 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-plugin/src/main/java/org/apache/geronimo/gshell/application/DefaultShellContext.java?rev=669903&r1=669902&r2=669903&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-plugin/src/main/java/org/apache/geronimo/gshell/application/DefaultShellContext.java (original)
+++ geronimo/gshell/trunk/gshell-plugin/src/main/java/org/apache/geronimo/gshell/application/DefaultShellContext.java Fri Jun 20 07:10:47 2008
@@ -50,7 +50,7 @@
         this(io, new DefaultVariables());
     }
 
-    public IO getIO() {
+    public IO getIo() {
         return io;
     }
 

Modified: 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/DefaultCommandLineExecutor.java?rev=669903&r1=669902&r2=669903&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/DefaultCommandLineExecutor.java Fri Jun 20 07:10:47 2008
@@ -138,7 +138,7 @@
 
         log.info("Executing (Object...): [{}]", Arguments.asString(args));
 
-        return execute(String.valueOf(args[0]), Arguments.shift(args), env.getIO());
+        return execute(String.valueOf(args[0]), Arguments.shift(args), env.getIo());
     }
 
     public Object execute(final String path, final Object[] args) throws Exception {
@@ -147,7 +147,7 @@
 
         log.info("Executing ({}): [{}]", path, Arguments.asString(args));
 
-        return execute(path, args, env.getIO());
+        return execute(path, args, env.getIo());
     }
 
     public Object execute(final Object[][] commands) throws Exception {
@@ -158,17 +158,17 @@
         PipedOutputStream pos = null;
 
         for (int i = 0; i < ios.length; i++) {
-            InputStream is = (i == 0) ? env.getIO().inputStream : new PipedInputStream(pos);
+            InputStream is = (i == 0) ? env.getIo().inputStream : new PipedInputStream(pos);
             OutputStream os;
 
             if (i == ios.length - 1) {
-                os = env.getIO().outputStream;
+                os = env.getIo().outputStream;
             }
             else {
                 os = pos = new PipedOutputStream();
             }
 
-            ios[i] = new IO(is, new PrintStream(os), env.getIO().errorStream);
+            ios[i] = new IO(is, new PrintStream(os), env.getIo().errorStream);
         }
 
         Thread[] threads = new Thread[commands.length];

Modified: geronimo/gshell/trunk/gshell-remote/gshell-remote-client/src/main/java/org/apache/geronimo/gshell/remote/client/proxy/RemoteShellContextProxy.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/RemoteShellContextProxy.java?rev=669903&r1=669902&r2=669903&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-remote/gshell-remote-client/src/main/java/org/apache/geronimo/gshell/remote/client/proxy/RemoteShellContextProxy.java (original)
+++ geronimo/gshell/trunk/gshell-remote/gshell-remote-client/src/main/java/org/apache/geronimo/gshell/remote/client/proxy/RemoteShellContextProxy.java Fri Jun 20 07:10:47 2008
@@ -40,7 +40,7 @@
         this.client = client;
     }
 
-    public IO getIO() {
+    public IO getIo() {
         return null;  //To change body of implemented methods use File | Settings | File Templates.
     }