commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rdon...@apache.org
Subject cvs commit: jakarta-commons/betwixt/src/java/org/apache/commons/betwixt/digester XMLBeanInfoDigester.java
Date Wed, 07 Apr 2004 21:16:28 GMT
rdonkin     2004/04/07 14:16:28

  Modified:    betwixt/src/java/org/apache/commons/betwixt Descriptor.java
               betwixt/src/java/org/apache/commons/betwixt/digester
                        XMLBeanInfoDigester.java
  Log:
  Added support for options an extensible system for optional behaviour hints.
  
  Revision  Changes    Path
  1.5       +24 -1     jakarta-commons/betwixt/src/java/org/apache/commons/betwixt/Descriptor.java
  
  Index: Descriptor.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/betwixt/src/java/org/apache/commons/betwixt/Descriptor.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- Descriptor.java	28 Feb 2004 13:38:32 -0000	1.4
  +++ Descriptor.java	7 Apr 2004 21:16:27 -0000	1.5
  @@ -36,6 +36,8 @@
       private Class propertyType;
       /** the singular property type (i.e. the type ignoring the Collection or Array */
       private Class singularPropertyType;
  +    /** Options set for this Descriptor */
  +    private Options options = new Options();
       
       
       /** Base constructor */
  @@ -134,6 +136,27 @@
        */
       public void setSingularPropertyType(Class singularPropertyType) {
           this.singularPropertyType = singularPropertyType;
  +    }
  +    
  +    
  +    /**
  +     * Gets the options for this descriptor.
  +     * Options are used to communicate non-declarative
  +     * (optinal) behaviour hints.
  +     * @return <code>Options</code>, not null
  +     */
  +    public Options getOptions() {
  +        return options;
  +    }
  +    
  +    /**
  +     * Sets the options for this descriptor.
  +     * Options are used to communicate non-declarative
  +     * (optinal) behaviour hints.
  +     * @param options
  +     */
  +    public void setOptions(Options options) {
  +        this.options = options;
       }
   
   }
  
  
  
  1.8       +6 -1      jakarta-commons/betwixt/src/java/org/apache/commons/betwixt/digester/XMLBeanInfoDigester.java
  
  Index: XMLBeanInfoDigester.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/betwixt/src/java/org/apache/commons/betwixt/digester/XMLBeanInfoDigester.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- XMLBeanInfoDigester.java	28 Feb 2004 13:38:32 -0000	1.7
  +++ XMLBeanInfoDigester.java	7 Apr 2004 21:16:28 -0000	1.8
  @@ -162,6 +162,11 @@
               addRule( "*/attribute", new AttributeRule() );
               addRule( "*/hide", new HideRule() );
               addRule( "*/addDefaults", new AddDefaultsRule() );
  +            
  +            OptionRule optionRule = new OptionRule();
  +            addRule( "*/option", optionRule );
  +            addRule( "*/option/name", optionRule.getNameRule() );
  +            addRule( "*/option/value", optionRule.getValueRule() );
           }
           
           // now initialize
  
  
  

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


Mime
View raw message