|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.evolveum.midpoint.test.ldap.OpenDJController
public class OpenDJController
This class controls embedded OpenDS instance. It is used in Unit tests. It configures and starts and stops the instance. It can even manage a "template" configuration of OpenDS and copy it to working instance configuration.
Field Summary | |
---|---|
protected java.io.File |
configFile
|
protected org.opends.server.protocols.internal.InternalClientConnection |
internalConnection
|
protected java.io.File |
serverRoot
|
protected java.io.File |
templateServerRoot
|
Constructor Summary | |
---|---|
OpenDJController()
|
|
OpenDJController(java.io.File ldapDataDir)
|
|
OpenDJController(java.io.File ldapDataDir,
java.io.File templateDir)
|
|
OpenDJController(java.lang.String ldapDataDir)
|
Method Summary | |
---|---|
java.util.Set<java.lang.String> |
asSet(java.util.List<org.opends.server.types.Attribute> attributes)
|
static void |
copyDirectory(java.io.File src,
java.io.File dst)
Copy a directory and its contents. |
static void |
copyFile(java.io.File src,
java.io.File dst)
Copy a file. |
static void |
deleteDirectory(java.io.File dir)
Delete a directory and its contents. |
java.io.File |
getConfigFile()
Get the value of configFile File name of primary OpenDS configuration file. |
org.opends.server.protocols.internal.InternalClientConnection |
getInternalConnection()
Get the value of internalConnection The connection to the OpenDS instance. |
java.io.File |
getServerRoot()
Get the value of serverRoot. |
java.io.File |
getTemplateServerRoot()
Get the value of templateServerRoot The top directory of template OpenDS installation. |
void |
refreshFromTemplate()
Refresh working OpenDS installation from the template. |
void |
setConfigFile(java.io.File configFile)
Set the value of configFile File name of primary OpenDS configuration file. |
void |
setInternalConnection(org.opends.server.protocols.internal.InternalClientConnection internalConnection)
Set the value of internalConnection The connection to the OpenDS instance. |
void |
setServerRoot(java.io.File serverRoot)
Set the value of serverRoot The top directory of working OpenDS installation. |
void |
setTemplateServerRoot(java.io.File templateServerRoot)
Set the value of templateServerRoot The top directory of template OpenDS installation. |
org.opends.server.protocols.internal.InternalClientConnection |
start()
Start the embedded OpenDS directory server. |
void |
stop()
Stop the embedded OpenDS server. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.io.File serverRoot
protected java.io.File configFile
protected java.io.File templateServerRoot
protected org.opends.server.protocols.internal.InternalClientConnection internalConnection
Constructor Detail |
---|
public OpenDJController()
public OpenDJController(java.io.File ldapDataDir)
public OpenDJController(java.io.File ldapDataDir, java.io.File templateDir)
public OpenDJController(java.lang.String ldapDataDir)
Method Detail |
---|
public java.io.File getServerRoot()
public void setServerRoot(java.io.File serverRoot)
serverRoot
- new value of serverRootpublic java.io.File getConfigFile()
public void setConfigFile(java.io.File configFile)
configFile
- new value of configFilepublic java.io.File getTemplateServerRoot()
public void setTemplateServerRoot(java.io.File templateServerRoot)
templateServerRoot
- new value of templateServerRootpublic org.opends.server.protocols.internal.InternalClientConnection getInternalConnection()
public void setInternalConnection(org.opends.server.protocols.internal.InternalClientConnection internalConnection)
internelConnection
- new value of internelConnectionpublic void refreshFromTemplate() throws java.io.IOException
java.io.IOException
public org.opends.server.protocols.internal.InternalClientConnection start()
public void stop()
public static void copyDirectory(java.io.File src, java.io.File dst) throws java.io.IOException
src
- The name of the directory to copy.dst
- The name of the destination directory.
java.io.IOException
- If the directory could not be copied.public static void deleteDirectory(java.io.File dir) throws java.io.IOException
dir
- The name of the directory to delete.
java.io.IOException
- If the directory could not be deleted.public static void copyFile(java.io.File src, java.io.File dst) throws java.io.IOException
src
- The name of the source file.dst
- The name of the destination file.
java.io.IOException
- If the file could not be copied.public java.util.Set<java.lang.String> asSet(java.util.List<org.opends.server.types.Attribute> attributes)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |