Groups
Description
Returns the collection of groups associated with the schema repository. This is a read-only property; it can be viewed but not set.
Each element in the returned collection is a Group Object.
Syntax
Perl
$adminSession->GetGroups();
- Identifier
- Description
- adminSession
- The AdminSession object representing the current schema repository access session.
- Return value
- A Groups Object containing all of the groups in the schema repository.
Example
Perl
use CQPerlExt;
#Create an admin session
$adminSession= CQAdminSession::Build();
#Logon as admin
$adminSession->Logon( "admin", "admin", "" );
#Get the list of groups
$groupList = $adminSession->GetGroups();
#Get the number of groups
$numGroups = $groupList->Count();
#Iterate through the groups
for ( $x=0; $x<$numGroups; $x++ ) {
#Get the specified item in the collection of groups
$groupObj = $groupList->Item( $x );
#Get the name of the group
$groupName = $groupObj->GetName();
}
CQAdminSession::Unbuild($adminSession);