Schemas

설명

스키마 저장소에 연관된 스키마 콜렉션을 리턴합니다. 이는 읽기 전용 특성입니다. 즉, 볼 수는 있으나 설정할 수는 없습니다.

리턴된 콜렉션 내의 각 요소는 Schema 오브젝트입니다.

구문

VBScript

adminSession.Schemas 

Perl

$adminSession->GetSchemas(); 
ID
설명
adminSession
현재 스키마 저장소 액세스 세션을 나타내는 AdminSession 오브젝트.
Return value
스키마 저장소의 모든 스키마를 포함하는 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);

피드백