java.lang.Object
edu.internet2.middleware.grouper.app.ldapProvisioning.ldapSyncDao.LdapSyncDao
Direct Known Subclasses:
LdapSyncDaoForLdap

public abstract class LdapSyncDao extends Object
access LDAP or dry run or testing
  • 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 object
      sizeLimit -
      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

      public abstract void delete(String ldapPoolName, String dn)
      delete an object by dn
      Parameters:
      ldapPoolName -
      dn -
    • create

      public abstract boolean create(String ldapPoolName, LdapEntry ldapEntry)
      create an object
      Parameters:
      ldapPoolName -
      ldapEntry -
      Returns:
      true if created, false if existed and updated
    • move

      public abstract boolean move(String ldapPoolName, String oldDn, String newDn)
      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