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 Summary
ConstructorsConstructorDescriptionLinkIndexQuery(Collection<URI> targetURLs, Collection<URI> linkTypes, URI gcURL) Creates a newLinkIndexQueryinstance. -
Method Summary
Modifier and TypeMethodDescriptionstatic 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.getGcURL()Get the global configuration URL.Get the link types.Get the root services URL.Get the target URLs.Get the authorization status of the friend.voidSet the global configuration URL.voidsetLinkTypes(Collection<URI> linkTypes) Set the link types.voidsetRootServices(Link rootServices) Set the root services URL.voidsetTargetURLs(Collection<URI> targetURLs) Set the target URLs.voidsetUnauthorized(Boolean unauthorized) Set the authorization status of the friend.Methods inherited from class org.eclipse.lyo.oslc4j.core.model.AbstractResource
addType, getAbout, getExtendedProperties, getTypes, setAbout, setExtendedProperties, setTypes
-
Constructor Details
-
LinkIndexQuery
public LinkIndexQuery() -
LinkIndexQuery
Creates a newLinkIndexQueryinstance.- Parameters:
targetURLs- only query the indexed links whose target matches one of theselinkTypes- only query the indexed links whose type matches one of thesegcURL- 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 friendsprojectAreaAssociations- the local application's project area associationsresource- the created link index queries will only query the links that target this resourceresourceType- 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
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
Set the link types. Only query the indexed links whose type matches one of these.- Parameters:
linkTypes- the link types
-
getGcURL
Get the global configuration URL. Only query the links that were indexed with this configuration.- Returns:
- the global configuration URL
-
setGcURL
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 withExecuteLinkIndexQuery.create(OslcClient, LinkIndexQuery).- Returns:
- the root services URL
- Since:
- 3.8.0
-
setRootServices
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 withExecuteLinkIndexQuery.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
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
-