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.
      Creates comment for share.
      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>
      void
      addObject​(long shareId, T object)
      Deprecated.
      Adds new item to share.
      <T extends ome.model.IObject>
      void
      addObjects​(long shareId, T... objects)
      Deprecated.
      Adds new items to share.
      ome.model.annotations.CommentAnnotation addReply​(long shareId, java.lang.String comment, ome.model.annotations.CommentAnnotation replyTo)
      Deprecated.
      Creates comment which replies to an existing comment.
      void addUser​(long shareId, ome.model.meta.Experimenter exp)
      Deprecated.
      Adds experimenter to share
      void addUsers​(long shareId, ome.model.meta.Experimenter... exps)
      Deprecated.
      Adds experimenters to share
      void closeShare​(long shareId)
      Deprecated.
      Closes share.
      <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.
      Creates share 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.
      Deletes comment from the database.
      java.util.Map<java.lang.String,​ome.model.meta.Experimenter> getActiveConnections​(long shareId)
      Deprecated.
      Gets actual active connections to share.
      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 all users who are a member of the share.
      java.util.Set<java.lang.String> getAllUsers​(long shareId)
      Deprecated.
      Get a single set containing the login 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 all comments which belong to the share.
      <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 all items belong to the share.
      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 for share per experimenter 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 current Experimenter is a member.
      java.util.Set<ome.model.meta.Session> getMemberSharesFor​(ome.model.meta.Experimenter user, boolean onlyActive)
      Deprecated.
      Gets all shares where given Experimenter is a member.
      java.util.Set<ome.model.meta.Session> getOwnShares​(boolean onlyActive)
      Deprecated.
      Gets all owned shares for the current Experimenter
      java.util.Map<java.lang.String,​ome.model.meta.Experimenter> getPastConnections​(long shareId)
      Deprecated.
      Gets previous connections to share.
      ome.model.meta.Share getShare​(long sessionId)
      Deprecated.
      Gets a share as a Session 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 given Experimenter.
      void invalidateConnection​(long shareId, ome.model.meta.Experimenter exp)
      Deprecated.
      Makes the connection invalid for share 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>
      void
      removeObject​(long shareId, T object)
      Deprecated.
      Removes existing object from the share.
      <T extends ome.model.IObject>
      void
      removeObjects​(long shareId, T... objects)
      Deprecated.
      Remove existing items from the share.
      void removeUser​(long shareId, ome.model.meta.Experimenter exp)
      Deprecated.
      Removes experimenter from share
      void removeUsers​(long shareId, java.util.List<ome.model.meta.Experimenter> exps)
      Deprecated.
      Removes experimenters from share
      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 an ValidationException 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 current Experimenter
        Parameters:
        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.
        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 current 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(String, Timestamp, List, List, List, boolean) and closed 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 given Experimenter.
        Parameters:
        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.
        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 given 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(String, Timestamp, List, List, List, boolean) and closed 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 a 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.
        Parameters:
        sessionId -
        Returns:
        a 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.
      • getContents

        <T extends ome.model.IObject> java.util.List<T> getContents​(long shareId)
        Deprecated.
        Looks up all items belong to the share.
        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.
        Creates share 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 except activate(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.
        Closes share. No further logins will be possible and all getters (e.g. getMemberShares(boolean), getOwnShares(boolean), ...) will filter these results if onlyActive is true.
        Parameters:
        shareId -
      • addObjects

        <T extends ome.model.IObject> void addObjects​(long shareId,
                                                      T... objects)
        Deprecated.
        Adds new items to share. Conceptually calls addObjects(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 new 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.
        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 existing object from the share.
        Parameters:
        shareId -
        object -
      • getComments

        java.util.List<ome.model.annotations.Annotation> getComments​(long shareId)
        Deprecated.
        Looks up all comments which belong to the share.
        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 by ShareMember 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.
        Creates comment for share.
        Parameters:
        shareId -
        comment -
      • addReply

        ome.model.annotations.CommentAnnotation addReply​(long shareId,
                                                         java.lang.String comment,
                                                         ome.model.annotations.CommentAnnotation replyTo)
        Deprecated.
        Creates comment which replies to an existing comment.
        Parameters:
        shareId -
        comment -
        replyTo -
        Returns:
        the new CommentAnnotation
      • deleteComment

        void deleteComment​(ome.model.annotations.Annotation comment)
        Deprecated.
        Deletes comment from the database.
        Parameters:
        comment -
      • getAllMembers

        java.util.Set<ome.model.meta.Experimenter> getAllMembers​(long shareId)
        Deprecated.
        Get all users 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 the login 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.
        Adds experimenters to share
        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.
        Removes experimenters from share
        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.
        Adds experimenter to share
        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.
        Removes experimenter from share
        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 to share.
        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 to share.
        Parameters:
        shareId -
        Returns:
        map of experimenter and IP address
      • invalidateConnection

        void invalidateConnection​(long shareId,
                                  ome.model.meta.Experimenter exp)
        Deprecated.
        Makes the connection invalid for share 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 for share per experimenter for period of time.
        Parameters:
        shareId -
        experimenter -
        from - - time
        to - - 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 -