com.atlassian.user.impl.ldap.adaptor
Class AbstractLDAPGroupAdaptor
java.lang.Object
com.atlassian.user.impl.ldap.adaptor.AbstractLDAPGroupAdaptor
- All Implemented Interfaces:
- LDAPGroupAdaptor
- Direct Known Subclasses:
- LDAPDynamicGroupAdaptor, LDAPStaticGroupAdaptor
- public abstract class AbstractLDAPGroupAdaptor
- extends java.lang.Object
- implements LDAPGroupAdaptor
Method Summary |
protected net.sf.ldaptemplate.support.filter.Filter |
constructGroupSearchFilter(java.lang.String name)
|
protected net.sf.ldaptemplate.support.filter.Filter |
constructGroupSearchFilter(java.lang.String name,
net.sf.ldaptemplate.support.filter.Filter patternToAnd)
|
protected java.lang.String |
getFirstPhraseFromDN(java.lang.String dn)
Extracts the username from the first occurrence of the username attribute
For example,
CN=ldapusera,CN=Users,DC=atlassian,DC=private
|
Group |
getGroup(java.lang.String name)
|
java.lang.String |
getGroupDN(Group group)
|
java.lang.String |
getGroupDN(java.lang.String groupName)
|
LDAPPagerInfo |
getGroupEntries()
|
LDAPPagerInfo |
getGroupEntries(java.lang.String groupName)
If groupName is null , returns all groups. |
LDAPPagerInfo |
getGroupEntries(java.lang.String[] attributesToReturn,
net.sf.ldaptemplate.support.filter.Filter additionalSearchFilter)
|
LDAPPagerInfo |
getGroupEntries(java.lang.String groupName,
java.lang.String[] attributesToReturn,
net.sf.ldaptemplate.support.filter.Filter additionalSearchFilter)
|
LDAPGroupFactory |
getGroupFactory()
|
Pager |
getGroups()
|
LDAPPagerInfo |
search(net.sf.ldaptemplate.support.filter.Filter searchFilter)
|
LDAPPagerInfo |
search(net.sf.ldaptemplate.support.filter.Filter filter,
java.lang.String[] attributesToReturn)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
log
protected final org.apache.log4j.Logger log
searchProperties
protected final LdapSearchProperties searchProperties
repository
protected final LdapContextFactory repository
groupFactory
protected final LDAPGroupFactory groupFactory
AbstractLDAPGroupAdaptor
protected AbstractLDAPGroupAdaptor(LdapContextFactory repo,
LdapSearchProperties searchProperties,
LDAPGroupFactory groupFactory,
LdapFilterFactory filterFactory)
getGroup
public Group getGroup(java.lang.String name)
throws EntityException
- Specified by:
getGroup
in interface LDAPGroupAdaptor
- Throws:
EntityException
getGroups
public Pager getGroups()
throws EntityException
- Specified by:
getGroups
in interface LDAPGroupAdaptor
- Throws:
EntityException
getGroupEntries
public LDAPPagerInfo getGroupEntries()
throws EntityException
- Specified by:
getGroupEntries
in interface LDAPGroupAdaptor
- Throws:
EntityException
getGroupEntries
public LDAPPagerInfo getGroupEntries(java.lang.String groupName)
throws EntityException
- Description copied from interface:
LDAPGroupAdaptor
- If groupName is
null
, returns all groups.
- Specified by:
getGroupEntries
in interface LDAPGroupAdaptor
- Throws:
EntityException
getGroupEntries
public LDAPPagerInfo getGroupEntries(java.lang.String[] attributesToReturn,
net.sf.ldaptemplate.support.filter.Filter additionalSearchFilter)
throws EntityException
- Specified by:
getGroupEntries
in interface LDAPGroupAdaptor
- Throws:
EntityException
getGroupEntries
public LDAPPagerInfo getGroupEntries(java.lang.String groupName,
java.lang.String[] attributesToReturn,
net.sf.ldaptemplate.support.filter.Filter additionalSearchFilter)
throws RepositoryException
- Specified by:
getGroupEntries
in interface LDAPGroupAdaptor
- Parameters:
groupName
- a String holding an RFC 2254 compliant getGroupEntries parameter to AND to
the LdapContextFactory.GROUP_SEARCH_FILTER
.
- Throws:
RepositoryException
search
public LDAPPagerInfo search(net.sf.ldaptemplate.support.filter.Filter searchFilter)
throws RepositoryException
- Specified by:
search
in interface LDAPGroupAdaptor
- Returns:
- an
LDAPPagerInfo
holding the search query used, the result, and the original base context.
- Throws:
RepositoryException
search
public LDAPPagerInfo search(net.sf.ldaptemplate.support.filter.Filter filter,
java.lang.String[] attributesToReturn)
throws RepositoryException
- Parameters:
attributesToReturn
- - will default to mapped membership attribute available in the LdapContextFactory
if set to null.
- Returns:
- an
LDAPPagerInfo
holding the search query used, the result, and the original base context.
- Throws:
RepositoryException
constructGroupSearchFilter
protected net.sf.ldaptemplate.support.filter.Filter constructGroupSearchFilter(java.lang.String name)
constructGroupSearchFilter
protected net.sf.ldaptemplate.support.filter.Filter constructGroupSearchFilter(java.lang.String name,
net.sf.ldaptemplate.support.filter.Filter patternToAnd)
getFirstPhraseFromDN
protected java.lang.String getFirstPhraseFromDN(java.lang.String dn)
- Extracts the username from the first occurrence of the username attribute
For example,
CN=ldapusera,CN=Users,DC=atlassian,DC=private
becomes ldapusera
- Returns:
- String representing the username in the DN
getGroupDN
public java.lang.String getGroupDN(java.lang.String groupName)
throws EntityException
- Specified by:
getGroupDN
in interface LDAPGroupAdaptor
- Throws:
EntityException
getGroupDN
public java.lang.String getGroupDN(Group group)
throws EntityException
- Specified by:
getGroupDN
in interface LDAPGroupAdaptor
- Throws:
EntityException
getGroupFactory
public LDAPGroupFactory getGroupFactory()
Copyright © 2005-2007 Atlassian Software Systems Pty Ltd. All Rights Reserved.