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
-
ALL
- Constant indicating that all user profile names and group
profile names are returned.
-
GROUP
- Constant indicating that user names that are group profiles are
returned.
-
MEMBER
- Constant indicating that user names that are members of the
group specified by the group info property are returned.
-
NOGROUP
- Constant indicating that users who are not a member of any
group are returned.
-
NONE
- Constant indicating that no group profile is specified.
-
USER
- Constant indicating that user names that are not group profiles
are returned.
-
UserList()
- Constructs a UserList object.
-
UserList(AS400)
- Constructs a UserList object.
-
UserList(AS400, String, String)
- Constructs a UserList object.
-
addPropertyChangeListener(PropertyChangeListener)
- Adds a listener to be notified when the value of any bound
property is changed.
-
addVetoableChangeListener(VetoableChangeListener)
- Adds a listener to be notified when the value of any constrained
property is changed.
-
getGroupInfo()
- Returns the group information that describes which users are returned.
-
getLength()
- Returns the number of users in the list that were most recently
retrieved from the AS/400 (the last call to getUsers()).
-
getSystem()
- Returns the AS/400 system from which the list of users will
be retrieved.
-
getUserInfo()
- Returns the user information that describes which users are returned
in the list.
-
getUsers()
- Returns a list of users defined on the AS/400.
-
removePropertyChangeListener(PropertyChangeListener)
- Removes a property change listener from the listener list.
-
removeVetoableChangeListener(VetoableChangeListener)
- Removes a vetoable change listener from the listener list.
-
setGroupInfo(String)
- Sets the group information that describes which users are returned.
-
setSystem(AS400)
- Sets the AS/400 system from which the list of users will be retrieved.
-
setUserInfo(String)
- Sets the user information that describes which users are returned.
-
toString()
- Returns the string representing the user list.
ALL
public static final String ALL
- Constant indicating that all user profile names and group
profile names are returned.
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.
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.
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.
NONE
public static final String NONE
- Constant indicating that no group profile is specified.
NOGROUP
public static final String NOGROUP
- Constant indicating that users who are not a member of any
group are returned.
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.
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.
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:
- groupInfo - The group information.
The valid values are:
- NOGROUP
- NONE
- A group identifier.
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.
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.
getGroupInfo
public String getGroupInfo()
- Returns the group information that describes which users are returned.
- Returns:
- The group information that describes which users are returned.
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.
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.
getUserInfo
public String getUserInfo()
- Returns the user information that describes which users are returned
in the list.
- Returns:
- The user information.
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.
removePropertyChangeListener
public void removePropertyChangeListener(PropertyChangeListener listener)
- Removes a property change listener from the listener list.
- Parameters:
- listener - The PropertyChangeListener.
removeVetoableChangeListener
public void removeVetoableChangeListener(VetoableChangeListener listener)
- Removes a vetoable change listener from the listener list.
- Parameters:
- listener - The VetoableChangeListener.
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.
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.
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:
This value cannot be null.
- Throws: PropertyVetoException
- If the change is vetoed.
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