|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--com.ibm.as400.access.UserList
The UserList class represents a list of OS/400 user profiles.
Implementation note: This class internally uses the Open List APIs (e.g. QGYOLAUS).
User,
UserGroup,
RUser,
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. |
void |
close()
Closes the user list on the system. |
java.lang.String |
getGroupInfo()
Returns the group profile whose members are to be returned. |
int |
getLength()
Returns the number of users in the user 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. |
User[] |
getUsers(int listOffset,
int number)
Returns a subset of the list of users. |
void |
load()
Loads the list of users on the system. |
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 |
public static final java.lang.String ALL
public static final java.lang.String USER
public static final java.lang.String GROUP
public static final java.lang.String MEMBER
public static final java.lang.String NONE
public static final java.lang.String NOGROUP
| Constructor Detail |
public UserList()
system must be set before calling
any of the methods that connect to the server.
The usersInfo parameter defaults to ALL
and the groupInfo parameter defaults to NONE.
public UserList(AS400 system)
ALL
and the groupInfo parameter defaults to NONE.
system - The system.
public UserList(AS400 system,
java.lang.String userInfo,
java.lang.String groupInfo)
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:
| Method Detail |
public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
listener - The listener.removePropertyChangeListener(java.beans.PropertyChangeListener)public void addVetoableChangeListener(java.beans.VetoableChangeListener listener)
listener - The listener.removeVetoableChangeListener(java.beans.VetoableChangeListener)
public void close()
throws AS400Exception,
AS400SecurityException,
ErrorCompletingRequestException,
java.lang.InterruptedException,
java.io.IOException,
ObjectDoesNotExistException
AS400Exception - If the system returns an error message.
AS400SecurityException - If a security or authority error occurs.
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 system.
ObjectDoesNotExistException - If the object does not exist on the system.load()public java.lang.String getGroupInfo()
public int getLength()
load().
load()public AS400 getSystem()
setSystem(com.ibm.as400.access.AS400)public java.lang.String getUserInfo()
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.
setUserInfo(java.lang.String)
public java.util.Enumeration getUsers()
throws AS400Exception,
AS400SecurityException,
ErrorCompletingRequestException,
java.lang.InterruptedException,
java.io.IOException,
ObjectDoesNotExistException,
RequestNotSupportedException
User objects.
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.close(),
load()
public User[] getUsers(int listOffset,
int number)
throws AS400Exception,
AS400SecurityException,
ErrorCompletingRequestException,
java.lang.InterruptedException,
java.io.IOException,
ObjectDoesNotExistException
load() is made (either implicitly or explicitly),
then the users at a given offset will change, so a subsequent call to
getUsers() with the same listOffset and number
will most likely not return the same Users as the previous call.
listOffset - The offset into the list of users. This value must be greater than 0 and
less than the list length, or specify -1 to retrieve all of the users.number - The number of users to retrieve out of the list, starting at the specified
listOffset. This value must be greater than or equal to 0 and less than or equal
to the list length. If the listOffset is -1, this parameter is ignored.
User objects.
The length of this array may not necessarily be equal to number, depending upon the size
of the list on the server, and the specified listOffset.
AS400Exception - If the system returns an error message.
AS400SecurityException - If a security or authority error occurs.
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 system.
ObjectDoesNotExistException - If the object does not exist on the system.Job,
close(),
load()
public void load()
throws AS400Exception,
AS400SecurityException,
ErrorCompletingRequestException,
java.lang.InterruptedException,
java.io.IOException,
ObjectDoesNotExistException
getUsers() will retrieve the actual user information
and attributes for each user in the list from the system.
This method updates the list length.
AS400Exception - If the 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 system.
ObjectDoesNotExistException - If the object does not exist on the system.
ServerStartupException - If the server cannot be started.
UnknownHostException - If the system cannot be located.getLength(),
close()public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
listener - The listener.addPropertyChangeListener(java.beans.PropertyChangeListener)public void removeVetoableChangeListener(java.beans.VetoableChangeListener listener)
listener - The listener.addVetoableChangeListener(java.beans.VetoableChangeListener)
public void setGroupInfo(java.lang.String groupInfo)
throws java.beans.PropertyVetoException
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.
groupInfo - The group profile whose members are to be returned.
Possible values are:
java.beans.PropertyVetoException - If the change is vetoed.getGroupInfo()
public void setSystem(AS400 system)
throws java.beans.PropertyVetoException
system - The system.
java.beans.PropertyVetoException - If the property change is vetoed.getSystem()
public void setUserInfo(java.lang.String userInfo)
throws java.beans.PropertyVetoException
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.
java.beans.PropertyVetoException - If the change is vetoed.getUserInfo()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||