|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.turbine.services.upload.TurbineUpload
This is a facade class for UploadService
.
This class provides static methods that retrieve the configured
(in TurbineResource.properties) implementation of UploadService
and perform certain operations on it. It uses
constants defined in UploadService
interface for accessing
the service's properties and default values for them.
Constructor Summary | |
TurbineUpload()
|
Method Summary | |
static boolean |
getAutomatic()
Retrieves the value of the 'automatic' property of UploadService . |
static java.lang.String |
getRepository()
Retrieves the value of the repository property of
UploadService . |
static UploadService |
getService()
Retrieves an instance of system's configured implementation of UploadService |
static long |
getSizeMax()
Retrieves the value of 'size.max' property of UploadService . |
static int |
getSizeThreshold()
Retrieves the value of size.threshold property of
UploadService . |
static boolean |
isAvailable()
Checks whether an Upload Service is configured. |
static void |
parseRequest(javax.servlet.http.HttpServletRequest req,
ParameterParser params)
Performs parsing the request and storing files and form fields. |
static void |
parseRequest(javax.servlet.http.HttpServletRequest req,
ParameterParser params,
java.lang.String path)
Performs parsing the request and storing files and form fields. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public TurbineUpload()
Method Detail |
public static UploadService getService()
Retrieves an instance of system's configured implementation
of UploadService
public static boolean isAvailable()
public static boolean getAutomatic()
UploadService
. This reports whether the Upload Service
is available and (if yes), the Parameter parser should
allow "automatic" uploads if it is submitted to Turbine.
This method is safe to call even with no Upload Service
configured.
UploadService
.public static long getSizeMax()
Retrieves the value of 'size.max' property of UploadService
.
UploadService
.public static int getSizeThreshold()
Retrieves the value of size.threshold
property of
UploadService
.
public static java.lang.String getRepository()
Retrieves the value of the repository
property of
UploadService
.
public static void parseRequest(javax.servlet.http.HttpServletRequest req, ParameterParser params) throws TurbineException
Performs parsing the request and storing files and form
fields. Default file repository is used. This method is
called by the ParameterParser
if automatic upload is
enabled.
req
- The servlet request to be parsed.params
- The ParameterParser instance to insert form
fields into.
TurbineException
- If there are problems reading/parsing
the request or storing files.public static void parseRequest(javax.servlet.http.HttpServletRequest req, ParameterParser params, java.lang.String path) throws TurbineException
Performs parsing the request and storing files and form
fields. Custom file repository may be specified. You can call
this method in your file upload Action
to if you need to specify a
custom directory for storing files.
req
- The servlet request to be parsed.params
- The ParameterParser instance to insert form
fields into.path
- The location where the files should be stored.
TurbineException
- If there are problems reading/parsing
the request or storing files.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |