Package ome.services

Class RawFileBean

  • All Implemented Interfaces:
    java.io.Serializable, ome.api.RawFileStore, ome.api.ServiceInterface, ome.api.StatefulServiceInterface, ome.system.SelfConfigurableService
    Direct Known Subclasses:
    RawFileBeanReadOnly

    @Transactional(readOnly=true)
    public class RawFileBean
    extends AbstractStatefulBean
    implements ome.api.RawFileStore
    Raw file gateway which provides access to the OMERO file repository.
    Since:
    OMERO3.0
    See Also:
    Serialized Form
    • Constructor Detail

      • RawFileBean

        public RawFileBean()
        default constructor
      • RawFileBean

        public RawFileBean​(boolean checking)
        overridden to allow Spring to set boolean
        Parameters:
        checking -
    • Method Detail

      • getServiceInterface

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

        public final void setOriginalFilesService​(ome.io.nio.OriginalFilesService ioService)
        I/O service (OriginalFilesService) Bean injector.
        Parameters:
        ioService - an OriginalFileService.
      • setIRepositoryInfo

        public final void setIRepositoryInfo​(ome.api.IRepositoryInfo iRepositoryInfo)
        Disk Space Usage service Bean injector
        Parameters:
        iRepositoryInfo - an IRepositoryInfo
      • setAdminService

        public final void setAdminService​(ome.api.IAdmin admin)
      • setChecksumProviderFactory

        public final void setChecksumProviderFactory​(ome.util.checksum.ChecksumProviderFactory checksumProviderFactory)
        ChecksumProviderFactory Bean injector
        Parameters:
        checksumProviderFactory - a ChecksumProviderFactory
      • passivate

        @Transactional(readOnly=true)
        public void passivate()
        Specified by:
        passivate in interface ome.api.StatefulServiceInterface
      • activate

        @Transactional(readOnly=true)
        public void activate()
        Specified by:
        activate in interface ome.api.StatefulServiceInterface
      • save

        @Transactional(readOnly=false)
        public ome.model.core.OriginalFile save()
        Specified by:
        save in interface ome.api.RawFileStore
      • close

        @Transactional(readOnly=false)
        public void close()
        Specified by:
        close in interface ome.api.StatefulServiceInterface
      • clean

        public void clean()
      • getFileId

        @Transactional(readOnly=true)
        public java.lang.Long getFileId()
        Specified by:
        getFileId in interface ome.api.RawFileStore
      • setFileId

        @Transactional(readOnly=true)
        public void setFileId​(long fileId)
        Specified by:
        setFileId in interface ome.api.RawFileStore
      • setFileIdWithBuffer

        public void setFileIdWithBuffer​(long fileId,
                                        ome.io.nio.FileBuffer buffer)
      • exists

        public boolean exists()
        Specified by:
        exists in interface ome.api.RawFileStore
      • read

        public byte[] read​(long position,
                           int length)
        Specified by:
        read in interface ome.api.RawFileStore
      • truncate

        public boolean truncate​(long length)
        Specified by:
        truncate in interface ome.api.RawFileStore
      • size

        public long size()
        Specified by:
        size in interface ome.api.RawFileStore
      • write

        public void write​(byte[] buf,
                          long position,
                          int length)
        Specified by:
        write in interface ome.api.RawFileStore
      • isDiskSpaceChecking

        public boolean isDiskSpaceChecking()
        getter disk overflow checking
        Returns:
        See above.
      • setDiskSpaceChecking

        public void setDiskSpaceChecking​(boolean diskSpaceChecking)
        setter disk overflow checking
        Parameters:
        diskSpaceChecking - a boolean