| |
|
| java.lang.Object org.apache.turbine.services.upload.TurbineUpload
TurbineUpload | abstract public class TurbineUpload (Code) | | 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.
author: Rafal Krzewski version: $Id: TurbineUpload.java 534527 2007-05-02 16:10:59Z tv $ |
getAutomatic | public static boolean getAutomatic()(Code) | | Retrieves the value of the 'automatic' property of
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.
The value of 'automatic' property of UploadService. |
getService | public static UploadService getService()(Code) | | Retrieves an instance of system's configured implementation
of UploadService
An instance of UploadService |
getSizeMax | public static long getSizeMax()(Code) | | Retrieves the value of 'size.max' property of
UploadService .
The value of 'size.max' property of UploadService. |
isAvailable | public static boolean isAvailable()(Code) | | Checks whether an Upload Service is configured.
This method is safe to call even with no Upload
service installed.
True if an upload Service is configured |
parseRequest | public static void parseRequest(HttpServletRequest req, ParameterParser params) throws TurbineException(Code) | | 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.
Parameters: req - The servlet request to be parsed. Parameters: params - The ParameterParser instance to insert formfields into. exception: TurbineException - If there are problems reading/parsingthe request or storing files. |
parseRequest | public static void parseRequest(HttpServletRequest req, ParameterParser params, String path) throws TurbineException(Code) | | 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
org.apache.turbine.modules.Action to if you need to specify a
custom directory for storing files.
Parameters: req - The servlet request to be parsed. Parameters: params - The ParameterParser instance to insert formfields into. Parameters: path - The location where the files should be stored. exception: TurbineException - If there are problems reading/parsingthe request or storing files. |
|
|
|