Search in sources :

Example 6 with FileConfiguration

use of org.gluu.util.properties.FileConfiguration in project oxAuth by GluuFederation.

the class Manual method init.

@BeforeClass
public void init() {
    final FileConfiguration fileConfiguration = new FileConfiguration(LDAP_FILE_PATH);
    final Properties props = PropertiesDecrypter.decryptProperties(fileConfiguration.getProperties(), "passoword");
    final LdapEntryManagerFactory ldapEntryManagerFactory = new LdapEntryManagerFactory();
    final LdapConnectionProvider connectionProvider = new LdapConnectionProvider(props);
    connectionProvider.create();
    MANAGER = ldapEntryManagerFactory.createEntryManager(props);
}
Also used : FileConfiguration(org.gluu.util.properties.FileConfiguration) LdapConnectionProvider(org.gluu.persist.ldap.operation.impl.LdapConnectionProvider) Properties(java.util.Properties) LdapEntryManagerFactory(org.gluu.persist.ldap.impl.LdapEntryManagerFactory) BeforeClass(org.testng.annotations.BeforeClass)

Aggregations

FileConfiguration (org.gluu.util.properties.FileConfiguration)6 ConfigurationException (org.gluu.exception.ConfigurationException)3 Properties (java.util.Properties)2 LdapConnectionProvider (org.gluu.persist.ldap.operation.impl.LdapConnectionProvider)2 BasePersistenceException (org.gluu.persist.exception.BasePersistenceException)1 LdapEntryManagerFactory (org.gluu.persist.ldap.impl.LdapEntryManagerFactory)1 BeforeClass (org.testng.annotations.BeforeClass)1