jLDAPBeans is being developed using the J2SE 5.0 because it uses many of the improvements included in this new release of the Java Virtual Machine like Annotations and Generics.
While java Generics are not deeply supported, java Annotations are required to write any LDAP bean.
Writing LDAP beans are as easy to write than any other bean with the particularity that
must extend the net.sf.jldapbeans.commons.Top
clas and use jLDAPBean
Annotations that will identify its objectClass
and its attributes.
Here is an example:
... import net.sf.jldapbeans.commons.Top; import net.sf.jldapbeans.lang.annotation.*; ... @LdapBean public interface Organization extends Top { ... @LdapAttribute public List getOrganizationName(); public void setOrganizationName(List value); ... }
This is an example of a simple bean for the example objectClass
that
has one attribute which responds to exampleName and which is SINGLE-VALUE
and has not any required attributes.