public class DirectoryEntryList extends 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 | Description |
---|---|---|
static String |
ADDRESS1 |
Constant used to filter the list of directory entries by mailing address.
|
static String |
ADDRESS2 |
Constant used to filter the list of directory entries by mailing address.
|
static String |
ADDRESS3 |
Constant used to filter the list of directory entries by mailing address.
|
static String |
ADDRESS4 |
Constant used to filter the list of directory entries by mailing address.
|
static String |
BUILDING |
Constant used to filter the list of directory entries by building.
|
static String |
COMPANY |
Constant used to filter the list of directory entries by company.
|
static String |
DEPARTMENT |
Constant used to filter the list of directory entries by department.
|
static String |
FAX |
Constant used to filter the list of directory entries by fax number.
|
static String |
FIRST_NAME |
Constant used to filter the list of directory entries by first name.
|
static String |
FIRST_OR_PREFERRED_NAME |
Constant used to filter the list of directory entries by first or preferred name.
|
static String |
FULL_NAME |
Constant used to filter the list of directory entries by full name.
|
static String |
JOB_TITLE |
Constant used to filter the list of directory entries by job title.
|
static String |
LAST_NAME |
Constant used to filter the list of directory entries by last name.
|
static String |
LOCATION |
Constant used to filter the list of directory entries by location.
|
static String |
MIDDLE_NAME |
Constant used to filter the list of directory entries by middle name.
|
static String |
NETWORK_USER_ID |
Constant used to filter the list of directory entries by network user ID.
|
static String |
OFFICE |
Constant used to filter the list of directory entries by office.
|
static String |
PREFERRED_NAME |
Constant used to filter the list of directory entries by preferred name.
|
static String |
SYSTEM_GROUP |
Constant used to filter the list of directory entries by system group.
|
static String |
SYSTEM_NAME |
Constant used to filter the list of directory entries by system name.
|
static String |
TELEPHONE1 |
Constant used to filter the list of directory entries by telephone number.
|
static String |
TELEPHONE2 |
Constant used to filter the list of directory entries by telephone number.
|
static String |
TEXT |
Constant used to filter the list of directory entries by text description.
|
static String |
USER_ADDRESS |
Constant used to filter the list of directory entries by directory entry user address.
|
static String |
USER_DESCRIPTION |
Constant used to filter the list of directory entries by user description.
|
static String |
USER_ID |
Constant used to filter the list of directory entries by directory entry user ID.
|
static String |
USER_PROFILE |
Constant used to filter the list of directory entries by user profile name.
|
Constructor | Description |
---|---|
DirectoryEntryList(AS400 system) |
Constructs a DirectoryEntryList.
|
Modifier and Type | Method | Description |
---|---|---|
void |
addSelection(String selectionID,
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.
|
String |
getKey() |
Returns the primary selection ID used when searching the system distribution directory.
|
AS400 |
getSystem() |
Returns the system.
|
void |
setKey(String selectionID) |
Sets the primary selection ID used when searching the system distribution directory.
|
void |
setSystem(AS400 system) |
Sets the system.
|
public static final String ADDRESS1
public static final String ADDRESS2
public static final String ADDRESS3
public static final String ADDRESS4
public static final String BUILDING
public static final String COMPANY
DirectoryEntry.getCompany()
,
Constant Field Valuespublic static final String DEPARTMENT
public static final String FAX
public static final String FIRST_NAME
public static final String FIRST_OR_PREFERRED_NAME
public static final String FULL_NAME
public static final String JOB_TITLE
public static final String LAST_NAME
public static final String LOCATION
public static final String MIDDLE_NAME
public static final String NETWORK_USER_ID
public static final String OFFICE
DirectoryEntry.getOffice()
,
Constant Field Valuespublic static final String PREFERRED_NAME
public static final String SYSTEM_GROUP
public static final String SYSTEM_NAME
public static final String TELEPHONE1
public static final String TELEPHONE2
public static final String TEXT
DirectoryEntry.getText()
,
Constant Field Valuespublic static final String USER_ADDRESS
public static final String USER_DESCRIPTION
public static final String USER_ID
DirectoryEntry.getUserID()
,
Constant Field Valuespublic static final String USER_PROFILE
public DirectoryEntryList(AS400 system)
system
- The system.public void addSelection(String selectionID, 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, InterruptedException, 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.InterruptedException
- If this thread is interrupted.IOException
- If an error occurs while communicating with the system.ObjectDoesNotExistException
- If the object does not exist.public 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(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()
Copyright © 2024. All rights reserved.