Main Content

slreq.dngGetProjectConfig

Configurations in current project for IBM DOORS Next session

Description

configs = slreq.dngGetProjectConfig returns the configuration contexts in the current IBM® DOORS® Next project.

example

configs = slreq.dngGetProjectConfig("Type","Stream") returns the streams for the current IBM DOORS Next Project.

example

configs = slreq.dngGetProjectConfig("Type","Changeset") returns the change sets for the current IBM DOORS Next Project.

example

configs = slreq.dngGetProjectConfig("Name",configName) returns the configuration context specified by the name configName.

example

configs = slreq.dngGetProjectConfig("ID",configID) returns the configuration context specified by the ID configID.

example

configs = slreq.dngGetProjectConfig("Project",projectName) returns the configuration contexts for the project specified by projectName. The function also changes the current project to the project specified by projectName.

example

Examples

collapse all

This example shows how to get and set the configuration context in the current project for the IBM DOORS Next session.

Specify the server address, requirements management service root, and the username.

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

Establish the connection by specifying the project, configuration context, whether to test the connection from the system browser to MATLAB®, and the custom authentication callback function myPasswordHelperCallback. The function myPasswordHelperCallback gets the password. For more information, see 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

Get the available configuration contexts for the project.

configs = slreq.dngGetProjectConfig
configs = 

  1×8 struct array with fields:

    id
    name
    type
    url

Set the configuration context to the first configuration context in the structure array.

slreq.dngSetSessionConfig(configs(1))

This example shows how to get the streams and change sets for the current project in the IBM DOORS Next session.

Specify the server address, requirements management service root, and the username.

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

Establish the connection by specifying the project, configuration context, whether to test the connection from the system browser to MATLAB, and the custom authentication callback function myPasswordHelperCallback. The function myPasswordHelperCallback gets the password. For more information, see 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

Get the available streams for the project.

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

  1×4 struct array with fields:

    id
    name
    type
    url

Get the available change sets for the project.

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

  1×4 struct array with fields:

    id
    name
    type
    url

This example shows how to get a configuration context by specifying the name or ID.

Specify the server address, requirements management service root, and the username.

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

Establish the connection by specifying the project, configuration context, whether to test the connection from the system browser to MATLAB, and the custom authentication callback function myPasswordHelperCallback. The function myPasswordHelperCallback gets the password. For more information, see 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

Get the configuration context for the stream with the name 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'

Get the configuration context for the stream with the 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'

This example shows how to get the configuration contexts for a specified project and change the current project to that project.

Specify the server address, requirements management service root, and the username.

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

Establish the connection by specifying the project, configuration context, whether to test the connection from the system browser to MATLAB, and the custom authentication callback function myPasswordHelperCallback. The function myPasswordHelperCallback gets the password. For more information, see 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

Get the configuration contexts for the project with the name My Other Project and change the current project to My Other Project.

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

  1×22 struct array with fields:

    id
    name
    type
    url

Get the current project.

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

Input Arguments

collapse all

Configuration context name, specified as a string scalar or a character vector.

Configuration context ID, specified as a string scalar or a character vector.

Project name, specified as a string scalar or a character vector.

Output Arguments

collapse all

Configuration contexts, returned as a structure array with these fields:

Configuration context ID, returned as a character vector.

Configuration context name, returned as a character vector.

Configuration context type, returned as 'stream' or 'changeset'.

Configuration context URL, returned as a character vector.

Version History

Introduced in R2018b