org.melati.servlet
Class DefaultFileFormDataAdaptor
java.lang.Object
org.melati.servlet.BaseFileFormDataAdaptor
org.melati.servlet.DefaultFileFormDataAdaptor
- All Implemented Interfaces:
- FormDataAdaptor
public class DefaultFileFormDataAdaptor
- extends BaseFileFormDataAdaptor
The default way to save an uploaded file to disk.
We tell it what directory to save it in and the base URL
to that directory.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
melati
protected Melati melati
uploadDir
protected String uploadDir
uploadURL
protected String uploadURL
makeUnique
protected boolean makeUnique
DefaultFileFormDataAdaptor
public DefaultFileFormDataAdaptor(Melati melatiP,
String uploadDirP,
String uploadUrlP)
- Constructor.
- Parameters:
melatiP
- The current melatiuploadDirP
- The directory to save this file inuploadUrlP
- A URL pointing to this directory (null if there
isn't an appropriate URL)
DefaultFileFormDataAdaptor
public DefaultFileFormDataAdaptor(Melati melatiP,
String uploadDirP,
String uploadURLP,
boolean makeUniqueP)
- Constructor.
- Parameters:
melatiP
- The current melatiuploadDirP
- The directory to save this file inuploadURLP
- A URL pointing to this directory (null if there
isn't an appropriate URL)makeUnique
- Whether we should make sure the new file has a unique
name within the uploadDir
directory
calculateLocalFile
protected File calculateLocalFile()
- Specified by:
calculateLocalFile
in class BaseFileFormDataAdaptor
- Returns:
- The file in which to save the data
calculateURL
protected String calculateURL()
- Description copied from class:
BaseFileFormDataAdaptor
- Return a URL to the saved file, null if not appropriate.
- Specified by:
calculateURL
in class BaseFileFormDataAdaptor
- Returns:
- a URL to the saved file, null if not appropriate
Copyright © 2000-2010 PanEris. All Rights Reserved.