Package ome.formats.importer.util
Class FileUploader
- java.lang.Object
-
- ome.formats.importer.util.FileUploader
-
- All Implemented Interfaces:
IObservable
public class FileUploader extends java.lang.Object implements IObservable
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
ZIP_EXTENSION
The extension used for the zip.
-
Constructor Summary
Constructors Constructor Description FileUploader(org.apache.http.impl.client.CloseableHttpClient httpClient)
Initialize upload with httpClient
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
addObserver(IObserver object)
Add observer for notificationboolean
deleteObserver(IObserver object)
Delete observervoid
notifyObservers(ImportEvent event)
Notify observers of eventvoid
uploadFiles(java.lang.String path, int timeout, ErrorContainer upload)
Upload files from error container to url
-
-
-
Field Detail
-
ZIP_EXTENSION
public static final java.lang.String ZIP_EXTENSION
The extension used for the zip.- See Also:
- Constant Field Values
-
-
Method Detail
-
uploadFiles
public void uploadFiles(java.lang.String path, int timeout, ErrorContainer upload) throws HtmlMessengerException
Upload files from error container to url- Parameters:
path
- the URL to which to POSTtimeout
- the timeout (ignored)upload
- the error container with files in it- Throws:
HtmlMessengerException
- if the POST failed
-
addObserver
public boolean addObserver(IObserver object)
Description copied from interface:IObservable
Add observer for notification- Specified by:
addObserver
in interfaceIObservable
- Parameters:
object
- - observer object- Returns:
- true if added
-
deleteObserver
public boolean deleteObserver(IObserver object)
Description copied from interface:IObservable
Delete observer- Specified by:
deleteObserver
in interfaceIObservable
- Parameters:
object
- - observer to delete- Returns:
- true if deleted
-
notifyObservers
public void notifyObservers(ImportEvent event)
Description copied from interface:IObservable
Notify observers of event- Specified by:
notifyObservers
in interfaceIObservable
- Parameters:
event
- - event that happened
-
-