Class DeleteBean

  • All Implemented Interfaces:
    ome.api.IDelete, ome.api.ServiceInterface, ome.system.SelfConfigurableService

    @Transactional
    public class DeleteBean
    extends AbstractLevel2Service
    implements ome.api.IDelete
    Strict implementation of the IDelete service interface which will use the SecuritySystem via SecuritySystem.runAsAdmin(AdminAction) to forcibly delete instances.
    Since:
    3.0-Beta3
    See Also:
    IDelete
    • Field Detail

      • log

        public static final org.slf4j.Logger log
      • IMAGE_QUERY

        public static final java.lang.String IMAGE_QUERY
        Loads an Image graph including: Pixels, Channel, LogicalChannel, StatsInfo, PlaneInfo, Thumbnails, file maps, OriginalFiles, and Settings
        See Also:
        Constant Field Values
      • SETTINGSID_QUERY

        public static final java.lang.String SETTINGSID_QUERY
        See Also:
        Constant Field Values
      • PLATEIMAGES_QUERY

        public static final java.lang.String PLATEIMAGES_QUERY
        See Also:
        Constant Field Values
    • Method Detail

      • getServiceInterface

        public final java.lang.Class<? extends ome.api.ServiceInterface> getServiceInterface()
        Specified by:
        getServiceInterface in interface ome.system.SelfConfigurableService
      • checkImageDelete

        public java.util.List<ome.model.IObject> checkImageDelete​(long id,
                                                                  boolean force)
        Specified by:
        checkImageDelete in interface ome.api.IDelete
      • previewImageDelete

        public java.util.List<ome.model.IObject> previewImageDelete​(long id,
                                                                    boolean force)
        This uses IMAGE_QUERY to load all the subordinate metadata of the Image which will be deleted.
        Specified by:
        previewImageDelete in interface ome.api.IDelete
      • deleteImage

        public void deleteImage​(long id,
                                boolean force)
                         throws ome.conditions.SecurityViolation,
                                ome.conditions.ValidationException
        Specified by:
        deleteImage in interface ome.api.IDelete
        Throws:
        ome.conditions.SecurityViolation
        ome.conditions.ValidationException
      • deleteImages

        public void deleteImages​(java.util.Set<java.lang.Long> ids,
                                 boolean force)
                          throws ome.conditions.SecurityViolation,
                                 ome.conditions.ValidationException,
                                 ome.conditions.ApiUsageException
        Specified by:
        deleteImages in interface ome.api.IDelete
        Throws:
        ome.conditions.SecurityViolation
        ome.conditions.ValidationException
        ome.conditions.ApiUsageException
      • deleteImagesByDataset

        public void deleteImagesByDataset​(long datasetId,
                                          boolean force)
                                   throws ome.conditions.SecurityViolation,
                                          ome.conditions.ValidationException,
                                          ome.conditions.ApiUsageException
        Specified by:
        deleteImagesByDataset in interface ome.api.IDelete
        Throws:
        ome.conditions.SecurityViolation
        ome.conditions.ValidationException
        ome.conditions.ApiUsageException
      • deleteSettings

        public void deleteSettings​(long imageId)
        Specified by:
        deleteSettings in interface ome.api.IDelete
      • deleteChannels

        public void deleteChannels​(long imageId)
      • deletePlate

        public void deletePlate​(long plateId)
        Specified by:
        deletePlate in interface ome.api.IDelete
      • collect

        protected void collect​(ome.services.delete.UnloadedCollector delete,
                               ome.model.core.Image i)
        Walks the Image graph collecting unloaded instances of all entities for later delete.