|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IShare
Provides method for sharing - collaboration process for images, datasets, projects.
Method Summary | ||
---|---|---|
void |
activate(long shareId)
Turns on the access control lists attached to the given share for the current session. |
|
ome.model.annotations.CommentAnnotation |
addComment(long shareId,
String comment)
Creates comment for
share . |
|
void |
addGuest(long shareId,
String emailAddress)
Add guest email address to the share. |
|
void |
addGuests(long shareId,
String... emailAddresses)
Adds guest email addresses to the share. |
|
|
addObject(long shareId,
T object)
Adds new item to share . |
|
|
addObjects(long shareId,
T... objects)
Adds new items to
share . |
|
ome.model.annotations.CommentAnnotation |
addReply(long shareId,
String comment,
ome.model.annotations.CommentAnnotation replyTo)
Creates comment which replies to an existing
comment. |
|
void |
addUser(long shareId,
ome.model.meta.Experimenter exp)
Adds experimenter to
share |
|
void |
addUsers(long shareId,
ome.model.meta.Experimenter... exps)
Adds experimenters to
share |
|
void |
closeShare(long shareId)
Closes share . |
|
|
createShare(String description,
Timestamp expiration,
List<T> items,
List<ome.model.meta.Experimenter> exps,
List<String> guests,
boolean enabled)
Creates share with all related:
items , members , and guests. |
|
void |
deactivate()
Turns off the access control lists with the current share. |
|
void |
deleteComment(ome.model.annotations.Annotation comment)
Deletes comment from the
database. |
|
Map<String,ome.model.meta.Experimenter> |
getActiveConnections(long shareId)
Gets actual active connections to share . |
|
Set<String> |
getAllGuests(long shareId)
Get the email addresses for all share guests. |
|
Set<ome.model.meta.Experimenter> |
getAllMembers(long shareId)
Get all users who are a member of the share. |
|
Set<String> |
getAllUsers(long shareId)
Get a single set containing the login
names of the Experimenters as well email addresses for guests. |
|
Map<Long,Long> |
getCommentCount(Set<Long> shareIds)
Returns a map from share id to comment count. |
|
List<ome.model.annotations.Annotation> |
getComments(long shareId)
Looks up all comments which
belong to the share . |
|
|
getContentMap(long shareId)
Returns the contents of the share keyed by type. |
|
|
getContents(long shareId)
Looks up all items belong to the
share . |
|
int |
getContentSize(long shareId)
Returns the number of items in the share. |
|
|
getContentSubList(long shareId,
int start,
int finish)
Returns a range of items from the share. |
|
List<ome.model.meta.Event> |
getEvents(long shareId,
ome.model.meta.Experimenter experimenter,
Timestamp from,
Timestamp to)
Gets events for share per
experimenter for period of time. |
|
Map<Long,Long> |
getMemberCount(Set<Long> shareIds)
Returns a map from share id to the count of total members (including the owner). |
|
Set<ome.model.meta.Session> |
getMemberShares(boolean onlyActive)
Gets all shares where current Experimenter is a member. |
|
Set<ome.model.meta.Session> |
getMemberSharesFor(ome.model.meta.Experimenter user,
boolean onlyActive)
Gets all shares where given Experimenter is a member. |
|
Set<ome.model.meta.Session> |
getOwnShares(boolean onlyActive)
Gets all owned shares for the current Experimenter |
|
Map<String,ome.model.meta.Experimenter> |
getPastConnections(long shareId)
Gets previous connections to share . |
|
ome.model.meta.Share |
getShare(long sessionId)
Gets a share as a Session with all related:
comments ,
members , fully loaded. |
|
Set<ome.model.meta.Session> |
getSharesOwnedBy(ome.model.meta.Experimenter user,
boolean onlyActive)
Gets all shares owned by the given Experimenter . |
|
void |
invalidateConnection(long shareId,
ome.model.meta.Experimenter exp)
Makes the connection invalid for share for
specifiec user. |
|
void |
removeGuest(long shareId,
String emailAddress)
Removes guest email address from share. |
|
void |
removeGuests(long shareId,
String... emailAddresses)
Removes guest email addresses from the share. |
|
|
removeObject(long shareId,
T object)
Removes existing item from the
share . |
|
|
removeObjects(long shareId,
T... objects)
Remove existing items from the share. |
|
void |
removeUser(long shareId,
ome.model.meta.Experimenter exp)
Removes experimenter from
share |
|
void |
removeUsers(long shareId,
List<ome.model.meta.Experimenter> exps)
Removes experimenters from
share |
|
void |
setActive(long shareId,
boolean active)
|
|
void |
setDescription(long shareId,
String description)
|
|
void |
setExpiration(long shareId,
Timestamp expiration)
|
Method Detail |
---|
void activate(long shareId)
ValidationException
is thrown.
shareId
- void deactivate()
Map<Long,Long> getCommentCount(Set<Long> shareIds)
shareIds
- Not null.
ome.conditions.ValidationException
- if a given share does not existSet<ome.model.meta.Session> getOwnShares(boolean onlyActive)
Experimenter
onlyActive
- if true, then only shares which can be used for login will be
returned. All "draft" shares (see
createShare(String, Timestamp, List, List, List, boolean)
and closed shares
will be filtered.
Set<ome.model.meta.Session> getMemberShares(boolean onlyActive)
Experimenter
is a member.
onlyActive
- if true, then only shares which can be used for login will be
returned. All "draft" shares (see
createShare(String, Timestamp, List, List, List, boolean)
and closed shares
will be filtered.
Set<ome.model.meta.Session> getSharesOwnedBy(ome.model.meta.Experimenter user, boolean onlyActive)
Experimenter
.
onlyActive
- if true, then only shares which can be used for login will be
returned. All "draft" shares (see
createShare(String, Timestamp, List, List, List, boolean)
and closed shares
will be filtered.
Set<ome.model.meta.Session> getMemberSharesFor(ome.model.meta.Experimenter user, boolean onlyActive)
Experimenter
is a member.
onlyActive
- if true, then only shares which can be used for login will be
returned. All "draft" shares (see
createShare(String, Timestamp, List, List, List, boolean)
and closed shares
will be filtered.
ome.model.meta.Share getShare(long sessionId)
Session
with all related:
comments
,
members
, fully loaded. Unlike the
other methods on this interface, if the sessionId is unknown, does not
throw a ValidationException
.
sessionId
-
Session
with id and Details
set or null.
The owner in
the Details object is the true owner, and the group in the
Details has all member users linked. Annotation
instances
of the share are linked to the Session
. Missing is a list
of share guests.<T extends ome.model.IObject> List<T> getContents(long shareId)
items
belong to the
share
.
shareId
-
<T extends ome.model.IObject> List<T> getContentSubList(long shareId, int start, int finish)
getContents(long)
int getContentSize(long shareId)
<T extends ome.model.IObject> Map<Class<T>,List<Long>> getContentMap(long shareId)
<T extends ome.model.IObject> long createShare(String description, Timestamp expiration, List<T> items, List<ome.model.meta.Experimenter> exps, List<String> guests, boolean enabled)
share
with all related:
items
, members
, and guests.
description
- expiration
- exps
- guests
- enabled
- if true, then the share is immediately available for use. If
false, then the share is in draft state. All methods on this
interface will work for shares except
activate(long)
. Similarly, the share password cannot
be used by guests to login.void setDescription(long shareId, String description)
void setExpiration(long shareId, Timestamp expiration)
void setActive(long shareId, boolean active)
void closeShare(long shareId)
share
. No further logins will be
possible and all getters (e.g. #getMemberShares(boolean),
{@link #getAllShares(boolean), ...} will filter these results if
"onlyActive" is true.
shareId
- <T extends ome.model.IObject> void addObjects(long shareId, T... objects)
items
to
share
. Conceptually calls
addObjects(long, IObject...)
for every argument passed, but the
graphs will be merged.
shareId
- objects
- <T extends ome.model.IObject> void addObject(long shareId, T object)
item
to share
. The entire object graph with the exception of all Details will
be loaded into the share. If you would like to load a single object,
then pass an unloaded reference.
shareId
- object
- <T extends ome.model.IObject> void removeObjects(long shareId, T... objects)
shareId
- objects
- <T extends ome.model.IObject> void removeObject(long shareId, T object)
item
from the
share
.
share
- item
- List<ome.model.annotations.Annotation> getComments(long shareId)
comments
which
belong to the share
.
share
-
Map<Long,Long> getMemberCount(Set<Long> shareIds)
ShareMember
links.
shareIds
- Not null.
ome.conditions.ValidationException
- if a given share does not existome.model.annotations.CommentAnnotation addComment(long shareId, String comment)
comment
for
share
.
share
- comment
- ome.model.annotations.CommentAnnotation addReply(long shareId, String comment, ome.model.annotations.CommentAnnotation replyTo)
comment
which replies to an existing
comment.
shareId
- comment
- replyTo
-
void deleteComment(ome.model.annotations.Annotation comment)
comment
from the
database.
comment
- Set<ome.model.meta.Experimenter> getAllMembers(long shareId)
users
who are a member of the share.
Set<String> getAllGuests(long shareId)
Set<String> getAllUsers(long shareId) throws ome.conditions.ValidationException
login
names
of the Experimenters
as well email addresses for guests.
shareId
-
ome.conditions.ValidationException
- if there is a conflict between email addresses and user
names.void addUsers(long shareId, ome.model.meta.Experimenter... exps)
experimenters
to
share
share
- exps
- void addGuests(long shareId, String... emailAddresses)
shareId
- emailAddresses
- void removeUsers(long shareId, List<ome.model.meta.Experimenter> exps)
experimenters
from
share
shareId
- exps
- void removeGuests(long shareId, String... emailAddresses)
shareId
- exp
- void addUser(long shareId, ome.model.meta.Experimenter exp)
experimenter
to
share
shareId
- exps
- void addGuest(long shareId, String emailAddress)
shareId
- emailAddress
- void removeUser(long shareId, ome.model.meta.Experimenter exp)
experimenter
from
share
shareId
- exps
- void removeGuest(long shareId, String emailAddress)
shareId
- emailAddress
- Map<String,ome.model.meta.Experimenter> getActiveConnections(long shareId)
share
.
shareId
-
Map<String,ome.model.meta.Experimenter> getPastConnections(long shareId)
share
.
shareId
-
void invalidateConnection(long shareId, ome.model.meta.Experimenter exp)
share
for
specifiec user.
shareId
- exp
- - connectionList<ome.model.meta.Event> getEvents(long shareId, ome.model.meta.Experimenter experimenter, Timestamp from, Timestamp to)
share
per
experimenter
for period of time.
shareId
- exp
- from
- - timeto
- - time
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Version: 4.3.4-dbcbce5a-b4
Copyright © 2009 The University of Dundee. All Rights Reserved.