You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by rd...@apache.org on 2003/11/19 22:05:19 UTC

cvs commit: jakarta-commons/digester/src/java/org/apache/commons/digester Digester.java

rdonkin     2003/11/19 13:05:19

  Modified:    digester/src/java/org/apache/commons/digester Digester.java
  Log:
  New rule implementation that allows flexible treatment of properties. Submitted by Simon Kitching
  
  Revision  Changes    Path
  1.86      +28 -4     jakarta-commons/digester/src/java/org/apache/commons/digester/Digester.java
  
  Index: Digester.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/Digester.java,v
  retrieving revision 1.85
  retrieving revision 1.86
  diff -u -r1.85 -r1.86
  --- Digester.java	28 Oct 2003 23:01:00 -0000	1.85
  +++ Digester.java	19 Nov 2003 21:05:19 -0000	1.86
  @@ -2181,6 +2181,30 @@
   
       }
   
  +    /**
  +     * Adds an {@link SetNestPropertiesRule}.
  +     *
  +     * @param pattern register the rule with this pattern
  +     * @param elementName elment name that a property maps to
  +     * @param propertyName property name of the element mapped from
  +     */
  +    public void addSetNestedProperties(String pattern, String elementName, String propertyName) {
  +    
  +        addRule(pattern, new SetNestedPropertiesRule(elementName, propertyName));
  +    }
  +
  +    /**
  +     * Adds an {@link SetNestPropertiesRule}.
  +     *
  +     * @param pattern register the rule with this pattern
  +     * @param elementNames elment names that (in order) map to properties
  +     * @param propertyNames property names that (in order) elements are mapped to
  +     */    
  +    public void addSetNestedProperties(String pattern, String[] elementNames, String[] propertyNames) {
  +    
  +        addRule(pattern, new SetNestedPropertiesRule(elementNames, propertyNames));
  +    }
  +
   
       /**
        * Add a "set next" rule for the specified parameters.
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org