ICEfaces ACE Components 3.3.0
Java API Documentation

org.icefaces.ace.component.fileentry
Interface FileEntryCallback

All Superinterfaces:
java.io.Serializable

public interface FileEntryCallback
extends java.io.Serializable

When files are being uploaded, they will be saved into the file-system unless a FileEntryCallback is provided, in which case the application may take responsibility for the process of saving the files. This is useful in cases where the files should be saved into a database, or processed in memory before being written to the file-system, etc. Each call to begin(-) can be followed by any number of calls to the write(-) methods, and then a call to end(-). Even if the begin(-) call shows that the file had pre-failed (say, due to an invalid file extension), end(-) will still be called, but not any of the write(-) methods.


Method Summary
 void begin(FileEntryResults.FileInfo fileInfo)
          Notify the callback of another file that has been uploaded Check fileInfo.getStatus() to determine if the file has pre-failed uploading, due to too many files uploaded, an invalid file extension, or content type.
 void end(FileEntryResults.FileInfo fileInfo)
          If we detect that a file failed, say because it's over quota, then we'll tell the callback, and it might massage the result, to still accept the file, or possibly to fail the file that we thought was ok, by calling FileEntryResults.FileInfo.updateStatus(FileEntryStatus, boolean).
 void write(byte[] buffer, int offset, int length)
          We write in chunks, as we read them in
 void write(int data)
          We write in chunks, as we read them in
 

Method Detail

begin

void begin(FileEntryResults.FileInfo fileInfo)
Notify the callback of another file that has been uploaded Check fileInfo.getStatus() to determine if the file has pre-failed uploading, due to too many files uploaded, an invalid file extension, or content type.

Parameters:
fileInfo - Contains all of the information known about the file, before downloading the contents

write

void write(byte[] buffer,
           int offset,
           int length)
We write in chunks, as we read them in


write

void write(int data)
We write in chunks, as we read them in


end

void end(FileEntryResults.FileInfo fileInfo)
If we detect that a file failed, say because it's over quota, then we'll tell the callback, and it might massage the result, to still accept the file, or possibly to fail the file that we thought was ok, by calling FileEntryResults.FileInfo.updateStatus(FileEntryStatus, boolean).

Parameters:
fileInfo - The same object that was passed into begin(FileInfo)

ICEfaces ACE Components 3.3.0
Java API Documentation

Copyright 2013 ICEsoft Technologies Canada Corp., All Rights Reserved.