prickett    2002/10/20 20:57:12

  Modified:    periodicity/src/plugins-build/database project.xml
               
periodicity/src/plugins-build/database/src/java/org/apache/commons/periodicity/database
                        DatabaseMetaDataImpl.java DriverMetaData.java
                        DriverMetaDataImpl.java
  Log:
  Added my email address to the database plugin project file.
  
  Added a dependency on velocity version 1.3 dev
  
  Added a variable to hold the db url property. The dbUrl Property
  will be computed and stored by the constructor, instead of generated
  each time getUrl is called (which is what I originally envisioned happening).
  
  Changed the type of the java.util.Properties variable to
  org.apache.velocity.context.Context.
  
  Revision  Changes    Path
  1.6       +5 -0      
jakarta-commons-sandbox/periodicity/src/plugins-build/database/project.xml
  
  Index: project.xml
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons-sandbox/periodicity/src/plugins-build/database/project.xml,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- project.xml       11 Oct 2002 19:43:26 -0000      1.5
  +++ project.xml       21 Oct 2002 03:57:12 -0000      1.6
  @@ -21,6 +21,7 @@
       <developer>
         <name>Jeff Prickett</name>
         <id>prickett</id>
  +      <email>[EMAIL PROTECTED]</email>
       </developer>
     </developers>
   
  @@ -39,6 +40,10 @@
         <properties>
           <classloader>root.maven</classloader>
         </properties>  
  +    </dependency>  
  +    <dependency>
  +      <id>velocity</id>
  +      <version>1.3-dev</version>
       </dependency>  
     </dependencies>  
   
  
  
  
  1.3       +22 -3     
jakarta-commons-sandbox/periodicity/src/plugins-build/database/src/java/org/apache/commons/periodicity/database/DatabaseMetaDataImpl.java
  
  Index: DatabaseMetaDataImpl.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons-sandbox/periodicity/src/plugins-build/database/src/java/org/apache/commons/periodicity/database/DatabaseMetaDataImpl.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- DatabaseMetaDataImpl.java 20 Oct 2002 22:44:46 -0000      1.2
  +++ DatabaseMetaDataImpl.java 21 Oct 2002 03:57:12 -0000      1.3
  @@ -74,6 +74,9 @@
       /** A variable to hold the type of the database */
       private String dbType = null;
   
  +    /** A variable to hold the url of the database */
  +    private String dbUrl = null;
  +
       /**
        * The purpose of this method is to create a new database meta data
        * implementation given a name and a type.
  @@ -163,5 +166,21 @@
       public String getUrl()
       {
           return null;
  +    }
  +
  +    /**
  +     * The purpose of this method is to set the url of the database.
  +     * @param newval The new value of the url as a string.
  +     */
  +    private void setUrl(String newval) throws Exception
  +    {
  +        if(newval != null)
  +        {
  +            dbUrl = newval;
  +        }
  +        else
  +        {
  +            throw new Exception("newval == null");
  +        }
       }    
   }    
  
  
  
  1.2       +4 -4      
jakarta-commons-sandbox/periodicity/src/plugins-build/database/src/java/org/apache/commons/periodicity/database/DriverMetaData.java
  
  Index: DriverMetaData.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons-sandbox/periodicity/src/plugins-build/database/src/java/org/apache/commons/periodicity/database/DriverMetaData.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DriverMetaData.java       20 Oct 2002 23:02:33 -0000      1.1
  +++ DriverMetaData.java       21 Oct 2002 03:57:12 -0000      1.2
  @@ -64,7 +64,7 @@
   
   
   
  -import java.util.Properties;
  +import org.apache.velocity.context.Context;
   
   public interface DriverMetaData
   {
  @@ -82,7 +82,7 @@
        * @return The properties that are associated with this database driver
        *         meta data object.
        */
  -    public Properties getProperties();
  +    public Context getVelocityContext();
   
   }    
       
  
  
  
  1.2       +14 -14    
jakarta-commons-sandbox/periodicity/src/plugins-build/database/src/java/org/apache/commons/periodicity/database/DriverMetaDataImpl.java
  
  Index: DriverMetaDataImpl.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons-sandbox/periodicity/src/plugins-build/database/src/java/org/apache/commons/periodicity/database/DriverMetaDataImpl.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DriverMetaDataImpl.java   20 Oct 2002 23:02:33 -0000      1.1
  +++ DriverMetaDataImpl.java   21 Oct 2002 03:57:12 -0000      1.2
  @@ -64,7 +64,7 @@
   
   
   
  -import java.util.Properties;
  +import org.apache.velocity.context.Context;
   
   public class DriverMetaDataImpl implements DriverMetaData
   {
  @@ -72,7 +72,7 @@
       private String name = null;
   
       /** A variable to store the properties of the driver */
  -    private Properties props = null;
  +    private Context context = null;
   
       /**
        * The purpose of this method is to create a new driver meta data
  @@ -80,21 +80,21 @@
        * @param newName The name of the new Driver Meta Data object.
        * @param newProps The properties of the new Driver Meta Data object.
        */
  -    DriverMetaDataImpl(String newName, Properties newProps) 
  +    DriverMetaDataImpl(String newName, Context newContext) 
              throws Exception
       {
  -        if(newName != null && newProps != null)
  +        if(newName != null && newContext != null)
           {
               setName(newName);
  -            setProperties(newProps);
  +            setVelocityContext(newContext);
           }
           else if(newName == null)
           {
               throw new Exception("newName == null");
           }
  -        else if(newProps == null)
  +        else if(newContext == null)
           {
  -            throw new Exception("newProps == null");
  +            throw new Exception("newContext == null");
           }
           else
           {
  @@ -135,9 +135,9 @@
        * @return The properties that are associated with this database driver
        *         meta data object.
        */
  -    public Properties getProperties()
  +    public Context getVelocityContext()
       {
  -        return props;
  +        return context;
       }
   
       /**
  @@ -146,11 +146,11 @@
        * @param newval newval The new value for the properties of this database
        *        object.
        */
  -    private void setProperties(Properties newval) throws Exception
  +    private void setVelocityContext(Context newval) throws Exception
       {
  -        if(props != null)
  +        if(context != null)
           {
  -            props = newval;
  +            context = newval;
           }
           else
           {
  
  
  

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

Reply via email to