Class LdapSyncDao
java.lang.Object
edu.internet2.middleware.grouper.app.ldapProvisioning.ldapSyncDao.LdapSyncDao
- Direct Known Subclasses:
LdapSyncDaoForLdap
access LDAP or dry run or testing
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract boolean
create an objectabstract void
delete an object by dnabstract void
internal_modifyHelper
(String ldapPoolName, String dn, List<LdapModificationItem> ldapModificationItems) modify attributes for an object.final LdapModificationResult
modify
(String ldapPoolName, String dn, List<LdapModificationItem> ldapModificationItems) Modify attributes for an object.abstract boolean
Move an object to a new dn.find objects by dn'ssearch
(String ldapPoolName, String baseDn, String filter, LdapSearchScope ldapSearchScope, List<String> attributeNames) do a filter searchsearch
(String ldapPoolName, String baseDn, String filter, LdapSearchScope ldapSearchScope, List<String> attributeNames, Integer sizeLimit) do a filter search
-
Constructor Details
-
LdapSyncDao
public LdapSyncDao()
-
-
Method Details
-
search
public abstract List<LdapEntry> search(String ldapPoolName, String baseDn, String filter, LdapSearchScope ldapSearchScope, List<String> attributeNames) do a filter search- Parameters:
ldapPoolName
-baseDn
-filter
-ldapSearchScope
-attributeNames
- are optional attribute names to get from the ldap object- Returns:
- the data
-
search
public abstract List<LdapEntry> search(String ldapPoolName, String baseDn, String filter, LdapSearchScope ldapSearchScope, List<String> attributeNames, Integer sizeLimit) do a filter search- Parameters:
ldapPoolName
-baseDn
-filter
-ldapSearchScope
-attributeNames
- are optional attribute names to get from the ldap objectsizeLimit
-- Returns:
- the data
-
read
public abstract List<LdapEntry> read(String ldapPoolName, String baseDn, List<String> dnList, List<String> attributeNames) find objects by dn's- Parameters:
ldapPoolName
-baseDn
-dnList
-attributeNames
- are optional attribute names to get from the ldap object- Returns:
- the data
-
delete
delete an object by dn- Parameters:
ldapPoolName
-dn
-
-
create
create an object- Parameters:
ldapPoolName
-ldapEntry
-- Returns:
- true if created, false if existed and updated
-
move
Move an object to a new dn. Assuming this would only be called if it's expected to work. i.e. If the ldap server doesn't allow this, the caller should avoid calling this and instead do a delete/re-create as appropriate.- Parameters:
ldapPoolName
-oldDn
-newDn
-- Returns:
- true if moved, false if newDn exists and oldDn doesn't exist so no update
-
modify
public final LdapModificationResult modify(String ldapPoolName, String dn, List<LdapModificationItem> ldapModificationItems) Modify attributes for an object. this should be done in bulk, and if there is an error, should be done individually.- Parameters:
ldapPoolName
-dn
-ldapModificationItems
-- Returns:
- the result
-
internal_modifyHelper
public abstract void internal_modifyHelper(String ldapPoolName, String dn, List<LdapModificationItem> ldapModificationItems) modify attributes for an object. this should be done in bulk, and if there is an error, throw it- Parameters:
ldapPoolName
-dn
-ldapModificationItems
-- Throws:
Exception
- if problem
-