org.apache.directory.server.core.integ
Class IntegrationUtils
java.lang.Object
org.apache.directory.server.core.integ.IntegrationUtils
- Direct Known Subclasses:
- ServerIntegrationUtils
public class IntegrationUtils
- extends java.lang.Object
Integration test utility methods.
- Version:
- $Rev$, $Date$
- Author:
- Apache Directory Project
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
IntegrationUtils
public IntegrationUtils()
doDelete
public static void doDelete(java.io.File wkdir)
throws java.io.IOException
- Deletes the working directory.
- Parameters:
wkdir
- the working directory to delete
- Throws:
java.io.IOException
- if the working directory cannot be deleted
injectEntries
public static void injectEntries(DirectoryService service,
java.lang.String ldif)
throws java.lang.Exception
- Inject an ldif String into the server. DN must be relative to the
root.
- Parameters:
service
- the directory service to useldif
- the ldif containing entries to add to the server.
- Throws:
javax.naming.NamingException
- if there is a problem adding the entries from the LDIF
java.lang.Exception
getUserAddLdif
public static org.apache.directory.shared.ldap.ldif.LdifEntry getUserAddLdif()
throws javax.naming.InvalidNameException,
javax.naming.NamingException
- Throws:
javax.naming.InvalidNameException
javax.naming.NamingException
getContext
public static javax.naming.ldap.LdapContext getContext(java.lang.String principalDn,
DirectoryService service,
java.lang.String dn)
throws java.lang.Exception
- Throws:
java.lang.Exception
getCoreSession
public static CoreSession getCoreSession(java.lang.String principalDn,
DirectoryService service,
java.lang.String dn)
throws java.lang.Exception
- Throws:
java.lang.Exception
getSystemContext
public static javax.naming.ldap.LdapContext getSystemContext(DirectoryService service)
throws java.lang.Exception
- Throws:
java.lang.Exception
getSchemaContext
public static javax.naming.ldap.LdapContext getSchemaContext(DirectoryService service)
throws java.lang.Exception
- Throws:
java.lang.Exception
getRootContext
public static javax.naming.ldap.LdapContext getRootContext(DirectoryService service)
throws java.lang.Exception
- Throws:
java.lang.Exception
apply
public static void apply(DirectoryService service,
org.apache.directory.shared.ldap.ldif.LdifEntry entry)
throws java.lang.Exception
- Throws:
java.lang.Exception
getUserAddLdif
public static org.apache.directory.shared.ldap.ldif.LdifEntry getUserAddLdif(java.lang.String dnstr,
byte[] password,
java.lang.String cn,
java.lang.String sn)
throws javax.naming.InvalidNameException,
javax.naming.NamingException
- Throws:
javax.naming.InvalidNameException
javax.naming.NamingException
Copyright © 2003-2009 Apache Software Foundation. All Rights Reserved.