Package omero.gateway.facility
Class DataManagerFacility
- java.lang.Object
-
- omero.gateway.facility.Facility
-
- omero.gateway.facility.DataManagerFacility
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddImagesToDataset(SecurityContext ctx, java.util.Collection<ImageData> images, DatasetData ds)Adds theImageDatas to the givenDatasetDatavoidaddImageToDataset(SecurityContext ctx, ImageData image, DatasetData ds)Adds theImageDatato the givenDatasetData<T extends AnnotationData>
TattachAnnotation(SecurityContext ctx, T annotation, DataObject target)Create/attach anAnnotationDatato a givenDataObjectjava.util.concurrent.Future<FileAnnotationData>attachFile(SecurityContext ctx, java.io.File file, java.lang.String mimetype, java.lang.String description, java.lang.String namespace, DataObject target)Attaches aFileto aDataObjectvoidchangeGroup(SecurityContext ctx, java.util.List<? extends DataObject> objects, long groupId)Move the given objects into another groupDatasetDatacreateDataset(SecurityContext ctx, DatasetData dataset, ProjectData project)Creates theDatasetDataon the server and attaches it to theProjectData(if notnull) (if the project doesn't exist on the server yet, it will be created, too)omero.cmd.CmdCallbackIdelete(SecurityContext ctx, java.util.List<omero.model.IObject> objects)Deletes the specified objects asynchronouslyomero.cmd.CmdCallbackIdelete(SecurityContext ctx, omero.model.IObject object)Deletes the specified object asynchronouslyomero.cmd.CmdCallbackIdeleteFolders(SecurityContext ctx, java.util.Collection<FolderData> folders, boolean includeSubFolders, boolean includeContent)Delete Folders (asynchronous)voidmove(SecurityContext ctx, java.util.List<? extends DataObject> objects, DataObject from, DataObject to)Moves DataObjects from one object to another, i.e.java.util.List<omero.model.IObject>saveAndReturnObject(SecurityContext ctx, java.util.List<omero.model.IObject> objects, java.util.Map options, java.lang.String userName)Updates the specified object.DataObjectsaveAndReturnObject(SecurityContext ctx, DataObject object)Updates the specified object.DataObjectsaveAndReturnObject(SecurityContext ctx, DataObject object, java.lang.String userName)Updates the specified object.omero.model.IObjectsaveAndReturnObject(SecurityContext ctx, omero.model.IObject object)Updates the specified object.omero.model.IObjectsaveAndReturnObject(SecurityContext ctx, omero.model.IObject object, java.lang.String userName)Updates the specified object.omero.model.IObjectsaveAndReturnObject(SecurityContext ctx, omero.model.IObject object, java.util.Map options)Updates the specified object.omero.model.IObjectsaveAndReturnObject(SecurityContext ctx, omero.model.IObject object, java.util.Map options, java.lang.String userName)Updates the specified object.omero.model.IObjectupdateObject(SecurityContext ctx, omero.model.IObject object, omero.sys.Parameters options)Updates the specified object.java.util.List<omero.model.IObject>updateObjects(SecurityContext ctx, java.util.List<omero.model.IObject> objects, omero.sys.Parameters options)Updates the specifiedIObjects and returned the updatedIObjects.-
Methods inherited from class omero.gateway.facility.Facility
addPropertyChangeListener, clear, firePropertyChanged, firePropertyChanged, getFacility, logDebug, logError, logInfo, logWarn, removePropertyChangeListener
-
-
-
-
Method Detail
-
delete
public omero.cmd.CmdCallbackI delete(SecurityContext ctx, omero.model.IObject object) throws DSOutOfServiceException, DSAccessException
Deletes the specified object asynchronously- Parameters:
ctx- The security context.object- The object to delete.- Returns:
- The
CmdCallbackI - Throws:
DSOutOfServiceException- If the connection is broken, or not logged inDSAccessException- If an error occurred while trying to retrieve data from OMERO service.
-
deleteFolders
public omero.cmd.CmdCallbackI deleteFolders(SecurityContext ctx, java.util.Collection<FolderData> folders, boolean includeSubFolders, boolean includeContent) throws DSOutOfServiceException, DSAccessException
Delete Folders (asynchronous)- Parameters:
ctx- TheSecurityContextfolders- The Folder to deleteincludeSubFolders- Passtrueto recursively delete sub foldersincludeContent- Passtrueto also delete content of the folders, otherwise content (ROIs, Images) will be orphaned- Returns:
- The Callback reference
- Throws:
DSOutOfServiceException- If the connection is broken, or not logged inDSAccessException- If an error occurred while trying to retrieve data from OMERO service.
-
delete
public omero.cmd.CmdCallbackI delete(SecurityContext ctx, java.util.List<omero.model.IObject> objects) throws DSOutOfServiceException, DSAccessException
Deletes the specified objects asynchronously- Parameters:
ctx- The security context.objects- The objects to delete.- Returns:
- The
CmdCallbackI - Throws:
DSOutOfServiceException- If the connection is broken, or logged inDSAccessException- If an error occurred while trying to retrieve data from OMERO service.
-
saveAndReturnObject
public omero.model.IObject saveAndReturnObject(SecurityContext ctx, omero.model.IObject object, java.util.Map options) throws DSOutOfServiceException, DSAccessException
Updates the specified object.- Parameters:
ctx- The security context.object- The object to update.options- Options to update the data.- Returns:
- The updated object.
- Throws:
DSOutOfServiceException- If the connection is broken, or not logged inDSAccessException- If an error occurred while trying to retrieve data from OMERO service.- See Also:
IContainerPrx.updateDataObject(IObject, Parameters)
-
saveAndReturnObject
public DataObject saveAndReturnObject(SecurityContext ctx, DataObject object) throws DSOutOfServiceException, DSAccessException
Updates the specified object.- Parameters:
ctx- The security context.object- The object to update.- Returns:
- The updated object.
- Throws:
DSOutOfServiceException- If the connection is broken, or not logged inDSAccessException- If an error occurred while trying to retrieve data from OMERO service.- See Also:
IContainerPrx.updateDataObject(IObject, Parameters)
-
saveAndReturnObject
public omero.model.IObject saveAndReturnObject(SecurityContext ctx, omero.model.IObject object) throws DSOutOfServiceException, DSAccessException
Updates the specified object.- Parameters:
ctx- The security context.object- The object to update.- Returns:
- The updated object.
- Throws:
DSOutOfServiceException- If the connection is broken, or not logged inDSAccessException- If an error occurred while trying to retrieve data from OMERO service.- See Also:
IContainerPrx.updateDataObject(IObject, Parameters)
-
saveAndReturnObject
public omero.model.IObject saveAndReturnObject(SecurityContext ctx, omero.model.IObject object, java.util.Map options, java.lang.String userName) throws DSOutOfServiceException, DSAccessException
Updates the specified object.- Parameters:
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.- Returns:
- The updated object.
- Throws:
DSOutOfServiceException- If the connection is broken, or not logged inDSAccessException- If an error occurred while trying to retrieve data from OMERO service.- See Also:
IContainerPrx.updateDataObject(IObject, Parameters)
-
saveAndReturnObject
public DataObject saveAndReturnObject(SecurityContext ctx, DataObject object, java.lang.String userName) throws DSOutOfServiceException, DSAccessException
Updates the specified object.- Parameters:
ctx- The security context.object- The object to update.userName- The name of the user to create the data for.- Returns:
- The updated object.
- Throws:
DSOutOfServiceException- If the connection is broken, or not logged inDSAccessException- If an error occurred while trying to retrieve data from OMERO service.- See Also:
IContainerPrx.updateDataObject(IObject, Parameters)
-
saveAndReturnObject
public omero.model.IObject saveAndReturnObject(SecurityContext ctx, omero.model.IObject object, java.lang.String userName) throws DSOutOfServiceException, DSAccessException
Updates the specified object.- Parameters:
ctx- The security context.object- The object to update.userName- The name of the user to create the data for.- Returns:
- The updated object.
- Throws:
DSOutOfServiceException- If the connection is broken, or not logged inDSAccessException- If an error occurred while trying to retrieve data from OMERO service.- See Also:
IContainerPrx.updateDataObject(IObject, Parameters)
-
saveAndReturnObject
public java.util.List<omero.model.IObject> saveAndReturnObject(SecurityContext ctx, java.util.List<omero.model.IObject> objects, java.util.Map options, java.lang.String userName) throws DSOutOfServiceException, DSAccessException
Updates the specified object.- Parameters:
ctx- The security context.objects- The objects to update.options- Options to update the data.userName- The username- Returns:
- The updated object.
- Throws:
DSOutOfServiceException- If the connection is broken, or not logged inDSAccessException- If an error occurred while trying to retrieve data from OMERO service.- See Also:
IContainerPrx.updateDataObject(IObject, Parameters)
-
updateObject
public omero.model.IObject updateObject(SecurityContext ctx, omero.model.IObject object, omero.sys.Parameters options) throws DSOutOfServiceException, DSAccessException
Updates the specified object.- Parameters:
ctx- The security context.object- The object to update.options- Options to update the data.- Returns:
- The updated object.
- Throws:
DSOutOfServiceException- If the connection is broken, or not logged inDSAccessException- If an error occurred while trying to retrieve data from OMERO service.- See Also:
IContainerPrx.updateDataObject(IObject, Parameters)
-
updateObjects
public java.util.List<omero.model.IObject> updateObjects(SecurityContext ctx, java.util.List<omero.model.IObject> objects, omero.sys.Parameters options) throws DSOutOfServiceException, DSAccessException
Updates the specifiedIObjects and returned the updatedIObjects.- Parameters:
ctx- The security context.objects- The array of objects to update.options- Options to update the data.- Returns:
- See above.
- Throws:
DSOutOfServiceException- If the connection is broken, or not logged inDSAccessException- If an error occurred while trying to retrieve data from OMERO service.- See Also:
IContainerPrx.updateDataObjects(List, Parameters)
-
addImageToDataset
public void addImageToDataset(SecurityContext ctx, ImageData image, DatasetData ds) throws DSOutOfServiceException, DSAccessException
Adds theImageDatato the givenDatasetData- Parameters:
ctx- The security context.image- The image to add to the datasetds- The dataset to add the image to- Throws:
DSOutOfServiceException- If the connection is broken, or not logged inDSAccessException- If an error occurred while trying to retrieve data from OMERO service.
-
addImagesToDataset
public void addImagesToDataset(SecurityContext ctx, java.util.Collection<ImageData> images, DatasetData ds) throws DSOutOfServiceException, DSAccessException
Adds theImageDatas to the givenDatasetData- Parameters:
ctx- The security context.images- The images to add to the datasetds- The dataset to add the images to- Throws:
DSOutOfServiceException- If the connection is broken, or not logged inDSAccessException- If an error occurred while trying to retrieve data from OMERO service.
-
createDataset
public DatasetData createDataset(SecurityContext ctx, DatasetData dataset, ProjectData project) throws DSOutOfServiceException, DSAccessException
Creates theDatasetDataon the server and attaches it to theProjectData(if notnull) (if the project doesn't exist on the server yet, it will be created, too)- Parameters:
ctx- TheSecurityContextdataset- TheDatasetDataproject- TheProjectData- Returns:
- The
DatasetData - Throws:
DSOutOfServiceException- If the connection is broken, or not logged inDSAccessException- If an error occurred while trying to retrieve data from OMERO service.
-
attachFile
public java.util.concurrent.Future<FileAnnotationData> attachFile(SecurityContext ctx, java.io.File file, java.lang.String mimetype, java.lang.String description, java.lang.String namespace, DataObject target)
Attaches aFileto aDataObject- Parameters:
ctx- TheSecurityContextfile- TheFileto attachmimetype- The mimetype of the file (can benull)description- A description (can benull)namespace- The namespace (can benull)target- TheDataObjectto attach the file to- Returns:
- The
FutureFileAnnotationData
-
attachAnnotation
public <T extends AnnotationData> T attachAnnotation(SecurityContext ctx, T annotation, DataObject target) throws DSOutOfServiceException, DSAccessException
Create/attach anAnnotationDatato a givenDataObject- Parameters:
ctx- TheSecurityContextannotation- TheAnnotationDatatarget- TheDataObjectto attach to- Returns:
- The
AnnotationData - Throws:
DSOutOfServiceException- If the connection is broken, or not logged inDSAccessException- If an error occurred while trying to retrieve data from OMERO service.
-
move
public void move(SecurityContext ctx, java.util.List<? extends DataObject> objects, DataObject from, DataObject to) throws DSOutOfServiceException, DSAccessException
Moves DataObjects from one object to another, i.e. Annotations from one Image to another, or Images from one Dataset to another.- Parameters:
ctx- The SecurityContextobjects- The objects to movefrom- The object to which the objects are attached nowto- The object to which the objects should be attached- Throws:
DSOutOfServiceExceptionDSAccessException
-
changeGroup
public void changeGroup(SecurityContext ctx, java.util.List<? extends DataObject> objects, long groupId) throws DSAccessException, DSOutOfServiceException
Move the given objects into another group- Parameters:
ctx- The SecurityContextobjects- The objects to move into another groupgroupId- The group to move the objects into- Throws:
DSAccessExceptionDSOutOfServiceException
-
-