use of org.apache.directory.server.core.api.changelog.ChangeLog in project wildfly-camel by wildfly-extras.
the class DirectoryServiceBuilder method revert.
public static void revert(DirectoryService dirService, long revision) throws Exception {
ChangeLog cl = dirService.getChangeLog();
if (cl.isEnabled() && (revision < cl.getCurrentRevision())) {
LOG.debug("Revert revision {}", revision);
dirService.revert(revision);
}
}
use of org.apache.directory.server.core.api.changelog.ChangeLog in project cloudstack by apache.
the class LdapDirectoryServerConnectionTest method testEmbeddedLdapServerInitialization.
@Test
public void testEmbeddedLdapServerInitialization() throws IndexNotFoundException {
LdapServer ldapServer = embeddedLdapServer.getLdapServer();
assertNotNull(ldapServer);
DirectoryService directoryService = embeddedLdapServer.getDirectoryService();
assertNotNull(directoryService);
assertNotNull(directoryService.getSchemaPartition());
assertNotNull(directoryService.getSystemPartition());
assertNotNull(directoryService.getSchemaManager());
assertNotNull(directoryService.getDnFactory());
assertNotNull(directoryService.isDenormalizeOpAttrsEnabled());
ChangeLog changeLog = directoryService.getChangeLog();
assertNotNull(changeLog);
assertFalse(changeLog.isEnabled());
assertNotNull(directoryService.isStarted());
assertNotNull(ldapServer.isStarted());
List userList = new ArrayList(embeddedLdapServer.getUserIndexMap().keySet());
java.util.Collections.sort(userList);
List checkList = Arrays.asList("uid");
assertEquals(userList, checkList);
}
Aggregations