commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hls...@apache.org
Subject cvs commit: jakarta-commons-sandbox/hivemind/framework/src/test/hivemind/test/parse TestDescriptorParser.java
Date Mon, 29 Sep 2003 15:36:52 GMT
hlship      2003/09/29 08:36:52

  Modified:    hivemind/framework/src/java/org/apache/commons/hivemind
                        ConfigurationPoint.java
               hivemind/framework/src/java/org/apache/commons/hivemind/parse
                        ConfigurationPointDescriptor.java
                        DescriptorParser.java
               hivemind/framework/src/java/org/apache/commons/hivemind/impl
                        RegistryBuilder.java ConfigurationPointImpl.java
               hivemind/framework/src/test/hivemind/test/parse
                        TestDescriptorParser.java
  Log:
  Add ConfigurationPoint.getContributionsSchema() method.
  
  Revision  Changes    Path
  1.2       +10 -1     jakarta-commons-sandbox/hivemind/framework/src/java/org/apache/commons/hivemind/ConfigurationPoint.java
  
  Index: ConfigurationPoint.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/hivemind/framework/src/java/org/apache/commons/hivemind/ConfigurationPoint.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ConfigurationPoint.java	18 Sep 2003 19:00:59 -0000	1.1
  +++ ConfigurationPoint.java	29 Sep 2003 15:36:52 -0000	1.2
  @@ -59,6 +59,8 @@
   
   import java.util.List;
   
  +import org.apache.commons.hivemind.schema.Schema;
  +
   /**
    * An extension point that provides configuration data in the form
    * of a list of elements.
  @@ -78,4 +80,11 @@
        */
       
       public List getElements();   
  +    
  +    /**
  +     * Returns the Schema for contributions to the configuration point
  +     * (which may be null if the point does not define a schema for
  +     * contributions).
  +     */
  +    public Schema getContributionsSchema();
   }
  
  
  
  1.2       +7 -7      jakarta-commons-sandbox/hivemind/framework/src/java/org/apache/commons/hivemind/parse/ConfigurationPointDescriptor.java
  
  Index: ConfigurationPointDescriptor.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/hivemind/framework/src/java/org/apache/commons/hivemind/parse/ConfigurationPointDescriptor.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ConfigurationPointDescriptor.java	18 Sep 2003 19:01:00 -0000	1.1
  +++ ConfigurationPointDescriptor.java	29 Sep 2003 15:36:52 -0000	1.2
  @@ -73,7 +73,7 @@
   {
       private String _id;
       private Occurances _count = Occurances.UNBOUNDED;
  -    private Schema _schema;
  +    private Schema _contributionsSchema;
   
       public String toString()
       {
  @@ -81,7 +81,7 @@
   
           builder.append("id", _id);
           builder.append("count", _count);
  -        builder.append("schema", _schema);
  +        builder.append("contributionsSchema", _contributionsSchema);
   
           return builder.toString();
       }
  @@ -106,14 +106,14 @@
           _id = string;
       }
   
  -    public Schema getSchema()
  +    public Schema getContributionsSchema()
       {
  -        return _schema;
  +        return _contributionsSchema;
       }
   
  -    public void setSchema(Schema schema)
  +    public void setContributionsSchema(Schema schema)
       {
  -        _schema = schema;
  +        _contributionsSchema = schema;
       }
   
   }
  
  
  
  1.5       +2 -2      jakarta-commons-sandbox/hivemind/framework/src/java/org/apache/commons/hivemind/parse/DescriptorParser.java
  
  Index: DescriptorParser.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/hivemind/framework/src/java/org/apache/commons/hivemind/parse/DescriptorParser.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- DescriptorParser.java	29 Sep 2003 15:32:26 -0000	1.4
  +++ DescriptorParser.java	29 Sep 2003 15:36:52 -0000	1.5
  @@ -959,7 +959,7 @@
           {
               SchemaImpl schema = enterSchema(elementName);
   
  -            epd.setSchema(schema);
  +            epd.setContributionsSchema(schema);
   
               return;
           }
  
  
  
  1.7       +2 -2      jakarta-commons-sandbox/hivemind/framework/src/java/org/apache/commons/hivemind/impl/RegistryBuilder.java
  
  Index: RegistryBuilder.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/hivemind/framework/src/java/org/apache/commons/hivemind/impl/RegistryBuilder.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- RegistryBuilder.java	29 Sep 2003 15:32:25 -0000	1.6
  +++ RegistryBuilder.java	29 Sep 2003 15:36:52 -0000	1.7
  @@ -381,7 +381,7 @@
               point.setLocation(cpd.getLocation());
               point.setModule(module);
               point.setExpectedCount(cpd.getCount());
  -            point.setSchema(cpd.getSchema());
  +            point.setContributionsSchema(cpd.getContributionsSchema());
   
               module.addConfigurationPoint(point);
   
  
  
  
  1.2       +13 -8     jakarta-commons-sandbox/hivemind/framework/src/java/org/apache/commons/hivemind/impl/ConfigurationPointImpl.java
  
  Index: ConfigurationPointImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/hivemind/framework/src/java/org/apache/commons/hivemind/impl/ConfigurationPointImpl.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ConfigurationPointImpl.java	18 Sep 2003 19:00:58 -0000	1.1
  +++ ConfigurationPointImpl.java	29 Sep 2003 15:36:52 -0000	1.2
  @@ -90,13 +90,13 @@
       private Occurances _expectedCount;
       private List _configurations;
       private boolean _building;
  -    private Schema _schema;
  +    private Schema _contributionsSchema;
   
       protected void extendDescription(ToStringBuilder builder)
       {
           builder.append("expectedCount", _expectedCount);
           builder.append("configurations", _configurations);
  -        builder.append("schema", _schema);
  +        builder.append("schema", _contributionsSchema);
       }
   
       /**
  @@ -191,7 +191,7 @@
   
               _elements = Collections.unmodifiableList(result);
               
  -            _schema = null;
  +            _contributionsSchema = null;
               _configurations = null;
   		
   			// Now that we have the real list, we don't need the proxy
  @@ -221,7 +221,7 @@
           if (_configurations == null)
               return Collections.EMPTY_LIST;
   
  -        SchemaProcessorImpl processor = new SchemaProcessorImpl(_schema);
  +        SchemaProcessorImpl processor = new SchemaProcessorImpl(_contributionsSchema);
   
           int count = _configurations.size();
   
  @@ -250,12 +250,17 @@
   
       public Schema getSchema()
       {
  -        return _schema;
  +        return _contributionsSchema;
       }
   
  -    public void setSchema(Schema schema)
  +    public void setContributionsSchema(Schema schema)
       {
  -        _schema = schema;
  +        _contributionsSchema = schema;
  +    }
  +
  +    public Schema getContributionsSchema()
  +    {
  +        return _contributionsSchema;
       }
   
   }
  
  
  
  1.5       +5 -5      jakarta-commons-sandbox/hivemind/framework/src/test/hivemind/test/parse/TestDescriptorParser.java
  
  Index: TestDescriptorParser.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/hivemind/framework/src/test/hivemind/test/parse/TestDescriptorParser.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- TestDescriptorParser.java	22 Sep 2003 20:06:00 -0000	1.4
  +++ TestDescriptorParser.java	29 Sep 2003 15:36:52 -0000	1.5
  @@ -257,7 +257,7 @@
           assertEquals(1, l.size());
           ConfigurationPointDescriptor cpd = (ConfigurationPointDescriptor) l.get(0);
   
  -        Schema schema = cpd.getSchema();
  +        Schema schema = cpd.getContributionsSchema();
   
           assertNotNull(schema.getLocation());
   
  @@ -299,7 +299,7 @@
           List l = md.getConfigurationPoints();
           assertEquals(1, l.size());
           ConfigurationPointDescriptor cpd = (ConfigurationPointDescriptor) l.get(0);
  -        Schema schema = cpd.getSchema();
  +        Schema schema = cpd.getContributionsSchema();
   
           l = schema.getElementModel();
   
  @@ -358,8 +358,8 @@
           ConfigurationPointDescriptor p1 = (ConfigurationPointDescriptor) l.get(0);
           ConfigurationPointDescriptor p2 = (ConfigurationPointDescriptor) l.get(1);
   
  -        Schema schema1 = p1.getSchema();
  -        Schema schema2 = p2.getSchema();
  +        Schema schema1 = p1.getContributionsSchema();
  +        Schema schema2 = p2.getContributionsSchema();
   
           assertSame(schema1, schema2);
       }
  
  
  

Mime
View raw message