Package ome.services
Class RawFileBean
- java.lang.Object
-
- ome.services.AbstractStatefulBean
-
- ome.services.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
-
-
Field Summary
-
Fields inherited from class ome.services.AbstractStatefulBean
iQuery, iUpdate, modified, sec
-
-
Constructor Summary
Constructors Constructor Description RawFileBean()
default constructorRawFileBean(boolean checking)
overridden to allow Spring to set boolean
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
activate()
void
clean()
void
close()
boolean
exists()
java.lang.Long
getFileId()
java.lang.Class<? extends ome.api.ServiceInterface>
getServiceInterface()
boolean
isDiskSpaceChecking()
getter disk overflow checkingprotected boolean
isModified()
Extends the check of theAbstractStatefulBean.modified
flag performed by super with an additional check of the actual file size against the value stored in the databasevoid
passivate()
byte[]
read(long position, int length)
ome.model.core.OriginalFile
save()
void
setAdminService(ome.api.IAdmin admin)
void
setChecksumProviderFactory(ome.util.checksum.ChecksumProviderFactory checksumProviderFactory)
ChecksumProviderFactory Bean injectorvoid
setDiskSpaceChecking(boolean diskSpaceChecking)
setter disk overflow checkingvoid
setFileId(long fileId)
void
setFileIdWithBuffer(long fileId, ome.io.nio.FileBuffer buffer)
void
setIRepositoryInfo(ome.api.IRepositoryInfo iRepositoryInfo)
Disk Space Usage service Bean injectorvoid
setOriginalFilesService(ome.io.nio.OriginalFilesService ioService)
I/O service (OriginalFilesService) Bean injector.long
size()
boolean
truncate(long length)
void
write(byte[] buf, long position, int length)
-
Methods inherited from class ome.services.AbstractStatefulBean
getBeanHelper, getCurrentEventContext, modified, selfConfigure, setQueryService, setSecuritySystem, setUpdateService
-
-
-
-
Method Detail
-
getServiceInterface
public java.lang.Class<? extends ome.api.ServiceInterface> getServiceInterface()
- Specified by:
getServiceInterface
in interfaceome.system.SelfConfigurableService
-
setOriginalFilesService
public final void setOriginalFilesService(ome.io.nio.OriginalFilesService ioService)
I/O service (OriginalFilesService) Bean injector.- Parameters:
ioService
- anOriginalFileService
.
-
setIRepositoryInfo
public final void setIRepositoryInfo(ome.api.IRepositoryInfo iRepositoryInfo)
Disk Space Usage service Bean injector- Parameters:
iRepositoryInfo
- anIRepositoryInfo
-
setAdminService
public final void setAdminService(ome.api.IAdmin admin)
-
setChecksumProviderFactory
public final void setChecksumProviderFactory(ome.util.checksum.ChecksumProviderFactory checksumProviderFactory)
ChecksumProviderFactory Bean injector- Parameters:
checksumProviderFactory
- aChecksumProviderFactory
-
passivate
@Transactional(readOnly=true) public void passivate()
- Specified by:
passivate
in interfaceome.api.StatefulServiceInterface
-
activate
@Transactional(readOnly=true) public void activate()
- Specified by:
activate
in interfaceome.api.StatefulServiceInterface
-
isModified
protected boolean isModified()
Extends the check of theAbstractStatefulBean.modified
flag performed by super with an additional check of the actual file size against the value stored in the database- Overrides:
isModified
in classAbstractStatefulBean
-
save
@Transactional(readOnly=false) public ome.model.core.OriginalFile save()
- Specified by:
save
in interfaceome.api.RawFileStore
-
close
@Transactional(readOnly=false) public void close()
- Specified by:
close
in interfaceome.api.StatefulServiceInterface
-
clean
public void clean()
-
getFileId
@Transactional(readOnly=true) public java.lang.Long getFileId()
- Specified by:
getFileId
in interfaceome.api.RawFileStore
-
setFileId
@Transactional(readOnly=true) public void setFileId(long fileId)
- Specified by:
setFileId
in interfaceome.api.RawFileStore
-
setFileIdWithBuffer
public void setFileIdWithBuffer(long fileId, ome.io.nio.FileBuffer buffer)
-
exists
public boolean exists()
- Specified by:
exists
in interfaceome.api.RawFileStore
-
read
public byte[] read(long position, int length)
- Specified by:
read
in interfaceome.api.RawFileStore
-
truncate
public boolean truncate(long length)
- Specified by:
truncate
in interfaceome.api.RawFileStore
-
size
public long size()
- Specified by:
size
in interfaceome.api.RawFileStore
-
write
public void write(byte[] buf, long position, int length)
- Specified by:
write
in interfaceome.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
- aboolean
-
-