|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IDelete
Provides simplifed methods for deleting instances from the database. Various policies may exist for delete and so it is important to consult the implementation documentation to know what types will be deleted by force (using admin privileges) or alternatively throw an exception due to constraint violations.
Method Summary | |
---|---|
List<ome.model.IObject> |
checkImageDelete(long id,
boolean force)
Returns all entities which would prevent the given Image id from
being deleted. |
void |
deleteImage(long id,
boolean force)
Deletes an Image and all related (subordinate) metadata as
defined below. |
void |
deleteImages(Set<Long> ids,
boolean force)
Deletes several Image instances within a single transaction via
the deleteImage(long, boolean) method. |
void |
deleteImagesByDataset(long datasetId,
boolean force)
Deletes the user-visible Image instances of the given
Dataset within a single transaction via the
deleteImage(long, boolean) . |
void |
deletePlate(long plateId)
Deletes all the images contained in a plate as if deleted by:
deleteImage(id, true)
so that all Dataset and Annotation links are broken, with WellSamples removed
first. |
void |
deleteSettings(long pixelId)
Deletes all rendering settings for the given Pixel id. |
List<ome.model.IObject> |
previewImageDelete(long id,
boolean force)
Returns all entities which would be deleted by a call to deleteImage(long, boolean) . |
Method Detail |
---|
List<ome.model.IObject> checkImageDelete(long id, boolean force)
Image
id from
being deleted. The force boolean determines whether or not the user's
collections should be removed in order to facilitate the delete.
Currently this only includes datasets
. The force boolean
determines if Dataset
instances from the same user will be
considered as constraints. Regardless of force, datasets from other users
are considered constraints.
id
- of the Image
to be deleted.force
- return value will be included
List<ome.model.IObject> previewImageDelete(long id, boolean force)
deleteImage(long, boolean)
.
id
- force
-
void deleteImage(long id, boolean force) throws ome.conditions.SecurityViolation, ome.conditions.ValidationException, ome.conditions.ApiUsageException
Image
and all related (subordinate) metadata as
defined below. This method calls checkImageDelete(long, boolean)
and throws a ConstraintViolation
exception with the results of
that call are not empty; then it forcibly deletes all objects returned by
previewImageDelete(long, boolean)
The deleted metadata includes all of the following types which belong to the current user:
Pixels
PixelsDimensions
PlaneInfo
RenderingDef
OriginalFile
ImageAnnotationLink
Image
data graph will be considered corrupted and a
ValidationException
will be thrown.
For the types:
Thumbnail
If the Image
is not owned by the current user, then
SecurityViolation
is thrown, unless the user is root or the group
leader.
Dataset
owned by another user. If the Image
is contained
in other datasets
belonging to the same user, then the
force parameter decides what will happen. A force value of true implies
that the Image
will be removed as well as the related
links
.
The Pixels.getRelatedTo()
field will be set to null for all
Pixels
pointing to a Pixels
instance which is about to
be deleted.
id
- id of the Image
to be deletedforce
- Image
will be removed even if contained in other
datasets
. If false, a
ConstraintViolation
will be raised.
ome.conditions.ValidationException
- throws an exception if there is any unexpected object which
prevents this object from being deleted, i.e. not in
checkImageDelete(long, boolean)
(check first)
ome.conditions.ApiUsageException
- if the object has constraints. Use
checkImageDelete(long, boolean)
first in order to
verify that there are no constraints.
ome.conditions.SecurityViolation
- If the Image
does not belong to the current user.void deleteImages(Set<Long> ids, boolean force) throws ome.conditions.SecurityViolation, ome.conditions.ValidationException, ome.conditions.ApiUsageException
Image
instances within a single transaction via
the deleteImage(long, boolean)
method.
id
- As deleteImage(long, boolean)
force
- As deleteImage(long, boolean)
ome.conditions.ValidationException
- As deleteImage(long, boolean)
ome.conditions.ApiUsageException
- As deleteImage(long, boolean)
ome.conditions.SecurityViolation
- As deleteImage(long, boolean)
void deleteImagesByDataset(long datasetId, boolean force) throws ome.conditions.SecurityViolation, ome.conditions.ValidationException, ome.conditions.ApiUsageException
Image
instances of the given
Dataset
within a single transaction via the
deleteImage(long, boolean)
. In addition, before Image
deletion is attempted, the links
to the given
Dataset
are first removed, otherwise this method would always
require a "force" argument of true.
id
- As deleteImage(long, boolean)
force
- As deleteImage(long, boolean)
ome.conditions.ValidationException
- As deleteImage(long, boolean)
ome.conditions.ApiUsageException
- As deleteImage(long, boolean)
SecurityVilation
- As {@link #deleteImage(long, boolean)
ome.conditions.SecurityViolation
void deleteSettings(long pixelId)
void deletePlate(long plateId)
deleteImage(id, true)
so that all Dataset and Annotation links are broken, with WellSamples removed
first. Then all Wells in the Plate and the Plate itself are removed.
WellSampleAnnotationLinks, WellAnnotationLinks, and PlateAnnotationLinks are
deleted as necessary.
plateId
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Version: 4.3.3-00d1137e-b2894
Copyright © 2009 The University of Dundee. All Rights Reserved.