Package de.hybris.platform.ldap.jalo
Class AbstractEmbeddedLDAPTest
- java.lang.Object
-
- de.hybris.platform.ldap.jalo.AbstractLDAPTest
-
- de.hybris.platform.ldap.jalo.AbstractEmbeddedLDAPTest
-
- Direct Known Subclasses:
BasePlatformLDAPTest,LoginEmbeddedLDAPTest
public abstract class AbstractEmbeddedLDAPTest extends AbstractLDAPTest
Base class for embedded ldap test using ApacheDS server
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.StringEMBEDDED_HOSTprotected static intEMBEDDED_PORT-
Fields inherited from class de.hybris.platform.ldap.jalo.AbstractLDAPTest
directoryService, ldapServer, rootDSE, schemaRoot, sysRoot
-
-
Constructor Summary
Constructors Constructor Description AbstractEmbeddedLDAPTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclearPartition()protected voidconfigureLdapData()responsible for loading test dataprotected voidconfigureLdapServer(org.apache.directory.server.ldap.LdapServer ldapServer)register some dynamic mappingsprotected org.apache.directory.server.core.partition.PartitionconfigurePartition()prepare partition , be aware at this methodDirectoryServiceis not started yet so no session will be availableprotected org.apache.directory.server.core.entry.ServerEntrycreateFirstSeverEntry(org.apache.directory.server.core.partition.Partition partition)creates first server entry in partitionprotected java.lang.StringgetLDAPHost()ldap host domain name/IPprotected intgetLDAPPort()port to listen ldap for either embedded or externalprotected org.apache.directory.server.core.partition.PartitiongetTestPartition()protected booleanisEmbeddedLdap()voidsetUp()Get's the initial context factory for the provider's ou=system context root.-
Methods inherited from class de.hybris.platform.ldap.jalo.AbstractLDAPTest
addIndex, createPartition, doDelete, getAuthenticationType, getLDAPCredenetial, getLDAPPassword, getWiredContext, getWiredContext, getWorkingDirectory, importLdif, injectEntries, isDeleteLDAPServer, loadLdif, loadTestLdif, setContexts, setContexts, tearDown, tearDownLogger, verify
-
-
-
-
Field Detail
-
EMBEDDED_HOST
protected static final java.lang.String EMBEDDED_HOST
- See Also:
- Constant Field Values
-
EMBEDDED_PORT
protected static final int EMBEDDED_PORT
- See Also:
- Constant Field Values
-
-
Method Detail
-
getTestPartition
protected org.apache.directory.server.core.partition.Partition getTestPartition()
-
isEmbeddedLdap
protected boolean isEmbeddedLdap()
- Overrides:
isEmbeddedLdapin classAbstractLDAPTest
-
getLDAPPort
protected int getLDAPPort()
Description copied from class:AbstractLDAPTestport to listen ldap for either embedded or external- Specified by:
getLDAPPortin classAbstractLDAPTest- Returns:
- the embeddedPort
-
getLDAPHost
protected java.lang.String getLDAPHost()
Description copied from class:AbstractLDAPTestldap host domain name/IP- Specified by:
getLDAPHostin classAbstractLDAPTest
-
setUp
public void setUp() throws java.lang.ExceptionDescription copied from class:AbstractLDAPTestGet's the initial context factory for the provider's ou=system context root.- Overrides:
setUpin classAbstractLDAPTest- Throws:
java.lang.Exception- See Also:
TestCase.setUp()
-
configureLdapData
protected void configureLdapData() throws java.lang.Exceptionresponsible for loading test data- Overrides:
configureLdapDatain classAbstractLDAPTest- Throws:
java.lang.Exception
-
configureLdapServer
protected void configureLdapServer(org.apache.directory.server.ldap.LdapServer ldapServer) throws java.lang.ExceptionDescription copied from class:AbstractLDAPTestregister some dynamic mappings- Overrides:
configureLdapServerin classAbstractLDAPTest- Throws:
java.lang.Exception
-
configurePartition
protected org.apache.directory.server.core.partition.Partition configurePartition() throws java.lang.ExceptionDescription copied from class:AbstractLDAPTestprepare partition , be aware at this methodDirectoryServiceis not started yet so no session will be available- Specified by:
configurePartitionin classAbstractLDAPTest- Throws:
java.lang.Exception
-
createFirstSeverEntry
protected org.apache.directory.server.core.entry.ServerEntry createFirstSeverEntry(org.apache.directory.server.core.partition.Partition partition) throws javax.naming.NamingExceptioncreates first server entry in partition- Throws:
javax.naming.NamingException
-
clearPartition
public void clearPartition() throws java.lang.Exception- Throws:
java.lang.Exception
-
-