Main Content

oslc.cm.ChangeRequest

Change request resource for OSLC change management domain

    Description

    The oslc.cm.ChangeRequest object represents change request resources in the change management domain of the Open Services for Lifecycle Collaboration (OSLC) service provider. After creating and configuring oslc.Client and oslc.core.QueryCapability objects, query the service provider for available change request resources by using the queryChangeRequests function.

    Creation

    Create an oslc.cm.ChangeRequest object by using the createChangeRequest function.

    Properties

    expand all

    Navigation URL for the change request resource, specified as a character array.

    Indicator for uncommitted changes to the change request resource, specified as a logical 1or 0 where:

    • 1 indicates the change request resource has uncommitted changes.

    • 0 indicates the change request resource has no uncommitted changes.

    Data Types: logical

    Change request resource fetch status, specified as a logical 1 or 0 where:

    • 1 indicates the change request resource is fetched.

    • 0 indicates the change request resource is not fetched.

    Data Types: logical

    Change request title, specified as a character array.

    OSLC change request resource identifier, specified as a character array.

    Object Functions

    addResourcePropertyAdd resource property to local OSLC resource object
    addTextPropertyAdd text property to local OSLC resource object
    commitSend local changes to OSLC service provider
    fetchRetrieve full resource data from OSLC service provider
    getPropertyGet local contents of text property from OSLC resource object
    getRDFGet resource RDF/XML data from OSLC resource object
    getResourcePropertyGet local contents of resource property from OSLC resource object
    removeRemove resource from OSLC service provider
    removeResourcePropertyRemove resource property from local OSLC resource object
    setPropertySet local contents of text property for OSLC resource object
    setRDFSet RDF content for local OSLC resource object
    setResourceUrlSet resource URL for local OSLC resource object
    showView OSLC resource in system browser

    Examples

    collapse all

    This example shows how to submit a query request for change request resources with a configured OSLC client, edit an existing change request resource, and commit the changes to the service provider.

    After you have created and configured the OSLC client myClient as described in Create and Configure an OSLC Client for the Change Management Domain, create a query capability for the change request resource type.

    myQueryCapability = getQueryService(myClient,'ChangeRequest');

    Submit a query request to the service provider for the available change request resources.

    changeRequests = queryChangeRequests(myQueryCapability)
    changeRequests = 
    
      1×6 ChangeRequest array with properties:
    
        ResourceUrl
        Dirty
        IsFetched
        Title
        Identifier

    Assign a change request resource to the variable myCR. Retrieve the full resource data from the service provider for the change request resource. Examine the Title property.

    myCR = changeRequests(1);
    status = fetch(myCR,myClient)
    status = 
    
      StatusCode enumeration
    
        OK
    title = myCR.Title
    title =
    
        'Change Request 1'
    

    Edit the change request title and commit the change to the service provider.

    myCR.Title = 'My New Change Request Title';
    status = commit(myCR,myClient)
    status = 
    
      StatusCode enumeration
    
        OK

    Open the change request resource in the system browser by using the show function.

    show(myChangeRequest)

    This example shows how to submit a creation request for a new change request 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 Change Management Domain, create a creation factory for the change request resource type.

    myCreationFactory = getCreationFactory(myClient,'ChangeRequest');

    Use the creation factory to create a new change request resource with the title My New Change Request. Retrieve the full resource data from the service provider for the change request resource and inspect the resource.

    newCR = createChangeRequest(myCreationFactory,'My New Change Request');
    fetch(newCR,myClient);
    newCR
    newCR = 
    
      ChangeRequest with properties:
    
        ResourceUrl: 'https://localhost:9443/ccm/resource/itemName/...'
              Dirty: 0
          IsFetched: 1
              Title: 'My New Change Request'
         Identifier: '204'

    Open the change request resource in the system browser by using the show function.

    show(newCR)
    Introduced in R2021a