Main Content

oslc.Client

クライアントを OSLC プロバイダーと統合

R2021a 以降

    説明

    oslc.Client オブジェクトは、Open Services for Lifecycle Collaboration (OSLC) サービス プロバイダーと統合するために使用します。オブジェクトでサービス プロバイダーのプロパティを指定してから、オブジェクト関数を使用してユーザー名を指定し、サーバーにログインします。その後、oslc.core.CreationFactory オブジェクトと oslc.core.QueryCapability オブジェクトを使用して、OSLC サービス プロバイダーでリソースの作成とクエリを実行できます。

    作成

    説明

    myClient = oslc.Client は、OSLC クライアント オブジェクトを返します。

    プロパティ

    すべて展開する

    OSLC サービス プロバイダーの名前。文字配列として指定します。

    サービス プロバイダーの構成コンテキストの名前。文字配列として指定します。

    サービス プロバイダーのカタログの URL。文字配列として指定します。

    例: 'https://localhost:9443/qm/oslc_qm/catalog'

    オブジェクト関数

    getConfigurationContextNamesGet configuration context names from OSLC service provider
    getCreationFactoryGet OSLC creation service object
    getCustomLoginProviderGet registered custom authentication callback function name for OSLC client
    getDialogGet user interface dialogs from OSLC service provider
    getQueryServiceGet OSLC query service object
    getServerGet server URL for OSLC client
    getServiceProviderNamesGet service providers for OSLC client
    getUserGet user for OSLC client
    loginOSLC クライアントにログイン
    removeRemove resource from OSLC service provider
    setCatalogPathSet catalog path for OSLC client
    setConfigurationContextSet configuration context for OSLC client
    setConfigurationQueryPathSet configuration query path for OSLC client
    setCustomLoginProviderRegister custom authentication callback function to OSLC client
    setHttpHeaderSet HTTP header for OSLC client
    setHttpOptionsSet HTTP options for OSLC client
    setServerSet server URL for OSLC client
    setServiceProviderSet service provider for OSLC client
    setServiceRootSet service root for OSLC client
    setUserSet user for OSLC client

    すべて折りたたむ

    この例では、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'

    この例では、MATLAB で OSLC クライアントを作成し、クライアントを品質管理ドメインの OSLC サービス プロバイダーに接続するように構成する方法を示します。

    OSLC クライアントを作成します。

    myClient = oslc.Client;

    サービス プロバイダーのユーザーとサーバー URL を設定します。要件管理ドメインのサービス ルートとカタログ パスを設定します。

    setUser(myClient,'jdoe');
    setServer(myClient,'https://localhost:9443');
    setServiceRoot(myClient,'qm');
    setCatalogPath(myClient,'/oslc_qm/catalog');

    クライアントにログインし、プロンプトが表示されたら資格情報を入力します。

    login(myClient);

    指定したカタログ パスとサービス ルートで使用可能なサービス プロバイダーを取得します。OSLC クライアントを目的のサービス プロバイダーに設定します。

    providers = getServiceProviderNames(myClient)
    providers =
    
      4×1 cell array
    
        {'OSLC Plugin (Quality Management)'                 }
        {'Model Based Design with OSLC (Quality Management)'}
        {'OSLC4RM (Quality Management)'                     }
        {'Interactive Testing (Quality Management)'         }

    setServiceProvider(myClient,'OSLC Plugin (Quality Management)');

    該当する場合は、使用可能な構成コンテキストを取得します。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 (Quality Management)'
        ConfigurationContext: 'Initial Development'
                  CatalogUrl: 'https://localhost:9443/qm/oslc_qm/catalog'

    この例では、MATLAB で OSLC クライアントを作成し、クライアントを変更管理ドメインの OSLC サービス プロバイダーに接続するように構成する方法を示します。

    OSLC クライアントを作成します。

    myClient = oslc.Client;

    サービス プロバイダーのユーザーとサーバー URL を設定します。変更管理ドメインのサービス ルートとカタログ パスを設定します。

    setUser(myClient,'jdoe');
    setServer(myClient,'https://localhost:9443');
    setServiceRoot(myClient,'ccm');
    setCatalogPath(myClient,'/oslc/workitems/catalog');

    クライアントにログインし、プロンプトが表示されたら資格情報を入力します。

    login(myClient);

    指定したカタログ パスとサービス ルートで使用可能なサービス プロバイダーを取得します。OSLC クライアントを目的のサービス プロバイダーに設定します。

    providers = getServiceProviderNames(myClient)
    providers =
    
      4×1 cell array
    
        {'OSLC Plugin (Change Management)'                 }
        {'Model Based Design with OSLC (Change Management)'}
        {'OSLC4RM (Change Management)'                     }
        {'Interactive Testing (Change Management)'         }

    setServiceProvider(myClient,'OSLC Plugin (Change Management)');

    該当する場合は、使用可能な構成コンテキストを取得します。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 (Change Management)'
        ConfigurationContext: 'Initial Development'
                  CatalogUrl: 'https://localhost:9443/cm/oslc_cm/catalog'

    バージョン履歴

    R2021a で導入