Interface Destination

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      boolean exists​(GuiseSession session, com.globalmentor.net.URIPath navigationPath, Bookmark bookmark, java.net.URI referrerURI)
      Determines if the given path does indeed exist for this destination.
      java.lang.Iterable<Category> getCategories()  
      java.util.Optional<io.urf.model.UrfResourceDescription> getDescription​(GuiseSession session, com.globalmentor.net.URIPath navigationPath, Bookmark bookmark, java.net.URI referrerURI)
      Returns a description of the resource for this destination at the given navigation path and bookmark.
      com.globalmentor.net.URIPath getPath()  
      com.globalmentor.net.URIPath getPath​(GuiseSession session, com.globalmentor.net.URIPath navigationPath, Bookmark bookmark, java.net.URI referrerURI)
      Determines the path to use for the requested path.
      java.util.regex.Pattern getPathPattern()  
      boolean isAuthorized​(GuiseSession session, com.globalmentor.net.URIPath navigationPath, Bookmark bookmark, java.net.URI referrerURI)
      Determines if access to the given path is authorized for access by the current user, if any.
      void setCategories​(java.util.List<Category> categories)
      Sets the categories.
      • Methods inherited from interface com.globalmentor.beans.PropertyBindable

        addPropertyChangeListener, addPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, hasPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener
    • Method Detail

      • getPath

        com.globalmentor.net.URIPath getPath()
        Returns:
        The application context-relative path within the Guise container context, which does not begin with '/', or null if there is no path specified for this destination.
      • getPathPattern

        java.util.regex.Pattern getPathPattern()
        Returns:
        The pattern to match an application context-relative path within the Guise container context, which does not begin with '/', or null if there is no path pattern specified for this destination.
      • getCategories

        java.lang.Iterable<Category> getCategories()
        Returns:
        The read-only iterable of categories.
      • setCategories

        void setCategories​(java.util.List<Category> categories)
        Sets the categories.
        Parameters:
        categories - The list of new categories.
      • getPath

        com.globalmentor.net.URIPath getPath​(GuiseSession session,
                                             com.globalmentor.net.URIPath navigationPath,
                                             Bookmark bookmark,
                                             java.net.URI referrerURI)
                                      throws com.globalmentor.net.ResourceIOException
        Determines the path to use for the requested path. If there is a preferred path, it is returned; otherwise, the path is returned unmodified. If there is no principal or the principal is not the owner of the identified resource; the determined path is a collection path; and there exists a discoverable home page in the collection, this version returns the path to the home page.
        Parameters:
        session - The current Guise session.
        navigationPath - The navigation path relative to the application context path.
        bookmark - The bookmark for this path, or null if there is no bookmark.
        referrerURI - The URI of the referring destination or other entity with no query or fragment, or null if no referring URI is known.
        Returns:
        The preferred path.
        Throws:
        java.lang.NullPointerException - if the given session and/or path is null.
        com.globalmentor.net.ResourceIOException - if there is an error accessing the resource.
      • exists

        boolean exists​(GuiseSession session,
                       com.globalmentor.net.URIPath navigationPath,
                       Bookmark bookmark,
                       java.net.URI referrerURI)
                throws com.globalmentor.net.ResourceIOException
        Determines if the given path does indeed exist for this destination.
        Parameters:
        session - The current Guise session.
        navigationPath - The navigation path relative to the application context path.
        bookmark - The bookmark for which navigation should occur at this navigation path, or null if there is no bookmark involved in navigation.
        referrerURI - The URI of the referring navigation panel or other entity with no query or fragment, or null if no referring URI is known.
        Returns:
        Whether the requested path exists.
        Throws:
        java.lang.NullPointerException - if the given navigation path is null.
        com.globalmentor.net.ResourceIOException - if there is an error accessing the resource.
      • isAuthorized

        boolean isAuthorized​(GuiseSession session,
                             com.globalmentor.net.URIPath navigationPath,
                             Bookmark bookmark,
                             java.net.URI referrerURI)
                      throws com.globalmentor.net.ResourceIOException
        Determines if access to the given path is authorized for access by the current user, if any.

        The result of this method for resources that do not exist is undefined; it is assumed that this method will not be called unless exists(GuiseSession, URIPath, Bookmark, URI) returns true for that resource, although this method must not produce an error if the resource does not exist.

        This method allows the underlying platform to handle unauthorized resources. If this implementation wishes to handle unauthorized resources, this method should return true and provide a resource that indicates the true resource is unauthorized or at the appropriate time redirect to an unauthorized indication page.

        Parameters:
        session - The current Guise session.
        navigationPath - The navigation path relative to the application context path.
        bookmark - The bookmark for which navigation should occur at this navigation path, or null if there is no bookmark involved in navigation.
        referrerURI - The URI of the referring navigation panel or other entity with no query or fragment, or null if no referring URI is known.
        Returns:
        Whether the requested path exists.
        Throws:
        java.lang.NullPointerException - if the given navigation path is null.
        com.globalmentor.net.ResourceIOException - if there is an error accessing the resource.
      • getDescription

        java.util.Optional<io.urf.model.UrfResourceDescription> getDescription​(GuiseSession session,
                                                                               com.globalmentor.net.URIPath navigationPath,
                                                                               Bookmark bookmark,
                                                                               java.net.URI referrerURI)
                                                                        throws com.globalmentor.net.ResourceIOException
        Returns a description of the resource for this destination at the given navigation path and bookmark.
        Parameters:
        session - The current Guise session.
        navigationPath - The navigation path relative to the application context path.
        bookmark - The bookmark for which navigation should occur at this navigation path, or null if there is no bookmark involved in navigation.
        referrerURI - The URI of the referring navigation panel or other entity with no query or fragment, or null if no referring URI is known.
        Returns:
        A description of the indicated navigation path for this destination, which will not be present if nothing exists at the given navigation path.
        Throws:
        java.lang.IllegalArgumentException - If the given navigation path is not a valid path serviced by this destination.
        com.globalmentor.net.ResourceIOException - if there is an error accessing the resource.