omero::api::IShare
Overview
[ "ami", "amd" ]
interface IShare extends ServiceInterface
Provides method for sharing - collaboration process for images,
datasets, projects.
Operation Index
- activate
-
Turns on the access control lists attached to the given
share for the current session.
- deactivate
-
Turns off the access control lists with the current share.
- getShare
-
Gets a share as a model::Session with all
related: model::Annotation comments,
model::Experimenter members, fully loaded.
- getMemberCount
-
Returns a map from share id to the count of total members
(including the owner).
- getOwnShares
-
Gets all owned shares for the current
model::Experimenter.
- getMemberShares
-
Gets all shares where current
model::Experimenter is a member.
- getSharesOwnedBy
-
Gets all shares owned by the given
model::Experimenter.
- getMemberSharesFor
-
Gets all shares where given
model::Experimenter is a member.
- getContents
-
Looks up all model::IObject items belong to the
model::Session share.
- getContentSubList
-
Returns a range of items from the share.
- getContentSize
-
Returns the number of items in the share.
- getContentMap
-
Returns the contents of the share keyed by type.
- createShare
-
Creates model::Session share with all related:
model::IObject itmes,
model::Experimenter members, and guests.
- setDescription
-
- setExpiration
-
- setActive
-
- closeShare
-
Closes model::Session share.
- addObjects
-
Adds new model::IObject items to
model::Session share.
- addObject
-
Adds new model::IObject item to
model::Session share.
- removeObjects
-
Remove existing items from the share.
- removeObject
-
Removes existing model::IObject object from the
model::Session share.
- getCommentCount
-
Returns a map from share id to comment count.
- getComments
-
Looks up all model::Annotation comments which
belong to the model::Session share.
- addComment
-
Creates model::TextAnnotation comment for
model::Session share.
- addReply
-
Creates model::TextAnnotation comment which
replies to an existing comment.
- deleteComment
-
Deletes model::Annotation comment from the
database.
- getAllMembers
-
Get all model::Experimenter users who are a
member of the share.
- getAllGuests
-
Get the email addresses for all share guests.
- getAllUsers
-
Get a single set containing the
{@code omero.model.Experimenter.getOmeName} login names
of the users as well email addresses for guests.
- addUsers
-
Adds model::Experimenter experimenters to
model::Session share.
- addGuests
-
Adds guest email addresses to the share.
- removeUsers
-
Removes model::Experimenter experimenters from
model::Session share.
- removeGuests
-
Removes guest email addresses from the share.
- addUser
-
Adds model::Experimenter experimenter to
model::Session share.
- addGuest
-
Adds guest email address to the share.
- removeUser
-
Removes model::Experimenter experimenter from
model::Session share.
- removeGuest
-
Removes guest email address from share.
- getActiveConnections
-
Gets actual active connections to
model::Session share.
- getPastConnections
-
Gets previous connections to
model::Session share.
- invalidateConnection
-
Makes the connection invalid for
model::Session share for specified user.
- getEvents
-
Gets events for model::Session share per
model::Experimenter experimenter for period of
time.
- notifyMembersOfShare
-
Notifies via email selected members of share.
Operations
void activate(long shareId) throws ServerError
Turns on the access control lists attached to the given
share for the current session. Warning: this will slow down
the execution of the current session for all database
reads. Writing to the database will not be allowed. If
share does not exist or is not accessible (non-members) or
is disabled, then an ValidationException is thrown.
void deactivate() throws ServerError
Turns off the access control lists with the current share.
Gets a share as a model::Session with all
related: model::Annotation comments,
model::Experimenter members, fully loaded.
Unlike the other methods on this interface, if the
sessionId is unknown, does not throw a
ValidationException.
Return Value
a model::Session with id and
model::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. model::Annotation instances
of the share are linked to the
model::Session. Missing is a list of
share guests.
Returns a map from share id to the count of total members
(including the owner). This is represented by
model::ShareMember links.
Parameters
- shareIds
-
Not null.
Return Value
Map with all ids present.
Exceptions
- ValidationException
-
if a given share does not exist
Gets all owned shares for the current
model::Experimenter.
{@code createShare}) and closed shares (see
{@code closeShare}) will be filtered.
Parameters
- active
-
if true, then only shares which can be used for
login will be returned. All draft shares
(see {
Return Value
set of shares. Never null. May be empty.
Gets all shares where current
model::Experimenter is a member.
{@code createShare}) and closed shares (see
{@code closeShare}) will be filtered.
Parameters
- active
-
if true, then only shares which can be used for
login will be returned. All draft shares
(see {
Return Value
set of shares. Never null. May be empty.
Gets all shares owned by the given
model::Experimenter.
{@code createShare}) and closed shares (see
{@code closeShare}) will be filtered.
Parameters
- user
-
the experimenter
- active
-
if true, then only shares which can be used for
login will be returned. All draft shares
(see {
Return Value
set of shares. Never null. May be empty.
Gets all shares where given
model::Experimenter is a member.
{@code createShare}) and closed shares (see
{@code closeShare}) will be filtered.
Parameters
- user
-
the experimenter
- active
-
if true, then only shares which can be used for
login will be returned. All draft shares
(see {
Return Value
set of shares. Never null. May be empty.
Looks up all model::IObject items belong to the
model::Session share.
Return Value
list of objects. Not null. Probably not empty.
IObjectList getContentSubList(long shareId, int start, int finish) throws ServerError
Returns a range of items from the share.
See Also
- getContents
int getContentSize(long shareId) throws ServerError
Returns the number of items in the share.
Returns the contents of the share keyed by type.
Creates model::Session share with all related:
model::IObject itmes,
model::Experimenter members, and guests.
{@code activate}.
Similarly, the share password cannot be used by
guests to login.
Parameters
- 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 {
void setDescription(long shareId, string description) throws ServerError
void setExpiration(long shareId, RTime expiration) throws ServerError
void setActive(long shareId, bool active) throws ServerError
void closeShare(long shareId) throws ServerError
Closes model::Session share. No further logins
will be possible and all getters (e.g.
{@code getMemberShares}, {@code getOwnShares}, ...) will
filter these results if {@code onlyActive} is true.
void addObjects(long shareId, IObjectList iobjects) throws ServerError
Adds new model::IObject items to
model::Session share. Conceptually calls
{@code addObjects} for every argument passed, but the
graphs will be merged.
Adds new model::IObject item to
model::Session 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.
void removeObjects(long shareId, IObjectList iobjects) throws ServerError
Remove existing items from the share.
Removes existing model::IObject object from the
model::Session share.
Returns a map from share id to comment count.
Parameters
- shareIds
-
Not null.
Return Value
Map with all ids present and 0 if no count exists.
Exceptions
- ValidationException
-
if a given share does not exist
Looks up all model::Annotation comments which
belong to the model::Session share.
Return Value
list of Annotation
Creates model::TextAnnotation comment for
model::Session share.
Creates model::TextAnnotation comment which
replies to an existing comment.
Return Value
the new model::TextAnnotation
Deletes model::Annotation comment from the
database.
Get all model::Experimenter users who are a
member of the share.
Get the email addresses for all share guests.
Get a single set containing the
{@code omero.model.Experimenter.getOmeName} login names
of the users as well email addresses for guests.
Parameters
-
Return Value
a java::util::Set containing the login of all
users
Exceptions
- ValidationException
-
if there is a conflict between email addresses and
user names.
Adds model::Experimenter experimenters to
model::Session share.
void addGuests(long shareId, StringSet emailAddresses) throws ServerError
Adds guest email addresses to the share.
Removes model::Experimenter experimenters from
model::Session share.
void removeGuests(long shareId, StringSet emailAddresses) throws ServerError
Removes guest email addresses from the share.
Adds model::Experimenter experimenter to
model::Session share.
void addGuest(long shareId, string emailAddress) throws ServerError
Adds guest email address to the share.
Removes model::Experimenter experimenter from
model::Session share.
void removeGuest(long shareId, string emailAddress) throws ServerError
Removes guest email address from share.
UserMap getActiveConnections(long shareId) throws ServerError
Gets actual active connections to
model::Session share.
Return Value
map of experimenter and IP address
UserMap getPastConnections(long shareId) throws ServerError
Gets previous connections to
model::Session share.
Return Value
map of experimenter and IP address
Makes the connection invalid for
model::Session share for specified user.
Gets events for model::Session share per
model::Experimenter experimenter for period of
time.
Return Value
List of events
void notifyMembersOfShare(long shareId, string subject, string message, bool html) throws ServerError
Notifies via email selected members of share.