Schemas

Description

Devuelve la recopilación de esquemas asociados al repositorio de esquemas. Es una propiedad de sólo lectura; se puede visualizar, pero no se puede establecer.

Cada elemento de la recopilación devuelta es un objeto Schema.

Sintaxis

VBScript

adminSession.Schemas 

Perl

$adminSession->GetSchemas(); 
Identificador
Description
adminSession
Objeto AdminSession que representa la sesión de acceso al repositorio de esquemas actual.
Valor de retorno
Un objeto Schemas que contiene todos los esquemas del repositorio de esquemas.

Ejemplo

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

Comentarios