Return-Path: Delivered-To: apmail-geronimo-scm-archive@www.apache.org Received: (qmail 61963 invoked from network); 8 Oct 2008 12:33:10 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 8 Oct 2008 12:33:10 -0000 Received: (qmail 14156 invoked by uid 500); 8 Oct 2008 12:33:09 -0000 Delivered-To: apmail-geronimo-scm-archive@geronimo.apache.org Received: (qmail 14113 invoked by uid 500); 8 Oct 2008 12:33:09 -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 14104 invoked by uid 99); 8 Oct 2008 12:33:09 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 Oct 2008 05:33:09 -0700 X-ASF-Spam-Status: No, hits=-1999.9 required=10.0 tests=ALL_TRUSTED,DNS_FROM_SECURITYSAGE 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; Wed, 08 Oct 2008 12:32:13 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id CEA292388882; Wed, 8 Oct 2008 05:32:49 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r702842 - /geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/command/CommandSupport.java Date: Wed, 08 Oct 2008 12:32:49 -0000 To: scm@geronimo.apache.org From: jdillon@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20081008123249.CEA292388882@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: jdillon Date: Wed Oct 8 05:32:48 2008 New Revision: 702842 URL: http://svn.apache.org/viewvc?rev=702842&view=rev Log: Add generic support for ResultNotification Modified: geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/command/CommandSupport.java Modified: geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/command/CommandSupport.java URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/command/CommandSupport.java?rev=702842&r1=702841&r2=702842&view=diff ============================================================================== --- geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/command/CommandSupport.java (original) +++ geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/command/CommandSupport.java Wed Oct 8 05:32:48 2008 @@ -34,6 +34,7 @@ import org.apache.geronimo.gshell.notification.Notification; import org.apache.geronimo.gshell.notification.FailureNotification; import org.apache.geronimo.gshell.notification.SuccessNotification; +import org.apache.geronimo.gshell.notification.ResultNotification; import org.apache.geronimo.gshell.shell.ShellContext; import org.apache.geronimo.gshell.spring.BeanContainer; import org.apache.geronimo.gshell.spring.BeanContainerAware; @@ -304,14 +305,19 @@ io.error(n.getMessage()); - result = new CommandResult.ValueResult(CommandAction.Result.FAILURE); + result = new CommandResult.ValueResult(n.getResult()); } catch (final SuccessNotification n) { log.trace("Command notified SUCCESS result: " + n, n); io.verbose(n.getMessage()); - result = new CommandResult.ValueResult(CommandAction.Result.SUCCESS); + result = new CommandResult.ValueResult(n.getResult()); + } + catch (final ResultNotification n) { + log.trace("Command notified result: " + n, n); + + result = new CommandResult.ValueResult(n.getResult()); } catch (final Notification n) { log.trace("Notified: " + n, n);