|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.as400.resource.ResourceList | +--com.ibm.as400.resource.BufferedResourceList | +--com.ibm.as400.resource.SystemResourceList | +--com.ibm.as400.resource.RUserList
The RUserList class represents a list of AS/400 users.
The following selection IDs are supported:
Use one or more of these selection IDs with
getSelectionValue()
and setSelectionValue()
to access the selection values for an RUserList.
RUserList objects generate RUser objects.
// Create an RUserList object to represent a list of users.
AS400 system = new AS400("MYSYSTEM", "MYUSERID", "MYPASSWORD");
RUserList userList = new RUserList(system);
// Set the selection so that only user profiles
// that are group profiles are included in the list.
userList.setSelectionValue(RUserList.SELECTION_CRITERIA, RUserList.GROUP);
// Open the list and wait for it to complete.
userList.open();
userList.waitForComplete();
// Read and print the user profile names and text
// descriptions for the users in the list.
long numberOfUsers = userList.getListLength();
for(long i = 0; i < numberOfUsers; ++i)
{
RUser user = (RUser)userList.resourceAt(i);
System.out.println(user.getAttributeValue(RUser.USER_PROFILE_NAME));
System.out.println(user.getAttributeValue(RUser.TEXT_DESCRIPTION));
System.out.println();
}
// Close the list.
userList.close();
RUser
, 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 |
GROUP_PROFILE
Selection ID for group profile. |
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 |
SELECTION_CRITERIA
Selection ID for selection criteria. |
static java.lang.String |
USER
Selection value indicating that the list contains only user profiles that are not group profiles. |
static java.lang.String |
USER_PROFILE
Selection ID for user profile. |
Constructor Summary | |
RUserList()
Constructs an RUserList object. |
|
RUserList(AS400 system)
Constructs an RUserList object. |
Method Summary | |
protected void |
establishConnection()
Establishes the connection to the AS/400. |
Methods inherited from class com.ibm.as400.resource.SystemResourceList |
close, isBidiEnabled, isResourceAvailable, open, refreshContents, refreshStatus, resourceAt, setSelectionValue, waitForComplete, waitForResource |
Methods inherited from class com.ibm.as400.resource.BufferedResourceList |
fireResourceAdded, getNumberOfPages, getPageSize, setNumberOfPages, setPageSize |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, 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
public static final java.lang.String SELECTION_CRITERIA
public static final java.lang.String GROUP_PROFILE
This must be set to a group profile name or NOGROUP if SELECTION_CRITERIA is set to MEMBER. This must be set to NONE if SELECTION_CRITERIA is not set to MEMBER.
public static final java.lang.String USER_PROFILE
Constructor Detail |
public RUserList()
public RUserList(AS400 system)
system
- The system.Method Detail |
protected void establishConnection() throws ResourceException
The method is called by the resource framework automatically when the connection needs to be established.
establishConnection
in class ResourceList
ResourceException
- If an error occurs.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |