|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Defines a common file handler interface to decouple the file receiver from the application processing.
For example a Struts Action
org.enableit.db.darrt.web.UploadAction.class
has been written
to allow a user to upload files through a web interface. But a variety
of possible functionality is required to process the file once received.
This interface is implemented by the processor, which the
receiver delegates to as appropriate. How the receiver
obtains the processor is undefined, though in the example
Action
it is via a JNDI lookup.
Method Summary | |
void |
process(java.io.File file,
java.lang.String fileType)
Process the specified file. |
void |
setProvider(org.enableit.db.beans.Provider provider)
Specify database connection details. |
Method Detail |
public void process(java.io.File file, java.lang.String fileType) throws ConfigurationException, DBException, java.rmi.RemoteException
file
- The file to upload.fileType
- A file type that will be recognised by the
implentation. Typically this should refer to the type of the
data in the file not the file's format or mime type, which the
implementation is expected to detect for itself (for example by
file extension or using the Java Activation Framework).
ConfigurationException
- If the fileType parameter is
unrecognised
DBException
- If the handling of the file goes wrong
in some recoverable way.
java.rmi.RemoteException
- If some system exception occurs within an
implementing class that is running in a distributed environment
(i.e. an EJB)public void setProvider(org.enableit.db.beans.Provider provider) throws ConfigurationException, DBException, java.rmi.RemoteException
provider
- Provider to be used by the FileProcessor
.
ConfigurationException
- If this FileProcessor
does
not expect a provider.
DBException
- If the handling of the file goes wrong
in some recoverable way.
java.rmi.RemoteException
- If some system exception occurs within an
implementing class that is running in a distributed environment
(i.e. an EJB)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |