org.lsc.beans
Class AbstractBean

java.lang.Object
  extended by org.lsc.beans.LscBean
      extended by org.lsc.beans.AbstractBean
All Implemented Interfaces:
Serializable, Cloneable, IBean

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.

public abstract class AbstractBean
extends LscBean

Abstract bean used to centralize methods across all beans

The main purpose of this class is to provide the mapper method which allows the bean to be mapped from the original object.

The bean is also able to map a bean from SearchResult LDAP object.

Author:
Sebastien Bahloul <seb@lsc-project.org>
See Also:
Serialized Form

Field Summary
static String GET_ACCESSOR_PREFIX
          Deprecated. The accessor getter prefix.
static String MAP_FUNCTION_PREFIX
          Deprecated. The mapper method prefix.
static String SET_ACCESSOR_PREFIX
          Deprecated. The accessor setter prefix.
 
Constructor Summary
AbstractBean()
          Deprecated. The default constructor.
 
Method Summary
static AbstractBean getInstance(SearchResult entry, String baseDn, Class<?> c)
          Deprecated. Set a bean from an LDAP entry
static Map<String,List<Method>> getLocalMethods()
          Deprecated.  
static void loadLocalMethods(Class<?> cl, Map<String,List<Method>> lMs, String prefix)
          Deprecated. Load the prefixed methods of the class into the map
 void mapDistinguishName(top t, IBean destBean, String value)
          Deprecated. Method implemented to bypass the default distinguish name mapping.
static void mapper(Class<?> cl, IBean bean, Object o)
          Deprecated. Load all the object values into the bean by invoking either the object bean map function or the default mapper.
static void setLocalMethods(Map<String,List<Method>> localMethods)
          Deprecated.  
 
Methods inherited from class org.lsc.beans.LscBean
clone, generateDn, getAttributeAsSetById, getAttributeById, getAttributeFirstValueById, getAttributesNames, getAttributeValueById, getAttributeValuesById, getDataSchema, getDistinguishedName, getDistinguishName, getDN, getFullDistinguishedName, setAttribute, setAttribute, setDataSchema, setDistinguishedName, setDistinguishName, setMetadata, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

GET_ACCESSOR_PREFIX

public static final String GET_ACCESSOR_PREFIX
Deprecated. 
The accessor getter prefix.

See Also:
Constant Field Values

MAP_FUNCTION_PREFIX

public static final String MAP_FUNCTION_PREFIX
Deprecated. 
The mapper method prefix.

See Also:
Constant Field Values

SET_ACCESSOR_PREFIX

public static final String SET_ACCESSOR_PREFIX
Deprecated. 
The accessor setter prefix.

See Also:
Constant Field Values
Constructor Detail

AbstractBean

public AbstractBean()
Deprecated. 
The default constructor.

Method Detail

mapper

public static void mapper(Class<?> cl,
                          IBean bean,
                          Object o)
                   throws IllegalAccessException,
                          InvocationTargetException
Deprecated. 
Load all the object values into the bean by invoking either the object bean map function or the default mapper. TODO: Check if loading local methods each time can be improved

Parameters:
cl - the local class which may be used to check Introspection
bean - the object to fill
o - object from which the values will be taken
Throws:
IllegalArgumentException
IllegalAccessException
InvocationTargetException

loadLocalMethods

public static void loadLocalMethods(Class<?> cl,
                                    Map<String,List<Method>> lMs,
                                    String prefix)
Deprecated. 
Load the prefixed methods of the class into the map

Parameters:
cl - the class to introspect
lMs - the method map
prefix - the methods prefix to look for

mapDistinguishName

public final void mapDistinguishName(top t,
                                     IBean destBean,
                                     String value)
Deprecated. 
Method implemented to bypass the default distinguish name mapping.

Parameters:
t - the original attribute
destBean - the destination
value - the distinguish name value

getInstance

public static AbstractBean getInstance(SearchResult entry,
                                       String baseDn,
                                       Class<?> c)
                                throws NamingException
Deprecated. 
Set a bean from an LDAP entry

Parameters:
entry - the LDAP entry
baseDn - the base Dn used to set the right Dn
c - class to instantiate
Returns:
the bean
Throws:
NamingException - thrown if a directory exception is encountered while looking at the entry

getLocalMethods

public static final Map<String,List<Method>> getLocalMethods()
Deprecated. 

setLocalMethods

public static final void setLocalMethods(Map<String,List<Method>> localMethods)
Deprecated. 


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