All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.ibm.as400.access.UserGroup

java.lang.Object
   |
   +----com.ibm.as400.access.User
           |
           +----com.ibm.as400.access.UserGroup

public class UserGroup
extends User
The UserGroup class represents a special user whose user profile is a group profile. Here is a simple example explaining how to use UserGroup:

 // Construct a AS400 system object.
 AS400 system = new AS400();
// Create a User Group
 UserGroup userGroup = new UserGroup();
 ...
 // Set the AS/400 system. 
 userGroup.setSystem(system);
 // Set the group profile name.
 userGroup.setName("Fredgroup");
 // Retrieve the users of this UserGroup.
 for(Enumeration e = userGroup.getMembers();e.hasMoreElements())
 {
     System.out.println((User)e.nextElement());
 }
 


Constructor Index

 o UserGroup(AS400, String)
Constructs a UserGroup object.

Method Index

 o getMembers()
Returns a list of users that are members of this group.

Constructors

 o UserGroup
 public UserGroup(AS400 as400,
                  String groupProfileName) throws AS400Exception, AS400SecurityException, ConnectionDroppedException, ErrorCompletingRequestException, InterruptedException, ObjectDoesNotExistException, IOException, UnsupportedEncodingException
Constructs a UserGroup object.

Parameters:
as400 - The AS/400 system in which the group information resides.
groupProfileName - The user profile name.
Throws: AS400Exception
If the AS/400 system returns an error message.
Throws: AS400SecurityException
If a security or authority error occurs.
Throws: ConnectionDroppedException
If the connection is dropped unexpectedly.
Throws: ErrorCompletingRequestException
If an error occurs before the request is completed.
Throws: InterruptedException
If this thread is interrupted.
Throws: IOException
If an error occurs while communicating with the AS/400.
Throws: ObjectDoesNotExistException
If the AS/400 object does not exist.
Throws: UnsupportedEncodingException
If the character encoding is not supported.

Methods

 o getMembers
 public Enumeration getMembers() throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, InterruptedException, IOException, ObjectDoesNotExistException, RequestNotSupportedException
Returns a list of users that are members of this group. The enumeration contains the users of this group.

Returns:
A list of users that are members of this group.
Throws: AS400Exception
If the AS/400 system returns an error message.
Throws: AS400SecurityException
If a security or authority error occurs.
Throws: ConnectionDroppedException
If the connection is dropped unexpectedly.
Throws: ErrorCompletingRequestException
If an error occurs before the request is completed.
Throws: InterruptedException
If this thread is interrupted.
Throws: IOException
If an error occurs while communicating with the AS/400.
Throws: ObjectDoesNotExistException
If the AS/400 object does not exist.
Throws: RequestNotSupportedException
If the AS/400 system is older than V3R7.

All Packages  Class Hierarchy  This Package  Previous  Next  Index