netscape.ldap.beans
Class LDAPIsMember
- Serializable
public class LDAPIsMember
implements Serializable
Invisible Bean that just takes a host and port, optional
authentication name and password, and DN of a group and another DN
which might be a member of the group, and returns true or
false, depending on whether the second DN is a member of the first.
Also handles the case of dynamic groups by derefencing the URL
and searching for membership based on the url search.
It doesn't handle nested groups.
A false result means the member could not be identified as
belonging to the group. The exact reason is
available through getErrorCode(), which returns one of
the following:
OK
INVALID_PARAMETER
CONNECT_ERROR
AUTHENTICATION_ERROR
PROPERTY_NOT_FOUND
AMBIGUOUS_RESULTS
NO_SUCH_OBJECT
LDAPIsMember() - Constructor with no parameters
|
LDAPIsMember(String host, int port, String group) - Constructor with host, port, and group DN initializers
|
LDAPIsMember(String host, int port, String dn, String password, String theGroup) - Constructor with host, port, authentication DN and password
and group DN initializers
|
String | getGroup() - Returns the distinguished name of the group
|
String | getMember() - Returns the distinguished name of the member
|
boolean | isMember() - Checks if an entity (specified by distinguished name) is a
member of a particular group (specified by distinguished name)
|
void | isMember(ActionEvent e) - Checks if an entity (specified by distinguished name) is a
member of a particular group (specified by distinguished name)
|
boolean | isMember(String host, int port, String dn, String password, String group, String member) - Checks if an entity (specified by distinguished name) is a
member of a particular group (specified by distinguished name)
|
static void | main(args[] ) - The main body if we run it as application instead of applet.
|
void | setGroup(String group) - Sets the distinguished name of the group
|
void | setMember(String member) - Sets the distinguished name of the member
|
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 |
AMBIGUOUS_RESULTS
public static final int AMBIGUOUS_RESULTS
AUTHENTICATION_ERROR
public static final int AUTHENTICATION_ERROR
CONNECT_ERROR
public static final int CONNECT_ERROR
INVALID_PARAMETER
public static final int INVALID_PARAMETER
NO_SUCH_OBJECT
public static final int NO_SUCH_OBJECT
OK
public static final int OK
PROPERTY_NOT_FOUND
public static final int PROPERTY_NOT_FOUND
LDAPIsMember
public LDAPIsMember()
Constructor with no parameters
LDAPIsMember
public LDAPIsMember(String host,
int port,
String group)
Constructor with host, port, and group DN initializers
host
- host stringport
- port numbergroup
- distinguished name of the group
LDAPIsMember
public LDAPIsMember(String host,
int port,
String dn,
String password,
String theGroup)
Constructor with host, port, authentication DN and password
and group DN initializers
host
- host stringport
- port numberdn
- fully qualified distinguished name to authenticatepassword
- password for authenticating the dntheGroup
- distinguished name of the group
getGroup
public String getGroup()
Returns the distinguished name of the group
getMember
public String getMember()
Returns the distinguished name of the member
isMember
public boolean isMember()
Checks if an entity (specified by distinguished name) is a
member of a particular group (specified by distinguished name)
- true if the specified member belongs to the group
isMember
public void isMember(ActionEvent e)
Checks if an entity (specified by distinguished name) is a
member of a particular group (specified by distinguished name)
isMember
public boolean isMember(String host,
int port,
String dn,
String password,
String group,
String member)
Checks if an entity (specified by distinguished name) is a
member of a particular group (specified by distinguished name)
host
- host stringport
- port numberdn
- fully qualified distinguished name to authenticate;
can be null or ""password
- password for authenticating the dn; can be null
or ""group
- distinguished name of the groupmember
- distinguished name of member to be checked
- true if the specified member belongs to the group
main
public static void main(args[] )
The main body if we run it as application instead of applet.
setGroup
public void setGroup(String group)
Sets the distinguished name of the group
setMember
public void setMember(String member)
Sets the distinguished name of the member