OSLC operations and resources

The OSLC service provider supports the creation factory and query capability operations for the resources that are available in the service provider document. A creation factory provides the oslc:creation creation URI that you use to create new resources by using HTTP POST. You use the oslc:queryBase query URI to select a resource collection that is managed by the service provider. When the resource is obtained, either by query or creation, the resource can be updated or deleted.

Creation factory operation

If the resource supports creation, there can be one creation factory operation. The following excerpt from a service provider document shows the creation factory operation, the URL for the resource shape, and the URL for the creation resource operation that creates the shape.

<oslc:creationFactory>
	<oslc:CreationFactory>
  	<oslc:resourceType rdf:resource="http://jazz.net/ns/tririga#WorkTask"/>
		<oslc:resourceShape rdf:resource="http://yourserver/oslc/shapes/WorkTask"/>
		<oslc:creation rdf:resource="http://yourserver/oslc/so/WorkTask"/>
		<oslc:label>Create WorkTask</oslc:label>
			<dcterms:title>OSLC creation factory for WorkTask</dcterms:title>
	</oslc:CreationFactory>
</oslc:creationFactory>
        ......

Query capability operation

The query URI is oslc:queryBase, and the following example shows a search for a work task by using the request: <oslc:queryBase rdf:resource="http://yourserver/oslc/spq/oslcwodetail"/>:

   <oslc:queryCapability>
          <oslc:QueryCapability>
            <oslc:resourceType rdf:resource="http://jazz.net/ns/tririga#WorkTask"/>
            <oslc:queryBase rdf:resource="http://yourserver/oslc/so/WorkTask"/>
            <oslc:labelQuery>WorkTask</oslc:label>
            <dcterms:taskname>OSLC query capability for WorkTask</dcterms:taskname>
          </oslc:QueryCapability>
        </oslc:queryCapability>

When you define an OSLC resource shape, all of the queries for the resource are available through the service provider. The queries are made available with OSLC query capabilities.

An OSLC resource shape is defined by a report that is defined in the IBM® TRIRIGA® Report Manager. The resource shape uses the report as a template to define the properties available for your resource. These properties are then returned when you run a query capability.

Each query capability contains a property that is named query base that you use to apply extended criteria to your resource. These criteria make it possible to predefine filters for the same shape. The Query Base field in query capability holds the name of a query that is compatible with the query that the resource is defined on. This query, if defined, is used for filtering. You can use TRIRIGA parameters in the query, such as $$USERID$$, $$RECORDID$$, or $$PARENT::SECTIONAME::FIELDNAME$$. The query base is a list and the contents of the list change when the resource changes. For example, the MyWorkTask query returns a list of work tasks that are assigned to the user who makes the query request.