Package ome.services.sharing
Class ShareStore
- java.lang.Object
-
- ome.services.sharing.ShareStore
-
- Direct Known Subclasses:
BlobShareStore
public abstract class ShareStore extends java.lang.Object
Entry to the Ice code generated data/ directory. Subclasess ofShareStore
know how to efficiently store and look upShareData
instances.- Since:
- 3.0-Beta4
- See Also:
IShare
-
-
Constructor Summary
Constructors Constructor Description ShareStore()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
close()
<T extends ome.model.IObject>
booleancontains(long sessionId, java.lang.Class<T> kls, long objId)
abstract void
doClose()
abstract <T extends ome.model.IObject>
booleandoContains(long sessionId, java.lang.Class<T> kls, long objId)
abstract void
doInit()
abstract void
doSet(ome.model.meta.Share share, ShareData data, java.util.List<ShareItem> items)
abstract ShareData
get(long id)
ShareData
getShareIfAccessible(long shareId, boolean isAdmin, long userId)
Loads share and checks its owner and member data against the current context (owner/member/admin).abstract java.util.List<ShareData>
getShares(long userId, boolean own, boolean active)
void
init()
CallsdoInit()
within a transaction with a session available to allHibernateTemplate
callbacks.abstract java.util.Set<java.lang.Long>
keys()
ShareData
parse(long id, byte[] data)
byte[]
parse(ShareData data)
<T extends ome.model.IObject>
ShareDataset(ome.model.meta.Share share, long owner, java.util.List<T> objects, java.util.List<java.lang.Long> members, java.util.List<java.lang.String> guests, boolean enabled)
abstract java.lang.Long
totalSharedItems()
abstract java.lang.Long
totalShares()
void
update(ome.model.meta.Share share, ShareData data)
-
-
-
Method Detail
-
getShareIfAccessible
public ShareData getShareIfAccessible(long shareId, boolean isAdmin, long userId)
Loads share and checks its owner and member data against the current context (owner/member/admin). This method must be kept in sync withShareBean.applyIfShareAccessible(QueryBuilder)
which does the same check at the database rather than binary data level.
-
set
public <T extends ome.model.IObject> ShareData set(ome.model.meta.Share share, long owner, java.util.List<T> objects, java.util.List<java.lang.Long> members, java.util.List<java.lang.String> guests, boolean enabled)
-
update
public void update(ome.model.meta.Share share, ShareData data)
-
parse
public final byte[] parse(ShareData data)
-
parse
public final ShareData parse(long id, byte[] data)
-
init
public final void init()
CallsdoInit()
within a transaction with a session available to allHibernateTemplate
callbacks.
-
close
public final void close()
-
contains
public final <T extends ome.model.IObject> boolean contains(long sessionId, java.lang.Class<T> kls, long objId)
-
doInit
public abstract void doInit()
-
totalShares
public abstract java.lang.Long totalShares()
-
totalSharedItems
public abstract java.lang.Long totalSharedItems()
-
keys
public abstract java.util.Set<java.lang.Long> keys()
-
get
public abstract ShareData get(long id)
-
getShares
public abstract java.util.List<ShareData> getShares(long userId, boolean own, boolean active)
-
doContains
public abstract <T extends ome.model.IObject> boolean doContains(long sessionId, java.lang.Class<T> kls, long objId)
-
doSet
public abstract void doSet(ome.model.meta.Share share, ShareData data, java.util.List<ShareItem> items)
-
doClose
public abstract void doClose()
-
-