org.apache.geronimo.console.ldapmanager
Class LDAPManagerHelper

java.lang.Object
  extended by org.apache.geronimo.console.ldapmanager.LDAPManagerHelper

public class LDAPManagerHelper
extends Object

The LDAP manager helper


Constructor Summary
LDAPManagerHelper()
          Construct an LDAP manager helper using config data (default)
LDAPManagerHelper(String host, String port, String baseDN, String securityAuthentication, String userDN, String userPwd)
          Construct an LDAP manager helper using config data (partial)
LDAPManagerHelper(String initialContextFactory, String host, String port, String baseDN, String ldapVersion, String securityProtocol, String securityAuthentication, String securityPrincipal, String securityCredentials)
          Construct an LDAP manager helper using config data (all)
 
Method Summary
 void close()
          Close directory context
 String connect(String initialContextFactory, String host, String port, String baseDN, String ldapVersion, String securityProtocol, String securityAuthentication, String securityPrincipal, String securityCredentials)
          Create a directory context using config data
 Collection getAttributes(String name)
          Return the attributes of an LDAP entry
 String getBaseDN()
          Return base DN of this directory context
 Map getEnvironment()
          Return directory context environment
 Collection list(String name)
          Returns the names bound in the named context
 Collection listBaseDN()
          Returns the names bound in the base DN context
 String listJSON(String name)
          Enumerates the names bound in the named context and return result as JSON
 String listJSON(String name, String commonFields)
          Enumerates the names bound in the named context and return result as JSON
 Collection search(String searchDN, String filter, String searchScope)
          Execute an LDAP search
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LDAPManagerHelper

public LDAPManagerHelper()
                  throws Exception
Construct an LDAP manager helper using config data (default)

Throws:
Exception

LDAPManagerHelper

public LDAPManagerHelper(String host,
                         String port,
                         String baseDN,
                         String securityAuthentication,
                         String userDN,
                         String userPwd)
                  throws Exception
Construct an LDAP manager helper using config data (partial)

Throws:
Exception

LDAPManagerHelper

public LDAPManagerHelper(String initialContextFactory,
                         String host,
                         String port,
                         String baseDN,
                         String ldapVersion,
                         String securityProtocol,
                         String securityAuthentication,
                         String securityPrincipal,
                         String securityCredentials)
                  throws Exception
Construct an LDAP manager helper using config data (all)

Throws:
Exception
Method Detail

connect

public String connect(String initialContextFactory,
                      String host,
                      String port,
                      String baseDN,
                      String ldapVersion,
                      String securityProtocol,
                      String securityAuthentication,
                      String securityPrincipal,
                      String securityCredentials)
               throws Exception
Create a directory context using config data

Throws:
Exception

getEnvironment

public Map getEnvironment()
Return directory context environment


list

public Collection list(String name)
                throws Exception
Returns the names bound in the named context

Throws:
Exception

listBaseDN

public Collection listBaseDN()
                      throws Exception
Returns the names bound in the base DN context

Throws:
Exception

listJSON

public String listJSON(String name)
                throws Exception
Enumerates the names bound in the named context and return result as JSON

Throws:
Exception

listJSON

public String listJSON(String name,
                       String commonFields)
                throws Exception
Enumerates the names bound in the named context and return result as JSON

Throws:
Exception

getAttributes

public Collection getAttributes(String name)
                         throws Exception
Return the attributes of an LDAP entry

Throws:
Exception

search

public Collection search(String searchDN,
                         String filter,
                         String searchScope)
                  throws Exception
Execute an LDAP search

Throws:
Exception

close

public void close()
           throws Exception
Close directory context

Throws:
Exception

getBaseDN

public String getBaseDN()
Return base DN of this directory context



Copyright © 2003-2007 Apache Software Foundation. All Rights Reserved.