org.ldaptive.beans
Class AbstractLdapEntryMapper<T>

java.lang.Object
  extended by org.ldaptive.beans.AbstractLdapEntryMapper<T>
Type Parameters:
T - type of object to map
All Implemented Interfaces:
LdapEntryMapper<T>
Direct Known Subclasses:
DefaultLdapEntryMapper, SpringLdapEntryMapper

public abstract class AbstractLdapEntryMapper<T>
extends Object
implements LdapEntryMapper<T>

Base implementation of an ldap entry mapper. Uses a ClassDescriptor for decoding and encoding of objects.

Version:
$Revision: 3013 $ $Date: 2014-07-02 11:26:52 -0400 (Wed, 02 Jul 2014) $
Author:
Middleware Services

Field Summary
protected  org.slf4j.Logger logger
          Logger for this class.
 
Constructor Summary
AbstractLdapEntryMapper()
           
 
Method Summary
protected abstract  ClassDescriptor getClassDescriptor(T object)
          Returns the class descriptor.
 void map(org.ldaptive.LdapEntry source, T dest)
          Injects data from the supplied ldap entry into the supplied destination object.
 org.ldaptive.LdapEntry map(T source)
          Injects data from the supplied source object into a new instance of ldap entry.
 void map(T source, org.ldaptive.LdapEntry dest)
          Injects data from the supplied source object into the supplied ldap entry.
 String mapDn(T object)
          Returns the LDAP DN for the supplied object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected final org.slf4j.Logger logger
Logger for this class.

Constructor Detail

AbstractLdapEntryMapper

public AbstractLdapEntryMapper()
Method Detail

getClassDescriptor

protected abstract ClassDescriptor getClassDescriptor(T object)
Returns the class descriptor.

Parameters:
object - to return the class descriptor for
Returns:
class descriptor

mapDn

public String mapDn(T object)
Returns the LDAP DN for the supplied object.

Specified by:
mapDn in interface LdapEntryMapper<T>
Parameters:
object - to retrieve the DN from
Returns:
LDAP DN

map

public org.ldaptive.LdapEntry map(T source)
Injects data from the supplied source object into a new instance of ldap entry.

Parameters:
source - to read from
Returns:
ldap entry

map

public void map(T source,
                org.ldaptive.LdapEntry dest)
Injects data from the supplied source object into the supplied ldap entry.

Specified by:
map in interface LdapEntryMapper<T>
Parameters:
source - to read from
dest - to write to

map

public void map(org.ldaptive.LdapEntry source,
                T dest)
Injects data from the supplied ldap entry into the supplied destination object.

Specified by:
map in interface LdapEntryMapper<T>
Parameters:
source - to read from
dest - to write to


Copyright © 2003-2014 Virginia Tech. All Rights Reserved.