com.ibm.as400.access
Class UserList

java.lang.Object
  |
  +--com.ibm.as400.access.UserList
All Implemented Interfaces:
java.io.Serializable

public class UserList
extends java.lang.Object
implements java.io.Serializable

The UserList class represents a list of AS/400 users.

Some of the selections have associated get and set methods defined in this class. These are provided for backwards compatibility with previous versions of the AS/400 Toolbox for Java. The complete set of selections can be accessed using the RUserList class.

See Also:
RUserList, Serialized Form

Field Summary
static java.lang.String ALL
          Selection value indicating that the list contains all user profiles and group profiles.
static java.lang.String GROUP
          Selection value indicating that the list contains only user profiles that are group profiles.
static java.lang.String MEMBER
          Selection value indicating that the list contains only user profiles that are members of a specified group.
static java.lang.String NOGROUP
          Selection value indicating that the list contains only user profiles that are not group profiles.
static java.lang.String NONE
          Selection value indicating that no group profile is specified.
static java.lang.String USER
          Selection value indicating that the list contains only user profiles that are not group profiles.
 
Constructor Summary
UserList()
          Constructs a UserList object.
UserList(AS400 system)
          Constructs a UserList object.
UserList(AS400 system, java.lang.String userInfo, java.lang.String groupInfo)
          Constructs a UserList object.
 
Method Summary
 void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
          Adds a PropertyChangeListener.
 void addVetoableChangeListener(java.beans.VetoableChangeListener listener)
          Adds a VetoableChangeListener.
 java.lang.String getGroupInfo()
          Returns the group profile whose members are to be returned.
 int getLength()
          Returns the number of users in the list.
 AS400 getSystem()
          Returns the system.
 java.lang.String getUserInfo()
          Returns the description of which users are returned.
 java.util.Enumeration getUsers()
          Returns the list of users in the user list.
 void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
          Removes a PropertyChangeListener.
 void removeVetoableChangeListener(java.beans.VetoableChangeListener listener)
          Removes a VetoableChangeListener.
 void setGroupInfo(java.lang.String groupInfo)
          Sets the group profile whose members are to be returned.
 void setSystem(AS400 system)
          Sets the system.
 void setUserInfo(java.lang.String userInfo)
          Sets which users are returned.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ALL

public static final java.lang.String ALL
Selection value indicating that the list contains all user profiles and group profiles.

USER

public static final java.lang.String USER
Selection value indicating that the list contains only user profiles that are not group profiles. These are user profiles that do not have a group identifier specified.

GROUP

public static final java.lang.String GROUP
Selection value indicating that the list contains only user profiles that are group profiles. These are user profiles that have a group identifier specified.

MEMBER

public static final java.lang.String MEMBER
Selection value indicating that the list contains only user profiles that are members of a specified group.

NONE

public static final java.lang.String NONE
Selection value indicating that no group profile is specified.

NOGROUP

public static final java.lang.String NOGROUP
Selection value indicating that the list contains only user profiles that are not group profiles. These are user profiles that do not have a group identifier specified.
Constructor Detail

UserList

public UserList()
Constructs a UserList object.

UserList

public UserList(AS400 system)
Constructs a UserList object.
Parameters:
system - The system.

UserList

public UserList(AS400 system,
                java.lang.String userInfo,
                java.lang.String groupInfo)
Constructs a UserList object.
Parameters:
system - The system.
userInfo - The users to be returned. Possible values are:
  • ALL - All user profiles and group profiles are returned.
  • USER - Only user profiles that are not group profiles are returned. These are user profiles that do not have a group identifier specified.
  • GROUP - Only user profiles that are group profiles are returned. These are user profiles that have a group identifier specified.
  • MEMBER - User profiles that are members of the group specified for groupInfo are returned.
groupInfo - The group profile whose members are to be returned. Possible values are:
  • NONE - No group profile is specified.
  • NOGROUP - Users who are not a member of any group are returned.
  • The group profile name - Users who are a member of this group are returned.
Method Detail

addPropertyChangeListener

public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Adds a PropertyChangeListener. The specified PropertyChangeListener's propertyChange() method will be called each time the value of any bound property is changed.
Parameters:
listener - The listener.

addVetoableChangeListener

public void addVetoableChangeListener(java.beans.VetoableChangeListener listener)
Adds a VetoableChangeListener. The specified VetoableChangeListener's vetoableChange() method will be called each time the value of any constrained property is changed.
Parameters:
listener - The listener.

getGroupInfo

public java.lang.String getGroupInfo()
Returns the group profile whose members are to be returned.
Returns:
The group profile whose members are to be returned. Possible values are:
  • NONE - No group profile is specified.
  • NOGROUP - Users who are not a member of any group are returned.
  • The group profile name - Users who are a member of this group are returned.
See Also:
RUserList.GROUP_PROFILE

getLength

public int getLength()
Returns the number of users in the list.
Returns:
The number of users, or 0 if no list has been retrieved.

getSystem

public AS400 getSystem()
Returns the system.
Returns:
The system.

getUserInfo

public java.lang.String getUserInfo()
Returns the description of which users are returned.
Returns:
The description of which users are returned. Possible values are:
  • ALL - All user profiles and group profiles are returned.
  • USER - Only user profiles that are not group profiles are returned. These are user profiles that do not have a group identifier specified.
  • GROUP - Only user profiles that are group profiles are returned. These are user profiles that have a group identifier specified.
  • MEMBER - User profiles that are members of the group specified for the group info are returned.
See Also:
RUserList.SELECTION_CRITERIA

getUsers

public java.util.Enumeration getUsers()
                               throws AS400Exception,
                                      AS400SecurityException,
                                      ErrorCompletingRequestException,
                                      java.lang.InterruptedException,
                                      java.io.IOException,
                                      ObjectDoesNotExistException,
                                      RequestNotSupportedException
Returns the list of users in the user list.
Returns:
An Enumeration of User objects.
Throws:
AS400Exception - If the AS/400 system returns an error message.
AS400SecurityException - If a security or authority error occurs.
ConnectionDroppedException - If the connection is dropped unexpectedly.
ErrorCompletingRequestException - If an error occurs before the request is completed.
java.lang.InterruptedException - If this thread is interrupted.
java.io.IOException - If an error occurs while communicating with the AS/400.
ObjectDoesNotExistException - If the AS/400 object does not exist.
RequestNotSupportedException - If the requested function is not supported because the AS/400 system is not at the correct level.

removePropertyChangeListener

public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Removes a PropertyChangeListener.
Parameters:
listener - The listener.

removeVetoableChangeListener

public void removeVetoableChangeListener(java.beans.VetoableChangeListener listener)
Removes a VetoableChangeListener.
Parameters:
listener - The listener.

setGroupInfo

public void setGroupInfo(java.lang.String groupInfo)
                  throws java.beans.PropertyVetoException
Sets the group profile whose members are to be returned.

This must be set to a group profile name or NOGROUP if group info is set to MEMBER. This must be set to NONE if group info is not set to MEMBER.

Parameters:
groupInfo - The group profile whose members are to be returned. Possible values are:
  • NONE - No group profile is specified.
  • NOGROUP - Users who are not a member of any group are returned.
  • The group profile name - Users who are a member of this group are returned.
Throws:
java.beans.PropertyVetoException - If the change is vetoed.
See Also:
RUserList.GROUP_PROFILE

setSystem

public void setSystem(AS400 system)
               throws java.beans.PropertyVetoException
Sets the system. This cannot be changed if the object has established a connection to the AS/400.
Parameters:
system - The system.
Throws:
java.beans.PropertyVetoException - If the property change is vetoed.

setUserInfo

public void setUserInfo(java.lang.String userInfo)
                 throws java.beans.PropertyVetoException
Sets which users are returned. Possible values are:
Parameters:
userInfo - A description of which users are returned. Possible values are:
  • ALL - All user profiles and group profiles are returned.
  • USER - Only user profiles that are not group profiles are returned. These are user profiles that do not have a group identifier specified.
  • GROUP - Only user profiles that are group profiles are returned. These are user profiles that have a group identifier specified.
  • MEMBER - User profiles that are members of the group specified for the group info are returned.
Throws:
java.beans.PropertyVetoException - If the change is vetoed.
See Also:
RUserList.SELECTION_CRITERIA