帮助中心帮助中心
本页采用了机器翻译。点击此处可查看英文原文。
从 OSLC 服务提供商中删除资源
自 R2021a 起
status = remove(resource,myClient)
示例
status = remove(resource,myClient) 从与 myClient 关联的生命周期协作开放服务 (OSLC) 服务提供商中删除资源 resource 并返回删除成功状态。
status
resource
myClient
全部折叠
此示例显示如何使用配置的 OSLC 客户端提交需求资源的查询请求以及删除需求资源。
按照为需求管理域创建并配置 OSLC 客户端中所述创建并配置 OSLC 客户端myClient后,为需求资源类型创建查询功能。
myQueryCapability = getQueryService(myClient,'Requirement');
向服务提供者提交可用的需求资源的查询请求。
reqs = queryRequirements(myQueryCapability)
reqs = 1×30 Requirement array with properties: ResourceUrl Dirty IsFetched Title Identifier
从服务提供商处检索需求资源的完整资源数据。检查需求资源。
myReq = reqs(1); status = fetch(myReq,myClient)
status = StatusCode enumeration OK
myReq
myReq = Requirement with properties: ResourceUrl: 'https://localhost:9443/rm/resources/_72lxMWJREeup0...' Dirty: 0 IsFetched: 1 Title: 'My New Requirement' Identifier: '1806'
删除服务提供商的需求。
status = remove(myReq,myClient)
oslc.rm.Requirement
oslc.rm.RequirementCollection
oslc.cm.ChangeRequest
OSLC 资源,指定为以下对象之一:
oslc.qm.TestCase
oslc.qm.TestExecutionRecord
oslc.qm.TestPlan
oslc.qm.TestResult
oslc.qm.TestScript
oslc.Client
OSLC 客户端,指定为 oslc.Client 对象。
matlab.net.http.StatusCode
删除成功状态,作为matlab.net.http.StatusCode对象返回。
在 R2021a 中推出
oslc.Client | oslc.rm.Requirement | oslc.rm.RequirementCollection | oslc.cm.ChangeRequest | oslc.qm.TestCase | oslc.qm.TestExecutionRecord | oslc.qm.TestPlan | oslc.qm.TestResult | oslc.qm.TestScript | commit | show | fetch
commit
show
fetch
您点击的链接对应于以下 MATLAB 命令:
请在 MATLAB 命令行窗口中直接输入以执行命令。Web 浏览器不支持 MATLAB 命令。
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office