netscape.ldap.beans
Class LDAPGetProperty
- Serializable
public class LDAPGetProperty
implements Serializable
Invisible Bean that just takes a name and password, host and
port, and directory base and attribute name, and returns an
attribute's values from a Directory Server. The values are
assumed to be strings, and are returned as an array. The
search has the scope "SUB", which means that it will find
an entry anywhere at or below the directory base.
Optionally, a client can register as a PropertyChangeListener
and will be notified when the values are available.
A null result means the property fetch failed. The reason is
available through getErrorCode(), which returns one of
the following:
OK
INVALID_PARAMETER
CONNECT_ERROR
AUTHENTICATION_ERROR
PROPERTY_NOT_FOUND
AMBIGUOUS_RESULTS
LDAPGetProperty() - Constructor with no parameters
|
LDAPGetProperty(String theHost, int thePort, String theBase) - Constructor with host, port, and base initializers
|
String | getAttribute() - Returns the name of the attribute to retrieve
|
String[] | getProperty() - Searches and returns values of a previously registered property,
using previously set parameters
|
void | getProperty(ActionEvent x)
|
String[] | getProperty(String host, int port, String base, String filter, String attribute) - Searches and returns values for a specified attribute
|
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 | setDNs(PropertyChangeEvent evt)
|
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 |
LDAPGetProperty
public LDAPGetProperty()
Constructor with no parameters
LDAPGetProperty
public LDAPGetProperty(String theHost,
int thePort,
String theBase)
Constructor with host, port, and base initializers
theHost
- host stringthePort
- port numbertheBase
- directory base string
getAttribute
public String getAttribute()
Returns the name of the attribute to retrieve
- attribute name to retrieve
getProperty
public String[] getProperty()
Searches and returns values of a previously registered property,
using previously set parameters
- Array of values for the property
getProperty
public void getProperty(ActionEvent x)
getProperty
public String[] getProperty(String host,
int port,
String base,
String filter,
String attribute)
Searches and returns values for a specified attribute
host
- host stringport
- port numberbase
- directory base stringfilter
- search filterattribute
- name of property to return values for
- Array of values for the property
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
setDNs
public void setDNs(PropertyChangeEvent evt)