org.lsc.jndi
Class FullDNJndiDstService

java.lang.Object
  extended by org.lsc.jndi.AbstractSimpleJndiService
      extended by org.lsc.jndi.FullDNJndiDstService
All Implemented Interfaces:
IJndiDstService

public class FullDNJndiDstService
extends AbstractSimpleJndiService
implements IJndiDstService

This class is a generic but configurable implementation to read data from the destination directory.

You can specify where (baseDn) and what (filterId & attr) information will be read on which type of entries (filterAll).

This connector has the particularity of identifying entries by their DN, and not via pivot attributes. For standard behavior with pivot attributes, see SimpleJndiSrcService. The list of DNs will be returned ordered from longest to shortest, to ensure that "child" entries are deleted before "parent" entries (during a clean operation).

Author:
Sebastien Bahloul <seb@lsc-project.org>, Jonathan Clarke <jonathan@phillipoux.net>

Constructor Summary
FullDNJndiDstService(Properties props, String beanClassName)
          Constructor adapted to the context properties and the bean class name to instantiate.
 
Method Summary
 IBean getBean(Map.Entry<String,LscAttributes> id)
          The simple object getter according to its identifier.
 JndiServices getJndiServices()
          Destination LDAP Services getter.
 Map<String,LscAttributes> getListPivots()
          Returns a list of all the objects identifiers.
 
Methods inherited from class org.lsc.jndi.AbstractSimpleJndiService
get, getAttrs, getAttrsId, getBaseDn, getBeanFromSR, getFilterAll, getFilterId, getObjectFromSR
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FullDNJndiDstService

public FullDNJndiDstService(Properties props,
                            String beanClassName)
Constructor adapted to the context properties and the bean class name to instantiate.

Parameters:
props - the properties used to identify the directory parameters and context
beanClassName - the bean class name that will be instantiated and feed up
Method Detail

getJndiServices

public final JndiServices getJndiServices()
Destination LDAP Services getter.

Specified by:
getJndiServices in class AbstractSimpleJndiService
Returns:
the Destination JndiServices object used to apply directory operations

getBean

public IBean getBean(Map.Entry<String,LscAttributes> id)
              throws NamingException
The simple object getter according to its identifier.

Specified by:
getBean in interface IJndiDstService
Parameters:
id - the data identifier in the directory - must return a unique directory entry
Returns:
the corresponding bean or null if failed
Throws:
NamingException - thrown if an directory exception is encountered while getting the identified bean

getListPivots

public Map<String,LscAttributes> getListPivots()
                                        throws NamingException
Description copied from interface: IJndiDstService
Returns a list of all the objects identifiers.

Specified by:
getListPivots in interface IJndiDstService
Returns:
Map of DNs of all entries that are returned by the directory with an associated map of attribute names and values (never null)
Throws:
NamingException


Copyright © 2005-2010 LSC project. All Rights Reserved.