Class URIFactory

java.lang.Object
com.sodius.oslc.broker.URIFactory

public abstract class URIFactory extends Object
Factory to build URIs of REST services contributed by the Broker.
Since:
4.0.0
See Also:
  • Field Details

  • Constructor Details

    • URIFactory

      protected URIFactory(URI baseLocation)
      Creates a new factory instance that uses the given location as base URL when creating URIs. This base location should be Broker.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

      protected UriBuilder builder()
      Creates a URI builder that uses as base URL the location given as constructor argument.
      Returns:
      a URI builder
    • getRootServices

      public URI getRootServices()
      Gets the URI for the root services.
      Returns:
      the URI for the root services.
    • getPublisher

      public URI getPublisher()
      Gets the URI for the Publisher.
      Returns:
      the URI for the Publisher.
    • getPublisherIcon

      public abstract URI 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

      public abstract URI 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

      public URI getOAuthRequestKey()
      Gets the URI for the OAuth Request Key service.
      Returns:
      the URI for the OAuth Request Key service.
    • getOAuthApproveKey

      public URI getOAuthApproveKey()
      Gets the URI for OAuth approving key.
      Returns:
      the URI for OAuth approving key.
    • getOAuthAuthorize

      public URI getOAuthAuthorize()
      Gets the URI for the OAuth Authorize service.
      Returns:
      the URI for the OAuth Authorize service.
    • getOAuthRequestToken

      public URI getOAuthRequestToken()
      Gets the URI for the OAuth Request Token service.
      Returns:
      the URI for the OAuth Request Token service.
    • getOAuthAccessToken

      public URI getOAuthAccessToken()
      Gets the URI for the OAuth Access Token service.
      Returns:
      the URI for the OAuth Access Token service.
    • getOAuthCallback

      public URI getOAuthCallback()
      Gets the URI for the OAuth Callback service.
      Returns:
      the URI for the OAuth Callback service.
    • getLoginBridge

      public URI getLoginBridge(URI redirect)
      Gets the URI for cross domain login.
      Parameters:
      redirect - URL to return to after login.
      Returns:
      the URI for cross domain login.
    • getPerson

      public URI getPerson(String id)
      Gets the URI for the Person of given id.
      Parameters:
      id - the person id
      Returns:
      the URI for the Person.
    • getProjectArea

      public URI getProjectArea(String id)
      Gets the URI for the Project Area of given id.
      Parameters:
      id - the project area id
      Returns:
      the URI for the Project Area.
    • getProjectAreaHome

      public abstract URI getProjectAreaHome(ApplicationContainer container)
      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

      public URI getAdminHomePage()
      Gets the URI for the administration page.
      Returns:
      the URI for the administration page.
    • getAdminHelpPage

      public URI getAdminHelpPage()
      Gets the URI for the administration help page.
      Returns:
      the URI for the administration help page.
    • getProjectAreaAdministration

      public URI getProjectAreaAdministration(String id)
      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

      public URI getAccessContextList()
      Gets the URI for the Access Context list.
      Returns:
      the URI for the Access Context list.
    • getAccessContext

      public URI getAccessContext(String id)
      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

      public URI getServiceProviderCatalog(Domain domain)
      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

      public URI getServiceProvider(Domain domain, String id)
      Gets the URI for the OSLC Service Provider of a given domain and project identifier.
      Parameters:
      domain - the OSLC domain
      id - the identifier of the service provider
      Returns:
      the URI for the OSLC Service Provider
    • getResourceShape

      public URI getResourceShape(String containerId, ResourceType resourceType)
      Determines the URI of the shape of a resource.
      Parameters:
      containerId - the identifier of the artifact container
      resourceType - the type of OSLC resource described by the shape
      Returns:
      the URI for the OSLC resource shape
    • getResource

      public URI getResource(ResourceType resourceType, String id)
      Determines the URI of a resource.
      Parameters:
      resourceType - the resource type.
      id - the resource identifier.
      Returns:
      the URI of the resource.
    • getArchitectureResource

      public URI getArchitectureResource(String id)
      Determines the URI of an architecture resource.
      Parameters:
      id - the architecture resource id
      Returns:
      the URI for the architecture resource
    • getArchitectureResourceShape

      public URI getArchitectureResourceShape(String containerId)
      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

      public URI getChangeRequest(String id)
      Determines the URI of a change request.
      Parameters:
      id - the change request id
      Returns:
      the URI for the change request
    • getChangeRequestShape

      public URI getChangeRequestShape(String containerId)
      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

      public URI getDeliverable(String id)
      Determines the URI of a deliverable.
      Parameters:
      id - the deliverable id
      Returns:
      the URI for the deliverable
    • getDeliverableShape

      public URI getDeliverableShape()
      Determines the URI of the resource shape of deliverables.
      Returns:
      the URI of the resource shape
    • getTestPlan

      public URI getTestPlan(String id)
      Determines the URI of a test plan.
      Parameters:
      id - the test plan id
      Returns:
      the URI for the test plan
    • getTestPlanShape

      public URI getTestPlanShape(String containerId)
      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

      public URI getTestCase(String id)
      Determines the URI of a test case.
      Parameters:
      id - the test case id
      Returns:
      the URI for the test case
    • getTestCaseShape

      public URI getTestCaseShape(String containerId)
      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

      public URI getTestExecutionRecord(String id)
      Determines the URI of a test execution record.
      Parameters:
      id - the test execution record id
      Returns:
      the URI for the test execution record
    • getTestExecutionRecordShape

      public URI getTestExecutionRecordShape(String containerId)
      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

      public URI getTestResult(String id)
      Determines the URI of a test result.
      Parameters:
      id - the test result id
      Returns:
      the URI for the test result
    • getTestResultShape

      public URI getTestResultShape(String containerId)
      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

      public URI getTestScript(String id)
      Determines the URI of a test script.
      Parameters:
      id - the test script id
      Returns:
      the URI for the test script
    • getTestScriptShape

      public URI getTestScriptShape(String containerId)
      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

      public URI getRequirement(String id)
      Determines the URI of a requirement.
      Parameters:
      id - the requirement id
      Returns:
      the URI for the requirement
    • getRequirementShape

      public URI getRequirementShape(String containerId)
      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

      public URI getRequirementCollection(String id)
      Determines the URI of a requirement collection.
      Parameters:
      id - the requirement collection id
      Returns:
      the URI for the requirement collection
    • getRequirementCollectionShape

      public URI getRequirementCollectionShape(String containerId)
      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

      public URI getQueryCapability(String containerId, ResourceType resourceType)
      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 query
      resourceType - the type of resources to look for
      Returns:
      the URI of the query capability
    • getTrsFeed

      public URI getTrsFeed(String identifier)
      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 application
      sourceType - the resource type of the source.
      propertyDefinition - the link type
      target - the URL of the link target
      Returns:
      a proxy wrapping the link target
      See Also:
    • getUnproxyLink

      public URI getUnproxyLink(URI uri)
      Returns the link target wrapped by the given link 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

      public URI 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

      public URI 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

      public URI getResourceIcon(ResourceType resourceType)
      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

      public URI getLinksExplorer()
      Gets the URI for the LinksExplorer page.

      Callers may append the source parameter to state what artifact must be displayed by the LinksExplorer and the target parameter to state the remote artifact with which to start the linking.

      Returns:
      the URI for the LinksExplorer page.
    • getLinksExplorerHelpPage

      public URI getLinksExplorerHelpPage()
      Gets the URI for the LinksExplorer help page.
      Returns:
      the URI for the LinksExplorer help page.