|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.jetspeed.security.spi.impl.ldap.AbstractLdapDao
public abstract class AbstractLdapDao
Abstract ldap dao.
Field Summary | |
---|---|
protected LdapContext |
ctx
Reference to remote server context |
private LdapBindingConfig |
ldapBindingConfig
The ldap binding configuration. |
private static org.apache.commons.logging.Log |
logger
|
Constructor Summary | |
---|---|
AbstractLdapDao()
Default constructor. |
|
AbstractLdapDao(LdapBindingConfig ldapConfig)
Initializes the dao. |
Method Summary | |
---|---|
protected void |
bindToServer(String rootDn,
String rootPassword)
Binds to the ldap server. |
protected abstract String[] |
getAttributes()
|
protected abstract String |
getEntryPrefix()
A template method that returns the LDAP entry prefix of the concrete DAO. |
private String |
getFirstDnForUid(NamingEnumeration searchResults)
Gets the first matching user for the given uid. |
protected String[] |
getGroupAttributes()
|
protected String |
getGroupFilter()
Returns the default Group suffix dn. |
protected String |
getGroupFilterBase()
Returns the default Group suffix dn. |
protected String |
getGroupIdAttribute()
|
protected String |
getGroupMembershipAttribute()
|
protected String |
getGroupMembershipForRoleAttribute()
|
protected String[] |
getGroupObjectClasses()
Returns the default Group suffix dn. |
protected String |
getGroupObjectRequiredAttributeClasses()
|
protected String |
getGroupUidAttribute()
|
protected String[] |
getKnownAttributes()
|
protected abstract String[] |
getObjectClasses()
|
protected String[] |
getRoleAttributes()
|
protected String |
getRoleFilter()
Returns the default Group suffix dn. |
protected String |
getRoleFilterBase()
Returns the default Group suffix dn. |
protected String |
getRoleGroupMembershipForRoleAttribute()
|
protected String |
getRoleIdAttribute()
|
protected String |
getRoleMembershipAttribute()
|
protected String[] |
getRoleObjectClasses()
Returns the default Group suffix dn. |
protected String |
getRoleObjectRequiredAttributeClasses()
|
protected String |
getRoleUidAttribute()
|
protected String |
getRootContext()
Returns the root context. |
protected abstract String |
getSearchDomain()
The domain in wich to perform a search |
protected int |
getSearchScope()
|
protected abstract String |
getSearchSuffix()
A template method that returns the LDAP entry prefix of the concrete DAO. |
protected String |
getSubcontextName(String dn)
Gets the sub context name. |
protected String |
getUidAttribute()
|
protected String[] |
getUserAttributes()
|
protected String |
getUserFilter()
|
protected String |
getUserFilterBase()
Returns the default Group suffix dn. |
protected String |
getUserGroupMembershipAttribute()
|
protected String |
getUserIdAttribute()
|
protected String[] |
getUserObjectClasses()
|
protected String |
getUserPasswordAttribute()
|
protected String |
getUserRoleMembershipAttribute()
|
protected String |
getUserUidAttribute()
|
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 NamingEnumeration |
searchGroupByWildcardedUid(String filter,
SearchControls cons)
Search uid by wild card. |
protected NamingEnumeration |
searchRoleByWildcardedUid(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 static final org.apache.commons.logging.Log logger
private LdapBindingConfig ldapBindingConfig
protected LdapContext ctx
Constructor Detail |
---|
public AbstractLdapDao()
Default constructor.
public AbstractLdapDao(LdapBindingConfig ldapConfig) throws org.apache.jetspeed.security.SecurityException
Initializes the dao.
ldapConfig
- Holds the ldap configuration.
org.apache.jetspeed.security.SecurityException
Method Detail |
---|
protected void bindToServer(String rootDn, String rootPassword) throws org.apache.jetspeed.security.SecurityException
Binds to the ldap server.
rootDn
- rootPassword
-
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) throws org.apache.jetspeed.security.SecurityException
Validate the domain name.
dn
- The domain name.
org.apache.jetspeed.security.SecurityException
protected void validatePassword(String password) throws org.apache.jetspeed.security.SecurityException
Valiate the users password.
password
- The user.
org.apache.jetspeed.security.SecurityException
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) throws org.apache.jetspeed.security.SecurityException
Validate the uid.
uid
- The uid.
org.apache.jetspeed.security.SecurityException
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 NamingEnumeration searchGroupByWildcardedUid(String filter, SearchControls cons) throws NamingException
Search uid by wild card.
filter
- The filter.cons
- The SearchControls
NamingEnumeration
NamingException
- Throws a NamingEnumeration
.protected NamingEnumeration searchRoleByWildcardedUid(String filter, SearchControls cons) throws NamingException
Search uid by wild card.
filter
- The filter.cons
- The SearchControls
NamingEnumeration
NamingException
- Throws a NamingEnumeration
.protected String getGroupFilterBase()
Returns the default Group suffix dn.
protected String[] getGroupObjectClasses()
Returns the default Group suffix dn.
protected String getRoleFilterBase()
Returns the default Group suffix dn.
protected String[] getRoleObjectClasses()
Returns the default Group suffix dn.
protected String getUserFilterBase()
Returns the default Group suffix dn.
protected String getGroupFilter()
Returns the default Group suffix dn.
protected String getRoleFilter()
Returns the default Group suffix dn.
protected String getRootContext()
Returns the root context.
protected abstract String getEntryPrefix()
A template method that returns the LDAP entry prefix of the concrete DAO.
TODO : this should be in spring config
protected abstract String getSearchSuffix()
A template method that returns the LDAP entry prefix of the concrete DAO.
TODO : this should be in spring config
protected abstract String getSearchDomain()
The domain in wich to perform a search
TODO : this should be in spring config
protected String getUserFilter()
protected String[] getUserObjectClasses()
protected String getGroupMembershipAttribute()
protected String getUserGroupMembershipAttribute()
protected String getGroupMembershipForRoleAttribute()
protected String getRoleGroupMembershipForRoleAttribute()
protected String getRoleMembershipAttribute()
protected String getUserRoleMembershipAttribute()
protected String getRoleIdAttribute()
protected String getGroupIdAttribute()
protected String getUserIdAttribute()
protected String getUidAttribute()
protected int getSearchScope()
protected String getRoleUidAttribute()
protected String getGroupUidAttribute()
protected String getUserUidAttribute()
protected String getGroupObjectRequiredAttributeClasses()
protected String getRoleObjectRequiredAttributeClasses()
protected String[] getUserAttributes()
protected String[] getGroupAttributes()
protected String[] getRoleAttributes()
protected String getUserPasswordAttribute()
protected String[] getKnownAttributes()
protected abstract String[] getObjectClasses()
protected abstract String[] getAttributes()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |