|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.jetspeed.security.spi.impl.ldap.AbstractLdapDao
Abstract ldap dao.
Field Summary | |
protected LdapContext |
ctx
Reference to remote server context |
protected String |
defaultDnSuffix
The default suffix. |
private String |
ldapServerName
The ldap server name. |
protected String |
rootContext
The root context. |
protected String |
rootDn
The root domain. |
protected String |
rootPassword
The root password. |
Constructor Summary | |
AbstractLdapDao()
Default constructor. |
|
AbstractLdapDao(String ldapServerName,
String rootDn,
String rootPassword,
String rootContext,
String defaultDnSuffix)
Initializes the dao. |
Method Summary | |
protected void |
bindToServer(String rootDn,
String rootPassword)
Binds to the ldap server. |
private String |
getFirstDnForUid(NamingEnumeration searchResults)
Gets the first matching user for the given uid. |
protected abstract String |
getObjectClass()
A template method that returns the LDAP object class of the concrete DAO. |
protected String |
getSubcontextName(String dn)
Gets the sub context name. |
String |
lookupByUid(String uid)
Searches the LDAP server for the user with the specified userid (uid attribute). |
protected NamingEnumeration |
searchByWildcardedUid(String filter,
SearchControls cons)
Search uid by wild card. |
protected SearchControls |
setSearchControls()
|
protected void |
validateDn(String dn)
Validate the domain name. |
protected void |
validatePassword(String password)
Valiate the users password. |
protected void |
validateUid(String uid)
Validate the uid. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private String ldapServerName
protected String rootDn
protected String rootPassword
protected String rootContext
protected String defaultDnSuffix
protected LdapContext ctx
Constructor Detail |
public AbstractLdapDao()
Default constructor.
public AbstractLdapDao(String ldapServerName, String rootDn, String rootPassword, String rootContext, String defaultDnSuffix) throws org.apache.jetspeed.security.SecurityException, NamingException
Initializes the dao.
ldapServerName
- The server name.rootDn
- The root domain.rootPassword
- The root password.rootContext
- The root context.defaultDnSuffix
- The default suffix.Method Detail |
protected void bindToServer(String rootDn, String rootPassword) throws org.apache.jetspeed.security.SecurityException, NamingException
Binds to the ldap server.
rootDn
- rootPassword
-
NamingException
org.apache.jetspeed.security.SecurityException
protected String getSubcontextName(String dn) throws NamingException
Gets the sub context name.
dn
- The domain name.
NamingException
protected void validateDn(String dn)
Validate the domain name.
dn
- The domain name.protected void validatePassword(String password)
Valiate the users password.
password
- The user.protected SearchControls setSearchControls()
public String lookupByUid(String uid) throws org.apache.jetspeed.security.SecurityException
Searches the LDAP server for the user with the specified userid (uid attribute).
org.apache.jetspeed.security.SecurityException
private String getFirstDnForUid(NamingEnumeration searchResults) throws NamingException
Gets the first matching user for the given uid.
searchResults
- The NamingEnumeration
.
NamingException
- Throws a NamingException
.protected void validateUid(String uid)
Validate the uid.
uid
- The uid.protected NamingEnumeration searchByWildcardedUid(String filter, SearchControls cons) throws NamingException
Search uid by wild card.
filter
- The filter.cons
- The SearchControls
NamingEnumeration
NamingException
- Throws a NamingEnumeration
.protected abstract String getObjectClass()
A template method that returns the LDAP object class of the concrete DAO.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |