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 2007/09/11 11:03:05 UTC

svn commit: r574515 - in /geronimo/sandbox/gshell/trunk: gshell-cli/src/main/resources/META-INF/plexus/ gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/ gshell-core/src/main/java/org/apache/geronimo/gshell/lay...

Author: jdillon
Date: Tue Sep 11 02:03:04 2007
New Revision: 574515

URL: http://svn.apache.org/viewvc?rev=574515&view=rev
Log:
Rename PluginCollector to CommandRegistry

Added:
    geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/plugin/CommandRegistry.java   (contents, props changed)
      - copied, changed from r574492, geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/plugin/PluginCollector.java
Removed:
    geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/plugin/PluginCollector.java
Modified:
    geronimo/sandbox/gshell/trunk/gshell-cli/src/main/resources/META-INF/plexus/plexus.xml
    geronimo/sandbox/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/HelpCommand.java
    geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/layout/DefaultLayoutManager.java

Modified: geronimo/sandbox/gshell/trunk/gshell-cli/src/main/resources/META-INF/plexus/plexus.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-cli/src/main/resources/META-INF/plexus/plexus.xml?rev=574515&r1=574514&r2=574515&view=diff
==============================================================================
--- geronimo/sandbox/gshell/trunk/gshell-cli/src/main/resources/META-INF/plexus/plexus.xml (original)
+++ geronimo/sandbox/gshell/trunk/gshell-cli/src/main/resources/META-INF/plexus/plexus.xml Tue Sep 11 02:03:04 2007
@@ -24,7 +24,7 @@
     <component-discoverer-manager implementation="org.codehaus.plexus.component.discovery.DefaultComponentDiscovererManager">
         <listeners>
             <listener implementation="org.codehaus.plexus.component.discovery.DiscoveryListenerDescriptor">
-                <role>org.apache.geronimo.gshell.plugin.PluginCollector</role>
+                <role>org.apache.geronimo.gshell.plugin.CommandRegistry</role>
                 <role-hint>default</role-hint>
             </listener>
         </listeners>
@@ -64,9 +64,9 @@
         Configure the collector, needs to be done here since we are using it above as a discovery listener.
         -->
         <component>
-            <role>org.apache.geronimo.gshell.plugin.PluginCollector</role>
+            <role>org.apache.geronimo.gshell.plugin.CommandRegistry</role>
             <role-hint>default</role-hint>
-            <implementation>org.apache.geronimo.gshell.plugin.PluginCollector</implementation>
+            <implementation>org.apache.geronimo.gshell.plugin.CommandRegistry</implementation>
         </component>
         
         <!--

Modified: geronimo/sandbox/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/HelpCommand.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/HelpCommand.java?rev=574515&r1=574514&r2=574515&view=diff
==============================================================================
--- geronimo/sandbox/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/HelpCommand.java (original)
+++ geronimo/sandbox/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/HelpCommand.java Tue Sep 11 02:03:04 2007
@@ -28,7 +28,7 @@
 import org.apache.geronimo.gshell.command.descriptor.CommandDescriptor;
 import org.apache.geronimo.gshell.branding.Branding;
 import org.apache.geronimo.gshell.layout.LayoutManager;
-import org.apache.geronimo.gshell.plugin.PluginCollector;
+import org.apache.geronimo.gshell.plugin.CommandRegistry;
 import org.codehaus.plexus.component.annotations.Requirement;
 import org.codehaus.plexus.util.StringUtils;
 
@@ -42,7 +42,7 @@
     extends CommandSupport
 {
     @Requirement
-    private PluginCollector pluginCollector;
+    private CommandRegistry commandRegistry;
 
     @Requirement
     private LayoutManager layoutManager;
@@ -53,7 +53,7 @@
     private Renderer renderer = new Renderer();
 
     protected Object doExecute() throws Exception {
-        assert pluginCollector != null;
+        assert commandRegistry != null;
         assert layoutManager != null;
 
         io.out.println();
@@ -62,7 +62,7 @@
 
         io.out.println("Available commands:");
 
-        Collection<CommandDescriptor> commands = pluginCollector.getCommandDescriptors();
+        Collection<CommandDescriptor> commands = commandRegistry.getCommandDescriptors();
 
         // Figure out the maximum length of a command name
         int maxNameLen = 0;

Modified: geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/layout/DefaultLayoutManager.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/layout/DefaultLayoutManager.java?rev=574515&r1=574514&r2=574515&view=diff
==============================================================================
--- geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/layout/DefaultLayoutManager.java (original)
+++ geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/layout/DefaultLayoutManager.java Tue Sep 11 02:03:04 2007
@@ -24,7 +24,7 @@
 import org.apache.geronimo.gshell.command.descriptor.CommandDescriptor;
 import org.apache.geronimo.gshell.layout.loader.LayoutLoader;
 import org.apache.geronimo.gshell.layout.model.Layout;
-import org.apache.geronimo.gshell.plugin.PluginCollector;
+import org.apache.geronimo.gshell.plugin.CommandRegistry;
 import org.apache.geronimo.gshell.shell.Environment;
 import org.codehaus.plexus.component.annotations.Component;
 import org.codehaus.plexus.component.annotations.Requirement;
@@ -45,7 +45,7 @@
     private final Logger log = LoggerFactory.getLogger(getClass());
 
     @Requirement
-    private PluginCollector pluginCollector;
+    private CommandRegistry commandRegistry;
 
     @Requirement
     private LayoutLoader loader;
@@ -83,6 +83,6 @@
         // HACK: For now, assume the path is just the id... should eventually change this
         //
 
-        return pluginCollector.getCommandDescriptor(path);
+        return commandRegistry.getCommandDescriptor(path);
     }
 }

Copied: geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/plugin/CommandRegistry.java (from r574492, geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/plugin/PluginCollector.java)
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/plugin/CommandRegistry.java?p2=geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/plugin/CommandRegistry.java&p1=geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/plugin/PluginCollector.java&r1=574492&r2=574515&rev=574515&view=diff
==============================================================================
--- geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/plugin/PluginCollector.java (original)
+++ geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/plugin/CommandRegistry.java Tue Sep 11 02:03:04 2007
@@ -33,15 +33,15 @@
 import org.slf4j.LoggerFactory;
 
 /**
- * Hook to get some details about the Plexus components which are loaded.
+ * Registers command components as they are discovered by the container.
  * 
  * @version $Rev$ $Date$
  */
-@Component(role=PluginCollector.class)
-public class PluginCollector
+@Component(role= CommandRegistry.class)
+public class CommandRegistry
     implements ComponentDiscoveryListener
 {
-    public static final String ID = "gshell-plugin-collector";
+    public static final String ID = "gshell-command-regsitry";
 
     private final Logger log = LoggerFactory.getLogger(getClass());
 

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

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

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