public class DataManagerFacility extends Facility
Facility
for saving, deleting and updating data objectsModifier and Type | Method and Description |
---|---|
void |
addImagesToDataset(SecurityContext ctx,
Collection<ImageData> images,
DatasetData ds)
Adds the
ImageData s to the given DatasetData |
void |
addImageToDataset(SecurityContext ctx,
ImageData image,
DatasetData ds)
Adds the
ImageData to the given DatasetData |
<T extends AnnotationData> |
attachAnnotation(SecurityContext ctx,
T annotation,
DataObject target)
Create/attach an
AnnotationData to a given DataObject |
Future<FileAnnotationData> |
attachFile(SecurityContext ctx,
File file,
String mimetype,
String description,
String namespace,
DataObject target)
Attaches a
File to a DataObject |
DatasetData |
createDataset(SecurityContext ctx,
DatasetData dataset,
ProjectData project)
Creates the
DatasetData on the server and attaches it
to the ProjectData (if not null ) (if the
project doesn't exist on the server yet, it will be created, too) |
CmdCallbackI |
delete(SecurityContext ctx,
omero.model.IObject object)
Deletes the specified object asynchronously
|
CmdCallbackI |
delete(SecurityContext ctx,
List<omero.model.IObject> objects)
Deletes the specified objects asynchronously
|
CmdCallbackI |
deleteFolders(SecurityContext ctx,
Collection<FolderData> folders,
boolean includeSubFolders,
boolean includeContent)
Delete Folders (asynchronous)
|
omero.cmd.Response |
deleteObject(SecurityContext ctx,
omero.model.IObject object)
Deprecated.
Use the asynchronous method
delete(SecurityContext, IObject) instead |
omero.cmd.Response |
deleteObjects(SecurityContext ctx,
List<omero.model.IObject> objects)
Deprecated.
Use the asynchronous method
delete(SecurityContext, List) instead |
DataObject |
saveAndReturnObject(SecurityContext ctx,
DataObject object)
Updates the specified object.
|
DataObject |
saveAndReturnObject(SecurityContext ctx,
DataObject object,
String userName)
Updates the specified object.
|
omero.model.IObject |
saveAndReturnObject(SecurityContext ctx,
omero.model.IObject object)
Updates the specified object.
|
omero.model.IObject |
saveAndReturnObject(SecurityContext ctx,
omero.model.IObject object,
Map options)
Updates the specified object.
|
omero.model.IObject |
saveAndReturnObject(SecurityContext ctx,
omero.model.IObject object,
Map options,
String userName)
Updates the specified object.
|
omero.model.IObject |
saveAndReturnObject(SecurityContext ctx,
omero.model.IObject object,
String userName)
Updates the specified object.
|
List<omero.model.IObject> |
saveAndReturnObject(SecurityContext ctx,
List<omero.model.IObject> objects,
Map options,
String userName)
Updates the specified object.
|
omero.model.IObject |
updateObject(SecurityContext ctx,
omero.model.IObject object,
omero.sys.Parameters options)
Updates the specified object.
|
List<omero.model.IObject> |
updateObjects(SecurityContext ctx,
List<omero.model.IObject> objects,
omero.sys.Parameters options)
Updates the specified
IObject s and returned the updated
IObject s. |
addPropertyChangeListener, clear, firePropertyChanged, firePropertyChanged, getFacility, logDebug, logError, logInfo, logWarn, removePropertyChangeListener
public omero.cmd.Response deleteObject(SecurityContext ctx, omero.model.IObject object) throws DSOutOfServiceException, DSAccessException
delete(SecurityContext, IObject)
insteadctx
- The security context.object
- The object to delete.Response
handleDSOutOfServiceException
- If the connection is broken, or not logged inDSAccessException
- If an error occurred while trying to retrieve data from OMERO
service.public CmdCallbackI delete(SecurityContext ctx, omero.model.IObject object) throws DSOutOfServiceException, DSAccessException
ctx
- The security context.object
- The object to delete.CmdCallbackI
DSOutOfServiceException
- If the connection is broken, or not logged inDSAccessException
- If an error occurred while trying to retrieve data from OMERO
service.public CmdCallbackI deleteFolders(SecurityContext ctx, Collection<FolderData> folders, boolean includeSubFolders, boolean includeContent) throws DSOutOfServiceException, DSAccessException
ctx
- The SecurityContext
folders
- The Folder to deleteincludeSubFolders
- Pass true
to recursively delete sub foldersincludeContent
- Pass true
to also delete content of the folders,
otherwise content (ROIs, Images) will be orphanedDSOutOfServiceException
- If the connection is broken, or not logged inDSAccessException
- If an error occurred while trying to retrieve data from OMERO
service.public CmdCallbackI delete(SecurityContext ctx, List<omero.model.IObject> objects) throws DSOutOfServiceException, DSAccessException
ctx
- The security context.objects
- The objects to delete.CmdCallbackI
DSOutOfServiceException
- If the connection is broken, or logged inDSAccessException
- If an error occurred while trying to retrieve data from OMERO
service.public omero.cmd.Response deleteObjects(SecurityContext ctx, List<omero.model.IObject> objects) throws DSOutOfServiceException, DSAccessException
delete(SecurityContext, List)
insteadctx
- The security context.objects
- The objects to delete.Response
handleDSOutOfServiceException
- If the connection is broken, or not logged inDSAccessException
- If an error occurred while trying to retrieve data from OMERO
service.public omero.model.IObject saveAndReturnObject(SecurityContext ctx, omero.model.IObject object, Map options) throws DSOutOfServiceException, DSAccessException
ctx
- The security context.object
- The object to update.options
- Options to update the data.DSOutOfServiceException
- If the connection is broken, or not logged inDSAccessException
- If an error occurred while trying to retrieve data from OMERO
service.IContainerPrx.updateDataObject(IObject, Parameters)
public DataObject saveAndReturnObject(SecurityContext ctx, DataObject object) throws DSOutOfServiceException, DSAccessException
ctx
- The security context.object
- The object to update.DSOutOfServiceException
- If the connection is broken, or not logged inDSAccessException
- If an error occurred while trying to retrieve data from OMERO
service.IContainerPrx.updateDataObject(IObject, Parameters)
public omero.model.IObject saveAndReturnObject(SecurityContext ctx, omero.model.IObject object) throws DSOutOfServiceException, DSAccessException
ctx
- The security context.object
- The object to update.DSOutOfServiceException
- If the connection is broken, or not logged inDSAccessException
- If an error occurred while trying to retrieve data from OMERO
service.IContainerPrx.updateDataObject(IObject, Parameters)
public omero.model.IObject saveAndReturnObject(SecurityContext ctx, omero.model.IObject object, Map options, String userName) throws DSOutOfServiceException, DSAccessException
ctx
- The security context.object
- The object to update.options
- Options to update the data.userName
- The name of the user to create the data for.DSOutOfServiceException
- If the connection is broken, or not logged inDSAccessException
- If an error occurred while trying to retrieve data from OMERO
service.IContainerPrx.updateDataObject(IObject, Parameters)
public DataObject saveAndReturnObject(SecurityContext ctx, DataObject object, String userName) throws DSOutOfServiceException, DSAccessException
ctx
- The security context.object
- The object to update.userName
- The name of the user to create the data for.DSOutOfServiceException
- If the connection is broken, or not logged inDSAccessException
- If an error occurred while trying to retrieve data from OMERO
service.IContainerPrx.updateDataObject(IObject, Parameters)
public omero.model.IObject saveAndReturnObject(SecurityContext ctx, omero.model.IObject object, String userName) throws DSOutOfServiceException, DSAccessException
ctx
- The security context.object
- The object to update.userName
- The name of the user to create the data for.DSOutOfServiceException
- If the connection is broken, or not logged inDSAccessException
- If an error occurred while trying to retrieve data from OMERO
service.IContainerPrx.updateDataObject(IObject, Parameters)
public List<omero.model.IObject> saveAndReturnObject(SecurityContext ctx, List<omero.model.IObject> objects, Map options, String userName) throws DSOutOfServiceException, DSAccessException
ctx
- The security context.objects
- The objects to update.options
- Options to update the data.userName
- The usernameDSOutOfServiceException
- If the connection is broken, or not logged inDSAccessException
- If an error occurred while trying to retrieve data from OMERO
service.IContainerPrx.updateDataObject(IObject, Parameters)
public omero.model.IObject updateObject(SecurityContext ctx, omero.model.IObject object, omero.sys.Parameters options) throws DSOutOfServiceException, DSAccessException
ctx
- The security context.object
- The object to update.options
- Options to update the data.DSOutOfServiceException
- If the connection is broken, or not logged inDSAccessException
- If an error occurred while trying to retrieve data from OMERO
service.IContainerPrx.updateDataObject(IObject, Parameters)
public List<omero.model.IObject> updateObjects(SecurityContext ctx, List<omero.model.IObject> objects, omero.sys.Parameters options) throws DSOutOfServiceException, DSAccessException
IObject
s and returned the updated
IObject
s.ctx
- The security context.objects
- The array of objects to update.options
- Options to update the data.DSOutOfServiceException
- If the connection is broken, or not logged inDSAccessException
- If an error occurred while trying to retrieve data from OMERO
service.IContainerPrx.updateDataObjects(List, Parameters)
public void addImageToDataset(SecurityContext ctx, ImageData image, DatasetData ds) throws DSOutOfServiceException, DSAccessException
ImageData
to the given DatasetData
ctx
- The security context.image
- The image to add to the datasetds
- The dataset to add the image toDSOutOfServiceException
- If the connection is broken, or not logged inDSAccessException
- If an error occurred while trying to retrieve data from OMERO
service.public void addImagesToDataset(SecurityContext ctx, Collection<ImageData> images, DatasetData ds) throws DSOutOfServiceException, DSAccessException
ImageData
s to the given DatasetData
ctx
- The security context.images
- The images to add to the datasetds
- The dataset to add the images toDSOutOfServiceException
- If the connection is broken, or not logged inDSAccessException
- If an error occurred while trying to retrieve data from OMERO
service.public DatasetData createDataset(SecurityContext ctx, DatasetData dataset, ProjectData project) throws DSOutOfServiceException, DSAccessException
DatasetData
on the server and attaches it
to the ProjectData
(if not null
) (if the
project doesn't exist on the server yet, it will be created, too)ctx
- The SecurityContext
dataset
- The DatasetData
project
- The ProjectData
DatasetData
DSOutOfServiceException
- If the connection is broken, or not logged inDSAccessException
- If an error occurred while trying to retrieve data from OMERO
service.public Future<FileAnnotationData> attachFile(SecurityContext ctx, File file, String mimetype, String description, String namespace, DataObject target)
File
to a DataObject
ctx
- The SecurityContext
file
- The File
to attachmimetype
- The mimetype of the file (can be null
)description
- A description (can be null
)namespace
- The namespace (can be null
)target
- The DataObject
to attach the file toFuture
FileAnnotationData
public <T extends AnnotationData> T attachAnnotation(SecurityContext ctx, T annotation, DataObject target) throws DSOutOfServiceException, DSAccessException
AnnotationData
to a given DataObject
ctx
- The SecurityContext
annotation
- The AnnotationData
target
- The DataObject
to attach toAnnotationData
DSOutOfServiceException
- If the connection is broken, or not logged inDSAccessException
- If an error occurred while trying to retrieve data from OMERO
service.
Version: 5.3.3-ice35-b63
Copyright © 2017 The University of Dundee & Open Microscopy Environment. All Rights Reserved.