|
|||||||||||
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
org.apache.jetspeed.security.spi.impl.ldap.LdapPrincipalDaoImpl
LdapPrincipalDao
Field Summary | |
private static org.apache.commons.logging.Log |
LOG
The logger. |
protected static String |
UID_ATTR_NAME
The uid attribute name. |
Fields inherited from class org.apache.jetspeed.security.spi.impl.ldap.AbstractLdapDao |
ctx, defaultDnSuffix, rootContext, rootDn, rootPassword |
Constructor Summary | |
LdapPrincipalDaoImpl()
Default constructor. |
|
LdapPrincipalDaoImpl(String ldapServerName,
String rootDn,
String rootPassword,
String rootContext,
String defaultDnSuffix)
Initializes the dao. |
Method Summary | |
private void |
buildPrincipal(Collection principals,
SearchResult searchResult)
|
private Principal[] |
convertPrincipalListToArray(Collection principals)
Converts a list of principals to an array of principals. |
protected String |
convertUidFromLdapAcceptableName(String uid)
Convert the uid back from the ldap acceptable name. |
protected String |
convertUidToLdapAcceptableName(String uid)
Converts the uid to an ldap acceptable name. |
void |
create(String principalUid)
Makes a new ldap entry for the specified principal. |
protected abstract Attributes |
defineLdapAttributes(String principalUid)
A template method for defining the attributes for a particular LDAP class. |
void |
delete(String principalUid)
Deletes a ldap entry for the specified principal. |
private void |
enumerateOverSearchResults(NamingEnumeration searchResults,
Collection principals)
Build the user principal by enumerating through the search results. |
Principal[] |
find(String principalUid)
Search the ldap directory for the principal. |
protected Attribute |
getAttribute(String attributeName,
Attributes userAttributes)
|
protected abstract Principal |
makePrincipal(String principalUid)
A template method for creating a concrete principal object. |
Methods inherited from class org.apache.jetspeed.security.spi.impl.ldap.AbstractLdapDao |
bindToServer, getObjectClass, getSubcontextName, lookupByUid, searchByWildcardedUid, setSearchControls, validateDn, validatePassword, validateUid |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.jetspeed.security.spi.impl.ldap.LdapReadOnlyPrincipalDao |
lookupByUid |
Field Detail |
private static final org.apache.commons.logging.Log LOG
protected static final String UID_ATTR_NAME
Constructor Detail |
public LdapPrincipalDaoImpl() throws NamingException, org.apache.jetspeed.security.SecurityException
Default constructor.
NamingException
- A NamingException
.
org.apache.jetspeed.security.SecurityException
- A SecurityException
.public LdapPrincipalDaoImpl(String ldapServerName, String rootDn, String rootPassword, String rootContext, String defaultDnSuffix) throws NamingException, org.apache.jetspeed.security.SecurityException
Initializes the dao.
ldapServerName
- The server name.rootDn
- The root domain.rootPassword
- The root password.rootContext
- The root context.defaultDnSuffix
- The default suffix.
NamingException
- A NamingException
.
org.apache.jetspeed.security.SecurityException
- A SecurityException
.Method Detail |
protected abstract Principal makePrincipal(String principalUid)
A template method for creating a concrete principal object.
principalUid
- The principal uid.
protected abstract Attributes defineLdapAttributes(String principalUid)
A template method for defining the attributes for a particular LDAP class.
principalUid
- The principal uid.
public void create(String principalUid) throws org.apache.jetspeed.security.SecurityException
LdapPrincipalDao
Makes a new ldap entry for the specified principal.
create
in interface LdapPrincipalDao
principalUid
- The principal uid.
org.apache.jetspeed.security.SecurityException
- Throws a SecurityException
.LdapPrincipalDao.create(java.lang.String)
public void delete(String principalUid) throws org.apache.jetspeed.security.SecurityException
LdapPrincipalDao
Deletes a ldap entry for the specified principal.
delete
in interface LdapPrincipalDao
principalUid
- The principal uid.
org.apache.jetspeed.security.SecurityException
- Throws a SecurityException
.LdapPrincipalDao.delete(java.lang.String)
protected String convertUidToLdapAcceptableName(String uid)
Converts the uid to an ldap acceptable name.
uid
- The uid.
protected String convertUidFromLdapAcceptableName(String uid)
Convert the uid back from the ldap acceptable name.
uid
- The uid.
public Principal[] find(String principalUid) throws org.apache.jetspeed.security.SecurityException
LdapPrincipalDao
Search the ldap directory for the principal.
find
in interface LdapPrincipalDao
principalUid
- The uid value of the principal. If empty this method
org.apache.jetspeed.security.SecurityException
LdapPrincipalDao.find(java.lang.String)
private Principal[] convertPrincipalListToArray(Collection principals)
Converts a list of principals to an array of principals.
principals
- The list of principals.
private void enumerateOverSearchResults(NamingEnumeration searchResults, Collection principals) throws NamingException
Build the user principal by enumerating through the search results.
searchResults
- The NamingEnumeration
of results.principals
- The collection of user principals.
NamingException
- Throws a NamingException
.private void buildPrincipal(Collection principals, SearchResult searchResult) throws NamingException
principals
- The collection of principals.searchResult
- The SearchResult
NamingException
- Throws a NamingException
.protected Attribute getAttribute(String attributeName, Attributes userAttributes) throws NamingException
attributeName
- The attribute name.userAttributes
- The user Attributes
.
Attribute
.
NamingException
- Throws a NamingException
.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |