org.apache.jetspeed.security.spi.impl.ldap
Class LdapGroupDaoImpl

java.lang.Object
  extended by org.apache.jetspeed.security.spi.impl.ldap.AbstractLdapDao
      extended by org.apache.jetspeed.security.spi.impl.ldap.LdapPrincipalDaoImpl
          extended by org.apache.jetspeed.security.spi.impl.ldap.LdapGroupDaoImpl
All Implemented Interfaces:
LdapPrincipalDao, LdapReadOnlyPrincipalDao

public class LdapGroupDaoImpl
extends LdapPrincipalDaoImpl

DAO for handling group objects.

Author:
Mike Long , David Le Strat

Field Summary
 
Fields inherited from class org.apache.jetspeed.security.spi.impl.ldap.AbstractLdapDao
ctx
 
Constructor Summary
LdapGroupDaoImpl()
           Default constructor.
LdapGroupDaoImpl(LdapBindingConfig ldapConfig)
           Initializes the dao.
 
Method Summary
protected  Attributes defineLdapAttributes(String principalUid)
           A template method for defining the attributes for a particular LDAP class.
protected  String[] getAttributes()
           
protected  String getDnSuffix()
           Builds the dn suffix.
protected  String getEntryPrefix()
           A template method that returns the LDAP entry prefix of the concrete DAO.
protected  String[] getObjectClasses()
           
protected  String getSearchDomain()
           The domain in wich to perform a search
protected  String getSearchSuffix()
           A template method that returns the LDAP entry prefix of the concrete DAO.
protected  String getUidAttributeForPrincipal()
           Builds the dn suffix.
protected  Principal makePrincipal(String principalUid)
           Creates a GroupPrincipal object.
 
Methods inherited from class org.apache.jetspeed.security.spi.impl.ldap.LdapPrincipalDaoImpl
convertUidToLdapAcceptableName, create, delete, find, getAttribute, getGroupDN, getGroupDN, getRoleDN, getRoleDN, getUserDN, getUserDN, parseAttr
 
Methods inherited from class org.apache.jetspeed.security.spi.impl.ldap.AbstractLdapDao
bindToServer, getGroupAttributes, getGroupFilter, getGroupFilterBase, getGroupIdAttribute, getGroupMembershipAttribute, getGroupMembershipForRoleAttribute, getGroupObjectClasses, getGroupObjectRequiredAttributeClasses, getGroupUidAttribute, getKnownAttributes, getRoleAttributes, getRoleFilter, getRoleFilterBase, getRoleGroupMembershipForRoleAttribute, getRoleIdAttribute, getRoleMembershipAttribute, getRoleObjectClasses, getRoleObjectRequiredAttributeClasses, getRoleUidAttribute, getRootContext, getSearchScope, getSubcontextName, getUidAttribute, getUserAttributes, getUserFilter, getUserFilterBase, getUserGroupMembershipAttribute, getUserIdAttribute, getUserObjectClasses, getUserPasswordAttribute, getUserRoleMembershipAttribute, getUserUidAttribute, lookupByUid, searchByWildcardedUid, searchGroupByWildcardedUid, searchRoleByWildcardedUid, 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
 

Constructor Detail

LdapGroupDaoImpl

public LdapGroupDaoImpl()
                 throws org.apache.jetspeed.security.SecurityException

Default constructor.

Throws:
org.apache.jetspeed.security.SecurityException - A SecurityException.

LdapGroupDaoImpl

public LdapGroupDaoImpl(LdapBindingConfig ldapConfig)
                 throws org.apache.jetspeed.security.SecurityException

Initializes the dao.

Parameters:
ldapConfig - Holds the ldap binding configuration.
Throws:
org.apache.jetspeed.security.SecurityException - A SecurityException.
Method Detail

defineLdapAttributes

protected Attributes defineLdapAttributes(String principalUid)

A template method for defining the attributes for a particular LDAP class.

Specified by:
defineLdapAttributes in class LdapPrincipalDaoImpl
Parameters:
principalUid - The principal uid.
Returns:
The LDAP attributes object for the particular class.

getDnSuffix

protected String getDnSuffix()
Description copied from class: LdapPrincipalDaoImpl

Builds the dn suffix.

Specified by:
getDnSuffix in class LdapPrincipalDaoImpl
Returns:
The dn suffix.
See Also:
LdapPrincipalDaoImpl.getDnSuffix()

makePrincipal

protected Principal makePrincipal(String principalUid)

Creates a GroupPrincipal object.

Specified by:
makePrincipal in class LdapPrincipalDaoImpl
Parameters:
principalUid - The principal uid.
Returns:
A group principal object.

getEntryPrefix

protected String getEntryPrefix()
Description copied from class: AbstractLdapDao

A template method that returns the LDAP entry prefix of the concrete DAO.

TODO : this should be in spring config

Specified by:
getEntryPrefix in class AbstractLdapDao
Returns:
a String containing the LDAP entry prefix name.

getSearchSuffix

protected String getSearchSuffix()
Description copied from class: AbstractLdapDao

A template method that returns the LDAP entry prefix of the concrete DAO.

TODO : this should be in spring config

Specified by:
getSearchSuffix in class AbstractLdapDao
Returns:
a String containing the LDAP entry prefix name.

getSearchDomain

protected String getSearchDomain()
Description copied from class: AbstractLdapDao

The domain in wich to perform a search

TODO : this should be in spring config

Overrides:
getSearchDomain in class LdapPrincipalDaoImpl
Returns:
a String containing the LDAP entry prefix name.

getObjectClasses

protected String[] getObjectClasses()
Specified by:
getObjectClasses in class AbstractLdapDao

getUidAttributeForPrincipal

protected String getUidAttributeForPrincipal()
Description copied from class: LdapPrincipalDaoImpl

Builds the dn suffix.

Specified by:
getUidAttributeForPrincipal in class LdapPrincipalDaoImpl
Returns:
The dn suffix.

getAttributes

protected String[] getAttributes()
Specified by:
getAttributes in class AbstractLdapDao


Copyright © 1999-2007 Apache Software Foundation. All Rights Reserved.