Interface RemoteObject

    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      DataObject asDataObject()
      Returns a DataObject (or a subclass) corresponding to the handled object.
      boolean canAnnotate()
      Returns true if the object can be annotated false otherwise, depending on permissions level.
      boolean canChgrp()
      Returns true if the object can be moved by the user currently logged in, false otherwise, depending on permissions level.
      boolean canChown()
      Returns true if the object can be given by the user currently logged in, false otherwise, depending on permissions level.
      boolean canDelete()
      Returns true if the object can be deleted by the user currently logged in, false otherwise, depending on permissions level.
      boolean canEdit()
      Returns true if the object can be edited by the user currently logged in false otherwise, depending on permissions level.
      boolean canLink()
      Returns true if the object can be linked e.g.
      static <T extends RemoteObject>
      java.util.List<T>
      distinct​(java.util.Collection<? extends T> objects)
      Only keeps objects with different IDs in a collection.
      static <T extends RemoteObject>
      java.util.List<T>
      flatten​(java.util.Collection<? extends java.util.Collection<? extends T>> lists)
      Flattens a collection of collections and only keeps objects with different IDs.
      java.sql.Timestamp getCreated()
      Gets the object creation date
      static <U extends RemoteObject,​V extends U>
      java.util.List<V>
      getElementsOf​(java.util.Collection<? extends U> collection, java.lang.Class<? extends V> clazz)
      Gets a list of elements of the specified class from a collection of RemoteObjects.
      java.lang.Long getGroupId()
      Gets the group ID
      long getId()
      Gets the object id
      Experimenter getOwner()
      Gets the owner ID
      void saveAndUpdate​(DataManager dm)
      Saves and updates object.
    • Method Detail

      • getElementsOf

        static <U extends RemoteObject,​V extends U> java.util.List<V> getElementsOf​(java.util.Collection<? extends U> collection,
                                                                                          java.lang.Class<? extends V> clazz)
        Gets a list of elements of the specified class from a collection of RemoteObjects.
        Type Parameters:
        U - Subclass of RemoteObject.
        V - Subclass of U.
        Parameters:
        clazz - Class of the wanted elements.
        collection - The collection of RemoteObjects
        Returns:
        See above.
      • distinct

        static <T extends RemoteObject> java.util.List<T> distinct​(java.util.Collection<? extends T> objects)
        Only keeps objects with different IDs in a collection.
        Type Parameters:
        T - The objects type.
        Parameters:
        objects - A collection of objects.
        Returns:
        Distinct objects list, sorted by ID.
      • flatten

        static <T extends RemoteObject> java.util.List<T> flatten​(java.util.Collection<? extends java.util.Collection<? extends T>> lists)
        Flattens a collection of collections and only keeps objects with different IDs.
        Type Parameters:
        T - The objects type.
        Parameters:
        lists - A collection of objects collections.
        Returns:
        Distinct objects list, sorted by ID.
      • asDataObject

        DataObject asDataObject()
        Returns a DataObject (or a subclass) corresponding to the handled object.
        Returns:
        See above.
      • getId

        long getId()
        Gets the object id
        Returns:
        id.
      • getCreated

        java.sql.Timestamp getCreated()
        Gets the object creation date
        Returns:
        creation date.
      • getOwner

        Experimenter getOwner()
        Gets the owner ID
        Returns:
        owner id.
      • getGroupId

        java.lang.Long getGroupId()
        Gets the group ID
        Returns:
        group id.
      • saveAndUpdate

        void saveAndUpdate​(DataManager dm)
                    throws java.util.concurrent.ExecutionException,
                           ServiceException,
                           AccessException
        Saves and updates object.
        Parameters:
        dm - The data manager.
        Throws:
        ServiceException - Cannot connect to OMERO.
        AccessException - Cannot access data.
        java.util.concurrent.ExecutionException - A Facility can't be retrieved or instantiated.
      • canAnnotate

        boolean canAnnotate()
        Returns true if the object can be annotated false otherwise, depending on permissions level.
        Returns:
        See above.
      • canEdit

        boolean canEdit()
        Returns true if the object can be edited by the user currently logged in false otherwise, depending on permissions level.
        Returns:
        See above.
      • canLink

        boolean canLink()
        Returns true if the object can be linked e.g. image add to dataset, by the user currently logged in, false otherwise, depending on permissions level.
        Returns:
        See above.
      • canDelete

        boolean canDelete()
        Returns true if the object can be deleted by the user currently logged in, false otherwise, depending on permissions level.
        Returns:
        See above.
      • canChgrp

        boolean canChgrp()
        Returns true if the object can be moved by the user currently logged in, false otherwise, depending on permissions level.
        Returns:
        See above.
      • canChown

        boolean canChown()
        Returns true if the object can be given by the user currently logged in, false otherwise, depending on permissions level.
        Returns:
        See above.