Schemas

Descrizione

Restituisce la raccolta di schemi associata al repository schema. Si tratta di una proprietà di sola lettura; è possibile visualizzarla, ma non impostarla.

Ogni elemento nella raccolta restituita è un Oggetto Schema.

Sintassi

VBScript

adminSession.Schemas 

Perl

$adminSession->GetSchemas(); 
Identificativo
Descrizione
adminSession
L'oggetto AdminSession rappresenta la sessione di accesso corrente del repository schema.
Valore di ritorno
Un Oggetto Schemas contenente tutti gli schemi presenti nel repository schema.

Esempio

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); 

Feedback