Return-Path: Delivered-To: apmail-geronimo-scm-archive@www.apache.org Received: (qmail 6703 invoked from network); 5 Jun 2008 12:34:00 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 5 Jun 2008 12:34:00 -0000 Received: (qmail 41063 invoked by uid 500); 5 Jun 2008 12:34:03 -0000 Delivered-To: apmail-geronimo-scm-archive@geronimo.apache.org Received: (qmail 41004 invoked by uid 500); 5 Jun 2008 12:34:03 -0000 Mailing-List: contact scm-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@geronimo.apache.org List-Id: Delivered-To: mailing list scm@geronimo.apache.org Received: (qmail 40994 invoked by uid 99); 5 Jun 2008 12:34:03 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 Jun 2008 05:34:03 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 Jun 2008 12:33:15 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 1EFE32388A16; Thu, 5 Jun 2008 05:33:37 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r663586 - in /geronimo/gshell/trunk: gshell-api/src/main/java/org/apache/geronimo/gshell/command/ gshell-plugin/src/main/java/org/apache/geronimo/gshell/plugin/ gshell-plugin/src/main/java/org/apache/geronimo/gshell/plugin/descriptor/ Date: Thu, 05 Jun 2008 12:33:36 -0000 To: scm@geronimo.apache.org From: jdillon@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20080605123337.1EFE32388A16@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: jdillon Date: Thu Jun 5 05:33:36 2008 New Revision: 663586 URL: http://svn.apache.org/viewvc?rev=663586&view=rev Log: More work to ween the platform off of the Command interface and use Executable instead Modified: geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/command/Executable.java geronimo/gshell/trunk/gshell-plugin/src/main/java/org/apache/geronimo/gshell/plugin/DefaultCommandContainer.java geronimo/gshell/trunk/gshell-plugin/src/main/java/org/apache/geronimo/gshell/plugin/descriptor/CommandDescriptor.java Modified: geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/command/Executable.java URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/command/Executable.java?rev=663586&r1=663585&r2=663586&view=diff ============================================================================== --- geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/command/Executable.java (original) +++ geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/command/Executable.java Thu Jun 5 05:33:36 2008 @@ -30,6 +30,8 @@ Result FAILURE = Result.FAILURE; + // TODO: Change this to ExecutionContext + Object execute(CommandContext context, Object... args) throws Exception; // Modified: geronimo/gshell/trunk/gshell-plugin/src/main/java/org/apache/geronimo/gshell/plugin/DefaultCommandContainer.java URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-plugin/src/main/java/org/apache/geronimo/gshell/plugin/DefaultCommandContainer.java?rev=663586&r1=663585&r2=663586&view=diff ============================================================================== --- geronimo/gshell/trunk/gshell-plugin/src/main/java/org/apache/geronimo/gshell/plugin/DefaultCommandContainer.java (original) +++ geronimo/gshell/trunk/gshell-plugin/src/main/java/org/apache/geronimo/gshell/plugin/DefaultCommandContainer.java Thu Jun 5 05:33:36 2008 @@ -20,20 +20,19 @@ package org.apache.geronimo.gshell.plugin; import org.apache.geronimo.gshell.command.CommandContainer; -import org.apache.geronimo.gshell.command.Command; import org.apache.geronimo.gshell.command.CommandContext; import org.apache.geronimo.gshell.command.Executable; import org.apache.geronimo.gshell.command.annotation.CommandComponent; import org.apache.geronimo.gshell.plexus.GShellPlexusContainer; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.codehaus.plexus.component.annotations.Configuration; +import org.codehaus.plexus.PlexusConstants; import org.codehaus.plexus.component.annotations.Component; +import org.codehaus.plexus.component.annotations.Configuration; import org.codehaus.plexus.component.repository.exception.ComponentLookupException; -import org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable; import org.codehaus.plexus.context.Context; import org.codehaus.plexus.context.ContextException; -import org.codehaus.plexus.PlexusConstants; +import org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * ??? @@ -70,7 +69,7 @@ public String getDescription() { // - // FIXME: + // FIXME: Can fetch this from the model... ? // CommandComponent cmd = getExecutable().getClass().getAnnotation(CommandComponent.class); @@ -84,7 +83,7 @@ assert container != null; try { - return container.lookupComponent(Command.class, commandId); + return container.lookupComponent(Executable.class, commandId); } catch (ComponentLookupException e) { throw new RuntimeException(e); Modified: geronimo/gshell/trunk/gshell-plugin/src/main/java/org/apache/geronimo/gshell/plugin/descriptor/CommandDescriptor.java URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-plugin/src/main/java/org/apache/geronimo/gshell/plugin/descriptor/CommandDescriptor.java?rev=663586&r1=663585&r2=663586&view=diff ============================================================================== --- geronimo/gshell/trunk/gshell-plugin/src/main/java/org/apache/geronimo/gshell/plugin/descriptor/CommandDescriptor.java (original) +++ geronimo/gshell/trunk/gshell-plugin/src/main/java/org/apache/geronimo/gshell/plugin/descriptor/CommandDescriptor.java Thu Jun 5 05:33:36 2008 @@ -24,6 +24,7 @@ import org.apache.geronimo.gshell.model.command.Command; import org.apache.geronimo.gshell.model.command.Parameter; import org.apache.geronimo.gshell.model.command.Requirement; +import org.apache.geronimo.gshell.command.Executable; import org.codehaus.plexus.component.repository.ComponentRequirement; import org.codehaus.plexus.configuration.xml.XmlPlexusConfiguration; @@ -43,7 +44,7 @@ this.command = command; setDescription(command.getDescription()); - setRole(org.apache.geronimo.gshell.command.Command.class); + setRole(Executable.class); setRoleHint(command.getId()); setImplementation(command.getImplementation()); setVersion(command.getVersion());