Package com.sodius.oslc.broker
Class URIFactory
java.lang.Object
com.sodius.oslc.broker.URIFactory
Factory to build URIs of REST services contributed by the Broker.
- Since:
- 4.0.0
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedURIFactory(URI baseLocation) Creates a new factory instance that uses the given location as base URL when creating URIs. -
Method Summary
Modifier and TypeMethodDescriptionprotected UriBuilderbuilder()Creates a URI builder that uses as base URL the location given as constructor argument.Gets the URI for the Access Context of a given identifier.Gets the URI for the Access Context list.Gets the URI for the administration help page.Gets the URI for the administration page.Determines the URI of an architecture resource.getArchitectureResourceShape(String containerId) Determines the URI of the resource shape of architecture resources.Determines the URI of a change request.getChangeRequestShape(String containerId) Determines the URI of the resource shape of change requests.getDeliverable(String id) Determines the URI of a deliverable.Determines the URI of the resource shape of deliverables.Gets the URI for the LinksExplorer page.Gets the URI for the LinksExplorer help page.getLoginBridge(URI redirect) Gets the URI for cross domain login.Gets the URI for the OAuth Access Token service.Gets the URI for OAuth approving key.Gets the URI for the OAuth Authorize service.Gets the URI for the OAuth Callback service.Gets the URI for the OAuth Request Key service.Gets the URI for the OAuth Request Token service.Gets the URI for the Person of given id.getProjectArea(String id) Gets the URI for the Project Area of given id.Gets the URI for the Project Area administration page of given container in the broker, for example to administer its project associations.abstract URIgetProjectAreaHome(ApplicationContainer container) Gets the URI for the Project Area home page of given container in the brokered application.Gets the URI for the icon representing an OSLC link whose target resource is deleted.Gets the URI for the icon representing a generic OSLC link.getProxyLink(String sourceId, ResourceType sourceType, URI propertyDefinition, URI target) Gets the URI for a link proxy for the given OSLC link.Gets the URI for the Publisher.abstract URIGets the icon URI for the Publisher.abstract URIGets the product image URI for the Publisher.getQueryCapability(String containerId, ResourceType resourceType) Determines the URI of the query capability for searching resources in a given container and of the given type.getRequirement(String id) Determines the URI of a requirement.Determines the URI of a requirement collection.getRequirementCollectionShape(String containerId) Determines the URI of the resource shape of requirement collections.getRequirementShape(String containerId) Determines the URI of the resource shape of requirements.getResource(ResourceType resourceType, String id) Determines the URI of a resource.getResourceIcon(ResourceType resourceType) Gets the URI for the icon representing a given type of OSLC resource.getResourceShape(String containerId, ResourceType resourceType) Determines the URI of the shape of a resource.Gets the URI for the root services.getServiceProvider(Domain domain, String id) Gets the URI for the OSLC Service Provider of a given domain and project identifier.getServiceProviderCatalog(Domain domain) Gets the URI for the OSLC Service Provider Catalog of a given domain.getTestCase(String id) Determines the URI of a test case.getTestCaseShape(String containerId) Determines the URI of the resource shape of test cases.Determines the URI of a test execution record.getTestExecutionRecordShape(String containerId) Determines the URI of the resource shape of test execution records.getTestPlan(String id) Determines the URI of a test plan.getTestPlanShape(String containerId) Determines the URI of the resource shape of test plans.getTestResult(String id) Determines the URI of a test result.getTestResultShape(String containerId) Determines the URI of the resource shape of test results.getTestScript(String id) Determines the URI of a test script.getTestScriptShape(String containerId) Determines the URI of the resource shape of test scripts.getTrsFeed(String identifier) Determines the URI of the TRS Feed for the given identifier.getUnproxyLink(URI uri) Returns the link target wrapped by the givenlink proxy.
-
Field Details
-
PARAMETER_PROJECT
Theprojectparameter.- See Also:
-
PARAMETER_RESOURCE
Theresourceparameter.- See Also:
-
PARAMETER_TARGET
Thetargetparameter.- See Also:
-
-
Constructor Details
-
URIFactory
Creates a new factory instance that uses the given location as base URL when creating URIs. This base location should beBroker.getContextLocation().- Parameters:
baseLocation- the base URL for creating URIs with additional path segments and query parameters.- Throws:
NullPointerException- if baseLocation is null
-
-
Method Details
-
builder
Creates a URI builder that uses as base URL the location given as constructor argument.- Returns:
- a URI builder
-
getRootServices
Gets the URI for the root services.- Returns:
- the URI for the root services.
-
getPublisher
Gets the URI for the Publisher.- Returns:
- the URI for the Publisher.
-
getPublisherIcon
Gets the icon URI for the Publisher. This icon should be a favicon format and 16x16 pixels in size- Returns:
- the icon URI for the Publisher.
-
getPublisherProductImage
Gets the product image URI for the Publisher. This should be a large image containing the product name for display in the navbar- Returns:
- the product image URI for the Publisher.
-
getOAuthRequestKey
Gets the URI for the OAuth Request Key service.- Returns:
- the URI for the OAuth Request Key service.
-
getOAuthApproveKey
Gets the URI for OAuth approving key.- Returns:
- the URI for OAuth approving key.
-
getOAuthAuthorize
Gets the URI for the OAuth Authorize service.- Returns:
- the URI for the OAuth Authorize service.
-
getOAuthRequestToken
Gets the URI for the OAuth Request Token service.- Returns:
- the URI for the OAuth Request Token service.
-
getOAuthAccessToken
Gets the URI for the OAuth Access Token service.- Returns:
- the URI for the OAuth Access Token service.
-
getOAuthCallback
Gets the URI for the OAuth Callback service.- Returns:
- the URI for the OAuth Callback service.
-
getLoginBridge
Gets the URI for cross domain login.- Parameters:
redirect- URL to return to after login.- Returns:
- the URI for cross domain login.
-
getPerson
Gets the URI for the Person of given id.- Parameters:
id- the person id- Returns:
- the URI for the Person.
-
getProjectArea
Gets the URI for the Project Area of given id.- Parameters:
id- the project area id- Returns:
- the URI for the Project Area.
-
getProjectAreaHome
Gets the URI for the Project Area home page of given container in the brokered application.- Parameters:
container- the container representing the project area- Returns:
- the URI for the Project Area home page.
-
getAdminHomePage
Gets the URI for the administration page.- Returns:
- the URI for the administration page.
-
getAdminHelpPage
Gets the URI for the administration help page.- Returns:
- the URI for the administration help page.
-
getProjectAreaAdministration
Gets the URI for the Project Area administration page of given container in the broker, for example to administer its project associations.- Parameters:
id- the container representing the project area- Returns:
- the URI for the Project Area administration page.
-
getAccessContextList
Gets the URI for the Access Context list.- Returns:
- the URI for the Access Context list.
-
getAccessContext
Gets the URI for the Access Context of a given identifier.- Parameters:
id- the access context id- Returns:
- the URI for the Access Context.
-
getServiceProviderCatalog
Gets the URI for the OSLC Service Provider Catalog of a given domain.- Parameters:
domain- the OSLC domain- Returns:
- the URI for the OSLC Service Provider Catalog
-
getServiceProvider
Gets the URI for the OSLC Service Provider of a given domain and project identifier.- Parameters:
domain- the OSLC domainid- the identifier of the service provider- Returns:
- the URI for the OSLC Service Provider
-
getResourceShape
Determines the URI of the shape of a resource.- Parameters:
containerId- the identifier of the artifact containerresourceType- the type of OSLC resource described by the shape- Returns:
- the URI for the OSLC resource shape
-
getResource
Determines the URI of a resource.- Parameters:
resourceType- the resource type.id- the resource identifier.- Returns:
- the URI of the resource.
-
getArchitectureResource
Determines the URI of an architecture resource.- Parameters:
id- the architecture resource id- Returns:
- the URI for the architecture resource
-
getArchitectureResourceShape
Determines the URI of the resource shape of architecture resources.- Parameters:
containerId- the artifact container where architecture resources described by the shape are defined- Returns:
- the URI of the resource shape
-
getChangeRequest
Determines the URI of a change request.- Parameters:
id- the change request id- Returns:
- the URI for the change request
-
getChangeRequestShape
Determines the URI of the resource shape of change requests.- Parameters:
containerId- the artifact container where change requests described by the shape are defined- Returns:
- the URI of the resource shape
-
getDeliverable
Determines the URI of a deliverable.- Parameters:
id- the deliverable id- Returns:
- the URI for the deliverable
-
getDeliverableShape
Determines the URI of the resource shape of deliverables.- Returns:
- the URI of the resource shape
-
getTestPlan
Determines the URI of a test plan.- Parameters:
id- the test plan id- Returns:
- the URI for the test plan
-
getTestPlanShape
Determines the URI of the resource shape of test plans.- Parameters:
containerId- the artifact container where test plans described by the shape are defined- Returns:
- the URI of the resource shape
-
getTestCase
Determines the URI of a test case.- Parameters:
id- the test case id- Returns:
- the URI for the test case
-
getTestCaseShape
Determines the URI of the resource shape of test cases.- Parameters:
containerId- the artifact container where test cases described by the shape are defined- Returns:
- the URI of the resource shape
-
getTestExecutionRecord
Determines the URI of a test execution record.- Parameters:
id- the test execution record id- Returns:
- the URI for the test execution record
-
getTestExecutionRecordShape
Determines the URI of the resource shape of test execution records.- Parameters:
containerId- the artifact container where test execution records described by the shape are defined- Returns:
- the URI of the resource shape
-
getTestResult
Determines the URI of a test result.- Parameters:
id- the test result id- Returns:
- the URI for the test result
-
getTestResultShape
Determines the URI of the resource shape of test results.- Parameters:
containerId- the artifact container where test results described by the shape are defined- Returns:
- the URI of the resource shape
-
getTestScript
Determines the URI of a test script.- Parameters:
id- the test script id- Returns:
- the URI for the test script
-
getTestScriptShape
Determines the URI of the resource shape of test scripts.- Parameters:
containerId- the artifact container where test scripts described by the shape are defined- Returns:
- the URI of the resource shape
-
getRequirement
Determines the URI of a requirement.- Parameters:
id- the requirement id- Returns:
- the URI for the requirement
-
getRequirementShape
Determines the URI of the resource shape of requirements.- Parameters:
containerId- the artifact container where requirements described by the shape are defined- Returns:
- the URI of the resource shape
-
getRequirementCollection
Determines the URI of a requirement collection.- Parameters:
id- the requirement collection id- Returns:
- the URI for the requirement collection
-
getRequirementCollectionShape
Determines the URI of the resource shape of requirement collections.- Parameters:
containerId- the artifact container where requirement collections described by the shape are defined- Returns:
- the URI of the resource shape
-
getQueryCapability
Determines the URI of the query capability for searching resources in a given container and of the given type.- Parameters:
containerId- the artifact container that scopes the queryresourceType- the type of resources to look for- Returns:
- the URI of the query capability
-
getTrsFeed
Determines the URI of the TRS Feed for the given identifier.- Parameters:
identifier- the TRS feed identifier- Returns:
- the URI for the TRS feed
-
getProxyLink
public URI getProxyLink(String sourceId, ResourceType sourceType, URI propertyDefinition, URI target) Gets the URI for a link proxy for the given OSLC link. Returns the link as is if it is already a proxy.- Parameters:
sourceId- the identifier of the artifact hosted in the brokered applicationsourceType- the resource type of the source.propertyDefinition- the link typetarget- the URL of the link target- Returns:
- a proxy wrapping the link target
- See Also:
-
getUnproxyLink
Returns the link target wrapped by the givenlink proxy. Returns the link as is if it is not a proxy URI.- Parameters:
uri- a proxy link URI- Returns:
- the link target
- See Also:
-
getProxyBrokenLinkIcon
Gets the URI for the icon representing an OSLC link whose target resource is deleted. The returned URI must be freely accessible by the brokered application and not require authentication.- Returns:
- the URI for the broken link icon
-
getProxyGenericLinkIcon
Gets the URI for the icon representing a generic OSLC link. The returned URI must be freely accessible by the brokered application and not require authentication.- Returns:
- the URI for the generic link icon
-
getResourceIcon
Gets the URI for the icon representing a given type of OSLC resource. The returned URI must be freely accessible by the brokered application and not require authentication.- Parameters:
resourceType- the type of OSLC resource- Returns:
- the URI for the icon
-
getLinksExplorer
Gets the URI for the LinksExplorer page.Callers may append the
sourceparameter to state what artifact must be displayed by the LinksExplorer and thetargetparameter to state the remote artifact with which to start the linking.- Returns:
- the URI for the LinksExplorer page.
-
getLinksExplorerHelpPage
Gets the URI for the LinksExplorer help page.- Returns:
- the URI for the LinksExplorer help page.
-