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 void
activate(long shareId)
Deprecated.Turns on the access control lists attached to the given share for the current session.ome.model.annotations.CommentAnnotation
addComment(long shareId, java.lang.String comment)
Deprecated.Createscomment
forshare
.void
addGuest(long shareId, java.lang.String emailAddress)
Deprecated.Add guest email address to the share.void
addGuests(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 newitem
toshare
.<T extends ome.model.IObject>
voidaddObjects(long shareId, T... objects)
Deprecated.Adds newitems
toshare
.ome.model.annotations.CommentAnnotation
addReply(long shareId, java.lang.String comment, ome.model.annotations.CommentAnnotation replyTo)
Deprecated.Createscomment
which replies to an existing comment.void
addUser(long shareId, ome.model.meta.Experimenter exp)
Deprecated.Addsexperimenter
toshare
void
addUsers(long shareId, ome.model.meta.Experimenter... exps)
Deprecated.Addsexperimenters
toshare
void
closeShare(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.Createsshare
with all related:items
,members
, and guests.void
deactivate()
Deprecated.Turns off the access control lists with the current share.void
deleteComment(ome.model.annotations.Annotation comment)
Deprecated.Deletescomment
from 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 allusers
who are a member of the share.java.util.Set<java.lang.String>
getAllUsers(long shareId)
Deprecated.Get a single set containing thelogin names
of 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 allcomments
which 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 allitems
belong to theshare
.int
getContentSize(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 forshare
perexperimenter
for 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 currentExperimenter
is a member.java.util.Set<ome.model.meta.Session>
getMemberSharesFor(ome.model.meta.Experimenter user, boolean onlyActive)
Deprecated.Gets all shares where givenExperimenter
is a member.java.util.Set<ome.model.meta.Session>
getOwnShares(boolean onlyActive)
Deprecated.Gets all owned shares for the currentExperimenter
java.util.Map<java.lang.String,ome.model.meta.Experimenter>
getPastConnections(long shareId)
Deprecated.Gets previous connections toshare
.ome.model.meta.Share
getShare(long sessionId)
Deprecated.Gets a share as aSession
with 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
.void
invalidateConnection(long shareId, ome.model.meta.Experimenter exp)
Deprecated.Makes the connection invalid forshare
for specifiec user.void
notifyMembersOfShare(long shareId, java.lang.String subject, java.lang.String message, boolean html)
Deprecated.Notify via email selected members of share.void
removeGuest(long shareId, java.lang.String emailAddress)
Deprecated.Removes guest email address from share.void
removeGuests(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 existingobject
from theshare
.<T extends ome.model.IObject>
voidremoveObjects(long shareId, T... objects)
Deprecated.Remove existing items from the share.void
removeUser(long shareId, ome.model.meta.Experimenter exp)
Deprecated.Removesexperimenter
fromshare
void
removeUsers(long shareId, java.util.List<ome.model.meta.Experimenter> exps)
Deprecated.Removesexperimenters
fromshare
void
setActive(long shareId, boolean active)
Deprecated.void
setDescription(long shareId, java.lang.String description)
Deprecated.void
setExpiration(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 anValidationException
is 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 shares
will 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 currentExperimenter
is 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 shares
will 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 shares
will 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 givenExperimenter
is 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 shares
will be filtered.- Returns:
- set of shares. Never null. May be empty.
-
getShare
ome.model.meta.Share getShare(long sessionId)
Deprecated.Gets a share as aSession
with 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
Session
with id andDetails
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 theSession
. Missing is a list of share guests.
-
getContents
<T extends ome.model.IObject> java.util.List<T> getContents(long shareId)
Deprecated.Looks up allitems
belong 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.Createsshare
with 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 ifonlyActive
is true.- Parameters:
shareId
-
-
addObjects
<T extends ome.model.IObject> void addObjects(long shareId, T... objects)
Deprecated.Adds newitems
toshare
. 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 newitem
toshare
. 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 existingobject
from theshare
.- Parameters:
shareId
-object
-
-
getComments
java.util.List<ome.model.annotations.Annotation> getComments(long shareId)
Deprecated.Looks up allcomments
which 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 byShareMember
links.- 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.Createscomment
forshare
.- Parameters:
shareId
-comment
-
-
addReply
ome.model.annotations.CommentAnnotation addReply(long shareId, java.lang.String comment, ome.model.annotations.CommentAnnotation replyTo)
Deprecated.Createscomment
which replies to an existing comment.- Parameters:
shareId
-comment
-replyTo
-- Returns:
- the new
CommentAnnotation
-
deleteComment
void deleteComment(ome.model.annotations.Annotation comment)
Deprecated.Deletescomment
from the database.- Parameters:
comment
-
-
getAllMembers
java.util.Set<ome.model.meta.Experimenter> getAllMembers(long shareId)
Deprecated.Get allusers
who 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.ValidationException
Deprecated.Get a single set containing thelogin names
of the users as well email addresses for guests.- Parameters:
shareId
-- Returns:
- a
Set
containing 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.Addsexperimenters
toshare
- 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.Removesexperimenters
fromshare
- 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.Addsexperimenter
toshare
- 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.Removesexperimenter
fromshare
- 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 forshare
for 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 forshare
perexperimenter
for 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
-
-
-