Package ome.services.sharing
Class BlobShareStore
- java.lang.Object
-
- ome.services.sharing.ShareStore
-
- ome.services.sharing.BlobShareStore
-
- All Implemented Interfaces:
org.springframework.beans.factory.Aware
,org.springframework.context.ApplicationContextAware
public class BlobShareStore extends ShareStore implements org.springframework.context.ApplicationContextAware
ImplementsShareStore
and provides functionality to work with binary Ice data from the share. Also provides methods for verification if metadata graph elements are safe to load (part of the security system's ACL vote).- Since:
- 3.0-Beta4
- See Also:
IShare
-
-
Field Summary
Fields Modifier and Type Field Description protected SessionFactory
__dont_use_me_factory
Used indirectly to obtain sessions for querying and updating the store during normal operation.protected ome.system.OmeroContext
ctx
protected java.util.Map<java.lang.Long,java.util.List<java.lang.Long>>
obToImageCache
protected java.util.Map<java.lang.Long,java.lang.Long>
pixToImageCache
protected ome.util.SqlAction
sqlAction
-
Fields inherited from class ome.services.sharing.ShareStore
ic, log
-
-
Constructor Summary
Constructors Constructor Description BlobShareStore()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
doClose()
<T extends ome.model.IObject>
booleandoContains(long sessionId, java.lang.Class<T> kls, long objId)
protected <T extends ome.model.IObject>
booleandoContains(ShareData data, java.lang.Class<T> kls, long objId)
void
doInit()
void
doSet(ome.model.meta.Share share, ShareData data, java.util.List<ShareItem> items)
ShareData
get(long id)
java.util.List<ShareData>
getShares(long userId, boolean own, boolean activeOnly)
java.util.Set<java.lang.Long>
keys()
static void
main(java.lang.String[] args)
void
setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
Because there is a cyclic dependency (SF -> ACLVoter -> BlobStore -> SF), we have to lazy-load the session factory via the context.void
setSqlAction(ome.util.SqlAction sqlAction)
java.lang.Long
totalSharedItems()
java.lang.Long
totalShares()
-
Methods inherited from class ome.services.sharing.ShareStore
close, contains, getShareIfAccessible, init, parse, parse, set, update
-
-
-
-
Field Detail
-
__dont_use_me_factory
protected SessionFactory __dont_use_me_factory
Used indirectly to obtain sessions for querying and updating the store during normal operation. Due to this classes late initialization, all sessions should be obtained fromsession()
.
-
ctx
protected ome.system.OmeroContext ctx
-
sqlAction
protected ome.util.SqlAction sqlAction
-
pixToImageCache
protected java.util.Map<java.lang.Long,java.lang.Long> pixToImageCache
-
obToImageCache
protected java.util.Map<java.lang.Long,java.util.List<java.lang.Long>> obToImageCache
-
-
Method Detail
-
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException
Because there is a cyclic dependency (SF -> ACLVoter -> BlobStore -> SF), we have to lazy-load the session factory via the context.- Specified by:
setApplicationContext
in interfaceorg.springframework.context.ApplicationContextAware
- Throws:
org.springframework.beans.BeansException
-
setSqlAction
public void setSqlAction(ome.util.SqlAction sqlAction)
-
doInit
public void doInit()
- Specified by:
doInit
in classShareStore
-
totalShares
public java.lang.Long totalShares()
- Specified by:
totalShares
in classShareStore
-
totalSharedItems
public java.lang.Long totalSharedItems()
- Specified by:
totalSharedItems
in classShareStore
-
doSet
public void doSet(ome.model.meta.Share share, ShareData data, java.util.List<ShareItem> items)
- Specified by:
doSet
in classShareStore
-
get
public ShareData get(long id)
- Specified by:
get
in classShareStore
-
getShares
public java.util.List<ShareData> getShares(long userId, boolean own, boolean activeOnly)
- Specified by:
getShares
in classShareStore
-
doContains
public <T extends ome.model.IObject> boolean doContains(long sessionId, java.lang.Class<T> kls, long objId)
- Specified by:
doContains
in classShareStore
-
doContains
protected <T extends ome.model.IObject> boolean doContains(ShareData data, java.lang.Class<T> kls, long objId)
-
doClose
public void doClose()
- Specified by:
doClose
in classShareStore
-
keys
public java.util.Set<java.lang.Long> keys()
- Specified by:
keys
in classShareStore
-
main
public static void main(java.lang.String[] args) throws java.lang.Exception
- Throws:
java.lang.Exception
-
-