public final class DSAnnotationProcessor extends Object
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,
String ldif)
Inject an ldif String into the server.
|
static void |
injectLdifFiles(Class<?> clazz,
DirectoryService service,
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 Exception
dsBuilder
- The DirectoryService builderException
- If the DirectoryService cannot be createdpublic static DirectoryService getDirectoryService(org.junit.runner.Description description) throws Exception
description
- The annotations containing the info from which we will create
the DSException
- If the DirectoryService instance can't be returnedpublic static DirectoryService getDirectoryService() throws Exception
Exception
- If the DirectoryService instance can't be returnedpublic static void injectLdifFiles(Class<?> clazz, DirectoryService service, String[] ldifFiles) throws Exception
clazz
- The class which classLoaded will be use to retrieve the resourcesservice
- the DirectoryServiceldifFiles
- array of LDIF file names (only )Exception
- If we weren't able to inject LdifFilespublic static void injectEntries(DirectoryService service, String ldif) throws Exception
service
- the directory service to useldif
- the ldif containing entries to add to the server.Exception
- if there is a problem adding the entries from the LDIFpublic static void loadSchemas(org.junit.runner.Description desc, DirectoryService service)
desc
- The descriptionservice
- The DirectoryService instancepublic static void applyLdifs(org.junit.runner.Description desc, DirectoryService service) throws Exception
desc
- The descriptionservice
- The DirectoryService instanceException
- If we can't apply the ldifsCopyright © 2003–2020 The Apache Software Foundation. All rights reserved.