All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.ibm.as400.access.UserList

java.lang.Object
   |
   +----com.ibm.as400.access.UserList

public class UserList
extends Object
implements Serializable
The UserList class represents a list of AS/400 users.

For example:

 UserList userList = new UserList( as400 );
 Enumeration e = userList.getUsers ();
 while (e.hasMoreElements ())
 {
   User u = (User) e.nextElement ();
   System.out.println (u);
 }
 

UserList objects generate the following events:

See Also:
User

Variable Index

 o ALL
Constant indicating that all user profile names and group profile names are returned.
 o GROUP
Constant indicating that user names that are group profiles are returned.
 o MEMBER
Constant indicating that user names that are members of the group specified by the group info property are returned.
 o NOGROUP
Constant indicating that users who are not a member of any group are returned.
 o NONE
Constant indicating that no group profile is specified.
 o USER
Constant indicating that user names that are not group profiles are returned.

Constructor Index

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

Method Index

 o addPropertyChangeListener(PropertyChangeListener)
Adds a listener to be notified when the value of any bound property is changed.
 o addVetoableChangeListener(VetoableChangeListener)
Adds a listener to be notified when the value of any constrained property is changed.
 o getGroupInfo()
Returns the group information that describes which users are returned.
 o getLength()
Returns the number of users in the list that were most recently retrieved from the AS/400 (the last call to getUsers()).
 o getSystem()
Returns the AS/400 system from which the list of users will be retrieved.
 o getUserInfo()
Returns the user information that describes which users are returned in the list.
 o getUsers()
Returns a list of users defined on the AS/400.
 o removePropertyChangeListener(PropertyChangeListener)
Removes a property change listener from the listener list.
 o removeVetoableChangeListener(VetoableChangeListener)
Removes a vetoable change listener from the listener list.
 o setGroupInfo(String)
Sets the group information that describes which users are returned.
 o setSystem(AS400)
Sets the AS/400 system from which the list of users will be retrieved.
 o setUserInfo(String)
Sets the user information that describes which users are returned.
 o toString()
Returns the string representing the user list.

Variables

 o ALL
 public static final String ALL
Constant indicating that all user profile names and group profile names are returned.

 o USER
 public static final String USER
Constant indicating that user names that are not group profiles are returned. These are user profiles that do not have a group identifier specified.

 o GROUP
 public static final String GROUP
Constant indicating that user names that are group profiles are returned. These are user profiles that have a group identifier specified.

 o MEMBER
 public static final String MEMBER
Constant indicating that user names that are members of the group specified by the group info property are returned.

 o NONE
 public static final String NONE
Constant indicating that no group profile is specified.

 o NOGROUP
 public static final String NOGROUP
Constant indicating that users who are not a member of any group are returned.

Constructors

 o UserList
 public UserList()
Constructs a UserList object. The system property needs to be set before using any method that requires a connection to the AS/400.

 o UserList
 public UserList(AS400 system)
Constructs a UserList object.

Depending on how the AS400 object was constructed, the user may need to be prompted for the system name, user ID, or password when any method requiring a connection to the AS/400 is used.

Parameters:
system - The AS/400 system from which the list of users will be retrieved. This value cannot be null.
 o UserList
 public UserList(AS400 system,
                 String userInfo,
                 String groupInfo)
Constructs a UserList object.

Depending on how the AS400 object was constructed, the user may need to be prompted for the system name, user ID, or password when any method requiring a connection to the AS/400 is used.

Parameters:
system - The AS/400 system from which the list of users will be retrieved. This value cannot be null.
userInfo - The user information. The valid values are:
  • ALL
  • USER
  • GROUP
  • MEMBER
groupInfo - The group information. The valid values are:
  • NOGROUP
  • NONE
  • A group identifier.

Methods

 o addPropertyChangeListener
 public void addPropertyChangeListener(PropertyChangeListener listener)
Adds a listener to be notified when the value of any bound property is changed. The propertyChange() method will be be called.

Parameters:
listener - The PropertyChangeListener.
 o addVetoableChangeListener
 public void addVetoableChangeListener(VetoableChangeListener listener)
Adds a listener to be notified when the value of any constrained property is changed. The vetoableChange() method will be called.

Parameters:
listener - The VetoableChangeListener.
 o getGroupInfo
 public String getGroupInfo()
Returns the group information that describes which users are returned.

Returns:
The group information that describes which users are returned.
 o getLength
 public int getLength()
Returns the number of users in the list that were most recently retrieved from the AS/400 (the last call to getUsers()).

Returns:
The number of users, or 0 if no list has been retrieved.
 o getSystem
 public AS400 getSystem()
Returns the AS/400 system from which the list of users will be retrieved.

Returns:
The AS/400 system from which the list of users will be retrieved.
 o getUserInfo
 public String getUserInfo()
Returns the user information that describes which users are returned in the list.

Returns:
The user information.
 o getUsers
 public Enumeration getUsers() throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, InterruptedException, IOException, ObjectDoesNotExistException, RequestNotSupportedException
Returns a list of users defined on the AS/400. A valid AS/400 system must be provided before this call is made.

Returns:
An Enumeration of User objects.
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 requested function is not supported because the AS/400 system is not at the correct level.
 o removePropertyChangeListener
 public void removePropertyChangeListener(PropertyChangeListener listener)
Removes a property change listener from the listener list.

Parameters:
listener - The PropertyChangeListener.
 o removeVetoableChangeListener
 public void removeVetoableChangeListener(VetoableChangeListener listener)
Removes a vetoable change listener from the listener list.

Parameters:
listener - The VetoableChangeListener.
 o setGroupInfo
 public void setGroupInfo(String groupInfo) throws PropertyVetoException
Sets the group information that describes which users are returned. The default group information is NONE. This must be set to a valid group identifier or NOGROUP when the user information property is MEMBER. This takes effect the next time that getUsers() is called.

Parameters:
groupInfo - The group information The valid values for this parameter are:
  • NOGROUP
  • NONE
  • A group identifier.
This value cannot be null.
Throws: PropertyVetoException
If the change is vetoed.
 o setSystem
 public void setSystem(AS400 system) throws PropertyVetoException
Sets the AS/400 system from which the list of users will be retrieved.

Parameters:
system - The AS/400 system from which the list of users will be retrieved. This value cannot be null.
Throws: PropertyVetoException
If the change is vetoed.
 o setUserInfo
 public void setUserInfo(String userInfo) throws PropertyVetoException
Sets the user information that describes which users are returned. The default is ALL. If MEMBER is specified, then the group info property must be set to a valid group identifier or NOGROUP. This takes effect the next time that getUsers() is called.

Parameters:
userInfo - The user information. The valid values are:
  • ALL
  • USER
  • GROUP
  • MEMBER
This value cannot be null.
Throws: PropertyVetoException
If the change is vetoed.
 o toString
 public String toString()
Returns the string representing the user list.

Returns:
The string representing the user list.
Overrides:
toString in class Object

All Packages  Class Hierarchy  This Package  Previous  Next  Index