Package ome.services
Class ThumbnailBean
- java.lang.Object
-
- ome.logic.AbstractLevel2Service
-
- ome.services.ThumbnailBean
-
- All Implemented Interfaces:
java.io.Serializable
,ome.api.ServiceInterface
,ome.api.StatefulServiceInterface
,ome.api.ThumbnailStore
,ome.system.SelfConfigurableService
,org.springframework.beans.factory.Aware
,org.springframework.context.ApplicationContextAware
- Direct Known Subclasses:
ThumbnailBeanReadOnly
@Transactional(readOnly=true) public class ThumbnailBean extends AbstractLevel2Service implements org.springframework.context.ApplicationContextAware, ome.api.ThumbnailStore, java.io.Serializable
Provides methods for directly querying object graphs. The service is entirely read/write transactionally because of the requirements of rendering engine lazy object creation where rendering settings are missing.- Since:
- 3.0
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static float
DEFAULT_COMPRESSION_QUALITY
The default compression quality in fractional percent.static java.lang.String
DEFAULT_MIME_TYPE
The default MIME type.static int
DEFAULT_X_WIDTH
The default X-width for a thumbnail.static int
DEFAULT_Y_WIDTH
The default Y-width for a thumbnail.-
Fields inherited from class ome.logic.AbstractLevel2Service
iQuery, iUpdate, metadata, queryFactory, readOnlyStatus, sec
-
-
Constructor Summary
Constructors Constructor Description ThumbnailBean(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
close()
void
createThumbnail(java.lang.Integer sizeX, java.lang.Integer sizeY)
void
createThumbnails()
void
createThumbnailsByLongestSideSet(java.lang.Integer size, java.util.Set<java.lang.Long> pixelsIds)
protected void
errorIfInvalidState()
protected void
errorIfNullPixels()
protected void
errorIfNullPixelsAndRenderingDef()
protected void
errorIfNullRenderingDef()
ome.system.EventContext
getCurrentEventContext()
long
getRenderingDefId()
java.lang.Class<? extends ome.api.ServiceInterface>
getServiceInterface()
byte[]
getThumbnail(java.lang.Integer sizeX, java.lang.Integer sizeY)
byte[]
getThumbnailByLongestSide(java.lang.Integer size)
byte[]
getThumbnailByLongestSideDirect(java.lang.Integer size)
java.util.Map<java.lang.Long,byte[]>
getThumbnailByLongestSideSet(java.lang.Integer size, java.util.Set<java.lang.Long> pixelsIds)
byte[]
getThumbnailDirect(java.lang.Integer sizeX, java.lang.Integer sizeY)
byte[]
getThumbnailForSectionByLongestSideDirect(int theZ, int theT, java.lang.Integer size)
byte[]
getThumbnailForSectionDirect(int theZ, int theT, java.lang.Integer sizeX, java.lang.Integer sizeY)
java.util.Map<java.lang.Long,byte[]>
getThumbnailSet(java.lang.Integer sizeX, java.lang.Integer sizeY, java.util.Set<java.lang.Long> pixelsIds)
byte[]
getThumbnailWithoutDefault(java.lang.Integer sizeX, java.lang.Integer sizeY)
boolean
isDiskSpaceChecking()
boolean
isInProgress()
void
passivate()
void
resetDefaults()
void
setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
void
setCompressionService(LocalCompress compressionService)
Compression service Bean injector.void
setDiskSpaceChecking(boolean diskSpaceChecking)
void
setInProgressImageResource(org.springframework.core.io.Resource inProgressImageResource)
In-progress image resource Bean injector.void
setIoService(ome.io.nio.ThumbnailService ioService)
I/O service (ThumbnailService) Bean injector.void
setIPixels(ome.api.IPixels iPixels)
Pixels service Bean injector.void
setIRepositoryInfo(ome.api.IRepositoryInfo iRepositoryInfo)
Disk Space Usage service Bean injectorvoid
setLutProvider(omeis.providers.re.lut.LutProvider lutProvider)
Lookup table provider Bean injector.void
setPixelDataService(ome.io.nio.PixelsService pixelDataService)
Pixels data service Bean injector.boolean
setPixelsId(long id)
void
setRenderingDefId(long id)
void
setScaleService(ome.api.IScale iScale)
Scale service Bean injector.void
setSettingsService(ome.api.IRenderingSettings settingsService)
Rendering settings service Bean injector.boolean
thumbnailExists(java.lang.Integer sizeX, java.lang.Integer sizeY)
-
Methods inherited from class ome.logic.AbstractLevel2Service
getBeanHelper, getExtendedMetadata, getQueryFactory, getSecuritySystem, selfConfigure, setExtendedMetadata, setQueryFactory, setQueryService, setReadOnlyStatus, setSecuritySystem, setUpdateService
-
-
-
-
Field Detail
-
DEFAULT_X_WIDTH
public static final int DEFAULT_X_WIDTH
The default X-width for a thumbnail.- See Also:
- Constant Field Values
-
DEFAULT_Y_WIDTH
public static final int DEFAULT_Y_WIDTH
The default Y-width for a thumbnail.- See Also:
- Constant Field Values
-
DEFAULT_COMPRESSION_QUALITY
public static final float DEFAULT_COMPRESSION_QUALITY
The default compression quality in fractional percent.- See Also:
- Constant Field Values
-
DEFAULT_MIME_TYPE
public static final java.lang.String DEFAULT_MIME_TYPE
The default MIME type.- See Also:
- Constant Field Values
-
-
Method Detail
-
getServiceInterface
public java.lang.Class<? extends ome.api.ServiceInterface> getServiceInterface()
- Specified by:
getServiceInterface
in interfaceome.system.SelfConfigurableService
-
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
- Specified by:
setApplicationContext
in interfaceorg.springframework.context.ApplicationContextAware
-
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
-
close
public void close()
- Specified by:
close
in interfaceome.api.StatefulServiceInterface
-
getRenderingDefId
public long getRenderingDefId()
- Specified by:
getRenderingDefId
in interfaceome.api.ThumbnailStore
-
getCurrentEventContext
public ome.system.EventContext getCurrentEventContext()
- Specified by:
getCurrentEventContext
in interfaceome.api.StatefulServiceInterface
-
setPixelsId
@Transactional(readOnly=false) public boolean setPixelsId(long id)
- Specified by:
setPixelsId
in interfaceome.api.ThumbnailStore
-
isInProgress
public boolean isInProgress()
- Specified by:
isInProgress
in interfaceome.api.ThumbnailStore
-
setRenderingDefId
public void setRenderingDefId(long id)
- Specified by:
setRenderingDefId
in interfaceome.api.ThumbnailStore
-
setLutProvider
public void setLutProvider(omeis.providers.re.lut.LutProvider lutProvider)
Lookup table provider Bean injector.- Parameters:
lutProvider
- The lookup table provider we'll be providing to the renderer.
-
setInProgressImageResource
public void setInProgressImageResource(org.springframework.core.io.Resource inProgressImageResource)
In-progress image resource Bean injector.- Parameters:
inProgressImageResource
- The in-progress image resource we'll be using for in progress images.
-
setPixelDataService
public void setPixelDataService(ome.io.nio.PixelsService pixelDataService)
Pixels data service Bean injector.- Parameters:
pixelDataService
- aPixelsService
.
-
setIPixels
public void setIPixels(ome.api.IPixels iPixels)
Pixels service Bean injector.- Parameters:
iPixels
- anIPixels
.
-
setScaleService
public void setScaleService(ome.api.IScale iScale)
Scale service Bean injector.- Parameters:
iScale
- anIScale
.
-
setIoService
public void setIoService(ome.io.nio.ThumbnailService ioService)
I/O service (ThumbnailService) Bean injector.- Parameters:
ioService
- aThumbnailService
.
-
setIRepositoryInfo
public final void setIRepositoryInfo(ome.api.IRepositoryInfo iRepositoryInfo)
Disk Space Usage service Bean injector- Parameters:
iRepositoryInfo
- anIRepositoryInfo
-
setCompressionService
public void setCompressionService(LocalCompress compressionService)
Compression service Bean injector.- Parameters:
compressionService
- anICompress
.
-
setSettingsService
public void setSettingsService(ome.api.IRenderingSettings settingsService)
Rendering settings service Bean injector.- Parameters:
settingsService
- anIRenderingSettings
.
-
errorIfInvalidState
protected void errorIfInvalidState()
-
errorIfNullPixelsAndRenderingDef
protected void errorIfNullPixelsAndRenderingDef()
-
errorIfNullPixels
protected void errorIfNullPixels()
-
errorIfNullRenderingDef
protected void errorIfNullRenderingDef()
-
createThumbnail
@Transactional(readOnly=false) public void createThumbnail(java.lang.Integer sizeX, java.lang.Integer sizeY)
- Specified by:
createThumbnail
in interfaceome.api.ThumbnailStore
-
createThumbnails
@Transactional(readOnly=false) public void createThumbnails()
- Specified by:
createThumbnails
in interfaceome.api.ThumbnailStore
-
createThumbnailsByLongestSideSet
@Transactional(readOnly=false) public void createThumbnailsByLongestSideSet(java.lang.Integer size, java.util.Set<java.lang.Long> pixelsIds)
- Specified by:
createThumbnailsByLongestSideSet
in interfaceome.api.ThumbnailStore
-
getThumbnailSet
@Transactional(readOnly=false) public java.util.Map<java.lang.Long,byte[]> getThumbnailSet(java.lang.Integer sizeX, java.lang.Integer sizeY, java.util.Set<java.lang.Long> pixelsIds)
- Specified by:
getThumbnailSet
in interfaceome.api.ThumbnailStore
-
getThumbnailByLongestSideSet
@Transactional(readOnly=false) public java.util.Map<java.lang.Long,byte[]> getThumbnailByLongestSideSet(java.lang.Integer size, java.util.Set<java.lang.Long> pixelsIds)
- Specified by:
getThumbnailByLongestSideSet
in interfaceome.api.ThumbnailStore
-
getThumbnail
@Transactional(readOnly=false) public byte[] getThumbnail(java.lang.Integer sizeX, java.lang.Integer sizeY)
- Specified by:
getThumbnail
in interfaceome.api.ThumbnailStore
-
getThumbnailWithoutDefault
@Transactional(readOnly=false) public byte[] getThumbnailWithoutDefault(java.lang.Integer sizeX, java.lang.Integer sizeY)
- Specified by:
getThumbnailWithoutDefault
in interfaceome.api.ThumbnailStore
-
getThumbnailByLongestSide
@Transactional(readOnly=false) public byte[] getThumbnailByLongestSide(java.lang.Integer size)
- Specified by:
getThumbnailByLongestSide
in interfaceome.api.ThumbnailStore
-
getThumbnailDirect
public byte[] getThumbnailDirect(java.lang.Integer sizeX, java.lang.Integer sizeY)
- Specified by:
getThumbnailDirect
in interfaceome.api.ThumbnailStore
-
getThumbnailForSectionDirect
public byte[] getThumbnailForSectionDirect(int theZ, int theT, java.lang.Integer sizeX, java.lang.Integer sizeY)
- Specified by:
getThumbnailForSectionDirect
in interfaceome.api.ThumbnailStore
-
getThumbnailByLongestSideDirect
public byte[] getThumbnailByLongestSideDirect(java.lang.Integer size)
- Specified by:
getThumbnailByLongestSideDirect
in interfaceome.api.ThumbnailStore
-
getThumbnailForSectionByLongestSideDirect
public byte[] getThumbnailForSectionByLongestSideDirect(int theZ, int theT, java.lang.Integer size)
- Specified by:
getThumbnailForSectionByLongestSideDirect
in interfaceome.api.ThumbnailStore
-
thumbnailExists
public boolean thumbnailExists(java.lang.Integer sizeX, java.lang.Integer sizeY)
- Specified by:
thumbnailExists
in interfaceome.api.ThumbnailStore
-
resetDefaults
@Transactional(readOnly=false) public void resetDefaults()
- Specified by:
resetDefaults
in interfaceome.api.ThumbnailStore
-
isDiskSpaceChecking
public boolean isDiskSpaceChecking()
-
setDiskSpaceChecking
public void setDiskSpaceChecking(boolean diskSpaceChecking)
-
-