Class LDAPConfigStore


  • public class LDAPConfigStore
    extends ConfigStorage
    LDAPConfigStore: Extends PropConfigStore with methods to load/save from/to file for persistent storage. This is a configuration store agent who reads data from an LDAP entry.

    Version:
    $Revision$, $Date$
    See Also:
    PropConfigStore
    • Constructor Summary

      Constructors 
      Constructor Description
      LDAPConfigStore​(ILdapConnFactory dbFactory, java.lang.String dn, netscape.ldap.LDAPAttribute[] createAttrs, java.lang.String attr)
      Constructs an LDAP configuration store.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void commit​(IConfigStore config, boolean createBackup)
      Commit the configuration to the database.
      netscape.ldap.LDAPEntry commitReturn​(IConfigStore config, boolean createBackup, java.lang.String[] attrs)
      This version of commit also returns the post-read entry that the change resulted in.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • LDAPConfigStore

        public LDAPConfigStore​(ILdapConnFactory dbFactory,
                               java.lang.String dn,
                               netscape.ldap.LDAPAttribute[] createAttrs,
                               java.lang.String attr)
                        throws java.lang.Exception
        Constructs an LDAP configuration store.

        Parameters:
        dbFactory - Database connection factory
        dn - Distinguished name of record containing config store
        attr - Name of attribute containing config store
        createAttrs - Set of initial attributes if creating the entry. Should contain cn, objectclass and possibly other attributes.
        Throws:
        java.lang.Exception
    • Method Detail

      • commit

        public void commit​(IConfigStore config,
                           boolean createBackup)
                    throws EBaseException
        Commit the configuration to the database. All uses of LDAPProfileStore at time of writing call with createBackup=false, so the argument is ignored. If backup becomes necessary, the constructor should be modified to take a String backupAttr, and the existing content be copied to that attribute.
        Overrides:
        commit in class ConfigStorage
        Parameters:
        createBackup - Ignored.
        Throws:
        EBaseException
      • commitReturn

        public netscape.ldap.LDAPEntry commitReturn​(IConfigStore config,
                                                    boolean createBackup,
                                                    java.lang.String[] attrs)
                                             throws EBaseException
        This version of commit also returns the post-read entry that the change resulted in.
        Throws:
        EBaseException