Return-Path: Delivered-To: apmail-commons-commits-archive@minotaur.apache.org Received: (qmail 68277 invoked from network); 8 Feb 2011 19:17:13 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 8 Feb 2011 19:17:13 -0000 Received: (qmail 80702 invoked by uid 500); 8 Feb 2011 19:17:13 -0000 Delivered-To: apmail-commons-commits-archive@commons.apache.org Received: (qmail 80359 invoked by uid 500); 8 Feb 2011 19:17:11 -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 80348 invoked by uid 99); 8 Feb 2011 19:17:10 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 08 Feb 2011 19:17:10 +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; Tue, 08 Feb 2011 19:17:10 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 02A682388A9B; Tue, 8 Feb 2011 19:16:50 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1068533 - in /commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3: RulesBinderImpl.java rulesbinder/SetPropertiesBuilder.java Date: Tue, 08 Feb 2011 19:16:49 -0000 To: commits@commons.apache.org From: simonetripodi@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20110208191650.02A682388A9B@eris.apache.org> Author: simonetripodi Date: Tue Feb 8 19:16:49 2011 New Revision: 1068533 URL: http://svn.apache.org/viewvc?rev=1068533&view=rev Log: added method to ignore an attribute when SetPropertiesRule Modified: commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/RulesBinderImpl.java commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/rulesbinder/SetPropertiesBuilder.java Modified: commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/RulesBinderImpl.java URL: http://svn.apache.org/viewvc/commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/RulesBinderImpl.java?rev=1068533&r1=1068532&r2=1068533&view=diff ============================================================================== --- commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/RulesBinderImpl.java (original) +++ commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/RulesBinderImpl.java Tue Feb 8 19:16:49 2011 @@ -242,9 +242,19 @@ final class RulesBinderImpl implements R return this; } + public SetPropertiesBuilder ignoreAttribute(String attributeName) { + if (attributeName == null) { + addError("{forPattern(\"%s\").setProperties().ignoreAttribute(String)} empty 'attributeName' not allowed", + keyPattern); + } else { + this.aliases.put(attributeName, null); + } + return this; + } + public SetPropertiesBuilder addAlias(String attributeName, /* @Nullable */String propertyName) { if (attributeName == null) { - addError("{forPattern(\"%s\").setProperties().addAlias(String,String)} empty 'methodName' not allowed", + addError("{forPattern(\"%s\").setProperties().addAlias(String,String)} empty 'attributeName' not allowed", keyPattern); } else { this.aliases.put(attributeName, propertyName); Modified: commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/rulesbinder/SetPropertiesBuilder.java URL: http://svn.apache.org/viewvc/commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/rulesbinder/SetPropertiesBuilder.java?rev=1068533&r1=1068532&r2=1068533&view=diff ============================================================================== --- commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/rulesbinder/SetPropertiesBuilder.java (original) +++ commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/rulesbinder/SetPropertiesBuilder.java Tue Feb 8 19:16:49 2011 @@ -25,6 +25,14 @@ import org.apache.commons.digester3.SetP public interface SetPropertiesBuilder extends BackToLinkedRuleBuilder { /** + * Add an attribute name to the ignore list. + * + * @param attributeName The attribute to match has to be ignored + * @return this builder instance + */ + SetPropertiesBuilder ignoreAttribute(String attributeName); + + /** * Add an additional attribute name to property name mapping. * * @param attributeName The attribute to match