setServer
説明
例
この例では、MATLAB® で OSLC クライアントを作成し、クライアントを要件管理ドメインの OSLC サービス プロバイダーに接続するように構成する方法を示します。
OSLC クライアントを作成します。
myClient = oslc.Client;
サービス プロバイダーのユーザーとサーバー URL を設定します。さらに、要件管理ドメインのサービス ルートとカタログ パス、および構成のクエリ パスを設定します。
setUser(myClient,'jdoe'); setServer(myClient,'https://localhost:9443'); setServiceRoot(myClient,'rm'); setCatalogPath(myClient,'/oslc_rm/catalog'); setConfigurationQueryPath(myClient,'gc/oslc-query/configurations'); myClient
クライアントにログインし、プロンプトが表示されたら資格情報を入力します。
login(myClient);
指定したカタログ パスとサービス ルートで使用可能なサービス プロバイダーを取得します。OSLC クライアントを目的のサービス プロバイダーに設定します。
providers = getServiceProviderNames(myClient)
providers =
4×1 cell array
{'OSLC Plugin' }
{'Model Based Design with OSLC' }
{'OSLC4RM' }
{'Interactive Testing (Requirements Management)'}setServiceProvider(myClient,'OSLC Plugin');該当する場合は、使用可能な構成コンテキストを取得します。OSLC クライアントを目的の構成コンテキストに設定します。
configurations = getConfigurationContextNames(myClient)
configurations =
2×1 cell array
{'Initial Development'}
{'Initial Baseline' }setConfigurationContext(myClient,'Initial Development');クライアントのプロパティを検証します。
myClient
myClient =
Client with properties:
ServiceProvider: 'OSLC Plugin'
ConfigurationContext: 'Initial Development'
CatalogUrl: 'https://localhost:9443/rm/oslc_rm/catalog'入力引数
OSLC クライアント。oslc.Client オブジェクトとして指定します。
OSLC クライアントに設定する OSLC サーバー URL。文字ベクトルとして指定します。
バージョン履歴
R2021a で導入
参考
oslc.Client | setCatalogPath | setServiceRoot | login | setUser
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Web サイトの選択
Web サイトを選択すると、翻訳されたコンテンツにアクセスし、地域のイベントやサービスを確認できます。現在の位置情報に基づき、次のサイトの選択を推奨します:
また、以下のリストから Web サイトを選択することもできます。
最適なサイトパフォーマンスの取得方法
中国のサイト (中国語または英語) を選択することで、最適なサイトパフォーマンスが得られます。その他の国の MathWorks のサイトは、お客様の地域からのアクセスが最適化されていません。
南北アメリカ
- América Latina (Español)
- Canada (English)
- United States (English)
ヨーロッパ
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)