Schemas

説明

スキーマ リポジトリに関連付けられたスキーマのコレクションを戻します。これは読み取り専用のプロパティです。表示できますが設定できません。

戻されたコレクション内の各エレメントは Schema オブジェクトです。

構文

VBScript

adminSession.Schemas 

Perl

$adminSession->GetSchemas(); 
識別子
説明
adminSession
AdminSession オブジェクトは、現在のスキーマ リポジトリのアクセス セッションを表します。
戻り値
スキーマ リポジトリ内のすべてのスキーマを含む Schemas オブジェクト

VBScript

set adminSession = CreateObject("ClearQuest.AdminSession")
set SessionObj = CreateObject("ClearQuest.Session")
     adminSession.Logon "admin", "admin", ""

set schemaList = adminSession.Schemas
For each schemaObj in schemaList
     schemaName = schemaObj.Name
     SessionObj.OutputDebugString "Found schema: " & schemaName
Next

Perl

use CQPerlExt;

#Create a Rational ClearQuest admin session
$adminSession = CQAdminSession::Build();

$SessionObj = CQSession::Build();

#Logon as admin
$adminSession->Logon( "admin", "admin", "" );

#Get the list of schemas in the repository.
$schemaList = $adminSession->GetSchemas();

#Get the number of schemas in the repository
$numSchemas = $schemaList->Count();

#Iterate through the schemas in the repository
for ( $x=0; $x<$numSchemas; $x++ ) {
     #Get the specified item in the collection of schemas
     $schemaObj = $schemaList->Item( $x );
     #Get the name of the schema
     $schemaName = $schemaObj->GetName();
     #Output, via debugger, that the user was found
     $debugString = "Found schema: " . $schemaName;
     $SessionObj->OutputDebugString( $debugString );
}
CQSession::Unbuild($SessionObj); 
CQAdminSession::Unbuild($adminSession);

フィードバック