Return-Path: Delivered-To: apmail-commons-commits-archive@minotaur.apache.org Received: (qmail 15965 invoked from network); 23 Feb 2011 16:52:26 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 23 Feb 2011 16:52:26 -0000 Received: (qmail 98675 invoked by uid 500); 23 Feb 2011 16:52:26 -0000 Delivered-To: apmail-commons-commits-archive@commons.apache.org Received: (qmail 98418 invoked by uid 500); 23 Feb 2011 16:52:24 -0000 Mailing-List: contact commits-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@commons.apache.org Delivered-To: mailing list commits@commons.apache.org Received: (qmail 98406 invoked by uid 99); 23 Feb 2011 16:52:24 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 Feb 2011 16:52:24 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.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; Wed, 23 Feb 2011 16:52:22 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 4184B23889E7; Wed, 23 Feb 2011 16:52:01 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1073825 - /commons/sandbox/digester3/trunk/src/site/xdoc/guide/plugins.xml Date: Wed, 23 Feb 2011 16:52:01 -0000 To: commits@commons.apache.org From: simonetripodi@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20110223165201.4184B23889E7@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: simonetripodi Date: Wed Feb 23 16:52:00 2011 New Revision: 1073825 URL: http://svn.apache.org/viewvc?rev=1073825&view=rev Log: minor format Modified: commons/sandbox/digester3/trunk/src/site/xdoc/guide/plugins.xml Modified: commons/sandbox/digester3/trunk/src/site/xdoc/guide/plugins.xml URL: http://svn.apache.org/viewvc/commons/sandbox/digester3/trunk/src/site/xdoc/guide/plugins.xml?rev=1073825&r1=1073824&r2=1073825&view=diff ============================================================================== --- commons/sandbox/digester3/trunk/src/site/xdoc/guide/plugins.xml (original) +++ commons/sandbox/digester3/trunk/src/site/xdoc/guide/plugins.xml Wed Feb 23 16:52:00 2011 @@ -51,30 +51,22 @@ Given the following digester rules in th @Override protected void configure() { forPattern("pipeline") - .createObject() - .ofType(Pipeline.class); + .createObject().ofType(Pipeline.class); forPattern("pipeline/source") - .callMethod("setSource") - .withParamCount(1) + .callMethod("setSource").withParamCount(1) .then() - .callParam() - .ofIndex(0) - .fromAttribute("file"); + .callParam().ofIndex(0).fromAttribute("file"); forPattern("pipeline/transform") - .createPlugin() - .ofType(Transform.class) + .createPlugin().ofType(Transform.class) .then() .setNext("setTransform"); forPattern("pipeline/destination") - .callMethod("setDest") - .withParamCount(1) + .callMethod("setDest").withParamCount(1) .then() - .callParam() - .ofIndex(0) - .fromAttribute("file"); + .callParam().ofIndex(0).fromAttribute("file"); } }); @@ -230,7 +222,7 @@ the rule info may have any name of your

Here is the addRules method on class SubstituteTransform, from the example:

- public static void addRules(Digester d, String pathPrefix) { + public static void addRules(final Digester d, final String pathPrefix) { newLoader(new AbstractRulesModule() { @Override @@ -239,13 +231,11 @@ Here is the addRules method on class Sub // define any object of type Widget. Because a Container is // itself a widget, this allows us to build trees of objects. forPattern(pattern + "/from") - .callMethod("setFrom") - .usingElementBodyAsArgument(); + .callMethod("setFrom").usingElementBodyAsArgument(); // allow users to declare plugins under a container as well forPattern(pattern + "/to") - .callMethod("setTo") - .usingElementBodyAsArgument(); + .callMethod("setTo").usingElementBodyAsArgument(); } }).decorate(digester.getRules());