Schemas

Description

Renvoie la collection de schémas associée au référentiel de schéma. Il s'agit d'une propriété en lecture seule ; elle peut être visualisée mais pas définie.

Each element in the returned collection is a Schema Object.

Syntaxe

VBScript

adminSession.Schemas 

Perl

$adminSession->GetSchemas(); 
Identificateur
Description
adminSession
L'objet AdminSession représentant la session d'accès du référentiel de schéma en cours.
Valeur de retour
A Schemas Object containing all of the schemas in the schema repository.

Exemple

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;

# Créez une session admin Rational ClearQuest
$adminSession= CQAdminSession::Build();

$SessionObj = CQSession::Build();

#Connectez-vous en tant qu'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