public abstract class ShareStore
extends java.lang.Object
ShareStore
know how to efficiently store and look up
ShareData
instances.IShare
Modifier and Type | Field and Description |
---|---|
protected Ice.Communicator |
ic |
protected org.slf4j.Logger |
log |
Constructor and Description |
---|
ShareStore() |
Modifier and Type | Method and Description |
---|---|
void |
close() |
<T extends ome.model.IObject> |
contains(long sessionId,
java.lang.Class<T> kls,
long objId) |
abstract void |
doClose() |
abstract <T extends ome.model.IObject> |
doContains(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()
Calls
doInit() within a transaction with a session available to
all HibernateTemplate callbacks. |
abstract java.util.Set<java.lang.Long> |
keys() |
ShareData |
parse(long id,
byte[] data) |
byte[] |
parse(ShareData data) |
<T extends ome.model.IObject> |
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) |
abstract java.lang.Long |
totalSharedItems() |
abstract java.lang.Long |
totalShares() |
void |
update(ome.model.meta.Share share,
ShareData data) |
public ShareData getShareIfAccessible(long shareId, boolean isAdmin, long userId)
ShareBean.applyIfShareAccessible(QueryBuilder)
which does the same check
at the database rather than binary data level.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)
public void update(ome.model.meta.Share share, ShareData data)
public final byte[] parse(ShareData data)
public final ShareData parse(long id, byte[] data)
public final void init()
doInit()
within a transaction with a session available to
all HibernateTemplate
callbacks.public final void close()
public final <T extends ome.model.IObject> boolean contains(long sessionId, java.lang.Class<T> kls, long objId)
public abstract void doInit()
public abstract java.lang.Long totalShares()
public abstract java.lang.Long totalSharedItems()
public abstract java.util.Set<java.lang.Long> keys()
public abstract ShareData get(long id)
public abstract java.util.List<ShareData> getShares(long userId, boolean own, boolean active)
public abstract <T extends ome.model.IObject> boolean doContains(long sessionId, java.lang.Class<T> kls, long objId)
public abstract void doSet(ome.model.meta.Share share, ShareData data, java.util.List<ShareItem> items)
public abstract void doClose()