org.lsc.jndi
Class SimpleJndiDstService

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

public class SimpleJndiDstService
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 and attrId).

Author:
Sebastien Bahloul <seb@lsc-project.org>

Constructor Summary
SimpleJndiDstService(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> ids)
          The simple object getter according to its identifier.
 JndiServices getJndiServices()
          Destination LDAP Services getter.
 Map<String,LscAttributes> getListPivots()
          Get the identifiers list.
 
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

SimpleJndiDstService

public SimpleJndiDstService(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

getBean

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

Specified by:
getBean in interface IJndiDstService
Parameters:
ids - 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

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

getListPivots

public Map<String,LscAttributes> getListPivots()
                                        throws NamingException
Get the identifiers list.

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 - thrown if an directory exception is encountered while getting the identifiers list


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