public final class DSAnnotationProcessor
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
private static org.slf4j.Logger |
LOG
A logger for this class
|
| Modifier | Constructor and Description |
|---|---|
private |
DSAnnotationProcessor() |
| Modifier and Type | Method and Description |
|---|---|
static void |
applyLdifs(org.junit.runner.Description desc,
DirectoryService service)
Apply the LDIF entries to the given service
|
static DirectoryService |
createDS(CreateDS dsBuilder)
Create the DirectoryService
|
static DirectoryService |
getDirectoryService()
Create a DirectoryService from an annotation.
|
static DirectoryService |
getDirectoryService(org.junit.runner.Description description)
Create a DirectoryService from a Unit test annotation
|
static void |
injectEntries(DirectoryService service,
java.lang.String ldif)
Inject an ldif String into the server.
|
private static void |
injectEntry(org.apache.directory.api.ldap.model.ldif.LdifEntry entry,
DirectoryService service)
injects an LDIF entry in the given DirectoryService
|
static void |
injectLdifFiles(java.lang.Class<?> clazz,
DirectoryService service,
java.lang.String[] ldifFiles)
injects the LDIF entries present in a LDIF file
|
static void |
loadSchemas(org.junit.runner.Description desc,
DirectoryService service)
Load the schemas, and enable/disable them.
|
public static DirectoryService createDS(CreateDS dsBuilder) throws java.lang.Exception
java.lang.Exceptionpublic static DirectoryService getDirectoryService(org.junit.runner.Description description) throws java.lang.Exception
description - The annotations containing the info from which we will create
the DSjava.lang.Exceptionpublic static DirectoryService getDirectoryService() throws java.lang.Exception
java.lang.Exceptionprivate static void injectEntry(org.apache.directory.api.ldap.model.ldif.LdifEntry entry,
DirectoryService service)
throws org.apache.directory.api.ldap.model.exception.LdapException
entry - the LdifEntry to be injectedservice - the DirectoryServicejava.lang.Exceptionorg.apache.directory.api.ldap.model.exception.LdapExceptionpublic static void injectLdifFiles(java.lang.Class<?> clazz,
DirectoryService service,
java.lang.String[] ldifFiles)
throws java.lang.Exception
service - the DirectoryServiceldifFiles - the array of LDIF file names (only )java.lang.Exceptionpublic static void injectEntries(DirectoryService service, java.lang.String ldif) throws java.lang.Exception
service - the directory service to useldif - the ldif containing entries to add to the server.java.lang.Exception - if there is a problem adding the entries from the LDIFpublic static void loadSchemas(org.junit.runner.Description desc,
DirectoryService service)
public static void applyLdifs(org.junit.runner.Description desc,
DirectoryService service)
throws java.lang.Exception
java.lang.Exception