Class AbstractDiscoveryLinkIndexService


  • public abstract class AbstractDiscoveryLinkIndexService
    extends Object
    Provides services to discover links stored in the link index of a remote application.

    Concrete services extending this class may declare the following path:
    @Path("/process/discovery/linkIndex")

    Since:
    1.7.0
    • Constructor Detail

      • AbstractDiscoveryLinkIndexService

        public AbstractDiscoveryLinkIndexService()
    • Method Detail

      • getProjectAreaAssociations

        protected abstract ProjectAreaAssociations getProjectAreaAssociations​(URI resource)
        Returns the project area associations of the given resource's project
        Parameters:
        resource - the resource URI
        Returns:
        the project area associations of the given resource's project
      • getLinkIndexQueries

        protected Collection<LinkIndexQuery> getLinkIndexQueries​(ProjectAreaAssociations projectAreaAssociations,
                                                                 URI resource,
                                                                 URI resourceType,
                                                                 URI gcURL)
        Returns the collection of link index queries to execute in order to discover all the incoming links on the given resource.
        Parameters:
        projectAreaAssociations - the project area associations for the given resource's project
        resource - the local resource to get incoming links for, i.e: the target resource of the returned link index queries
        resourceType - the given resource's type
        gcURL - the global configuration URL
        Returns:
        the collection of link index queries to execute in order to discover all the incoming links on the given resource
      • discoverIncomingLinks

        protected ResourceResponse<Collection<DirectedLink>> discoverIncomingLinks​(LinkIndexQuery linkIndexQuery)
        Discovers the incoming links on the target resources of the given link index query.

        To discover the incoming links this method does the following:

        1. Execute the given link index query
        2. Reverse the resulting directed links, so we have the incoming links to display on local resources rather than the outgoing links owned by the remote application
        Parameters:
        linkIndexQuery - the link index query to execute
        Returns:
        the response containing the collection of discovered incoming links