Class LDAPConfigurator


  • public class LDAPConfigurator
    extends java.lang.Object
    • Field Detail

      • logger

        public static final org.slf4j.Logger logger
    • Constructor Detail

      • LDAPConfigurator

        public LDAPConfigurator​(netscape.ldap.LDAPConnection connection,
                                LDAPConfig config)
                         throws java.lang.Exception
        Throws:
        java.lang.Exception
      • LDAPConfigurator

        public LDAPConfigurator​(netscape.ldap.LDAPConnection connection,
                                LDAPConfig config,
                                java.lang.String instanceID)
                         throws java.lang.Exception
        Throws:
        java.lang.Exception
    • Method Detail

      • getConnection

        public netscape.ldap.LDAPConnection getConnection()
      • configureDirectory

        public void configureDirectory()
                                throws java.lang.Exception
        Throws:
        java.lang.Exception
      • enableUSN

        public void enableUSN()
                       throws java.lang.Exception
        Throws:
        java.lang.Exception
      • setupSchema

        public void setupSchema()
                         throws java.lang.Exception
        Throws:
        java.lang.Exception
      • createContainers

        public void createContainers​(java.lang.String subsystem)
                              throws java.lang.Exception
        Throws:
        java.lang.Exception
      • setupACL

        public void setupACL​(java.lang.String subsystem)
                      throws java.lang.Exception
        Throws:
        java.lang.Exception
      • createIndexes

        public void createIndexes​(java.lang.String subsystem)
                           throws java.lang.Exception
        Throws:
        java.lang.Exception
      • rebuildIndexes

        public void rebuildIndexes​(java.lang.String subsystem)
                            throws java.lang.Exception
        Throws:
        java.lang.Exception
      • setupDatabaseManager

        public void setupDatabaseManager()
                                  throws java.lang.Exception
        Throws:
        java.lang.Exception
      • createVLVIndexes

        public void createVLVIndexes​(java.lang.String subsystem)
                              throws java.lang.Exception
        Throws:
        java.lang.Exception
      • rebuildVLVIndexes

        public void rebuildVLVIndexes​(java.lang.String subsystem)
                               throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getEntry

        public netscape.ldap.LDAPEntry getEntry​(java.lang.String dn)
                                         throws java.lang.Exception
        Throws:
        java.lang.Exception
      • validateDatabaseOwnership

        public void validateDatabaseOwnership​(java.lang.String database,
                                              java.lang.String baseDN)
                                       throws java.lang.Exception
        Throws:
        java.lang.Exception
      • deleteEntry

        public void deleteEntry​(java.lang.String dn)
                         throws java.lang.Exception
        Throws:
        java.lang.Exception
      • waitForTask

        public void waitForTask​(java.lang.String dn)
                         throws java.lang.Exception
        Throws:
        java.lang.Exception
      • createDatabaseEntry

        public void createDatabaseEntry​(java.lang.String databaseDN,
                                        java.lang.String database,
                                        java.lang.String baseDN)
                                 throws java.lang.Exception
        Throws:
        java.lang.Exception
      • createMappingEntry

        public void createMappingEntry​(java.lang.String mappingDN,
                                       java.lang.String database,
                                       java.lang.String baseDN)
                                throws java.lang.Exception
        Throws:
        java.lang.Exception
      • createBaseEntry

        public void createBaseEntry​(java.lang.String baseDN)
                             throws java.lang.Exception
        Throws:
        java.lang.Exception
      • customizeFile

        public void customizeFile​(java.io.File file,
                                  java.io.File tmpFile)
                           throws java.lang.Exception
        Throws:
        java.lang.Exception
      • importFile

        public void importFile​(java.lang.String filename,
                               boolean ignoreErrors)
                        throws java.lang.Exception
        Throws:
        java.lang.Exception
      • importLDIFRecord

        public void importLDIFRecord​(netscape.ldap.util.LDIFRecord record,
                                     boolean ignoreErrors)
                              throws java.lang.Exception
        Throws:
        java.lang.Exception
      • importSchemaFile

        public void importSchemaFile​(java.lang.String filename)
                              throws java.lang.Exception
        Throws:
        java.lang.Exception
      • importSchemaRecord

        public void importSchemaRecord​(netscape.ldap.util.LDIFRecord record)
                                throws java.lang.Exception
        Throws:
        java.lang.Exception
      • deleteDatabase

        public void deleteDatabase​(java.lang.String database,
                                   java.lang.String baseDN)
                            throws java.lang.Exception
        Throws:
        java.lang.Exception
      • createSystemContainer

        public void createSystemContainer()
                                   throws java.lang.Exception
        Throws:
        java.lang.Exception
      • createReplicationManager

        public void createReplicationManager​(java.lang.String bindUser,
                                             java.lang.String pwd)
                                      throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getInstanceDir

        public java.lang.String getInstanceDir()
                                        throws java.lang.Exception
        Throws:
        java.lang.Exception
      • createChangeLog

        public void createChangeLog()
                             throws java.lang.Exception
        Throws:
        java.lang.Exception
      • createReplicaObject

        public boolean createReplicaObject​(java.lang.String bindUser,
                                           int id)
                                    throws java.lang.Exception
        Throws:
        java.lang.Exception
      • createReplicationAgreement

        public void createReplicationAgreement​(java.lang.String name,
                                               java.lang.String replicaHostname,
                                               int replicaPort,
                                               java.lang.String bindUser,
                                               java.lang.String replicaPassword,
                                               java.lang.String replicationSecurity)
                                        throws java.lang.Exception
        Throws:
        java.lang.Exception
      • setupReplicationAgreement

        public boolean setupReplicationAgreement​(java.lang.String agreementName,
                                                 java.lang.String bindUser,
                                                 java.lang.String bindPassword,
                                                 java.lang.String peerHostname,
                                                 int peerPort,
                                                 java.lang.String peerBindUser,
                                                 java.lang.String peerBindPassword,
                                                 java.lang.String security,
                                                 int replicaID)
                                          throws java.lang.Exception
        Throws:
        java.lang.Exception
      • initializeConsumer

        public void initializeConsumer​(java.lang.String agreementName)
                                throws java.lang.Exception
        Throws:
        java.lang.Exception
      • isReplicationDone

        public boolean isReplicationDone​(java.lang.String replicaDN,
                                         java.lang.String agreementName)
                                  throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getReplicationStatus

        public java.lang.String getReplicationStatus​(java.lang.String replicaDN,
                                                     java.lang.String agreementName)
                                              throws java.lang.Exception
        Throws:
        java.lang.Exception