info.magnolia.ui.form.field.upload
Interface FileItemWrapper

All Known Implementing Classes:
BasicFileItemWrapper

public interface FileItemWrapper

Used by Upload fields to handle Items and perform the bridge between a Vaadin Item and a UploadReceiver
FileItemWrapper is used by :
- Implementation class of AbstractUploadField in order to display File information's: newly Uploaded File or already Stored File by using the getter's
- AbstractUploadField in order to update the Item based on the Uploaded File (Dropped File): This is done during handling of events like UploadFinished or UploadFailed...


Method Summary
 void clearProperties()
          Clear all properties.
 String getExtension()
           
 File getFile()
           
 String getFileName()
           
 long getFileSize()
           
 String getMimeType()
           
 boolean isEmpty()
          Return true if the binaryData is not empty.
 void populateFromItem(com.vaadin.data.Item item)
          Populate the FileItemWrapper with the provided Item.
Generally done in the constructor (in Builder).
 void populateFromReceiver(UploadReceiver receiver)
          Populate the FileItemWrapper with the provided UploadReceiver.
 void reloadPrevious()
          Used to restore the previous Uploaded File if existing.
 

Method Detail

populateFromItem

void populateFromItem(com.vaadin.data.Item item)
Populate the FileItemWrapper with the provided Item.
Generally done in the constructor (in Builder).


populateFromReceiver

void populateFromReceiver(UploadReceiver receiver)
Populate the FileItemWrapper with the provided UploadReceiver.


clearProperties

void clearProperties()
Clear all properties.


reloadPrevious

void reloadPrevious()
Used to restore the previous Uploaded File if existing.


isEmpty

boolean isEmpty()
Return true if the binaryData is not empty. false otherwise.


getFileSize

long getFileSize()

getMimeType

String getMimeType()

getExtension

String getExtension()

getFileName

String getFileName()

getFile

File getFile()


Copyright © 2013 Magnolia International Ltd.. All Rights Reserved.