主要内容

oslc.cm.ChangeRequest

Change request resource for OSLC change management domain

    描述

    Theoslc.cm.ChangeRequestobject represents change request resources in the change management domain of the Open Services for Lifecycle Collaboration (OSLC) service provider. After creating and configuringoslc.Clientoslc.core.querycapabilityobjects, query the service provider for available change request resources by using thequeryChangeRequestsfunction.

    Creation

    Create anoslc.cm.ChangeRequest对象通过使用createChangeRequestfunction.

    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 logical1或者0where:

    • 1indicates the change request resource has uncommitted changes.

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

    Data Types:logical

    更改请求资源获取状态,指定为逻辑1或者0where:

    • 1指示获取更改请求资源。

    • 0indicates the change request resource is not fetched.

    Data Types:logical

    更改请求标题,指定为字符数组。

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

    Object Functions

    addResourceProperty 将资源属性添加到本地OSLC资源对象
    AddTextProperty Add text property to local OSLC resource object
    commit 向OSLC服务提供商发送本地更改
    拿来 Retrieve full resource data from OSLC service provider
    GetProperty Get local contents of text property from OSLC resource object
    getRDF Get resource RDF/XML data from OSLC resource object
    getResourceProperty 从OSLC资源对象获取资源属性的本地内容
    remove Remove resource from OSLC service provider
    removeResourceProperty 从本地OSLC资源对象中删除资源属性
    setProperty 设置OSLC资源对象的文本属性的本地内容
    setRDF Set RDF content for local OSLC resource object
    SetResourceurl Set resource URL for local OSLC resource object
    show View 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 clientmyClientas described in创建并配置为更改管理域的OSLC客户端, create a query capability for the change request resource type.

    myQueryCapability = getQueryService(myClient,'改变请求');

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

    changeRequests = queryChangeRequests(myQueryCapability)
    changerequests = 1×6带有属性的changerequest阵列:resourcorl dirty iSfetched标题标识符

    Assign a change request resource to the variablemyCR. Retrieve the full resource data from the service provider for the change request resource. Examine theTitleproperty.

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

    编辑更改请求标题并将更改提交服务提供商。

    myCR.Title =“我的新更改请求标题”;状态= commit(mycr,myclient)
    status = StatusCode enumeration OK

    Open the change request resource in the system browser by using theshowfunction.

    表演(Mychangerequest)

    此示例显示了如何使用配置的OSLC客户端提交新更改请求资源的创建请求。

    After you have created and configured the OSLC clientmyClientas described in创建并配置为更改管理域的OSLC客户端,为更改请求资源类型创建创建工厂。

    myCreationFactory = getCreationFactory(myClient,'改变请求');

    Use the creation factory to create a new change request resource with the titleMy 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');提取(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 theshowfunction.

    表演(newcr)

    Version History

    Introduced in R2021a