Author: jochen
Date: Wed Jun  6 16:51:28 2007
New Revision: 544995

URL: http://svn.apache.org/viewvc?view=rev&rev=544995
Log:
Documented that the FileCleaningTracker may be null
to disable tracking.
PR: FILEUPLOAD-133

Modified:
    
jakarta/commons/proper/fileupload/trunk/src/java/org/apache/commons/fileupload/disk/DiskFileItem.java
    
jakarta/commons/proper/fileupload/trunk/src/java/org/apache/commons/fileupload/disk/DiskFileItemFactory.java

Modified: 
jakarta/commons/proper/fileupload/trunk/src/java/org/apache/commons/fileupload/disk/DiskFileItem.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/fileupload/trunk/src/java/org/apache/commons/fileupload/disk/DiskFileItem.java?view=diff&rev=544995&r1=544994&r2=544995
==============================================================================
--- 
jakarta/commons/proper/fileupload/trunk/src/java/org/apache/commons/fileupload/disk/DiskFileItem.java
 (original)
+++ 
jakarta/commons/proper/fileupload/trunk/src/java/org/apache/commons/fileupload/disk/DiskFileItem.java
 Wed Jun  6 16:51:28 2007
@@ -216,7 +216,8 @@
      * Constructs a new <code>DiskFileItem</code> instance.
      *
      * @param tracker       The tracker, which is responsible for deleting
-     *                      the temporary file.
+     *                      the temporary file. May be null, if the file
+     *                      doesn't need to be tracked.
      * @param fieldName     The name of the form field.
      * @param contentType   The content type passed by the browser or
      *                      <code>null</code> if not specified.
@@ -648,10 +649,11 @@
 
 
     /**
-     * Creates and returns a [EMAIL PROTECTED] java.io.File File} representing 
a uniquely
-     * named temporary file in the configured repository path. The lifetime of
-     * the file is tied to the lifetime of the <code>FileItem</code> instance;
-     * the file will be deleted when the instance is garbage collected.
+     * <p>Creates and returns a [EMAIL PROTECTED] java.io.File File} 
representing a uniquely
+     * named temporary file in the configured repository path.</p>
+     * <p>If the file item factory has an associated [EMAIL PROTECTED] 
FileCleaningTracker},
+     * then the lifetime of the file is tied to the lifetime of the 
<code>FileItem</code>
+     * instance: The file will be deleted when the instance is garbage 
collected.</p>
      *
      * @return The [EMAIL PROTECTED] java.io.File File} to be used for 
temporary storage.
      */

Modified: 
jakarta/commons/proper/fileupload/trunk/src/java/org/apache/commons/fileupload/disk/DiskFileItemFactory.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/fileupload/trunk/src/java/org/apache/commons/fileupload/disk/DiskFileItemFactory.java?view=diff&rev=544995&r1=544994&r2=544995
==============================================================================
--- 
jakarta/commons/proper/fileupload/trunk/src/java/org/apache/commons/fileupload/disk/DiskFileItemFactory.java
 (original)
+++ 
jakarta/commons/proper/fileupload/trunk/src/java/org/apache/commons/fileupload/disk/DiskFileItemFactory.java
 Wed Jun  6 16:51:28 2007
@@ -85,8 +85,9 @@
 
 
     /**
-     * The instance of [EMAIL PROTECTED] FileCleaningTracker}, which is 
responsible
-     * for deleting temporary files.
+     * <p>The instance of [EMAIL PROTECTED] FileCleaningTracker}, which is 
responsible
+     * for deleting temporary files.</p>
+     * <p>May be null, if tracking files is not required.</p>
      */
     private FileCleaningTracker fileCleaningTracker;
 
@@ -130,7 +131,8 @@
      *                      which files will be created, should the item size
      *                      exceed the threshold.
      * @param tracker       The tracker, which is responsible to delete
-     *                      temporary files.
+     *                      temporary files. May be null, if files don't need
+     *                      to be tracked.
      */
     public DiskFileItemFactory(FileCleaningTracker tracker, int sizeThreshold,
             File repository) {
@@ -226,7 +228,8 @@
      * Returns the tracker, which is responsible for deleting temporary
      * files.
      * @return An instance of [EMAIL PROTECTED] FileCleaningTracker}, defaults 
to
-     *   [EMAIL PROTECTED] FileCleaner#getInstance()}.
+     *   [EMAIL PROTECTED] FileCleaner#getInstance()}. Null, if temporary files
+     *   aren't tracked.
      */
     public FileCleaningTracker getFileCleaningTracker() {
         return fileCleaningTracker;
@@ -236,7 +239,8 @@
      * Returns the tracker, which is responsible for deleting temporary
      * files.
      * @param pTracker An instance of [EMAIL PROTECTED] FileCleaningTracker},
-     *   which will from now on track the created files.
+     *   which will from now on track the created files. May be null
+     *   to disable tracking.
      */
     public void setFileCleaningTracker(FileCleaningTracker pTracker) {
         fileCleaningTracker = pTracker;



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to