org.melati.servlet
Class FormDataAdaptorFactory

Package class diagram package FormDataAdaptorFactory
java.lang.Object
  extended by org.melati.servlet.FormDataAdaptorFactory
Direct Known Subclasses:
DefaultFileFormDataAdaptorFactory, MemoryFormDataAdaptorFactory, TemporaryFileFormDataAdaptorFactory

public abstract class FormDataAdaptorFactory
extends Object

A way to implement policies about how to save uploaded files.


Constructor Summary
FormDataAdaptorFactory()
           
 
Method Summary
 FormDataAdaptor get(Melati melati, MultipartFormField field)
          We need to establish the user and set up any request specific melati stuff so that we can verify the user has permission for this task, and use melati Table / Objects to manipulate what the FormDataAdaptor does.
abstract  FormDataAdaptor getIt(Melati melati, MultipartFormField field)
          Implements different policies for saving uploaded files depending on the details of the file and the state of the application.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FormDataAdaptorFactory

public FormDataAdaptorFactory()
Method Detail

get

public FormDataAdaptor get(Melati melati,
                           MultipartFormField field)
We need to establish the user and set up any request specific melati stuff so that we can verify the user has permission for this task, and use melati Table / Objects to manipulate what the FormDataAdaptor does. Please note that when uploading a file for a record that has not yet been inserted (ie whilst adding), melati.getObject will return null.

Parameters:
melati - the Melati
field - a MultipartFormField to process
Returns:
a new FormDataAdaptor

getIt

public abstract FormDataAdaptor getIt(Melati melati,
                                      MultipartFormField field)
Implements different policies for saving uploaded files depending on the details of the file and the state of the application.

Parameters:
melati - the state of (this call to) the application
field - details of the uploaded file
Returns:
an adaptor which will save the contents of the file


Copyright © 2000-2010 PanEris. All Rights Reserved.