ome.services.sharing
Class BlobShareStore

java.lang.Object
  extended by ome.services.sharing.ShareStore
      extended by ome.services.sharing.BlobShareStore
All Implemented Interfaces:
org.springframework.context.ApplicationContextAware

public class BlobShareStore
extends ShareStore
implements org.springframework.context.ApplicationContextAware

Since:
3.0-Beta4
Author:
Josh Moore, josh at glencoesoftware.com
See Also:
IShare

Field Summary
protected  SessionFactory __dont_use_me_factory
          Used indirectly to obtain sessions for querying and updating the store during normal operation.
protected  OmeroContext ctx
           
 
Fields inherited from class ome.services.sharing.ShareStore
ic, log
 
Constructor Summary
BlobShareStore()
           
 
Method Summary
 void doClose()
           
<T extends ome.model.IObject>
boolean
doContains(long sessionId, Class<T> kls, long objId)
           
 void doInit()
           
 void doSet(ome.model.meta.Share share, ShareData data, List<ShareItem> items)
           
 ShareData get(long id)
           
 List<ShareData> getShares(long userId, boolean own, boolean activeOnly)
           
 Set<Long> keys()
           
 void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
          Because there is a cyclical dependency SF->ACLVoter->BlobStore->SF we have to lazy-load the session factory via the context.
 Long totalSharedItems()
           
 Long totalShares()
           
 
Methods inherited from class ome.services.sharing.ShareStore
close, contains, init, parse, parse, set, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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 from session().


ctx

protected OmeroContext ctx
Constructor Detail

BlobShareStore

public BlobShareStore()
Method Detail

setApplicationContext

public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
                           throws org.springframework.beans.BeansException
Because there is a cyclical dependency SF->ACLVoter->BlobStore->SF we have to lazy-load the session factory via the context.

Specified by:
setApplicationContext in interface org.springframework.context.ApplicationContextAware
Throws:
org.springframework.beans.BeansException

doInit

public void doInit()
Specified by:
doInit in class ShareStore

totalShares

public Long totalShares()
Specified by:
totalShares in class ShareStore

totalSharedItems

public Long totalSharedItems()
Specified by:
totalSharedItems in class ShareStore

doSet

public void doSet(ome.model.meta.Share share,
                  ShareData data,
                  List<ShareItem> items)
Specified by:
doSet in class ShareStore

get

public ShareData get(long id)
Specified by:
get in class ShareStore

getShares

public List<ShareData> getShares(long userId,
                                 boolean own,
                                 boolean activeOnly)
Specified by:
getShares in class ShareStore

doContains

public <T extends ome.model.IObject> boolean doContains(long sessionId,
                                                        Class<T> kls,
                                                        long objId)
Specified by:
doContains in class ShareStore

doClose

public void doClose()
Specified by:
doClose in class ShareStore

keys

public Set<Long> keys()
Specified by:
keys in class ShareStore


OmeroJava Api

Version: 4.3.3-00d1137e-b2894

Copyright © 2009 The University of Dundee. All Rights Reserved.