Package ome.api
Interface IShare
-
- All Superinterfaces:
ServiceInterface
@Deprecated public interface IShare extends ServiceInterface
Deprecated.Provides method for sharing - collaboration process for images, datasets, projects.- Since:
- 3.0-Beta4
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description voidactivate(long shareId)Deprecated.Turns on the access control lists attached to the given share for the current session.ome.model.annotations.CommentAnnotationaddComment(long shareId, java.lang.String comment)Deprecated.Createscommentforshare.voidaddGuest(long shareId, java.lang.String emailAddress)Deprecated.Add guest email address to the share.voidaddGuests(long shareId, java.lang.String... emailAddresses)Deprecated.Adds guest email addresses to the share.<T extends ome.model.IObject>
voidaddObject(long shareId, T object)Deprecated.Adds newitemtoshare.<T extends ome.model.IObject>
voidaddObjects(long shareId, T... objects)Deprecated.Adds newitemstoshare.ome.model.annotations.CommentAnnotationaddReply(long shareId, java.lang.String comment, ome.model.annotations.CommentAnnotation replyTo)Deprecated.Createscommentwhich replies to an existing comment.voidaddUser(long shareId, ome.model.meta.Experimenter exp)Deprecated.AddsexperimentertosharevoidaddUsers(long shareId, ome.model.meta.Experimenter... exps)Deprecated.AddsexperimenterstosharevoidcloseShare(long shareId)Deprecated.Closesshare.<T extends ome.model.IObject>
longcreateShare(java.lang.String description, java.sql.Timestamp expiration, java.util.List<T> items, java.util.List<ome.model.meta.Experimenter> exps, java.util.List<java.lang.String> guests, boolean enabled)Deprecated.Createssharewith all related:items,members, and guests.voiddeactivate()Deprecated.Turns off the access control lists with the current share.voiddeleteComment(ome.model.annotations.Annotation comment)Deprecated.Deletescommentfrom the database.java.util.Map<java.lang.String,ome.model.meta.Experimenter>getActiveConnections(long shareId)Deprecated.Gets actual active connections toshare.java.util.Set<java.lang.String>getAllGuests(long shareId)Deprecated.Get the email addresses for all share guests.java.util.Set<ome.model.meta.Experimenter>getAllMembers(long shareId)Deprecated.Get alluserswho are a member of the share.java.util.Set<java.lang.String>getAllUsers(long shareId)Deprecated.Get a single set containing thelogin namesof the users as well email addresses for guests.java.util.Map<java.lang.Long,java.lang.Long>getCommentCount(java.util.Set<java.lang.Long> shareIds)Deprecated.Returns a map from share id to comment count.java.util.List<ome.model.annotations.Annotation>getComments(long shareId)Deprecated.Looks up allcommentswhich belong to theshare.<T extends ome.model.IObject>
java.util.Map<java.lang.Class<T>,java.util.List<java.lang.Long>>getContentMap(long shareId)Deprecated.Returns the contents of the share keyed by type.<T extends ome.model.IObject>
java.util.List<T>getContents(long shareId)Deprecated.Looks up allitemsbelong to theshare.intgetContentSize(long shareId)Deprecated.Returns the number of items in the share.<T extends ome.model.IObject>
java.util.List<T>getContentSubList(long shareId, int start, int finish)Deprecated.Returns a range of items from the share.java.util.List<ome.model.meta.Event>getEvents(long shareId, ome.model.meta.Experimenter experimenter, java.sql.Timestamp from, java.sql.Timestamp to)Deprecated.Gets events forshareperexperimenterfor period of time.java.util.Map<java.lang.Long,java.lang.Long>getMemberCount(java.util.Set<java.lang.Long> shareIds)Deprecated.Returns a map from share id to the count of total members (including the owner).java.util.Set<ome.model.meta.Session>getMemberShares(boolean onlyActive)Deprecated.Gets all shares where currentExperimenteris a member.java.util.Set<ome.model.meta.Session>getMemberSharesFor(ome.model.meta.Experimenter user, boolean onlyActive)Deprecated.Gets all shares where givenExperimenteris a member.java.util.Set<ome.model.meta.Session>getOwnShares(boolean onlyActive)Deprecated.Gets all owned shares for the currentExperimenterjava.util.Map<java.lang.String,ome.model.meta.Experimenter>getPastConnections(long shareId)Deprecated.Gets previous connections toshare.ome.model.meta.SharegetShare(long sessionId)Deprecated.Gets a share as aSessionwith all related:comments,members, fully loaded.java.util.Set<ome.model.meta.Session>getSharesOwnedBy(ome.model.meta.Experimenter user, boolean onlyActive)Deprecated.Gets all shares owned by the givenExperimenter.voidinvalidateConnection(long shareId, ome.model.meta.Experimenter exp)Deprecated.Makes the connection invalid forsharefor specifiec user.voidnotifyMembersOfShare(long shareId, java.lang.String subject, java.lang.String message, boolean html)Deprecated.Notify via email selected members of share.voidremoveGuest(long shareId, java.lang.String emailAddress)Deprecated.Removes guest email address from share.voidremoveGuests(long shareId, java.lang.String... emailAddresses)Deprecated.Removes guest email addresses from the share.<T extends ome.model.IObject>
voidremoveObject(long shareId, T object)Deprecated.Removes existingobjectfrom theshare.<T extends ome.model.IObject>
voidremoveObjects(long shareId, T... objects)Deprecated.Remove existing items from the share.voidremoveUser(long shareId, ome.model.meta.Experimenter exp)Deprecated.RemovesexperimenterfromsharevoidremoveUsers(long shareId, java.util.List<ome.model.meta.Experimenter> exps)Deprecated.RemovesexperimentersfromsharevoidsetActive(long shareId, boolean active)Deprecated.voidsetDescription(long shareId, java.lang.String description)Deprecated.voidsetExpiration(long shareId, java.sql.Timestamp expiration)Deprecated.
-
-
-
Method Detail
-
activate
void activate(long shareId)
Deprecated.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 anValidationExceptionis thrown.- Parameters:
shareId-
-
deactivate
void deactivate()
Deprecated.Turns off the access control lists with the current share.
-
getCommentCount
java.util.Map<java.lang.Long,java.lang.Long> getCommentCount(java.util.Set<java.lang.Long> shareIds)
Deprecated.Returns a map from share id to comment count.- Parameters:
shareIds- Not null.- Returns:
- Map with all ids present and 0 if no count exists.
- Throws:
ome.conditions.ValidationException- if a given share does not exist
-
getOwnShares
java.util.Set<ome.model.meta.Session> getOwnShares(boolean onlyActive)
Deprecated.Gets all owned shares for the currentExperimenter- Parameters:
onlyActive- if true, then only shares which can be used for login will be returned. All "draft" shares (seecreateShare(String, Timestamp, List, List, List, boolean)andclosed shareswill be filtered.- Returns:
- set of shares. Never null. May be empty.
-
getMemberShares
java.util.Set<ome.model.meta.Session> getMemberShares(boolean onlyActive)
Deprecated.Gets all shares where currentExperimenteris a member.- Parameters:
onlyActive- if true, then only shares which can be used for login will be returned. All "draft" shares (seecreateShare(String, Timestamp, List, List, List, boolean)andclosed shareswill be filtered.- Returns:
- set of shares. Never null. May be empty.
-
getSharesOwnedBy
java.util.Set<ome.model.meta.Session> getSharesOwnedBy(ome.model.meta.Experimenter user, boolean onlyActive)Deprecated.Gets all shares owned by the givenExperimenter.- Parameters:
onlyActive- if true, then only shares which can be used for login will be returned. All "draft" shares (seecreateShare(String, Timestamp, List, List, List, boolean)andclosed shareswill be filtered.- Returns:
- set of shares. Never null. May be empty.
-
getMemberSharesFor
java.util.Set<ome.model.meta.Session> getMemberSharesFor(ome.model.meta.Experimenter user, boolean onlyActive)Deprecated.Gets all shares where givenExperimenteris a member.- Parameters:
onlyActive- if true, then only shares which can be used for login will be returned. All "draft" shares (seecreateShare(String, Timestamp, List, List, List, boolean)andclosed shareswill be filtered.- Returns:
- set of shares. Never null. May be empty.
-
getShare
ome.model.meta.Share getShare(long sessionId)
Deprecated.Gets a share as aSessionwith all related:comments,members, fully loaded. Unlike the other methods on this interface, if the sessionId is unknown, does not throw aValidationException.- Parameters:
sessionId-- Returns:
- a
Sessionwith id andDetailsset or null. The owner in the Details object is the true owner, and the group in the Details has all member users linked.Annotationinstances of the share are linked to theSession. Missing is a list of share guests.
-
getContents
<T extends ome.model.IObject> java.util.List<T> getContents(long shareId)
Deprecated.Looks up allitemsbelong to theshare.- Parameters:
shareId-- Returns:
- list of objects. Not null. Probably not empty.
-
getContentSubList
<T extends ome.model.IObject> java.util.List<T> getContentSubList(long shareId, int start, int finish)Deprecated.Returns a range of items from the share.- See Also:
getContents(long)
-
getContentSize
int getContentSize(long shareId)
Deprecated.Returns the number of items in the share.
-
getContentMap
<T extends ome.model.IObject> java.util.Map<java.lang.Class<T>,java.util.List<java.lang.Long>> getContentMap(long shareId)
Deprecated.Returns the contents of the share keyed by type.
-
createShare
<T extends ome.model.IObject> long createShare(java.lang.String description, java.sql.Timestamp expiration, java.util.List<T> items, java.util.List<ome.model.meta.Experimenter> exps, java.util.List<java.lang.String> guests, boolean enabled)Deprecated.Createssharewith all related:items,members, and guests.- Parameters:
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 exceptactivate(long). Similarly, the share password cannot be used by guests to login.
-
setDescription
void setDescription(long shareId, java.lang.String description)Deprecated.
-
setExpiration
void setExpiration(long shareId, java.sql.Timestamp expiration)Deprecated.
-
setActive
void setActive(long shareId, boolean active)Deprecated.
-
closeShare
void closeShare(long shareId)
Deprecated.Closesshare. No further logins will be possible and all getters (e.g.getMemberShares(boolean),getOwnShares(boolean), ...) will filter these results ifonlyActiveis true.- Parameters:
shareId-
-
addObjects
<T extends ome.model.IObject> void addObjects(long shareId, T... objects)Deprecated.Adds newitemstoshare. Conceptually callsaddObjects(long, IObject...)for every argument passed, but the graphs will be merged.- Parameters:
shareId-objects-
-
addObject
<T extends ome.model.IObject> void addObject(long shareId, T object)Deprecated.Adds newitemtoshare. 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.- Parameters:
shareId-object-
-
removeObjects
<T extends ome.model.IObject> void removeObjects(long shareId, T... objects)Deprecated.Remove existing items from the share.- Parameters:
shareId-objects-
-
removeObject
<T extends ome.model.IObject> void removeObject(long shareId, T object)Deprecated.Removes existingobjectfrom theshare.- Parameters:
shareId-object-
-
getComments
java.util.List<ome.model.annotations.Annotation> getComments(long shareId)
Deprecated.Looks up allcommentswhich belong to theshare.- Parameters:
shareId-- Returns:
- list of Annotation
-
getMemberCount
java.util.Map<java.lang.Long,java.lang.Long> getMemberCount(java.util.Set<java.lang.Long> shareIds)
Deprecated.Returns a map from share id to the count of total members (including the owner). This is represented byShareMemberlinks.- Parameters:
shareIds- Not null.- Returns:
- Map with all ids present.
- Throws:
ome.conditions.ValidationException- if a given share does not exist
-
addComment
ome.model.annotations.CommentAnnotation addComment(long shareId, java.lang.String comment)Deprecated.Createscommentforshare.- Parameters:
shareId-comment-
-
addReply
ome.model.annotations.CommentAnnotation addReply(long shareId, java.lang.String comment, ome.model.annotations.CommentAnnotation replyTo)Deprecated.Createscommentwhich replies to an existing comment.- Parameters:
shareId-comment-replyTo-- Returns:
- the new
CommentAnnotation
-
deleteComment
void deleteComment(ome.model.annotations.Annotation comment)
Deprecated.Deletescommentfrom the database.- Parameters:
comment-
-
getAllMembers
java.util.Set<ome.model.meta.Experimenter> getAllMembers(long shareId)
Deprecated.Get alluserswho are a member of the share.
-
getAllGuests
java.util.Set<java.lang.String> getAllGuests(long shareId)
Deprecated.Get the email addresses for all share guests.
-
getAllUsers
java.util.Set<java.lang.String> getAllUsers(long shareId) throws ome.conditions.ValidationExceptionDeprecated.Get a single set containing thelogin namesof the users as well email addresses for guests.- Parameters:
shareId-- Returns:
- a
Setcontaining the login of all users - Throws:
ome.conditions.ValidationException- if there is a conflict between email addresses and user names.
-
addUsers
void addUsers(long shareId, ome.model.meta.Experimenter... exps)Deprecated.Addsexperimenterstoshare- Parameters:
shareId-exps-
-
addGuests
void addGuests(long shareId, java.lang.String... emailAddresses)Deprecated.Adds guest email addresses to the share.- Parameters:
shareId-emailAddresses-
-
removeUsers
void removeUsers(long shareId, java.util.List<ome.model.meta.Experimenter> exps)Deprecated.Removesexperimentersfromshare- Parameters:
shareId-exps-
-
removeGuests
void removeGuests(long shareId, java.lang.String... emailAddresses)Deprecated.Removes guest email addresses from the share.- Parameters:
shareId-emailAddresses-
-
addUser
void addUser(long shareId, ome.model.meta.Experimenter exp)Deprecated.Addsexperimentertoshare- Parameters:
shareId-exp-
-
addGuest
void addGuest(long shareId, java.lang.String emailAddress)Deprecated.Add guest email address to the share.- Parameters:
shareId-emailAddress-
-
removeUser
void removeUser(long shareId, ome.model.meta.Experimenter exp)Deprecated.Removesexperimenterfromshare- Parameters:
shareId-exp-
-
removeGuest
void removeGuest(long shareId, java.lang.String emailAddress)Deprecated.Removes guest email address from share.- Parameters:
shareId-emailAddress-
-
getActiveConnections
java.util.Map<java.lang.String,ome.model.meta.Experimenter> getActiveConnections(long shareId)
Deprecated.Gets actual active connections toshare.- Parameters:
shareId-- Returns:
- map of experimenter and IP address
-
getPastConnections
java.util.Map<java.lang.String,ome.model.meta.Experimenter> getPastConnections(long shareId)
Deprecated.Gets previous connections toshare.- Parameters:
shareId-- Returns:
- map of experimenter and IP address
-
invalidateConnection
void invalidateConnection(long shareId, ome.model.meta.Experimenter exp)Deprecated.Makes the connection invalid forsharefor specifiec user.- Parameters:
shareId-exp- - connection
-
getEvents
java.util.List<ome.model.meta.Event> getEvents(long shareId, ome.model.meta.Experimenter experimenter, java.sql.Timestamp from, java.sql.Timestamp to)Deprecated.Gets events forshareperexperimenterfor period of time.- Parameters:
shareId-experimenter-from- - timeto- - time- Returns:
- List of events
-
notifyMembersOfShare
void notifyMembersOfShare(long shareId, java.lang.String subject, java.lang.String message, boolean html)Deprecated.Notify via email selected members of share.- Parameters:
shareId-subject-message-html-
-
-