|
Spring LDAP | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ObjectDirectoryMapper
The ObjectDirectoryMapper keeps track of managed class metadata and is used by LdapTemplate
to map to/from entity objects annotated with the annotations specified in the org.springframework.ldap.odm.annotations
package. Instances of this class are typically intended for internal use only.
Method Summary | ||
---|---|---|
String |
attributeFor(Class<?> clazz,
String fieldName)
Get the attribute corresponding to the specified field name. |
|
Filter |
filterFor(Class<?> clazz,
Filter baseFilter)
Use the specified search filter and return a new one that only applies to entries of the specified class. |
|
Name |
getCalculatedId(Object entry)
|
|
Name |
getId(Object entry)
Get the distinguished name for the specified object. |
|
void |
manageClass(Class<?> clazz)
Check if the specified class is already managed by this instance; if not, check the metadata and add the class to the managed classes. |
|
|
mapFromLdapDataEntry(LdapDataEntry ctx,
Class<T> clazz)
Used to convert from the JNDI LDAP representation of an Entry to the Java representation when reading from LDAP. |
|
void |
mapToLdapDataEntry(Object entry,
LdapDataEntry context)
Used to convert from Java representation of an Ldap Entry when writing to the Ldap directory |
|
void |
setId(Object entry,
Name id)
Set the distinguished name for the specified object. |
Method Detail |
---|
void mapToLdapDataEntry(Object entry, LdapDataEntry context)
entry
- - The entry to convert.context
- - The LDAP context to store the converted entry
NamingException
- on error.<T> T mapFromLdapDataEntry(LdapDataEntry ctx, Class<T> clazz)
NamingException
- on error.Name getId(Object entry)
entry
- the entry to get distinguished name for.
NamingException
- on error.void setId(Object entry, Name id)
entry
- the entry to set the name onid
- the name to set
NamingException
- on error.Name getCalculatedId(Object entry)
Filter filterFor(Class<?> clazz, Filter baseFilter)
clazz
- the class.baseFilter
- the filter we want to use.
NamingException
- on error.String attributeFor(Class<?> clazz, String fieldName)
clazz
- the clazz.fieldName
- the field name.
IllegalArgumentException
- if the fieldName is not present in the class or if
it is not mapped to an attribute.void manageClass(Class<?> clazz)
clazz
- the class to manage.
NamingException
- on error.
|
Spring LDAP | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |