public class TransferFacility extends Facility
Facility
which provides data transfer functionality, i.e. download
files and upload/import files.Modifier and Type | Method and Description |
---|---|
List<File> |
downloadImage(SecurityContext context,
String targetPath,
long imageId)
Downloads the original file of an image from the server.
|
void |
uploadImage(SecurityContext context,
File image,
boolean folderAsContainer,
boolean overrideName,
ExperimenterData user,
ImportCallback observer)
Uploads an image to the server.
|
void |
uploadImage(SecurityContext context,
File image,
ImportCallback observer)
Uploads an image to the server
|
void |
uploadImage(SecurityContext context,
File image,
IObserver observer,
String username,
String groupname)
Uploads an image to the server.
|
addPropertyChangeListener, clear, getFacility, logDebug, logError, logInfo, logWarn, removePropertyChangeListener
public void uploadImage(SecurityContext context, File image, ImportCallback observer) throws DSAccessException, DSOutOfServiceException, ImportException
context
- The security context.image
- The image to upload.observer
- The observer to notify components of upload status.DSOutOfServiceException
DSAccessException
ImportException
- If an error occurred while importing data.public void uploadImage(SecurityContext context, File image, boolean folderAsContainer, boolean overrideName, ExperimenterData user, ImportCallback observer) throws DSAccessException, DSOutOfServiceException, ImportException
context
- The security context.image
- The image to upload.folderAsContainer
- Indicates to use the folder's name to create
a dataset or screen.overrideName
- Indicates to override the file's name.user
- The owner of the image.observer
- The observer to notify components of upload status.DSOutOfServiceException
DSAccessException
ImportException
- If an error occurred while importing data.public void uploadImage(SecurityContext context, File image, IObserver observer, String username, String groupname) throws DSAccessException, DSOutOfServiceException
context
- The security context.image
- The image to upload.observer
- The observer to notify components of upload status.username
- The OMERO user name.groupname
- The group to import the data to.DSOutOfServiceException
DSAccessException
public List<File> downloadImage(SecurityContext context, String targetPath, long imageId) throws DSAccessException, DSOutOfServiceException
context
- The security context.targetPath
- Path to the file.imageId
- The identifier of the image.DSOutOfServiceException
DSAccessException
Version: 5.2.1-ice35-b15
Copyright © 2015 The University of Dundee & Open Microscopy Environment. All Rights Reserved.