netscape.ldap.beans
Class LDAPGetEntries
- Serializable
public class LDAPGetEntries
implements Serializable
Invisible Bean that just takes a host, port, directory base,
search string, and optional authentication name and password,
and returns a list of all matching DNs. The search has the scope
"SUB", which means that it will find an entry anywhere at or
below the directory base, unless a different scope is specified.
Optionally, a client can register as a PropertyChangeListener
and will be notified when the values are available.
A null result means no matching DNs were found. The reason is
available through getErrorCode(), which returns one of
the following:
OK
INVALID_PARAMETER
CONNECT_ERROR
AUTHENTICATION_ERROR
PROPERTY_NOT_FOUND
AMBIGUOUS_RESULTS
LDAPGetEntries()- Constructor with no parameters
|
LDAPGetEntries(String theHost, int thePort, String theBase)- Constructor with host, port, and base initializers
|
LDAPGetEntries(String theHost, int thePort, String theBase, int theScope)- Constructor with host, port, base, and scope initializers
|
String | getAttribute()- Returns the name of the attribute to retrieve
|
String[] | getEntries()- Searches and returns values of a previously registered property,
using previously set parameters
|
void | getEntries(ActionEvent x)
|
String[] | getEntries(String host, int port, String base, int scope, String filter)- Searches and returns values for a specified attribute
|
String[] | getEntries(String host, int port, String base, int scope, String userid, String userName)- Searches and returns values for a specified attribute
|
String | getResultString()
|
static void | main(args[] )- The main body if we run it as application instead of applet.
|
void | setAttribute(String attr)- Sets the attribute to retrieve
|
void | setResultString(String sNewValue)
|
addPropertyChangeListener, connect, convertToString, firePropertyChange, getAuthDN, getAuthPassword, getBase, getDebug, getErrorCode, getFilter, getHost, getPort, getScope, getUserID, getUserName, printDebug, removePropertyChangeListener, setAuthDN, setAuthPassword, setBase, setDebug, setDefaultReferralCredentials, setErrorCode, setFilter, setHost, setPort, setScope, setUserID, setUserName |
LDAPGetEntries
public LDAPGetEntries()
Constructor with no parameters
LDAPGetEntries
public LDAPGetEntries(String theHost,
int thePort,
String theBase) Constructor with host, port, and base initializers
theHost - host stringthePort - port numbertheBase - directory base string
LDAPGetEntries
public LDAPGetEntries(String theHost,
int thePort,
String theBase,
int theScope) Constructor with host, port, base, and scope initializers
theHost - host stringthePort - port numbertheBase - directory base stringtheScope - one of LDAPConnection.SCOPE_BASE,
LDAPConnection.SCOPE_SUB, LDAPConnection.SCOPE_ONE
getAttribute
public String getAttribute()
Returns the name of the attribute to retrieve
- attribute name to retrieve
getEntries
public String[] getEntries()
Searches and returns values of a previously registered property,
using previously set parameters
- Array of values for the property
getEntries
public void getEntries(ActionEvent x)
getEntries
public String[] getEntries(String host,
int port,
String base,
int scope,
String filter) Searches and returns values for a specified attribute
host - host stringport - port numberbase - directory base stringscope - one of LDAPConnection.SCOPE_BASE,
LDAPConnection.SCOPE_SUB, LDAPConnection.SCOPE_ONEfilter - search filter
- Array of values for the property
getEntries
public String[] getEntries(String host,
int port,
String base,
int scope,
String userid,
String userName) Searches and returns values for a specified attribute
host - host stringport - port numberbase - directory base stringscope - one of LDAPConnection.SCOPE_BASE,
LDAPConnection.SCOPE_SUB, LDAPConnection.SCOPE_ONEuserid - The user iduserName - The user name
getResultString
public String getResultString()
main
public static void main(args[] )
The main body if we run it as application instead of applet.
setAttribute
public void setAttribute(String attr)
Sets the attribute to retrieve
setResultString
public void setResultString(String sNewValue)