geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdil...@apache.org
Subject cvs commit: incubator-geronimo/modules/twiddle/src/test/org/apache/geronimo/twiddle/config ConfigurationTest.java test1.xml
Date Wed, 13 Aug 2003 16:54:48 GMT
jdillon     2003/08/13 09:54:48

  Modified:    modules/twiddle/src/java/org/apache/geronimo/twiddle/command
                        AbstractCommand.java CommandExecutor.java
               modules/twiddle/src/schema twiddle-configuration.xsd
               modules/twiddle/src/test/org/apache/geronimo/twiddle/config
                        ConfigurationTest.java test1.xml
  Log:
   o keep things simple for now
  
  Revision  Changes    Path
  1.3       +12 -3     incubator-geronimo/modules/twiddle/src/java/org/apache/geronimo/twiddle/command/AbstractCommand.java
  
  Index: AbstractCommand.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/twiddle/src/java/org/apache/geronimo/twiddle/command/AbstractCommand.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- AbstractCommand.java	13 Aug 2003 15:18:47 -0000	1.2
  +++ AbstractCommand.java	13 Aug 2003 16:54:48 -0000	1.3
  @@ -65,8 +65,7 @@
   /**
    * An abstract implementation of a <code>Command</code>.
    *
  - * <p>Sub-classes only need to implement {@link Command#execute} and
  - *    can access the command context from {@link #getCommandContext}.
  + * <p>Sub-classes only need to implement {@link Command#execute}.
    *
    * @version <code>$Id$</code>
    * @author <a href="mailto:jason@planet57.com">Jason Dillon</a>
  @@ -140,6 +139,16 @@
           }
           
           return context;
  +    }
  +    
  +    /**
  +     * Provides sub-classes with the commands environment.
  +     *
  +     * @return The commands environment.
  +     */
  +    protected Environment getEnvironment()
  +    {
  +        return getCommandContext().getEnvironment();
       }
       
       /**
  
  
  
  1.3       +4 -1      incubator-geronimo/modules/twiddle/src/java/org/apache/geronimo/twiddle/command/CommandExecutor.java
  
  Index: CommandExecutor.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/twiddle/src/java/org/apache/geronimo/twiddle/command/CommandExecutor.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- CommandExecutor.java	13 Aug 2003 15:18:47 -0000	1.2
  +++ CommandExecutor.java	13 Aug 2003 16:54:48 -0000	1.3
  @@ -117,6 +117,9 @@
           CommandContext ctx = new CommandContext() {
               public Environment getEnvironment()
               {
  +                //
  +                // TODO: Fix me :-P
  +                //
                   return null;
               }
               
  
  
  
  1.3       +23 -6     incubator-geronimo/modules/twiddle/src/schema/twiddle-configuration.xsd
  
  Index: twiddle-configuration.xsd
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/twiddle/src/schema/twiddle-configuration.xsd,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- twiddle-configuration.xsd	13 Aug 2003 11:48:57 -0000	1.2
  +++ twiddle-configuration.xsd	13 Aug 2003 16:54:48 -0000	1.3
  @@ -23,15 +23,17 @@
       <xsd:complexType>
         <xsd:sequence>
           <xsd:element ref="properties" minOccurs="0" maxOccurs="1"/>
  -        <xsd:element ref="libraries" minOccurs="0" maxOccurs="1"/>
  +        <!-- <xsd:element ref="libraries" minOccurs="0" maxOccurs="1"/> -->
           <xsd:element ref="includes" minOccurs="0" maxOccurs="1"/>
           <xsd:element ref="environment" minOccurs="0" maxOccurs="1"/>
  -        <xsd:element ref="search-path" minOccurs="0" maxOccurs="1"/>
  +        <!-- <xsd:element ref="search-path" minOccurs="0" maxOccurs="1"/> -->
           <xsd:element ref="commands" minOccurs="1" maxOccurs="1"/>
         </xsd:sequence>
       </xsd:complexType>
     </xsd:element>
     
  +  <!--
  +  
     <xsd:element name="libraries">
       <xsd:annotation>
         <xsd:documentation>
  @@ -62,6 +64,8 @@
       </xsd:complexType>
     </xsd:element>
     
  +  -->
  +  
     <xsd:element name="properties">
       <xsd:annotation>
         <xsd:documentation>
  @@ -106,6 +110,8 @@
       </xsd:complexType>
     </xsd:element>
     
  +  <!--
  +  
     <xsd:element name="search-path">
       <xsd:annotation>
         <xsd:documentation>
  @@ -120,6 +126,8 @@
       </xsd:complexType>
     </xsd:element>
     
  +  -->
  +  
     <xsd:element name="environment">
       <xsd:annotation>
         <xsd:documentation>
  @@ -130,7 +138,7 @@
       <xsd:complexType>
         <xsd:sequence>
           <xsd:element ref="attribute" minOccurs="0" maxOccurs="unbounded"/>
  -        <xsd:element ref="complex-attribute" minOccurs="0" maxOccurs="unbounded"/>
  +        <!-- <xsd:element ref="complex-attribute" minOccurs="0" maxOccurs="unbounded"/>
-->
         </xsd:sequence>
       </xsd:complexType>
     </xsd:element>
  @@ -161,6 +169,8 @@
       </xsd:complexType>
     </xsd:element>
     
  +  <!--
  +  
     <xsd:element name="complex-attribute">
       <xsd:annotation>
         <xsd:documentation>
  @@ -178,6 +188,8 @@
       </xsd:complexType>
     </xsd:element>
     
  +  -->
  +  
     <xsd:element name="commands">
       <xsd:annotation>
         <xsd:documentation>
  @@ -188,7 +200,7 @@
       <xsd:complexType>
         <xsd:sequence>
           <xsd:element ref="command" minOccurs="0" maxOccurs="unbounded"/>
  -        <xsd:element ref="command-set" minOccurs="0" maxOccurs="unbounded"/>
  +        <!-- <xsd:element ref="command-set" minOccurs="0" maxOccurs="unbounded"/>
-->
         </xsd:sequence>
       </xsd:complexType>
     </xsd:element>
  @@ -201,6 +213,8 @@
       </xsd:annotation>
     </xsd:element>
     
  +  <!--
  +  
     <xsd:element name="command-set">
       <xsd:annotation>
         <xsd:documentation>
  @@ -219,6 +233,8 @@
       </xsd:complexType>
     </xsd:element>
     
  +  -->
  +  
     <xsd:element name="command">
       <xsd:annotation>
         <xsd:documentation>
  @@ -230,11 +246,12 @@
         <xsd:sequence>
           <xsd:element ref="description" minOccurs="0" maxOccurs="1"/>
           <xsd:element ref="attribute" minOccurs="0" maxOccurs="unbounded"/>
  +        <!-- <xsd:element ref="complex-attribute" minOccurs="0" maxOccurs="unbounded"/>
-->
         </xsd:sequence>
         
         <xsd:attribute name="name" use="required" type="xsd:string"/>
         <xsd:attribute name="code" use="required" type="xsd:string"/>
  -      <xsd:attribute name="libid" type="xsd:string"/>
  +      <!-- <xsd:attribute name="libid" type="xsd:string"/> -->
       </xsd:complexType>
     </xsd:element>
     
  
  
  
  1.4       +10 -2     incubator-geronimo/modules/twiddle/src/test/org/apache/geronimo/twiddle/config/ConfigurationTest.java
  
  Index: ConfigurationTest.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/twiddle/src/test/org/apache/geronimo/twiddle/config/ConfigurationTest.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ConfigurationTest.java	13 Aug 2003 11:48:57 -0000	1.3
  +++ ConfigurationTest.java	13 Aug 2003 16:54:48 -0000	1.4
  @@ -164,7 +164,9 @@
           Assert.assertEquals("property2", props[1].getName());
           Assert.assertEquals("value2", props[1].getContent());
       }
  -
  +    
  +    /*
  +    
       public void testLibraries() throws Exception
       {
           Configuration config = read("test1.xml");
  @@ -179,6 +181,8 @@
           Assert.assertEquals("library2", libs[1].getContent());
       }
       
  +    */
  +    
       public void testIncludes() throws Exception
       {
           Configuration config = read("test1.xml");
  @@ -193,6 +197,8 @@
           Assert.assertEquals("include2", incs[1]);
       }
       
  +    /*
  +    
       public void testSearchPath() throws Exception
       {
           Configuration config = read("test1.xml");
  @@ -207,4 +213,6 @@
           Assert.assertEquals("path2", paths[1]);
           Assert.assertEquals("path3", paths[2]);
       }
  +    
  +    */
   }
  
  
  
  1.3       +18 -2     incubator-geronimo/modules/twiddle/src/test/org/apache/geronimo/twiddle/config/test1.xml
  
  Index: test1.xml
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/twiddle/src/test/org/apache/geronimo/twiddle/config/test1.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- test1.xml	13 Aug 2003 11:48:57 -0000	1.2
  +++ test1.xml	13 Aug 2003 16:54:48 -0000	1.3
  @@ -18,11 +18,14 @@
     <!-- Additional Libraries -->
     <!-- ==================== -->
     
  +  <!--
  +  
     <libraries>
       <library>library1</library>
       <library>library2</library>
     </libraries>
     
  +  -->
     
     <!-- ====================== -->
     <!-- Configuration Includes -->
  @@ -45,6 +48,8 @@
       <attribute name="boolean1" type="boolean">true</attribute>
       <attribute name="class1" type="class">my.class</attribute>
       
  +    <!--
  +    
       <complex-attribute name="complex1" code="my.complex.class">
         <attribute name="default2">value2</attribute>
         <attribute name="string2" type="string">value</attribute>
  @@ -52,6 +57,9 @@
         <attribute name="boolean2" type="boolean">false</attribute>
         <attribute name="class2" type="class">my.other.class</attribute>
       </complex-attribute>
  +    
  +    -->
  +    
     </environment>
     
     
  @@ -59,12 +67,16 @@
     <!-- Command Search Path -->
     <!-- =================== -->
     
  +  <!--
  +  
     <search-path>
       <path-element>path1</path-element>
       <path-element>path2</path-element>
       <path-element>path3</path-element>
     </search-path>
     
  +  -->
  +  
     
     <!-- ======== -->
     <!-- Commands -->
  @@ -74,12 +86,16 @@
       
       <command name="help" code="org.geronimo.twiddle.commands.HelpCommand"/>
       
  +    <!--
  +    
       <command-set name="whatever">
         <command name="whatever" code="whatever">
           <attribute name="Foo">Bar</attribute>
         </command>
       </command-set>
  -  
  +    
  +    -->
  +    
     </commands>
   
   </configuration>
  
  
  

Mime
View raw message