geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdil...@apache.org
Subject svn commit: r699008 - in /geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom: alias/AliasCommand.java alias/AliasManagerImpl.java config/PluginParser.java
Date Thu, 25 Sep 2008 15:54:14 GMT
Author: jdillon
Date: Thu Sep 25 08:54:13 2008
New Revision: 699008

URL: http://svn.apache.org/viewvc?rev=699008&view=rev
Log:
Go back to constructor args for AliasCommand

Modified:
    geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/alias/AliasCommand.java
    geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/alias/AliasManagerImpl.java
    geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/config/PluginParser.java

Modified: geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/alias/AliasCommand.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/alias/AliasCommand.java?rev=699008&r1=699007&r2=699008&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/alias/AliasCommand.java
(original)
+++ geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/alias/AliasCommand.java
Thu Sep 25 08:54:13 2008
@@ -35,26 +35,14 @@
 
     private String target;
 
-    public String getName() {
-        return name;
-    }
-
-    public void setName(final String name) {
+    public AliasCommand(final String name, final String target) {
         assert name != null;
+        assert target != null;
 
         this.name = name;
-    }
-
-    public String getTarget() {
-        return target;
-    }
-
-    public void setTarget(final String target) {
-        assert target != null;
-        
         this.target = target;
     }
-
+    
     @Override
     public CommandResult execute(final ShellContext context, final Object[] args) {
         assert context != null;

Modified: geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/alias/AliasManagerImpl.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/alias/AliasManagerImpl.java?rev=699008&r1=699007&r2=699008&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/alias/AliasManagerImpl.java
(original)
+++ geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/alias/AliasManagerImpl.java
Thu Sep 25 08:54:13 2008
@@ -65,6 +65,8 @@
 
         log.debug("Defining alias: {} -> {}", name, target);
 
+        final AliasCommand command = new AliasCommand(name, target);
+
         Alias alias = new Alias() {
             public String getName() {
                 return name;
@@ -73,6 +75,8 @@
             public String getTarget() {
                 return target;
             }
+
+            // TODO: Track the command
         };
 
         aliases.put(name, alias);

Modified: geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/config/PluginParser.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/config/PluginParser.java?rev=699008&r1=699007&r2=699008&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/config/PluginParser.java
(original)
+++ geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/config/PluginParser.java
Thu Sep 25 08:54:13 2008
@@ -376,8 +376,8 @@
             log.trace("Parse alias; element; {}", element);
 
             BeanDefinitionBuilder alias = BeanDefinitionBuilder.rootBeanDefinition(AliasCommand.class);
-            alias.addPropertyValue("name", element.getAttribute("name"));
-            alias.addPropertyValue("target", element.getAttribute("target"));
+            alias.addConstructorArgValue(element.getAttribute("name"));
+            alias.addConstructorArgValue(element.getAttribute("target"));
 
             return alias;
         }



Mime
View raw message