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