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 void
addImagesToDataset(SecurityContext ctx, java.util.Collection<ImageData> images, DatasetData ds)
Adds theImageData
s to the givenDatasetData
void
addImageToDataset(SecurityContext ctx, ImageData image, DatasetData ds)
Adds theImageData
to the givenDatasetData
<T extends AnnotationData>
TattachAnnotation(SecurityContext ctx, T annotation, DataObject target)
Create/attach anAnnotationData
to a givenDataObject
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 aFile
to aDataObject
void
changeGroup(SecurityContext ctx, java.util.List<? extends DataObject> objects, long groupId)
Move the given objects into another groupDatasetData
createDataset(SecurityContext ctx, DatasetData dataset, ProjectData project)
Creates theDatasetData
on 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.CmdCallbackI
delete(SecurityContext ctx, java.util.List<omero.model.IObject> objects)
Deletes the specified objects asynchronouslyomero.cmd.CmdCallbackI
delete(SecurityContext ctx, omero.model.IObject object)
Deletes the specified object asynchronouslyomero.cmd.CmdCallbackI
deleteFolders(SecurityContext ctx, java.util.Collection<FolderData> folders, boolean includeSubFolders, boolean includeContent)
Delete Folders (asynchronous)void
move(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.DataObject
saveAndReturnObject(SecurityContext ctx, DataObject object)
Updates the specified object.DataObject
saveAndReturnObject(SecurityContext ctx, DataObject object, java.lang.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, java.lang.String userName)
Updates the specified object.omero.model.IObject
saveAndReturnObject(SecurityContext ctx, omero.model.IObject object, java.util.Map options)
Updates the specified object.omero.model.IObject
saveAndReturnObject(SecurityContext ctx, omero.model.IObject object, java.util.Map options, java.lang.String userName)
Updates the specified object.omero.model.IObject
updateObject(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 specifiedIObject
s and returned the updatedIObject
s.-
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
- TheSecurityContext
folders
- The Folder to deleteincludeSubFolders
- Passtrue
to recursively delete sub foldersincludeContent
- Passtrue
to 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 specifiedIObject
s and returned the updatedIObject
s.- 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 theImageData
to 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 theImageData
s 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 theDatasetData
on 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
- TheSecurityContext
dataset
- TheDatasetData
project
- 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 aFile
to aDataObject
- Parameters:
ctx
- TheSecurityContext
file
- TheFile
to attachmimetype
- The mimetype of the file (can benull
)description
- A description (can benull
)namespace
- The namespace (can benull
)target
- TheDataObject
to attach the file to- Returns:
- The
Future
FileAnnotationData
-
attachAnnotation
public <T extends AnnotationData> T attachAnnotation(SecurityContext ctx, T annotation, DataObject target) throws DSOutOfServiceException, DSAccessException
Create/attach anAnnotationData
to a givenDataObject
- Parameters:
ctx
- TheSecurityContext
annotation
- TheAnnotationData
target
- TheDataObject
to 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:
DSOutOfServiceException
DSAccessException
-
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:
DSAccessException
DSOutOfServiceException
-
-