Serializable
public class UserList extends Object implements Serializable
Implementation note: This class internally uses the Open List APIs (such as QGYOLAUS).
User
,
UserGroup
,
Serialized FormModifier and Type | Field | Description |
---|---|---|
static String |
ALL |
Selection value indicating that the list contains all user profiles and group profiles.
|
static String |
GROUP |
Selection value indicating that the list contains only user profiles that are group profiles.
|
static String |
MEMBER |
Selection value indicating that the list contains only user profiles that are members of a specified group.
|
static String |
NOGROUP |
Selection value indicating that the list contains only user profiles that are not group profiles.
|
static String |
NONE |
Selection value indicating that no group profile is specified.
|
static String |
USER |
Selection value indicating that the list contains only user profiles that are not group profiles.
|
Constructor | Description |
---|---|
UserList() |
Constructs a UserList object.
|
UserList(AS400 system) |
Constructs a UserList object.
|
UserList(AS400 system,
String userInfo,
String groupInfo) |
Constructs a UserList object.
|
UserList(AS400 system,
String userInfo,
String groupInfo,
String userProfile) |
Constructs a UserList object.
|
Modifier and Type | Method | Description |
---|---|---|
void |
addPropertyChangeListener(PropertyChangeListener listener) |
Adds a PropertyChangeListener.
|
void |
addVetoableChangeListener(VetoableChangeListener listener) |
Adds a VetoableChangeListener.
|
void |
close() |
Closes the user list on the system.
|
protected void |
finalize() |
Closes the list on the system when this object is garbage collected.
|
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 object representing the system on which the users exist.
|
String |
getUserInfo() |
Returns the description of which users are returned.
|
String |
getUserProfile() |
Returns the user profile names of which users are returned.
|
Enumeration<User> |
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(PropertyChangeListener listener) |
Removes the PropertyChangeListener.
|
void |
removeVetoableChangeListener(VetoableChangeListener listener) |
Removes the VetoableChangeListener.
|
void |
setGroupInfo(String groupInfo) |
Sets the group profile whose members are to be returned.
|
void |
setSystem(AS400 system) |
Sets the system object representing the system on which the users exist.
|
void |
setUserInfo(String userInfo) |
Sets which users are returned.
|
void |
setUserProfile(String userProfile) |
Sets which profile names to include in the list.
|
public static final String ALL
public static final String USER
public static final String GROUP
public static final String MEMBER
public static final String NONE
public static final String NOGROUP
public UserList()
public UserList(AS400 system)
ALL
, the groupInfo parameter defaults to NONE
, and the userProfile parameter defaults to ALL
.system
- The system object representing the system on which the users exists.public UserList(AS400 system, String userInfo, String groupInfo)
ALL
.system
- The system object representing the system on which the users exists.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:
public UserList(AS400 system, String userInfo, String groupInfo, String userProfile)
system
- The system object representing the system on which the users exists.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:
userProfile
- The profile names to include in the list. Possible values are:
ALL
- All profiles are returned.
public void addPropertyChangeListener(PropertyChangeListener listener)
listener
- The listener.removePropertyChangeListener(java.beans.PropertyChangeListener)
public void addVetoableChangeListener(VetoableChangeListener listener)
listener
- The listener.removeVetoableChangeListener(java.beans.VetoableChangeListener)
public void close() throws AS400SecurityException, ErrorCompletingRequestException, InterruptedException, IOException, ObjectDoesNotExistException
AS400SecurityException
- If a security or authority error occurs.ErrorCompletingRequestException
- If an error occurs before the request is completed.InterruptedException
- If this thread is interrupted.IOException
- If an error occurs while communicating with the system.ObjectDoesNotExistException
- If the object does not exist on the system.load()
public String getGroupInfo()
public int getLength()
load()
.load()
public AS400 getSystem()
public 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.
public String getUserProfile()
ALL
- All profiles are returned.
public Enumeration<User> getUsers() throws AS400SecurityException, ErrorCompletingRequestException, InterruptedException, IOException, ObjectDoesNotExistException, RequestNotSupportedException
User
and/or UserGroup
objects.AS400SecurityException
- If a security or authority error occurs.ErrorCompletingRequestException
- If an error occurs before the request is completed.InterruptedException
- If this thread is interrupted.IOException
- If an error occurs while communicating with the system.ObjectDoesNotExistException
- If the system object does not exist.RequestNotSupportedException
- If the requested function is not supported because the system is not at the correct level.close()
,
load()
public User[] getUsers(int listOffset, int number) throws AS400SecurityException, ErrorCompletingRequestException, InterruptedException, IOException, ObjectDoesNotExistException
load()
is made (either implicitly or explicitly), then the users at a given list 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 in the list of users (0-based). This value must be greater than or equal to 0 and less than the list length; or specify -1 to retrieve all of the users.
Note: Prior to JTOpen 7.2, this parameter was incorrectly described.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
and/or UserGroup
objects. The length of this array may not necessarily be equal to number, depending upon the size of the list on the system, and the specified listOffset.AS400SecurityException
- If a security or authority error occurs.ErrorCompletingRequestException
- If an error occurs before the request is completed.InterruptedException
- If this thread is interrupted.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 AS400SecurityException, ErrorCompletingRequestException, InterruptedException, 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.
AS400SecurityException
- If a security or authority error occurs.ErrorCompletingRequestException
- If an error occurs before the request is completed.InterruptedException
- If this thread is interrupted.IOException
- If an error occurs while communicating with the system.ObjectDoesNotExistException
- If the object does not exist on the system.getLength()
,
close()
public void removePropertyChangeListener(PropertyChangeListener listener)
listener
- The listener object.public void removeVetoableChangeListener(VetoableChangeListener listener)
listener
- The listener object.public void setGroupInfo(String groupInfo) throws 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:
PropertyVetoException
- If any of the registered listeners vetos the property change.public void setSystem(AS400 system) throws PropertyVetoException
system
- The system object representing the system on which the users exists.PropertyVetoException
- If any of the registered listeners vetos the property change.public void setUserInfo(String userInfo) throws 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.
PropertyVetoException
- If any of the registered listeners vetos the property change.public void setUserProfile(String userProfile)
userProfile
- The profile names to include in the list. Possible values are:
ALL
- All profiles are returned.
Copyright © 2024. All rights reserved.