Main Content

createRequirementCollection

Create requirement collection in OSLC service provider

    Description

    example

    myReqCol = createRequirementCollection(myCreationFactory,title) creates a requirement collection with the specified title by using the creation factory myCreationFactory in the Open Services for Lifecycle Collaboration (OSLC) service provider.

    Examples

    collapse all

    This example shows how to submit a creation request for a new requirement collection resource with a configured OSLC client.

    After you have created and configured the OSLC client myClient as described in Create and Configure an OSLC Client for the Requirements Management Domain, create a creation factory for the requirement collection resource type.

    myCreationFactory = getCreationFactory(myClient,...
    'RequirementCollection');

    Use the creation factory to create a requirement collection resource with the title My New Requirement Collection. Retrieve the full resource data from the service provider for the requirement collection resource and inspect the resource.

    newReqCollection = createRequirementCollection(myCreationFactory,...
    'My New Requirement Collection')
    fetch(newReqCollection,myClient);
    newReqCollection
    newReqCollection = 
    
        RequirementCollection with properties:
        ResourceUrl: 'https://localhost:9443/rm/resources/_72lxMWJREeup0r..'
              Dirty: 0
          IsFetched: 1
              Title: 'My New Requirement Collection'
         Identifier: '1808'

    Open the requirement collection resource in the system browser by using the show function.

    show(newReqCollection)

    Input Arguments

    collapse all

    OSLC resource creation factory, specified as an oslc.core.CreationFactory object.

    Requirement collection title, specified as a character array.

    Output Arguments

    collapse all

    OSLC requirement collection resource, returned as an oslc.rm.RequirementCollection object.

    Introduced in R2021a