Interface Platform

    • Method Detail

      • getApplication

        GuiseApplication getApplication()
        Returns:
        The Guise application running on this platform.
      • getEnvironment

        Environment getEnvironment()
        Returns:
        The user local environment.
      • generateDepictID

        long generateDepictID()
        Generates a new depict ID unique to this session platform.
        Returns:
        A new depict ID unique to this session platform.
      • getDepictor

        <O extends DepictedObjectDepictor<? super O> getDepictor​(O depictedObject)
        Determines the depictor appropriate for the given depicted object. A depictor class is located by individually looking up the depicted object class hiearchy for registered depictor classes.
        Type Parameters:
        O - The type of depicted object.
        Parameters:
        depictedObject - The depicted object for which a depictor should be returned.
        Returns:
        A depictor to depict the given component, or null if no depictor is registered.
        Throws:
        java.lang.IllegalStateException - if the registered depictor could not be instantiated for some reason.
      • registerDepictedObject

        void registerDepictedObject​(DepictedObject depictedObject)
        Registers a depicted object so that it can interact with the platform.
        Parameters:
        depictedObject - The depicted object to register.
        Throws:
        java.lang.NullPointerException - if the given depicted object is null.
      • unregisterDepictedObject

        void unregisterDepictedObject​(DepictedObject depictedObject)
        Unregisters a depicted object so that no longer interacts with the platform.
        Parameters:
        depictedObject - The depicted object to unregister.
        Throws:
        java.lang.NullPointerException - if the given depicted object is null.
      • getDepictedObject

        DepictedObject getDepictedObject​(long depictedObjectID)
        Retrieves a depicted object that has been registered with the platform by the ID of the depicted object.
        Parameters:
        depictedObjectID - The ID of the depicted object to retrieve.
        Returns:
        The registered depicted object with the given ID, or null if there is no depicted object registered with this platform with the given ID.
      • getClientProduct

        ClientProduct getClientProduct()
        Returns:
        The client software being used to access Guise on this platform.
      • getSendMessageQueue

        java.util.Queue<? extends PlatformMessage> getSendMessageQueue()
        Returns:
        The thread-safe queue of messages to be delivered to the platform.
      • getDepictLock

        java.util.concurrent.locks.Lock getDepictLock()
        Returns:
        The lock used for exclusive depiction on the platform.
      • getDepictContext

        DepictContext getDepictContext()
        Retrieves information and functionality related to the current depiction.
        Returns:
        A context for the current depiction.
        Throws:
        java.lang.IllegalStateException - if no depict context can be returned in the current depiction state.
      • selectPlatformFiles

        void selectPlatformFiles​(boolean multiple,
                                 ValueSelectListener<java.util.Collection<PlatformFile>> platformFileSelectListener)
        Selects one or more files on the platform, using the appropriate selection functionality for the platform.
        Parameters:
        multiple - Whether multiple files should be allowed to be selected.
        platformFileSelectListener - The listener that will be notified when platform files are selected.
      • sendResource

        void sendResource​(com.globalmentor.net.URIPath resourcePath)
        Sends a resource to the platform.
        Parameters:
        resourcePath - The path of the resource to send, relative to the application.
        Throws:
        java.lang.NullPointerException - if the given path is null.
        java.lang.IllegalArgumentException - if the given string is not a path.
      • sendResource

        void sendResource​(java.net.URI resourceURI)
        Sends a resource to the platform.
        Parameters:
        resourceURI - The URI of the resource to send, relative to the application.
        Throws:
        java.lang.NullPointerException - if the given URI is null.
      • sendResource

        void sendResource​(com.globalmentor.net.URIPath resourcePath,
                          Bookmark bookmark)
        Sends a resource to the platform with the specified bookmark.
        Parameters:
        resourcePath - The path of the resource to send, relative to the application.
        bookmark - The bookmark at the given path, or null if there is no bookmark.
        Throws:
        java.lang.NullPointerException - if the given path is null.
      • sendResource

        void sendResource​(java.net.URI resourceURI,
                          Bookmark bookmark)
        Sends a resource to the platform.
        Parameters:
        resourceURI - The URI of the resource to send, relative to the application.
        bookmark - The bookmark at the given path, or null if there is no bookmark.
        Throws:
        java.lang.NullPointerException - if the given URI is null.