public abstract class ShareStore extends 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 IObject> |
contains(long sessionId,
Class<T> kls,
long objId) |
abstract void |
doClose() |
abstract <T extends IObject> |
doContains(long sessionId,
Class<T> kls,
long objId) |
abstract void |
doInit() |
abstract void |
doSet(Share share,
ome.services.sharing.data.ShareData data,
List<ome.services.sharing.data.ShareItem> items) |
abstract ome.services.sharing.data.ShareData |
get(long id) |
ome.services.sharing.data.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 List<ome.services.sharing.data.ShareData> |
getShares(long userId,
boolean own,
boolean active) |
void |
init()
Calls
doInit() within a transaction with a session available to
all HibernateTemplate callbacks. |
abstract Set<Long> |
keys() |
ome.services.sharing.data.ShareData |
parse(long id,
byte[] data) |
byte[] |
parse(ome.services.sharing.data.ShareData data) |
<T extends IObject> |
set(Share share,
long owner,
List<T> objects,
List<Long> members,
List<String> guests,
boolean enabled) |
abstract Long |
totalSharedItems() |
abstract Long |
totalShares() |
void |
update(Share share,
ome.services.sharing.data.ShareData data) |
public ome.services.sharing.data.ShareData getShareIfAccessible(long shareId, boolean isAdmin, long userId)
#applyIfShareAccessible(QueryBuilder)
which does the same check
at the database rather than binary data level.public <T extends IObject> ome.services.sharing.data.ShareData set(Share share, long owner, List<T> objects, List<Long> members, List<String> guests, boolean enabled)
public void update(Share share, ome.services.sharing.data.ShareData data)
public final byte[] parse(ome.services.sharing.data.ShareData data)
public final ome.services.sharing.data.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 IObject> boolean contains(long sessionId, Class<T> kls, long objId)
public abstract void doInit()
public abstract Long totalShares()
public abstract Long totalSharedItems()
public abstract ome.services.sharing.data.ShareData get(long id)
public abstract List<ome.services.sharing.data.ShareData> getShares(long userId, boolean own, boolean active)
public abstract <T extends IObject> boolean doContains(long sessionId, Class<T> kls, long objId)
public abstract void doSet(Share share, ome.services.sharing.data.ShareData data, List<ome.services.sharing.data.ShareItem> items)
public abstract void doClose()
Version: 5.1.4-ice35-b55
Copyright © 2015 The University of Dundee & Open Microscopy Environment. All Rights Reserved.