Class AbstractDiscoveryLinkIndexService
- java.lang.Object
-
- com.sodius.oslc.server.process.links.services.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 Summary
Constructors Constructor Description AbstractDiscoveryLinkIndexService()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description Response
discover()
protected ResourceResponse<Collection<DirectedLink>>
discoverIncomingLinks(LinkIndexQuery linkIndexQuery)
Discovers the incoming links on the target resources of the given link index query.Response
getAll(URI resource, URI resourceType, URI gcURL)
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.protected abstract ProjectAreaAssociations
getProjectAreaAssociations(URI resource)
Returns the project area associations of the given resource's project
-
-
-
Method Detail
-
discover
public Response discover()
-
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 projectresource
- the local resource to get incoming links for, i.e: the target resource of the returned link index queriesresourceType
- the given resource's typegcURL
- 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:
- Execute the given link index query
- 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
-
-