org.melati.servlet
Class DefaultFileDataAdaptorFactory

java.lang.Object
  extended by org.melati.servlet.FormDataAdaptorFactory
      extended by org.melati.servlet.DefaultFileDataAdaptorFactory

public class DefaultFileDataAdaptorFactory
extends FormDataAdaptorFactory

Save the uploaded file to disk in a particular directory with a particular URL.


Field Summary
protected  java.lang.String uploadDir
           
protected  java.lang.String uploadURL
           
 
Constructor Summary
DefaultFileDataAdaptorFactory()
           
 
Method Summary
 FormDataAdaptor getIt(Melati melati, MultipartFormField field)
          Get the FormDataAdaptor.
 java.lang.String getUploadDir()
          Return the directory to save files in.
 java.lang.String getUploadURL()
           
 void setUploadDir(java.lang.String dir)
          Set the directory to save files in.
 void setUploadURL(java.lang.String url)
          Set the URL to the uploadDir.
 
Methods inherited from class org.melati.servlet.FormDataAdaptorFactory
get
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

uploadDir

protected java.lang.String uploadDir

uploadURL

protected java.lang.String uploadURL
Constructor Detail

DefaultFileDataAdaptorFactory

public DefaultFileDataAdaptorFactory()
Method Detail

getUploadDir

public java.lang.String getUploadDir()
Return the directory to save files in.

Returns:
the directory as a String

setUploadDir

public void setUploadDir(java.lang.String dir)
Set the directory to save files in.

Parameters:
dir - The value to set it to

getUploadURL

public java.lang.String getUploadURL()
Returns:
the URL to the uploadDir

setUploadURL

public void setUploadURL(java.lang.String url)
Set the URL to the uploadDir.

Parameters:
url - The value to set it to

getIt

public FormDataAdaptor getIt(Melati melati,
                             MultipartFormField field)
Get the FormDataAdaptor.

Specified by:
getIt in class FormDataAdaptorFactory
Parameters:
melati - The Melati
field - A MultipartFormField
Returns:
The FormDataAdaptor.


Copyright © 2000-2008 PanEris. All Rights Reserved.