ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject cvs commit: jakarta-ant/src/main/org/apache/tools/ant/taskdefs Definer.java JDBCTask.java
Date Fri, 21 Jun 2002 05:49:06 GMT
stevel      2002/06/20 22:49:06

  Modified:    src/main/org/apache/tools/ant/taskdefs Tag: ANT_15_BRANCH
                        Definer.java JDBCTask.java
  Log:
  more javadoc updates.
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.15.2.6  +42 -0     jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Definer.java
  
  Index: Definer.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Definer.java,v
  retrieving revision 1.15.2.5
  retrieving revision 1.15.2.6
  diff -u -r1.15.2.5 -r1.15.2.6
  --- Definer.java	6 Jun 2002 01:15:56 -0000	1.15.2.5
  +++ Definer.java	21 Jun 2002 05:49:06 -0000	1.15.2.6
  @@ -89,6 +89,10 @@
       
       private static final String REUSE_LOADER_REF = "ant.reuse.loader";
       
  +    /**
  +     * @deprecated stop using this attribute
  +     * @ant.attribute ignore="true"
  +     */
       public void setReverseLoader(boolean reverseLoader) {
           this.reverseLoader = reverseLoader;
           log("The reverseloader attribute is DEPRECATED. It will be removed", 
  @@ -108,6 +112,9 @@
           }
       }
   
  +    /**
  +     * Create the classpath to be used when searching for component being defined
  +     */ 
       public Path createClasspath() {
           if (this.classpath == null) {
               this.classpath = new Path(project);
  @@ -115,6 +122,10 @@
           return this.classpath.createPath();
       }
   
  +    /**
  +     * reference to a classpath to use when loading the files.
  +     * To actually share the same loader, set loaderref as well
  +     */
       public void setClasspathRef(Reference r) {
           classpathId=r.getRefId();
           createClasspath().setRefid(r);
  @@ -209,6 +220,10 @@
           }
       }
       
  +    /**
  +     * create the classloader then hand the definition off to the subclass;
  +     * @throws BuildException when the class wont load for any reason
  +     */
       private void addDefinition(ClassLoader al, String name, String value)
           throws BuildException {
           try {
  @@ -226,6 +241,9 @@
           }
       }
   
  +    /**
  +     * create a classloader for this definition
  +     */
       private AntClassLoader createLoader() {
           // magic property 
           if (project.getProperty(REUSE_LOADER_REF) != null) {
  @@ -276,25 +294,49 @@
           return al;
       }
   
  +    /**
  +     * Name of the property file  to load
  +     * ant name/classname pairs from.
  +     */
       public void setFile(File file) {
           this.file = file;
       }
   
  +    /**
  +     * Name of the property resource to load
  +     * ant name/classname pairs from.
  +     */
       public void setResource(String res) {
           this.resource = res;
       }
   
  +    /**
  +     * Name of the property resource to load
  +     * ant name/classname pairs from.
  +     */
       public void setName(String name) {
           this.name = name;
       }
   
  +    /**
  +     * what is the classname we are definining? Can be null
  +     */
       public String getClassname() {
           return value;
       }
   
  +    /**
  +     * the full class name of the object being defined.
  +     * Required, unless file or resource have
  +     * been specified.
  +     */
       public void setClassname(String v) {
           value = v;
       }
   
  +    /**
  +     * this must be implemented by subclasses; it is the callback
  +     * they will get to add a new definition of their type
  +     */
       protected abstract void addDefinition(String name, Class c);
   }
  
  
  
  1.2.2.1   +16 -12    jakarta-ant/src/main/org/apache/tools/ant/taskdefs/JDBCTask.java
  
  Index: JDBCTask.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/JDBCTask.java,v
  retrieving revision 1.2
  retrieving revision 1.2.2.1
  diff -u -r1.2 -r1.2.2.1
  --- JDBCTask.java	26 Apr 2002 18:37:26 -0000	1.2
  +++ JDBCTask.java	21 Jun 2002 05:49:06 -0000	1.2.2.1
  @@ -192,7 +192,7 @@
       /**
        * Caching loaders / driver. This is to avoid
        * getting an OutOfMemoryError when calling this task
  -     * multiple times in a row.
  +     * multiple times in a row; default: true
        * @param enable
        */
       public void setCaching(boolean enable) {
  @@ -200,7 +200,7 @@
       }
   
       /**
  -     * Create the classpath for loading the driver.
  +     * Add the classpath for loading the driver; 
        */
       public Path createClasspath() {
           if (this.classpath == null) {
  @@ -210,14 +210,15 @@
       }
   
       /**
  -     * Set the classpath for loading the driver using the classpath reference.
  +     * Set the classpath for loading the driver 
  +     * using the classpath reference.
        */
       public void setClasspathRef(Reference r) {
           createClasspath().setRefid(r);
       }
   
       /**
  -     * Sets the driver.
  +     * Class name of the jdbc driver; required.
        * @param driver The driver to set
        */
       public void setDriver(String driver) {
  @@ -225,7 +226,7 @@
       }
   
       /**
  -     * Sets the url.
  +     * Sets the database connection url; required.
        * @param url The url to set
        */
       public void setUrl(String url) {
  @@ -233,14 +234,14 @@
       }
   
       /**
  -     * Set the user name for the DB connection.
  +     * Set the user name for the connection; required.
        */
       public void setUserid(String userId) {
           this.userId = userId;
       }
   
       /**
  -     * Sets the password.
  +     * Sets the password; required.
        * @param password The password to set
        */
       public void setPassword(String password) {
  @@ -248,7 +249,8 @@
       }
   
       /**
  -     * Sets the autocommit.
  +     * Auto commit flag for database connection;
  +     * optional, default false.
        * @param autocommit The autocommit to set
        */
       public void setAutocommit(boolean autocommit) {
  @@ -256,7 +258,8 @@
       }
   
       /**
  -     * Sets the rdbms.
  +     * Execute task only if the lower case product name 
  +     * of the DB matches this
        * @param rdbms The rdbms to set
        */
       public void setRdbms(String rdbms) {
  @@ -264,7 +267,8 @@
       }
   
       /**
  -     * Sets the version.
  +     * Sets the version string, execute task only if 
  +     * rdbms version match; optional.
        * @param version The version to set
        */
       public void setVersion(String version) {
  @@ -272,8 +276,8 @@
       }
   
       /**
  -     * Verify if connected to the correct RDBMS
  -     **/
  +     * Verify we are connected to the correct RDBMS
  +     */
       protected boolean isValidRdbms(Connection conn) {
           if (rdbms == null && version == null) {
               return true;
  
  
  

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


Mime
View raw message