public class DirectoryEntryList
extends java.lang.Object
By default, all entries are returned as if by calling addSelection(DirectoryEntryList.USER_PROFILE, "*").
AS400 system = new AS400(); DirectoryEntryList list = new DirectoryEntryList(system); // Retrieves all of the entries that map to user profiles that begin with the letter 'B'. list.addSelection(DirectoryEntryList.USER_PROFILE, "B*"); DirectoryEntry[] entries = list.getEntries();
Here is an example of using selection IDs:
AS400 system = new AS400(); DirectoryEntryList list = new DirectoryEntryList(system); list.addSelection(DirectoryEntryList.LAST_NAME, "SMITH"); list.addSelection(DirectoryEntryList.FIRST_NAME, "C*"); list.setKey(DirectoryEntryList.FIRST_NAME); // Set the primary sort to be the first name field. DirectoryEntry[] entries = list.getEntries();
DirectoryEntry
,
User
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ADDRESS1
Constant used to filter the list of directory entries by mailing address.
|
static java.lang.String |
ADDRESS2
Constant used to filter the list of directory entries by mailing address.
|
static java.lang.String |
ADDRESS3
Constant used to filter the list of directory entries by mailing address.
|
static java.lang.String |
ADDRESS4
Constant used to filter the list of directory entries by mailing address.
|
static java.lang.String |
BUILDING
Constant used to filter the list of directory entries by building.
|
static java.lang.String |
COMPANY
Constant used to filter the list of directory entries by company.
|
static java.lang.String |
DEPARTMENT
Constant used to filter the list of directory entries by department.
|
static java.lang.String |
FAX
Constant used to filter the list of directory entries by fax number.
|
static java.lang.String |
FIRST_NAME
Constant used to filter the list of directory entries by first name.
|
static java.lang.String |
FIRST_OR_PREFERRED_NAME
Constant used to filter the list of directory entries by first or preferred name.
|
static java.lang.String |
FULL_NAME
Constant used to filter the list of directory entries by full name.
|
static java.lang.String |
JOB_TITLE
Constant used to filter the list of directory entries by job title.
|
static java.lang.String |
LAST_NAME
Constant used to filter the list of directory entries by last name.
|
static java.lang.String |
LOCATION
Constant used to filter the list of directory entries by location.
|
static java.lang.String |
MIDDLE_NAME
Constant used to filter the list of directory entries by middle name.
|
static java.lang.String |
NETWORK_USER_ID
Constant used to filter the list of directory entries by network user ID.
|
static java.lang.String |
OFFICE
Constant used to filter the list of directory entries by office.
|
static java.lang.String |
PREFERRED_NAME
Constant used to filter the list of directory entries by preferred name.
|
static java.lang.String |
SYSTEM_GROUP
Constant used to filter the list of directory entries by system group.
|
static java.lang.String |
SYSTEM_NAME
Constant used to filter the list of directory entries by system name.
|
static java.lang.String |
TELEPHONE1
Constant used to filter the list of directory entries by telephone number.
|
static java.lang.String |
TELEPHONE2
Constant used to filter the list of directory entries by telephone number.
|
static java.lang.String |
TEXT
Constant used to filter the list of directory entries by text description.
|
static java.lang.String |
USER_ADDRESS
Constant used to filter the list of directory entries by directory entry user address.
|
static java.lang.String |
USER_DESCRIPTION
Constant used to filter the list of directory entries by user description.
|
static java.lang.String |
USER_ID
Constant used to filter the list of directory entries by directory entry user ID.
|
static java.lang.String |
USER_PROFILE
Constant used to filter the list of directory entries by user profile name.
|
Constructor and Description |
---|
DirectoryEntryList(AS400 system)
Constructs a DirectoryEntryList.
|
Modifier and Type | Method and Description |
---|---|
void |
addSelection(java.lang.String selectionID,
java.lang.String value)
Adds a value used to filter the list of directory entries returned by
getEntries() . |
void |
clearSelection()
Removes all selection IDs and values that were previously added by
addSelection() . |
DirectoryEntry[] |
getEntries()
Retrieves the directory entry information from the system.
|
java.lang.String |
getKey()
Returns the primary selection ID used when searching the system distribution directory.
|
AS400 |
getSystem()
Returns the system.
|
void |
setKey(java.lang.String selectionID)
Sets the primary selection ID used when searching the system distribution directory.
|
void |
setSystem(AS400 system)
Sets the system.
|
public static final java.lang.String ADDRESS1
public static final java.lang.String ADDRESS2
public static final java.lang.String ADDRESS3
public static final java.lang.String ADDRESS4
public static final java.lang.String BUILDING
public static final java.lang.String COMPANY
public static final java.lang.String DEPARTMENT
public static final java.lang.String FAX
public static final java.lang.String FIRST_NAME
public static final java.lang.String FIRST_OR_PREFERRED_NAME
public static final java.lang.String FULL_NAME
public static final java.lang.String JOB_TITLE
public static final java.lang.String LAST_NAME
public static final java.lang.String LOCATION
public static final java.lang.String MIDDLE_NAME
public static final java.lang.String NETWORK_USER_ID
public static final java.lang.String OFFICE
public static final java.lang.String PREFERRED_NAME
public static final java.lang.String SYSTEM_GROUP
public static final java.lang.String SYSTEM_NAME
public static final java.lang.String TELEPHONE1
public static final java.lang.String TELEPHONE2
public static final java.lang.String TEXT
public static final java.lang.String USER_ADDRESS
public static final java.lang.String USER_DESCRIPTION
public static final java.lang.String USER_ID
public static final java.lang.String USER_PROFILE
public DirectoryEntryList(AS400 system)
system
- The system.public void addSelection(java.lang.String selectionID, java.lang.String value)
getEntries()
.
See the list of constants in this class for some possible selection IDs. Other selection IDs
can be used, if they are allowed by the QOKSCHD system API.
If the specified selectionID has already been added, then the specified value will override
the previously added value.selectionID
- The selectionID, e.g. LAST_NAME
or USER_PROFILE
.value
- The value used as the filter for the specified selectionID, e.g. "SMITH" or "A*".
The asterisk '*' is allowed as a wildcard character.clearSelection()
,
setKey(java.lang.String)
public void clearSelection()
addSelection()
.
This also clears the key.public DirectoryEntry[] getEntries() throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, java.lang.InterruptedException, java.io.IOException, ObjectDoesNotExistException
AS400Exception
- If an error occurs.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.public java.lang.String getKey()
addSelection()
then it has no effect on how the list is sorted when returned by getEntries()
.
If no key has been set, then the first entry added via addSelection() is used.
setKey(java.lang.String)
public AS400 getSystem()
setSystem(com.ibm.as400.access.AS400)
public void setKey(java.lang.String selectionID)
addSelection()
then it has no effect on how the list is sorted when returned by getEntries()
.
If no key has been set, then the first entry added via addSelection() is used.
selectionID
- addSelection(java.lang.String, java.lang.String)
,
getKey()
public void setSystem(AS400 system)
system
- The new system.getSystem()