org.lsc.jndi
Class AbstractSimpleJndiService

java.lang.Object
  extended by org.lsc.jndi.AbstractSimpleJndiService
Direct Known Subclasses:
EmptyJndiDstService, FullDNJndiDstService, SimpleJndiDstService, SimpleJndiSrcService

public abstract class AbstractSimpleJndiService
extends Object

This class is an abstract generic but configurable implementation to get data from the 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
AbstractSimpleJndiService(Properties serviceProps)
          The default initializer.
 
Method Summary
 SearchResult get(Map.Entry<String,LscAttributes> entry)
          Get the ldap search result according the specified identifier.
 List<String> getAttrs()
          Default attributes getter.
 List<String> getAttrsId()
          Default attrId getter.
 String getBaseDn()
          Default base distinguish name getter.
 IBean getBeanFromSR(SearchResult sr, IBean beanToFill)
          Map the ldap search result into a AbstractBean inherited object.
 String getFilterAll()
          Default filter getter, for all corresponding entries.
 String getFilterId()
          Default filter getter, for one corresponding entry.
abstract  JndiServices getJndiServices()
          LDAP Services getter to fit to the context - source or destination.
 LscObject getObjectFromSR(SearchResult sr, LscObject objToFill)
          Deprecated. This class was used in LSC 1.1 projects, and is no longer necessary, but kept for reverse compatibility. It will be removed in LSC 1.3.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractSimpleJndiService

public AbstractSimpleJndiService(Properties serviceProps)
The default initializer.

Parameters:
serviceProps - The default simple JNDI properties
Method Detail

getObjectFromSR

public final LscObject getObjectFromSR(SearchResult sr,
                                       LscObject objToFill)
                                throws NamingException
Deprecated. This class was used in LSC 1.1 projects, and is no longer necessary, but kept for reverse compatibility. It will be removed in LSC 1.3.

Map the ldap search result into a top derivated object.

Parameters:
sr - the ldap search result
objToFill - the original object to fill
Returns:
the object modified
Throws:
NamingException - thrown if a directory exception is encountered while switching to the Java POJO

getBeanFromSR

public final IBean getBeanFromSR(SearchResult sr,
                                 IBean beanToFill)
                          throws NamingException
Map the ldap search result into a AbstractBean inherited object.

Parameters:
sr - the ldap search result
beanToFill - the bean to fill
Returns:
the modified bean
Throws:
NamingException - thrown if a directory exception is encountered while switching to the Java POJO

get

public final SearchResult get(Map.Entry<String,LscAttributes> entry)
                       throws NamingException
Get the ldap search result according the specified identifier.

Parameters:
entry - The object identifiers - used in the directory filter as {0} or any attributes name
Returns:
The ldap search result
Throws:
NamingException - thrown if an directory exception is encountered while getting the identified object

getJndiServices

public abstract JndiServices getJndiServices()
LDAP Services getter to fit to the context - source or destination.

Returns:
the JndiServices object used to apply directory operations

getAttrsId

public final List<String> getAttrsId()
Default attrId getter.

Returns:
the attrId value

getAttrs

public final List<String> getAttrs()
Default attributes getter.

Returns:
the attrs array

getBaseDn

public final String getBaseDn()
Default base distinguish name getter.

Returns:
the baseDn value

getFilterAll

public final String getFilterAll()
Default filter getter, for all corresponding entries.

Returns:
the filterAll value

getFilterId

public final String getFilterId()
Default filter getter, for one corresponding entry.

Returns:
the attrId value


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