|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.directory.server.core.integ.IntegrationUtils
public class IntegrationUtils
Integration test utility methods.
Constructor Summary | |
---|---|
IntegrationUtils()
|
Method Summary | |
---|---|
static void |
apply(DirectoryService service,
org.apache.directory.shared.ldap.ldif.LdifEntry entry)
|
static void |
closeConections()
|
static void |
disableSchema(DirectoryService service,
java.lang.String schemaName)
|
static void |
doDelete(java.io.File wkdir)
Deletes the working directory. |
static void |
enableSchema(DirectoryService service,
java.lang.String schemaName)
|
static org.apache.directory.ldap.client.api.LdapConnection |
getAdminConnection(LdapServer ldapServer)
gets a LdapConnection bound using the default admin DN uid=admin,ou=system and password "secret" |
static org.apache.directory.ldap.client.api.LdapConnection |
getConnectionAs(LdapServer ldapServer,
org.apache.directory.shared.ldap.name.DN dn,
java.lang.String password)
|
static org.apache.directory.ldap.client.api.LdapConnection |
getConnectionAs(LdapServer ldapServer,
java.lang.String dn,
java.lang.String password)
|
static org.apache.directory.ldap.client.api.LdapConnection |
getConnectionAs(java.lang.String host,
int port,
java.lang.String dn,
java.lang.String password)
|
static javax.naming.ldap.LdapContext |
getContext(java.lang.String principalDn,
DirectoryService service,
java.lang.String dn)
|
static CoreSession |
getCoreSession(java.lang.String principalDn,
DirectoryService service,
java.lang.String dn)
|
static javax.naming.ldap.LdapContext |
getRootContext(DirectoryService service)
|
static javax.naming.ldap.LdapContext |
getSchemaContext(DirectoryService service)
|
static javax.naming.ldap.LdapContext |
getSystemContext(DirectoryService service)
|
static org.apache.directory.shared.ldap.ldif.LdifEntry |
getUserAddLdif()
|
static org.apache.directory.shared.ldap.ldif.LdifEntry |
getUserAddLdif(java.lang.String dnstr,
byte[] password,
java.lang.String cn,
java.lang.String sn)
|
static void |
injectEntries(DirectoryService service,
java.lang.String ldif)
Inject an ldif String into the server. |
static boolean |
isDisabled(DirectoryService service,
java.lang.String schemaName)
A helper method which tells if a schema is disabled. |
static boolean |
isEnabled(DirectoryService service,
java.lang.String schemaName)
A helper method which tells if a schema is enabled. |
static boolean |
isLoaded(DirectoryService service,
java.lang.String schemaName)
A helper method which tells if a schema is loaded. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public IntegrationUtils()
Method Detail |
---|
public static void doDelete(java.io.File wkdir) throws java.io.IOException
wkdir
- the working directory to delete
java.io.IOException
- if the working directory cannot be deletedpublic 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.
javax.naming.NamingException
- if there is a problem adding the entries from the LDIF
java.lang.Exception
public static org.apache.directory.shared.ldap.ldif.LdifEntry getUserAddLdif() throws org.apache.directory.shared.ldap.exception.LdapException
org.apache.directory.shared.ldap.exception.LdapException
public static javax.naming.ldap.LdapContext getContext(java.lang.String principalDn, DirectoryService service, java.lang.String dn) throws java.lang.Exception
java.lang.Exception
public static CoreSession getCoreSession(java.lang.String principalDn, DirectoryService service, java.lang.String dn) throws java.lang.Exception
java.lang.Exception
public static javax.naming.ldap.LdapContext getSystemContext(DirectoryService service) throws java.lang.Exception
java.lang.Exception
public static javax.naming.ldap.LdapContext getSchemaContext(DirectoryService service) throws java.lang.Exception
java.lang.Exception
public static javax.naming.ldap.LdapContext getRootContext(DirectoryService service) throws java.lang.Exception
java.lang.Exception
public static void apply(DirectoryService service, org.apache.directory.shared.ldap.ldif.LdifEntry entry) throws java.lang.Exception
java.lang.Exception
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 org.apache.directory.shared.ldap.exception.LdapException
org.apache.directory.shared.ldap.exception.LdapException
public static void enableSchema(DirectoryService service, java.lang.String schemaName) throws java.lang.Exception
java.lang.Exception
public static void disableSchema(DirectoryService service, java.lang.String schemaName) throws java.lang.Exception
java.lang.Exception
public static boolean isDisabled(DirectoryService service, java.lang.String schemaName)
public static boolean isLoaded(DirectoryService service, java.lang.String schemaName)
public static boolean isEnabled(DirectoryService service, java.lang.String schemaName)
public static org.apache.directory.ldap.client.api.LdapConnection getAdminConnection(LdapServer ldapServer) throws java.lang.Exception
java.lang.Exception
public static org.apache.directory.ldap.client.api.LdapConnection getConnectionAs(LdapServer ldapServer, java.lang.String dn, java.lang.String password) throws java.lang.Exception
java.lang.Exception
public static org.apache.directory.ldap.client.api.LdapConnection getConnectionAs(LdapServer ldapServer, org.apache.directory.shared.ldap.name.DN dn, java.lang.String password) throws java.lang.Exception
java.lang.Exception
public static org.apache.directory.ldap.client.api.LdapConnection getConnectionAs(java.lang.String host, int port, java.lang.String dn, java.lang.String password) throws java.lang.Exception
java.lang.Exception
public static void closeConections()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |