Main Content

本页采用了机器翻译。点击此处可查看英文原文。

slreq.dngGetProjectConfig

IBM DOORS Next 会话的当前工程中的配置

说明

示例

configs = slreq.dngGetProjectConfig 返回当前 IBM® DOORS® Next 工程中的配置上下文。

示例

configs = slreq.dngGetProjectConfig("Type","Stream") 返回当前 IBM DOORS Next 工程的流。

示例

configs = slreq.dngGetProjectConfig("Type","Changeset") 返回当前 IBM DOORS Next 工程的变更集。

示例

configs = slreq.dngGetProjectConfig("Name",configName) 返回名称 configName 指定的配置上下文。

示例

configs = slreq.dngGetProjectConfig("ID",configID) 返回 ID configID 指定的配置上下文。

示例

configs = slreq.dngGetProjectConfig("Project",projectName) 返回 projectName 指定的工程的配置上下文。该函数还将当前工程更改为 projectName 指定的工程。

示例

全部折叠

此示例显示如何获取和设置当前工程中 IBM DOORS Next 会话的配置上下文。

指定服务器地址、需求管理服务根和用户名。

rmipref(OslcServerAddress="https://localhost:9443");
rmipref(OslcServerRMRoot="rm");
rmipref(OslcServerUser="jdoe");

通过指定工程、配置上下文、是否测试从系统浏览器到 MATLAB® 的连接以及自定义身份验证回调函数 myPasswordHelperCallback 来建立连接。函数myPasswordHelperCallback获取密码。有关更多信息,请参阅 setCustomLoginProvider

slreq.dngConfigure("My Project","My Project Initial Stream", ...
    true,"myPasswordHelperCallback")
Performing default system browser message test.
	If browser warns about a missing certificate for 127.0.0.1,
	please allow the connection or add exemption for 127.0.0.1.
	https://127.0.0.1:31515/matlab/oslc/inboundTest

获取工程的可用配置上下文。

configs = slreq.dngGetProjectConfig
configs = 

  1×8 struct array with fields:

    id
    name
    type
    url

将配置上下文设置为结构体数组中的第一个配置上下文。

slreq.dngSetSessionConfig(configs(1))

此示例显示如何在 IBM DOORS Next 会话中获取当前工程的流和变更集。

指定服务器地址、需求管理服务根和用户名。

rmipref(OslcServerAddress="https://localhost:9443");
rmipref(OslcServerRMRoot="rm");
rmipref(OslcServerUser="jdoe");

通过指定工程、配置上下文、是否测试从系统浏览器到 MATLAB 的连接以及自定义身份验证回调函数 myPasswordHelperCallback 来建立连接。函数myPasswordHelperCallback获取密码。有关更多信息,请参阅 setCustomLoginProvider

slreq.dngConfigure("My Project","My Project Initial Stream", ...
    true,"myPasswordHelperCallback")
Performing default system browser message test.
	If browser warns about a missing certificate for 127.0.0.1,
	please allow the connection or add exemption for 127.0.0.1.
	https://127.0.0.1:31515/matlab/oslc/inboundTest

获取工程的可用流。

streams = slreq.dngGetProjectConfig("Type","Stream")
streams = 

  1×4 struct array with fields:

    id
    name
    type
    url

获取工程的可用变更集。

changesets = slreq.dngGetProjectConfig("Type","Changeset")
changesets = 

  1×4 struct array with fields:

    id
    name
    type
    url

此示例显示如何通过指定名称或 ID 来获取配置上下文。

指定服务器地址、需求管理服务根和用户名。

rmipref(OslcServerAddress="https://localhost:9443");
rmipref(OslcServerRMRoot="rm");
rmipref(OslcServerUser="jdoe");

通过指定工程、配置上下文、是否测试从系统浏览器到 MATLAB 的连接以及自定义身份验证回调函数 myPasswordHelperCallback 来建立连接。函数myPasswordHelperCallback获取密码。有关更多信息,请参阅 setCustomLoginProvider

slreq.dngConfigure("My Project","My Project Initial Stream", ...
    true,"myPasswordHelperCallback")
Performing default system browser message test.
	If browser warns about a missing certificate for 127.0.0.1,
	please allow the connection or add exemption for 127.0.0.1.
	https://127.0.0.1:31515/matlab/oslc/inboundTest

获取名为 My Project Initial Stream 的流的配置上下文。

config = slreq.dngGetProjectConfig("Name","My Project Initial Stream")
config = 

  struct with fields:

      id: '_gSVNYFhWEey8CNpbhtB7vg'
    name: 'My Project Initial Stream'
    type: 'stream'
     url: 'https://localhost:9443/rm/cm/stream/_gSVNYFhWEey8CNpbhtB7vg'

获取 ID 为 _tP_J5osyEeuFd_Hmf7aaKg 的流的配置上下文。

config = slreq.dngGetProjectConfig("ID","_tP_J5osyEeuFd_Hmf7aaKg")
config = 

  struct with fields:

      id: '_tP_J5osyEeuFd_Hmf7aaKg'
    name: 'Other Stream'
    type: 'stream'
     url: 'https://localhost:9443/rm/cm/stream/_tP_J5osyEeuFd_Hmf7aaKg'

此示例显示如何获取指定工程的配置上下文并将当前工程更改为该工程。

指定服务器地址、需求管理服务根和用户名。

rmipref(OslcServerAddress="https://localhost:9443");
rmipref(OslcServerRMRoot="rm");
rmipref(OslcServerUser="jdoe");

通过指定工程、配置上下文、是否测试从系统浏览器到 MATLAB 的连接以及自定义身份验证回调函数 myPasswordHelperCallback 来建立连接。函数myPasswordHelperCallback获取密码。有关更多信息,请参阅 setCustomLoginProvider

slreq.dngConfigure("My Project","My Project Initial Stream", ...
    true,"myPasswordHelperCallback")
Performing default system browser message test.
	If browser warns about a missing certificate for 127.0.0.1,
	please allow the connection or add exemption for 127.0.0.1.
	https://127.0.0.1:31515/matlab/oslc/inboundTest

获取名为 My Other Project 的工程的配置上下文,并将当前工程更改为 My Other Project

config = slreq.dngGetProjectConfig("Project","My Other Project")
configs = 

  1×22 struct array with fields:

    id
    name
    type
    url

获取当前工程。

project = slreq.dngGetCurrentProject
project = 
          name: 'My Other Project'
           uri: 'https://localhost:9443/rm/_J5osyEeuFd_Hmf7aaKg'
    serviceUri: 'https://localhost:9443/rm/_J5osyEeuFd_Hmf7aaKg/services.xml'
       context: 'My Other Project Initial Stream'
     queryBase: 'https://localhost:9443/rm/views?oslc.query=true&2F_J5osyEeuFd_Hmf7aaKg

输入参数

全部折叠

配置上下文名称,指定为字符串标量或字符向量。

配置上下文 ID,指定为字符串标量或字符向量。

工程名称,指定为字符串标量或字符向量。

输出参量

全部折叠

配置上下文,以包含以下字段的结构体数组形式返回:

配置上下文 ID,以字符向量形式返回。

配置上下文名称,以字符向量形式返回。

配置上下文类型,返回为 'stream''changeset'

配置上下文 URL,以字符向量形式返回。

版本历史记录

在 R2018b 中推出