org.wso2.carbon.apacheds.impl
Class ApacheLDAPServer

java.lang.Object
  extended by org.wso2.carbon.apacheds.impl.ApacheLDAPServer
All Implemented Interfaces:
LDAPServer

public class ApacheLDAPServer
extends Object
implements LDAPServer

An implementation of LDAP server. This wraps apacheds implementation and provides an abstract interface to operate on directory server.


Constructor Summary
ApacheLDAPServer()
           
 
Method Summary
 void changeConnectionUserPassword(String password)
          Changes the connection user password.
 String getConnectionDomainName()
          Gets system admins connection domain name.
 PartitionManager getPartitionManager()
          Gets the partition manager from LDAP server.
 org.apache.directory.server.core.DirectoryService getService()
           
 void init(LDAPConfiguration configurations)
          Initializes directory service.
protected  void initializeDefaultDirectoryService()
           
protected  void initializeLDAPServer()
           
 void setService(org.apache.directory.server.core.DirectoryService service)
           
 void start()
          Will start LDAP server.
 void stop()
          Stopes the LDAP server.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ApacheLDAPServer

public ApacheLDAPServer()
Method Detail

init

public void init(LDAPConfiguration configurations)
          throws DirectoryServerException
Description copied from interface: LDAPServer
Initializes directory service. Will create a LDAP server instance using apacheeds APIs.

Specified by:
init in interface LDAPServer
Parameters:
configurations - This wraps LDAP specific configurations. This includes information such as ldap running port, kdc running port, whether to enable kdc server etc ...
Throws:
DirectoryServerException - If initialization failed.

getService

public org.apache.directory.server.core.DirectoryService getService()

setService

public void setService(org.apache.directory.server.core.DirectoryService service)

start

public void start()
           throws DirectoryServerException
Description copied from interface: LDAPServer
Will start LDAP server. Must be initialized first.

Specified by:
start in interface LDAPServer
Throws:
DirectoryServerException - If unable to start LDAP server.

stop

public void stop()
          throws DirectoryServerException
Description copied from interface: LDAPServer
Stopes the LDAP server.

Specified by:
stop in interface LDAPServer
Throws:
DirectoryServerException - If unable to stop LDAP server.

getPartitionManager

public PartitionManager getPartitionManager()
                                     throws DirectoryServerException
Description copied from interface: LDAPServer
Gets the partition manager from LDAP server. This is used to create partitions for tenants.

Specified by:
getPartitionManager in interface LDAPServer
Returns:
Returns a PartitionManager
Throws:
DirectoryServerException - If unable to extract PartitionManager from LDAP service context.

initializeDefaultDirectoryService

protected void initializeDefaultDirectoryService()
                                          throws DirectoryServerException
Throws:
DirectoryServerException

getConnectionDomainName

public String getConnectionDomainName()
                               throws DirectoryServerException
Description copied from interface: LDAPServer
Gets system admins connection domain name. Ex :- uid=admin,ou=system

Specified by:
getConnectionDomainName in interface LDAPServer
Returns:
Admin's domain name as a domain name entry.
Throws:
DirectoryServerException - If an error occurred when quarrying the admin user domain name.

changeConnectionUserPassword

public void changeConnectionUserPassword(String password)
                                  throws DirectoryServerException
Description copied from interface: LDAPServer
Changes the connection user password. As for now we don't allow users to change admin domain name. But users can change admin's password using this method.

Specified by:
changeConnectionUserPassword in interface LDAPServer
Parameters:
password - New password.
Throws:
DirectoryServerException - If an error occurred while changing the password.

initializeLDAPServer

protected void initializeLDAPServer()
                             throws DirectoryServerException
Throws:
DirectoryServerException


Copyright © 2015 WSO2. All rights reserved.