A while back I wrote an extension to Spring LDAP called Spring LDAP Object Directory Mapping (ODM). Spring LDAP ODM plays a similar role with respect to an LDAP directory to that played by Object-Relational Mapping (ORM) tools such as Hibernate with respect to a relational database.
Spring LDAP ODM represents LDAP objects as annotated POJOs. These POJOs may then be used with the Spring LDAP ODM library to search and to carry out CRUD operations against an LDAP directory. Also a tool is provided that is capable of generating appropriately annotated POJOs from an existing LDAP schema.
I actually thought that Spring LDAP ODM was not going to make its way into Spring LDAP, as after I supplied the software I could not find time to create reference documentation above that generated by the Javadoc. But it seems that one of the Spring LDAP crew has kindly stepped in to provide some documentation for me. This documentation does not cover all of the functionality of Spring LDAP ODM - but with the Javadoc it should be easy enough to use the library.
References:
- Javadoc - see the org.springframework.ldap.odm.* packges.
- Reference Documentation - it is not comprehensive but is a good start.
- Download Snaphot
I will try to find some time to enhance the reference documentation in coming weeks.
i have a problem - OdmManagerImpl.update calls context.rebind() that removes the object at first and creates one. It doesn't work, if child elements exist. Better to use context.modifyAttributes() at this place.
ReplyDeleteHi
ReplyDeleteAny tips on how to handle nested schema objects? I cant find anything in the docs to help me
eg:
{code}
ou=Domains,o=myOrg
\_cn=Domain1,ou=Domains,o=myOrg
\_ou=Contexts,cn=Domain1,ou=Domains,o=myOrg
\_cn=ItemA,ou=Contexts,cn=Domain1,ou=Domains,o=myOrg
\_cn=ItemB,ou=Contexts,cn=Domain1,ou=Domains,o=myOrg
{code}
I want a POJO called Domain which will contain Domain1 and a list of Contexts containing POJOs for ItemA and ItemB