org.fm.addressbook.bean
Class FileUploadBean

java.lang.Object
  extended by org.fm.addressbook.bean.BaseBean
      extended by org.fm.addressbook.bean.FileUploadBean

public class FileUploadBean
extends BaseBean

JContact- online Address Book Management Systemhttp://jcontact.sourceforge.net/

Licensed under the terms of any of the following licenses at your choice: -
GNU General Public License Version 2 or later (the "GPL") http://www.gnu.org/licenses/gpl.html -
GNU Lesser General Public License Version 2.1 or later (the "LGPL") http://www.gnu.org/licenses/lgpl.html

FileUploadBean is managed bean with session scope. This handles file upload functionalities.

Author:
Tennyson Varghese
Aneesh S

Field Summary
 
Fields inherited from class org.fm.addressbook.bean.BaseBean
SHOWBUTTON_CREATE, SHOWBUTTON_UPDATE
 
Constructor Summary
FileUploadBean()
           
 
Method Summary
 byte[] getFileByteContents()
           
 java.lang.String getFileName()
           
 java.lang.String getFilePath()
           
 java.lang.String getMimeType()
           
 long getTimeStamp()
           
 void init()
           
 void paint(java.io.OutputStream output, java.lang.Object object)
          Paint the picture
 void processFile(java.lang.String fileName)
          Set the fileByteContents with bytes of given file
 void resetBean()
           
 void setFileByteContents(byte[] fileByteContents)
           
 void setFileName(java.lang.String fileName)
           
 void setMimeType(java.lang.String mimeType)
           
 void uploadListener(org.richfaces.event.UploadEvent event)
          Listener for upload
 
Methods inherited from class org.fm.addressbook.bean.BaseBean
getShowButton, isCreateAction, setShowButton
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileUploadBean

public FileUploadBean()
Method Detail

init

public void init()
Specified by:
init in class BaseBean

resetBean

public void resetBean()
Specified by:
resetBean in class BaseBean

uploadListener

public void uploadListener(org.richfaces.event.UploadEvent event)
Listener for upload

Parameters:
event -

processFile

public void processFile(java.lang.String fileName)
Set the fileByteContents with bytes of given file

Parameters:
fileName -

paint

public void paint(java.io.OutputStream output,
                  java.lang.Object object)
           throws java.io.IOException
Paint the picture

Parameters:
output -
object -
Throws:
java.io.IOException

getFilePath

public java.lang.String getFilePath()
Returns:
upload directory path

getTimeStamp

public long getTimeStamp()

getFileByteContents

public byte[] getFileByteContents()

setFileByteContents

public void setFileByteContents(byte[] fileByteContents)

getFileName

public java.lang.String getFileName()

setFileName

public void setFileName(java.lang.String fileName)

getMimeType

public java.lang.String getMimeType()

setMimeType

public void setMimeType(java.lang.String mimeType)