Return-Path: Delivered-To: apmail-geronimo-dev-archive@www.apache.org Received: (qmail 86361 invoked from network); 17 Oct 2008 06:33:13 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 17 Oct 2008 06:33:13 -0000 Received: (qmail 58985 invoked by uid 500); 17 Oct 2008 06:33:13 -0000 Delivered-To: apmail-geronimo-dev-archive@geronimo.apache.org Received: (qmail 58944 invoked by uid 500); 17 Oct 2008 06:33:13 -0000 Mailing-List: contact dev-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 dev@geronimo.apache.org Received: (qmail 58933 invoked by uid 99); 17 Oct 2008 06:33:13 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Oct 2008 23:33:13 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of gnodet@gmail.com designates 209.85.134.188 as permitted sender) Received: from [209.85.134.188] (HELO mu-out-0910.google.com) (209.85.134.188) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 17 Oct 2008 06:32:03 +0000 Received: by mu-out-0910.google.com with SMTP id i10so367296mue.5 for ; Thu, 16 Oct 2008 23:32:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=xPum6/42pQm5MPo7MZVhLP7gD3ioJ2wE7V0VSU79njE=; b=flAbvXaaRx6CS79ar9aD++wXRppiiXi1q1uAjzZKrWbLhc5PMA7b9L2zCu5n7TLlcS F0OQpZJ50Qp/QvD4AnVx0RMCWZ3QKDGD3M+F8P3bKKhlXQuIsr87FTa6s9ZZD2ia/rTn 3NK7FfPxJT3taw0qopLwj0gqKw4N2/msdWrb0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=sIrI26zIHwE0ilHczZ9tSCOoZB0qkt+smUuvdDqvZ6XfUUZpDI4esxOlu51rvkw5qs 3oXZY35t9ATBzt3yGhhqMfPdXAw8y1RxrxiLd0yeHWzaoySHDDHMfirlG14KO9hs3ali LgJb0hAg/TJpyjqYDodLpj3PCjFQiMgU6EWrM= Received: by 10.103.175.9 with SMTP id c9mr1980271mup.15.1224225159864; Thu, 16 Oct 2008 23:32:39 -0700 (PDT) Received: by 10.103.244.13 with HTTP; Thu, 16 Oct 2008 23:32:39 -0700 (PDT) Message-ID: Date: Fri, 17 Oct 2008 08:32:39 +0200 From: "Guillaume Nodet" To: dev@geronimo.apache.org Subject: Re: svn commit: r704975 - in /geronimo/gshell/trunk: gshell-api/src/main/java/org/apache/geronimo/gshell/command/Command.java gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/registry/CommandRegistryImpl.java In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20081015180424.BA43523888A3@eris.apache.org> <720A1BD7-2FE7-4ADE-B974-7A235CF50D0D@gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org Looks good, I can work on fixing that if you want. On Fri, Oct 17, 2008 at 8:23 AM, Jason Dillon wrote: > Yes, I suppose the PluginParser can set this, and thus avoid needing to make > it part of the Command intf. > > --jason > > > On Oct 16, 2008, at 2:33 PM, Guillaume Nodet wrote: > >> Yeah, I was supposing so. >> However, it seems more natural, as the only place where the location >> is set is when registering the command in the registry. >> Maybe another way would be to say that the location has to be set on >> the command in some way before registering it: the registry would >> retrieve the location from the command instead of receiving it as an >> argument to the registerCommand method and then setting the location. >> As the same command object can not be registered at two different >> locations (else one location would be somehow lost on the command), it >> may make sense. The location could be set directly when the >> PluginParser creates the bean definition. Wdyt ? >> >> On Thu, Oct 16, 2008 at 9:24 AM, Jason Dillon >> wrote: >>> >>> I didn't really want to expose setLocation in Command, hence the reason >>> why >>> it was coded like that. >>> >>> --jason >>> >>> >>> On Oct 16, 2008, at 1:04 AM, gnodet@apache.org wrote: >>> >>>> Author: gnodet >>>> Date: Wed Oct 15 11:04:24 2008 >>>> New Revision: 704975 >>>> >>>> URL: http://svn.apache.org/viewvc?rev=704975&view=rev >>>> Log: >>>> Remove an ugly cast by adding the setLocation method to the Command >>>> interface >>>> >>>> Modified: >>>> >>>> >>>> geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/command/Command.java >>>> >>>> >>>> geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/registry/CommandRegistryImpl.java >>>> >>>> Modified: >>>> >>>> geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/command/Command.java >>>> URL: >>>> >>>> http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/command/Command.java?rev=704975&r1=704974&r2=704975&view=diff >>>> >>>> >>>> ============================================================================== >>>> --- >>>> >>>> geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/command/Command.java >>>> (original) >>>> +++ >>>> >>>> geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/command/Command.java >>>> Wed Oct 15 11:04:24 2008 >>>> @@ -31,6 +31,8 @@ >>>> { >>>> CommandLocation getLocation(); >>>> >>>> + void setLocation(CommandLocation location); >>>> + >>>> /** >>>> * Returns the action of the command. >>>> * >>>> >>>> Modified: >>>> >>>> geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/registry/CommandRegistryImpl.java >>>> URL: >>>> >>>> http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/registry/CommandRegistryImpl.java?rev=704975&r1=704974&r2=704975&view=diff >>>> >>>> >>>> ============================================================================== >>>> --- >>>> >>>> geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/registry/CommandRegistryImpl.java >>>> (original) >>>> +++ >>>> >>>> geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/registry/CommandRegistryImpl.java >>>> Wed Oct 15 11:04:24 2008 >>>> @@ -60,9 +60,7 @@ >>>> throw new DuplicateCommandException(name); >>>> } >>>> >>>> - if (command instanceof CommandSupport) { >>>> - ((CommandSupport)command).setLocation(new >>>> CommandLocationImpl(name)); >>>> - } >>>> + command.setLocation(new CommandLocationImpl(name)); >>>> >>>> commands.put(name, command); >>>> >>>> >>>> >>> >>> >> >> >> >> -- >> Cheers, >> Guillaume Nodet >> ------------------------ >> Blog: http://gnodet.blogspot.com/ >> ------------------------ >> Open Source SOA >> http://fusesource.com > > -- Cheers, Guillaume Nodet ------------------------ Blog: http://gnodet.blogspot.com/ ------------------------ Open Source SOA http://fusesource.com