Version: 5.3.3-ice35-b63

OmeroBlitz API
Home Previous Up Next Index

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 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.

model::Share getShare(long shareId) throws ServerError

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.

sys::CountMap getMemberCount(sys::LongList shareIds) throws ServerError

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

SessionList getOwnShares(bool active) throws ServerError

Gets all owned shares for the current model::Experimenter.

Parameters

onlyActive
if true, then only shares which can be used for login will be returned. All draft shares (see createShare) and closed shares (see closeShare) will be filtered.

Return Value

set of shares. Never null. May be empty.

SessionList getMemberShares(bool active) throws ServerError

Gets all shares where current model::Experimenter is a member.

Parameters

onlyActive
if true, then only shares which can be used for login will be returned. All draft shares (see createShare) and closed shares (see closeShare) will be filtered.

Return Value

set of shares. Never null. May be empty.

SessionList getSharesOwnedBy(model::Experimenter user, bool active) throws ServerError

Gets all shares owned by the given model::Experimenter.

Parameters

onlyActive
if true, then only shares which can be used for login will be returned. All draft shares (see createShare) and closed shares (see closeShare) will be filtered.

Return Value

set of shares. Never null. May be empty.

SessionList getMemberSharesFor(model::Experimenter user, bool active) throws ServerError

Gets all shares where given model::Experimenter is a member.

Parameters

onlyActive
if true, then only shares which can be used for login will be returned. All draft shares (see createShare) and closed shares (see closeShare) will be filtered.

Return Value

set of shares. Never null. May be empty.

IObjectList getContents(long shareId) throws ServerError

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.

IdListMap getContentMap(long shareId) throws ServerError

Returns the contents of the share keyed by type.

long createShare(string description, RTime expiration, IObjectList items, ExperimenterList exps, StringSet guests, bool enabled) throws ServerError

Creates model::Session share with all related: model::IObject itmes, model::Experimenter members, and guests.

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 activate. Similarly, the share password cannot be used by guests to login.

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. getMemberShares, 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 addObjects for every argument passed, but the graphs will be merged.

void addObject(long shareId, model::IObject iobject) throws ServerError

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.

void removeObject(long shareId, model::IObject iobject) throws ServerError

Removes existing model::IObject object from the model::Session share.

sys::CountMap getCommentCount(sys::LongList shareIds) throws ServerError

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

AnnotationList getComments(long shareId) throws ServerError

Looks up all model::Annotation comments which belong to the model::Session share.

Return Value

list of Annotation

model::TextAnnotation addComment(long shareId, string comment) throws ServerError

Creates model::TextAnnotation comment for model::Session share.

model::TextAnnotation addReply(long shareId, string comment, model::TextAnnotation replyTo) throws ServerError

Creates model::TextAnnotation comment which replies to an existing comment.

Return Value

the new model::TextAnnotation

void deleteComment(model::Annotation comment) throws ServerError

Deletes model::Annotation comment from the database.

ExperimenterList getAllMembers(long shareId) throws ServerError

Get all model::Experimenter users who are a member of the share.

StringSet getAllGuests(long shareId) throws ServerError

Get the email addresses for all share guests.

StringSet getAllUsers(long shareId) throws ValidationException, ServerError

Get a single set containing the model::Experimenter::getOmeName login names of the users as well email addresses for guests.

Parameters

Return Value

a StringSet containing the login of all users

Exceptions

ValidationException
if there is a conflict between email addresses and user names.

void addUsers(long shareId, ExperimenterList exps) throws ServerError

Adds model::Experimenter experimenters to model::Session share.

void addGuests(long shareId, StringSet emailAddresses) throws ServerError

Adds guest email addresses to the share.

void removeUsers(long shareId, ExperimenterList exps) throws ServerError

Removes model::Experimenter experimenters from model::Session share.

void removeGuests(long shareId, StringSet emailAddresses) throws ServerError

Removes guest email addresses from the share.

void addUser(long shareId, model::Experimenter exp) throws ServerError

Adds model::Experimenter experimenter to model::Session share.

void addGuest(long shareId, string emailAddress) throws ServerError

Adds guest email address to the share.

void removeUser(long shareId, model::Experimenter exp) throws ServerError

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

void invalidateConnection(long shareId, model::Experimenter exp) throws ServerError

Makes the connection invalid for model::Session share for specified user.

IObjectList getEvents(long shareId, model::Experimenter exp, RTime from, RTime to) throws ServerError

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.


Home Previous Up Next Index