Author: skitching
Date: Sun Feb 13 03:17:29 2005
New Revision: 153619

URL: http://svn.apache.org/viewcvs?view=rev&rev=153619
Log:
Change references to BeanPropertySetterAction to SetPropertyAction, in line
with changes made to class names. Also add factory method for the 
SetPropertyAction
constructor that takes the target property from an xml attribute.

Modified:
    
jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/factory/ActionFactory.java

Modified: 
jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/factory/ActionFactory.java
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/factory/ActionFactory.java?view=diff&r1=153618&r2=153619
==============================================================================
--- 
jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/factory/ActionFactory.java
 (original)
+++ 
jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/factory/ActionFactory.java
 Sun Feb 13 03:17:29 2005
@@ -195,27 +195,50 @@
     }
 
     /**
-     * Add a "bean property setter" rule for the specified parameters.
+     * Add a "property setter" rule for the specified parameters.
      *
      * @param pattern Element matching pattern
-     * @see BeanPropertySetterAction
+     * @see SetPropertyAction
      */
-    public Action addBeanPropertySetter(String pattern)
+    public Action addSetProperty(String pattern)
     throws InvalidRuleException {
-        Action action = new BeanPropertySetterAction();
+        Action action = new SetPropertyAction();
         return addRule(pattern, action);
     }
 
     /**
-     * Add a "bean property setter" rule for the specified parameters.
+     * Add a "property setter" rule for the specified parameters.
      *
      * @param pattern Element matching pattern
      * @param propertyName Name of property to set
-     * @see BeanPropertySetterAction
+     * @see SetPropertyAction
      */
-    public Action addBeanPropertySetter(String pattern, String propertyName) 
+    public Action addSetProperty(String pattern, String propertyName) 
     throws InvalidRuleException {
-        Action action = new BeanPropertySetterAction(propertyName);
+        Action action = new SetPropertyAction(propertyName);
+        return addRule(pattern, action);
+    }
+
+    /**
+     * Add a "property setter" rule for the specified parameters.
+     *
+     * @param pattern Element matching pattern
+     * @param xmlAttributeNS is the namespace of the xml attribute that will
+     *  indicate which property to set. Null means the default namespace.
+     * @param xmlAttributeName is the name of the xml attribute that will 
+     *  indicate which property to set. Must not be null.
+     * @param defaultPropertyName is the name of a property to set if the
+     *  specified xml attribute is not defined. If null, then it is an error
+     *  if the xml attribute is not present in the input.
+     * @see SetPropertyAction
+     */
+    public Action addSetProperty(
+    String pattern, 
+    String xmlAttributeNS, String xmlAttributeName,
+    String defaultPropertyName) 
+    throws InvalidRuleException {
+        Action action = new SetPropertyAction(
+            xmlAttributeNS, xmlAttributeName, defaultPropertyName);
         return addRule(pattern, action);
     }
 



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to