This wiki is locked. Future workgroup activity and specification development must take place at our new wiki. For more information, see this blog post about the new governance model and this post about changes to the website.

Scenario: Obtain the AM resource factory URI

In this scenario the client uses the service discovery documents to get the AM resource factory URI. With this URI a client MAY create new AM resources (if the service provider permits it).

1. Starting with URI to the AM service providers catalog URI, we GET the resource.

Request
GET https://am.acme.com/catalog/servicecatalog
Accept: application/x-oslc-disc-service-provider-catalog+xml 
Response
Content-Type: application/x-oslc-disc-service-provider-catalog+xml
<?xml version="1.0"?>
<oslc_disc:ServiceProviderCatalog
 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
 xmlns:dc="http://purl.org/dc/terms/" 
 xmlns:oslc_disc="http://open-services.net/xmlns/discovery/1.0/"
 rdf:about="http://am.acme.com/AMCatalog" >

 <dc:title>Architecture Management Service Provider Catalog</dc:title>

 <oslc_disc:entry>
 <oslc_disc:ServiceProvider>
 <dc:title>Project X</dc:title>
 <oslc_disc:details rdf:resource="http://am.acme.com/projects/_CGwYgAnrEd6_yLxvteIpZw" />
 <oslc_disc:services
 rdf:resource="http://am.acme.com/projects/_CGwYgAnrEd6_yLxvteIpZw/services.xml" />
 </oslc_disc:ServiceProvider>
 </oslc_disc:entry>

 <oslc_disc:entry>
 <oslc_disc:ServiceProvider>
 <dc:title>Project Y</dc:title>
 <oslc_disc:details rdf:resource="http://am.acme.com/projects/_sajkASDo92asDAsjd" />
 <oslc_disc:services
 rdf:resource="http://am.acme.com/projects/_sajkASDo92asDAsjd/services.xml" />
 </oslc_disc:ServiceProvider>
 </oslc_disc:entry>

</oslc_disc:ServiceProviderCatalog> 

2. The client examines the results and sees two entries. Each entry corresponds to a project or context on the server. Clients are to assume that if an antry appears in the result that it has at least some rights to the project. The client can use the returned information to prompt the user to select a specific project to search for an AM resource in. The client uses the oslc_disc:services resource to obtain the specific services (and endpoints) for the project. The client GETs the service document.

Request
GET http://am.acme.com/projects/_CGwYgAnrEd6_yLxvteIpZw/services.xml
Accept: application/x-oslc-am-service-description+xml
Response
<oslc_am:ServiceDescriptor xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:dc="http://purl.org/dc/terms/" xmlns:oslc_am="http://open-services.net/xmlns/am/1.0/"
   rdf:about="http://am.acme.com/service-descriptor.xml">

   <dc:title>Project X</dc:title>
   <dc:description>My description of Project X.</dc:description>

   <oslc_am:ResourceFactory
      rdf:resource="https://am.acme.com/resourceFactory?projectId=Project%20X">
      <dc:title>Factory for creating AM Resources in Project X</dc:title>
   </oslc_am:ResourceFactory>

   <oslc_am:LinkTypeFactory
      rdf:resource="https://am.acme.com/linkTypeFactory?projectId=Project%20X">
      <dc:title>Factory for getting and if allowed creating Link Type URIs for use in Project X</dc:title>
   </oslc_am:LinkTypeFactory>

   <oslc_am:SelectionDialog
      rdf:resource="https://am.acme.com/resourcePicker?projectId=Project%20X">
      <dc:title>Web UI for finding and selecting AM resources in Project X</dc:title>
      <oslc_am:hintWidth>400px</oslc_am:hintWidth>
      <oslc_am:hintHeight>500px</oslc_am:hintHeight>
   </oslc_am:SelectionDialog>

</oslc_am:ServiceDescriptor>

3. The service descriptor document contains the service end points for all the services available for the selected context/project. This document includes the name and description of the context/project. The discovered URLs MAY include query parts.

The Resource Factory URI is used to POST new resource requests to. The Link Type Factory URI is used to get known link type URIs that are used in resource links. If the service provider permits it, it can also be used register definitions for new link types. The Selection Dialog URI is used by clients that want a human readable HTML based web interface to search for and 'select' AM resources with.

Back to Architecture Management Use Case Scenarios

Topic revision: r2 - 11 Jan 2010 - 19:40:53 - JimConallen
 
This site is powered by the TWiki collaboration platform Copyright � by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Contributions are governed by our Terms of Use
Ideas, requests, problems regarding this site? Send feedback