You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@turbine.apache.org by ep...@apache.org on 2004/11/04 21:50:27 UTC
cvs commit: jakarta-turbine-fulcrum/upload/src/java/org/apache/fulcrum/upload UploadServiceFacade.java UploadService.java DefaultUploadService.java
epugh 2004/11/04 12:50:27
Modified: upload/src/java/org/apache/fulcrum/upload
UploadServiceFacade.java UploadService.java
DefaultUploadService.java
Log:
Cleanup
Revision Changes Path
1.2 +6 -5 jakarta-turbine-fulcrum/upload/src/java/org/apache/fulcrum/upload/UploadServiceFacade.java
Index: UploadServiceFacade.java
===================================================================
RCS file: /home/cvs/jakarta-turbine-fulcrum/upload/src/java/org/apache/fulcrum/upload/UploadServiceFacade.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- UploadServiceFacade.java 13 Feb 2004 14:26:23 -0000 1.1
+++ UploadServiceFacade.java 4 Nov 2004 20:50:27 -0000 1.2
@@ -59,6 +59,7 @@
import javax.servlet.http.HttpServletRequest;
import org.apache.commons.fileupload.DiskFileUpload;
+import org.apache.commons.fileupload.FileUploadException;
/**
* <p> This is a facade class for {@link UploadService}.
@@ -140,11 +141,11 @@
* @param req The servlet request to be parsed.
* @param params The ParameterParser instance to insert form
* fields into.
- * @exception ServiceException If there are problems reading/parsing
+ * @exception FileUploadException If there are problems reading/parsing
* the request or storing files.
*/
public static ArrayList parseRequest( HttpServletRequest req )
- throws Exception
+ throws FileUploadException
{
return uploadService.parseRequest(req, getFileUpload().getRepositoryPath());
}
@@ -160,12 +161,12 @@
* @param params The ParameterParser instance to insert form
* fields into.
* @param path The location where the files should be stored.
- * @exception ServiceException If there are problems reading/parsing
+ * @exception FileUploadException If there are problems reading/parsing
* the request or storing files.
*/
public static ArrayList parseRequest( HttpServletRequest req,
String path )
- throws Exception
+ throws FileUploadException
{
return getService().parseRequest(req, path);
}
1.2 +3 -2 jakarta-turbine-fulcrum/upload/src/java/org/apache/fulcrum/upload/UploadService.java
Index: UploadService.java
===================================================================
RCS file: /home/cvs/jakarta-turbine-fulcrum/upload/src/java/org/apache/fulcrum/upload/UploadService.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- UploadService.java 13 Feb 2004 14:26:23 -0000 1.1
+++ UploadService.java 4 Nov 2004 20:50:27 -0000 1.2
@@ -58,6 +58,7 @@
import javax.servlet.http.HttpServletRequest;
import org.apache.commons.fileupload.DiskFileUpload;
+import org.apache.commons.fileupload.FileUploadException;
/**
* <p> This service handles parsing <code>multipart/form-data</code>
@@ -195,7 +196,7 @@
* request or storing the uploaded file(s).
*/
public ArrayList parseRequest(HttpServletRequest req, String path)
- throws Exception;
+ throws FileUploadException;
/**
* <p> Retrieves the value of <code>size.max</code> property of the
1.2 +15 -33 jakarta-turbine-fulcrum/upload/src/java/org/apache/fulcrum/upload/DefaultUploadService.java
Index: DefaultUploadService.java
===================================================================
RCS file: /home/cvs/jakarta-turbine-fulcrum/upload/src/java/org/apache/fulcrum/upload/DefaultUploadService.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- DefaultUploadService.java 13 Feb 2004 14:26:23 -0000 1.1
+++ DefaultUploadService.java 4 Nov 2004 20:50:27 -0000 1.2
@@ -60,7 +60,6 @@
import javax.servlet.http.HttpServletRequest;
-import org.apache.avalon.framework.activity.Disposable;
import org.apache.avalon.framework.activity.Initializable;
import org.apache.avalon.framework.configuration.Configurable;
import org.apache.avalon.framework.configuration.Configuration;
@@ -96,7 +95,7 @@
*/
public class DefaultUploadService
extends AbstractLogEnabled
- implements UploadService, Initializable,Configurable, Disposable, Contextualizable, Serviceable
+ implements UploadService, Initializable,Configurable, Contextualizable, Serviceable
{
protected DiskFileUpload fileUpload;
@@ -148,22 +147,17 @@
*
* @param req The servlet request to be parsed.
* @param path The location where the files should be stored.
- * @exception ServiceException Problems reading/parsing the
+ * @exception FileUploadException Problems reading/parsing the
* request or storing the uploaded file(s).
*/
public ArrayList parseRequest(HttpServletRequest req, String path)
- throws Exception
+ throws FileUploadException
{
- try
- {
- return (ArrayList)
- (getFileUpload())
- .parseRequest(req, sizeThreshold, sizeMax, path);
- }
- catch (FileUploadException e)
- {
- throw new Exception(e);
- }
+
+ return (ArrayList)
+ (getFileUpload())
+ .parseRequest(req, sizeThreshold, sizeMax, path);
+
}
@@ -175,22 +169,17 @@
* @param sizeThreshold the max size in bytes to be stored in memory
* @param sizeMax the maximum allowed upload size in bytes
* @param path The location where the files should be stored.
- * @exception ServiceException Problems reading/parsing the
+ * @exception FileUploadException Problems reading/parsing the
* request or storing the uploaded file(s).
*/
public List parseRequest(HttpServletRequest req, int sizeThreshold,
int sizeMax, String path)
- throws Exception
+ throws FileUploadException
{
- try
- {
- return getFileUpload()
- .parseRequest(req, sizeThreshold, sizeMax, path);
- }
- catch (FileUploadException e)
- {
- throw new Exception(e);
- }
+
+ return getFileUpload()
+ .parseRequest(req, sizeThreshold, sizeMax, path);
+
}
/**
@@ -284,13 +273,6 @@
public void service( ServiceManager manager) {
UploadServiceFacade.setUploadService(this);
-
- }
- /**
- * Avalon component lifecycle method
- */
- public void dispose()
- {
}
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-dev-help@jakarta.apache.org