Weaver 3.1.0a1-D1

com.oldlight.weaver.interpreter
Class WeaverUploadedFileImpl

java.lang.Object
  extended bycom.oldlight.weaver.interpreter.WeaverUploadedFileImpl
All Implemented Interfaces:
WeaverUploadedFile

public class WeaverUploadedFileImpl
extends Object
implements WeaverUploadedFile


Field Summary
private  String contentType
           
private  File file
           
private  boolean keep
           
private  String name
           
private  String remoteFileName
           
 
Constructor Summary
WeaverUploadedFileImpl(String name, String contentType, File file, String remoteFileName)
           
 
Method Summary
 void cleanUpIfNeeded()
           
 String getContentType()
          Gets the content type (MIME type) of the uploaded file.
 File getFile()
          Gets a File object on to the uploaded file.
 boolean getKeep()
          Determines wheter this file is flagged for automatic deletion once the current request has been processed.
 String getName()
          Gets the name of the uploaded file as it appeared on the remove file system.
 void setKeep(boolean keep)
          Sest whether this file should be automatically deleted once the current request has been processed.
 String toString()
          Gets a string representation of the object (this is NOT file contents)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

keep

private boolean keep

contentType

private String contentType

file

private File file

remoteFileName

private String remoteFileName

name

private String name
Constructor Detail

WeaverUploadedFileImpl

public WeaverUploadedFileImpl(String name,
                              String contentType,
                              File file,
                              String remoteFileName)
Method Detail

getKeep

public boolean getKeep()
Description copied from interface: WeaverUploadedFile
Determines wheter this file is flagged for automatic deletion once the current request has been processed.

Specified by:
getKeep in interface WeaverUploadedFile
Returns:
Keep status.

getName

public String getName()
Description copied from interface: WeaverUploadedFile
Gets the name of the uploaded file as it appeared on the remove file system.

Specified by:
getName in interface WeaverUploadedFile
Returns:
The remove file name.

setKeep

public void setKeep(boolean keep)
Description copied from interface: WeaverUploadedFile
Sest whether this file should be automatically deleted once the current request has been processed. By default the file will be deleted. If the file is flagged to be kept then it is your responsibility to clean it up when it is nolonger needed.

Specified by:
setKeep in interface WeaverUploadedFile
Parameters:
keep - Whether to kepp the file.

cleanUpIfNeeded

public void cleanUpIfNeeded()

getFile

public File getFile()
Description copied from interface: WeaverUploadedFile
Gets a File object on to the uploaded file.

Specified by:
getFile in interface WeaverUploadedFile
Returns:
The uploaded file.

getContentType

public String getContentType()
Description copied from interface: WeaverUploadedFile
Gets the content type (MIME type) of the uploaded file.

Specified by:
getContentType in interface WeaverUploadedFile
Returns:
The content type.

toString

public String toString()
Description copied from interface: WeaverUploadedFile
Gets a string representation of the object (this is NOT file contents)

Specified by:
toString in interface WeaverUploadedFile

Copyright ©Paul Harvey