Class LinkIndexQuery

java.lang.Object
org.eclipse.lyo.oslc4j.core.model.AbstractResource
com.sodius.oslc.core.process.links.model.LinkIndexQuery
All Implemented Interfaces:
IExtendedResource, IResource

@OslcNamespace("http://www.sodius.com/ns/process/links#") @OslcResourceShape(title="Link Index Query Resource Shape", describes="http://www.sodius.com/ns/process/links#LinkIndexQuery") public class LinkIndexQuery extends AbstractResource
Represents a link index query.
Since:
1.7.0
See Also:
  • Constructor Details

    • LinkIndexQuery

      public LinkIndexQuery()
    • LinkIndexQuery

      public LinkIndexQuery(Collection<URI> targetURLs, Collection<URI> linkTypes, URI gcURL)
      Creates a new LinkIndexQuery instance.
      Parameters:
      targetURLs - only query the indexed links whose target matches one of these
      linkTypes - only query the indexed links whose type matches one of these
      gcURL - only query the links that were indexed with this global configuration
  • Method Details

    • create

      public static Collection<LinkIndexQuery> create(Collection<Friend> friends, ProjectAreaAssociations projectAreaAssociations, URI resource, URI resourceType, URI gcURL)
      A utility method that creates link index queries from the given parameters.

      Not all of the given project area associations will result in a link index query:

      • at most one link index query will be created per application
      • the associations are only retained if their back association provides outgoing link types that target the given resource type
      • the retained associations must have a matching friend application

      The resulting link index queries contain the rootServices property of a matching friend, so that the caller is able to easily use ExecuteLinkIndexQuery.create(OslcClient, LinkIndexQuery) for each returned link index query afterwards.

      Parameters:
      friends - the local application's friends
      projectAreaAssociations - the local application's project area associations
      resource - the created link index queries will only query the links that target this resource
      resourceType - the given resource's type (used to filter the link types range)
      gcURL - the created link index queries will only query the links that were indexed with this global configuration
      Returns:
      the link index query that are made available by the given project area associations
    • getTargetURLs

      @OslcPropertyDefinition("http://www.sodius.com/ns/process/links#targetURLs") public Collection<URI> getTargetURLs()
      Get the target URLs. Only query the indexed links whose target matches one of these.
      Returns:
      the target URLs
    • setTargetURLs

      public void setTargetURLs(Collection<URI> targetURLs)
      Set the target URLs. Only query the indexed links whose target matches one of these.
      Parameters:
      targetURLs - the target URLs
    • getLinkTypes

      @OslcPropertyDefinition("http://www.sodius.com/ns/process/links#linkTypes") public Collection<URI> getLinkTypes()
      Get the link types. Only query the indexed links whose type matches one of these.
      Returns:
      the link types
    • setLinkTypes

      public void setLinkTypes(Collection<URI> linkTypes)
      Set the link types. Only query the indexed links whose type matches one of these.
      Parameters:
      linkTypes - the link types
    • getGcURL

      @OslcPropertyDefinition("http://www.sodius.com/ns/process/links#gcURL") public URI getGcURL()
      Get the global configuration URL. Only query the links that were indexed with this configuration.
      Returns:
      the global configuration URL
    • setGcURL

      public void setGcURL(URI gcURL)
      Set the global configuration URL. Only query the links that were indexed with this configuration.
      Parameters:
      gcURL - the global configuration URL
    • getRootServices

      @OslcPropertyDefinition("http://jazz.net/xmlns/prod/jazz/discovery/1.0/rootServices") public Link getRootServices()
      Get the root services URL. This is an optional property that should only be present if the link index query URL is not known, so that it can be discovered with ExecuteLinkIndexQuery.create(OslcClient, LinkIndexQuery).
      Returns:
      the root services URL
      Since:
      3.8.0
    • setRootServices

      public void setRootServices(Link rootServices)
      Set the root services URL. This is an optional property that should only be present if the link index query URL is not known, so that it can be discovered with ExecuteLinkIndexQuery.create(OslcClient, LinkIndexQuery).
      Parameters:
      rootServices - the root services URL
      Since:
      3.8.0
    • isUnauthorized

      @OslcPropertyDefinition("http://www.sodius.com/ns/process/links#unauthorized") public Boolean isUnauthorized()
      Get the authorization status of the friend. Used to let the front trigger the OAuth dance.
      Returns:
      true if the friend is not connected.
      Since:
      3.15.0
    • setUnauthorized

      public void setUnauthorized(Boolean unauthorized)
      Set the authorization status of the friend. Used to let the front trigger the OAuth dance.
      Parameters:
      unauthorized - the new status value
      Since:
      3.15.0