dlr         01/05/18 11:25:23

  Modified:    src/java/org/apache/turbine/services/upload
                        TurbineUpload.java
  Log:
  Moved functionality into BaseUploadService.  It never belonged in this
  thin wrapper code.
  
  Revision  Changes    Path
  1.11      +10 -37    
jakarta-turbine/src/java/org/apache/turbine/services/upload/TurbineUpload.java
  
  Index: TurbineUpload.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-turbine/src/java/org/apache/turbine/services/upload/TurbineUpload.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- TurbineUpload.java        2001/05/05 14:03:45     1.10
  +++ TurbineUpload.java        2001/05/18 18:25:20     1.11
  @@ -73,7 +73,7 @@
    * the service's properties and default values for them.
    *
    * @author <a href="mailto:[EMAIL PROTECTED]";>Rafal Krzewski</a>
  - * @version $Id: TurbineUpload.java,v 1.10 2001/05/05 14:03:45 jvanzyl Exp $
  + * @version $Id: TurbineUpload.java,v 1.11 2001/05/18 18:25:20 dlr Exp $
    */
   public abstract class TurbineUpload
   {
  @@ -133,56 +133,29 @@
        */
       public static int getSizeMax()
       {
  -        UploadService upload = getService();
  -        String sizeMax = upload.getProperties()
  -            .getProperty(UploadService.SIZE_MAX_KEY,
  -                         UploadService.SIZE_MAX_DEFAULT.toString());
  -        try
  -        {
  -            return Integer.parseInt(sizeMax);
  -        }
  -        catch(NumberFormatException e)
  -        {
  -            return UploadService.SIZE_MAX_DEFAULT.intValue();
  -        }
  +        return getService().getSizeMax();
       }
   
       /**
  -     * <p> Retrieves the value of 'size.threshold' property of {@link
  -     * UploadService}.
  +     * <p> Retrieves the value of <code>size.threshold</code> property of
  +     * {@link org.apache.turbine.services.upload.UploadService}.
        *
  -     * @return The value of 'size.threshold' property of {@link
  -     * UploadService}.
  +     * @return The threshold beyond which files are written directly to disk.
        */
       public static int getSizeThreshold()
       {
  -        UploadService upload = getService();
  -        String sizeThreshold = upload.getProperties()
  -            .getProperty(UploadService.SIZE_THRESHOLD_KEY,
  -                         UploadService.SIZE_THRESHOLD_DEFAULT.toString());
  -        try
  -        {
  -            return Integer.parseInt(sizeThreshold);
  -        }
  -        catch(NumberFormatException e)
  -        {
  -            return UploadService.SIZE_THRESHOLD_DEFAULT.intValue();
  -        }
  +        return getService().getSizeThreshold();
       }
   
       /**
  -     * <p> Retrieves the value of 'repository' property of {@link
  -     * UploadService}.
  +     * <p> Retrieves the value of the <code>repository</code> property of
  +     * {@link org.apache.turbine.services.upload.UploadService}.
        *
  -     * @return The value of 'repository' property of {@link
  -     * UploadService}.
  +     * @return The repository.
        */
       public static String getRepository()
       {
  -        UploadService upload = getService();
  -        return upload.getProperties()
  -            .getProperty(UploadService.REPOSITORY_KEY,
  -                         UploadService.REPOSITORY_DEFAULT.toString());
  +        return getService().getRepository();
       }
   
       /**
  
  
  

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

Reply via email to