geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdil...@apache.org
Subject svn commit: r407915 - in /geronimo/sandbox/gshell/trunk: gshell-cli/src/main/java/org/apache/geronimo/gshell/cli/ gshell-commands/standard-commands/src/main/resources/META-INF/org.apache.geronimo.gshell.command/ gshell-core/src/main/java/org/apache/ger...
Date Fri, 19 May 2006 21:34:33 GMT
Author: jdillon
Date: Fri May 19 14:34:32 2006
New Revision: 407915

URL: http://svn.apache.org/viewvc?rev=407915&view=rev
Log:
Starting to play with ResourceFinder (which kicks ass)

Added:
    geronimo/sandbox/gshell/trunk/gshell-commands/standard-commands/src/main/resources/META-INF/org.apache.geronimo.gshell.command/
    geronimo/sandbox/gshell/trunk/gshell-commands/standard-commands/src/main/resources/META-INF/org.apache.geronimo.gshell.command/cat.properties
    geronimo/sandbox/gshell/trunk/gshell-commands/standard-commands/src/main/resources/META-INF/org.apache.geronimo.gshell.command/echo.properties
    geronimo/sandbox/gshell/trunk/gshell-commands/standard-commands/src/main/resources/META-INF/org.apache.geronimo.gshell.command/exit.properties
    geronimo/sandbox/gshell/trunk/gshell-commands/standard-commands/src/main/resources/META-INF/org.apache.geronimo.gshell.command/help.properties
    geronimo/sandbox/gshell/trunk/gshell-commands/standard-commands/src/main/resources/META-INF/org.apache.geronimo.gshell.command/java.properties
    geronimo/sandbox/gshell/trunk/gshell-commands/standard-commands/src/main/resources/META-INF/org.apache.geronimo.gshell.command/set.properties
    geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/command/CommandManager.java
Modified:
    geronimo/sandbox/gshell/trunk/gshell-cli/src/main/java/org/apache/geronimo/gshell/cli/Main.java

Modified: geronimo/sandbox/gshell/trunk/gshell-cli/src/main/java/org/apache/geronimo/gshell/cli/Main.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-cli/src/main/java/org/apache/geronimo/gshell/cli/Main.java?rev=407915&r1=407914&r2=407915&view=diff
==============================================================================
--- geronimo/sandbox/gshell/trunk/gshell-cli/src/main/java/org/apache/geronimo/gshell/cli/Main.java
(original)
+++ geronimo/sandbox/gshell/trunk/gshell-cli/src/main/java/org/apache/geronimo/gshell/cli/Main.java
Fri May 19 14:34:32 2006
@@ -26,6 +26,7 @@
 import org.apache.commons.cli.HelpFormatter;
 
 import org.apache.geronimo.gshell.GShell;
+import org.apache.geronimo.gshell.command.CommandManager;
 import org.apache.geronimo.gshell.console.IO;
 import org.apache.geronimo.gshell.console.InteractiveConsole;
 import org.apache.geronimo.gshell.console.SimpleConsole;

Added: geronimo/sandbox/gshell/trunk/gshell-commands/standard-commands/src/main/resources/META-INF/org.apache.geronimo.gshell.command/cat.properties
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-commands/standard-commands/src/main/resources/META-INF/org.apache.geronimo.gshell.command/cat.properties?rev=407915&view=auto
==============================================================================
--- geronimo/sandbox/gshell/trunk/gshell-commands/standard-commands/src/main/resources/META-INF/org.apache.geronimo.gshell.command/cat.properties
(added)
+++ geronimo/sandbox/gshell/trunk/gshell-commands/standard-commands/src/main/resources/META-INF/org.apache.geronimo.gshell.command/cat.properties
Fri May 19 14:34:32 2006
@@ -0,0 +1,11 @@
+##
+## $Id$
+##
+
+class=org.apache.geronimo.gshell.commands.standard.CatCommand
+
+name=cat
+
+aliases=concat,print
+
+category=standard

Added: geronimo/sandbox/gshell/trunk/gshell-commands/standard-commands/src/main/resources/META-INF/org.apache.geronimo.gshell.command/echo.properties
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-commands/standard-commands/src/main/resources/META-INF/org.apache.geronimo.gshell.command/echo.properties?rev=407915&view=auto
==============================================================================
--- geronimo/sandbox/gshell/trunk/gshell-commands/standard-commands/src/main/resources/META-INF/org.apache.geronimo.gshell.command/echo.properties
(added)
+++ geronimo/sandbox/gshell/trunk/gshell-commands/standard-commands/src/main/resources/META-INF/org.apache.geronimo.gshell.command/echo.properties
Fri May 19 14:34:32 2006
@@ -0,0 +1,11 @@
+##
+## $Id$
+##
+
+class=org.apache.geronimo.gshell.commands.standard.EchoCommand
+
+name=echo
+
+#aliases=
+
+category=standard

Added: geronimo/sandbox/gshell/trunk/gshell-commands/standard-commands/src/main/resources/META-INF/org.apache.geronimo.gshell.command/exit.properties
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-commands/standard-commands/src/main/resources/META-INF/org.apache.geronimo.gshell.command/exit.properties?rev=407915&view=auto
==============================================================================
--- geronimo/sandbox/gshell/trunk/gshell-commands/standard-commands/src/main/resources/META-INF/org.apache.geronimo.gshell.command/exit.properties
(added)
+++ geronimo/sandbox/gshell/trunk/gshell-commands/standard-commands/src/main/resources/META-INF/org.apache.geronimo.gshell.command/exit.properties
Fri May 19 14:34:32 2006
@@ -0,0 +1,11 @@
+##
+## $Id$
+##
+
+class=org.apache.geronimo.gshell.commands.standard.ExitCommand
+
+name=exit
+
+aliases=quit,bye
+
+category=standard

Added: geronimo/sandbox/gshell/trunk/gshell-commands/standard-commands/src/main/resources/META-INF/org.apache.geronimo.gshell.command/help.properties
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-commands/standard-commands/src/main/resources/META-INF/org.apache.geronimo.gshell.command/help.properties?rev=407915&view=auto
==============================================================================
--- geronimo/sandbox/gshell/trunk/gshell-commands/standard-commands/src/main/resources/META-INF/org.apache.geronimo.gshell.command/help.properties
(added)
+++ geronimo/sandbox/gshell/trunk/gshell-commands/standard-commands/src/main/resources/META-INF/org.apache.geronimo.gshell.command/help.properties
Fri May 19 14:34:32 2006
@@ -0,0 +1,11 @@
+##
+## $Id$
+##
+
+class=org.apache.geronimo.gshell.commands.standard.HelpCommand
+
+name=help
+
+#aliases=
+
+category=standard

Added: geronimo/sandbox/gshell/trunk/gshell-commands/standard-commands/src/main/resources/META-INF/org.apache.geronimo.gshell.command/java.properties
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-commands/standard-commands/src/main/resources/META-INF/org.apache.geronimo.gshell.command/java.properties?rev=407915&view=auto
==============================================================================
--- geronimo/sandbox/gshell/trunk/gshell-commands/standard-commands/src/main/resources/META-INF/org.apache.geronimo.gshell.command/java.properties
(added)
+++ geronimo/sandbox/gshell/trunk/gshell-commands/standard-commands/src/main/resources/META-INF/org.apache.geronimo.gshell.command/java.properties
Fri May 19 14:34:32 2006
@@ -0,0 +1,11 @@
+##
+## $Id$
+##
+
+class=org.apache.geronimo.gshell.commands.standard.JavaCommand
+
+name=java
+
+#aliases=
+
+category=standard

Added: geronimo/sandbox/gshell/trunk/gshell-commands/standard-commands/src/main/resources/META-INF/org.apache.geronimo.gshell.command/set.properties
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-commands/standard-commands/src/main/resources/META-INF/org.apache.geronimo.gshell.command/set.properties?rev=407915&view=auto
==============================================================================
--- geronimo/sandbox/gshell/trunk/gshell-commands/standard-commands/src/main/resources/META-INF/org.apache.geronimo.gshell.command/set.properties
(added)
+++ geronimo/sandbox/gshell/trunk/gshell-commands/standard-commands/src/main/resources/META-INF/org.apache.geronimo.gshell.command/set.properties
Fri May 19 14:34:32 2006
@@ -0,0 +1,11 @@
+##
+## $Id$
+##
+
+class=org.apache.geronimo.gshell.commands.standard.SetCommand
+
+name=set
+
+#aliases=
+
+category=standard

Added: geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/command/CommandManager.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/command/CommandManager.java?rev=407915&view=auto
==============================================================================
--- geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/command/CommandManager.java
(added)
+++ geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/command/CommandManager.java
Fri May 19 14:34:32 2006
@@ -0,0 +1,55 @@
+/*
+ * Copyright 2006 The Apache Software Foundation
+ *
+ * Licensed 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.command;
+
+import org.apache.xbean.finder.ResourceFinder;
+
+import java.io.IOException;
+import java.util.Properties;
+import java.util.Iterator;
+import java.util.Map;
+
+/**
+ * ???
+ *
+ * @version $Id: Command.java 407908 2006-05-19 13:47:49 -0700 (Fri, 19 May 2006) jdillon
$
+ */
+public class CommandManager
+{
+    public CommandManager() throws IOException {
+        ResourceFinder resourceFinder = new ResourceFinder("META-INF/");
+
+        Map<String, Properties> propertiesMap = resourceFinder.mapAllProperties("org.apache.geronimo.gshell.command");
+        Iterator<String> iter = propertiesMap.keySet().iterator();
+
+        while (iter.hasNext()) {
+            String name = iter.next();
+            Properties props = propertiesMap.get(name);
+            System.err.println("name: " + name);
+            System.err.println(props);
+            System.err.println("----");
+        }
+    }
+
+    //
+    // HACK: Testing...
+    //
+
+    public static void main(final String[] args) throws Exception {
+        new CommandManager();
+    }
+}



Mime
View raw message