From fe11d447da2f4c32d10f8b3f4d906079aa1a8d58 Mon Sep 17 00:00:00 2001 From: Ulrik Sandberg Date: Fri, 27 Jul 2007 07:45:32 +0000 Subject: [PATCH] Patch from Jasper on July 27. --- .../ldap/odm/annotations/DirAttribute.java | 8 +++++--- .../ldap/odm/mapping/ObjectDirectoryMapperFactory.java | 2 +- .../springframework/ldap/odm/typeconversion/package.html | 7 +++++++ .../ldap/odm/typeconversion/ValidConversionTypeTest.java | 3 +-- 4 files changed, 14 insertions(+), 6 deletions(-) create mode 100644 spring-ldap-odm/src/main/java/org/springframework/ldap/odm/typeconversion/package.html diff --git a/spring-ldap-odm/src/main/java/org/springframework/ldap/odm/annotations/DirAttribute.java b/spring-ldap-odm/src/main/java/org/springframework/ldap/odm/annotations/DirAttribute.java index 655a1ac6..50e2d36a 100644 --- a/spring-ldap-odm/src/main/java/org/springframework/ldap/odm/annotations/DirAttribute.java +++ b/spring-ldap-odm/src/main/java/org/springframework/ldap/odm/annotations/DirAttribute.java @@ -13,9 +13,11 @@ import java.lang.annotation.Target; /** * The DirAttribute describes the mapping between a bean property and an LDAP attribute. - * For example
@DirAttribute("uid")
maps a bean property to the directory attribute - * 'uid'. A DirAttribute without a value designates that the attribute has the same name - * as the bean property. + * For example: + *
@DirAttribute("uid")
+ * private String uniqueIdentifier;
+ * maps the field 'uniqueIdentifier' to the directory attribute 'uid'. A DirAttribute + * without a value designates that the attribute has the same name as the bean property. */ @Documented @Target({FIELD}) diff --git a/spring-ldap-odm/src/main/java/org/springframework/ldap/odm/mapping/ObjectDirectoryMapperFactory.java b/spring-ldap-odm/src/main/java/org/springframework/ldap/odm/mapping/ObjectDirectoryMapperFactory.java index bd733e73..1bb3a80f 100644 --- a/spring-ldap-odm/src/main/java/org/springframework/ldap/odm/mapping/ObjectDirectoryMapperFactory.java +++ b/spring-ldap-odm/src/main/java/org/springframework/ldap/odm/mapping/ObjectDirectoryMapperFactory.java @@ -41,7 +41,7 @@ public class ObjectDirectoryMapperFactory /** Attempts to return an {@link ObjectDirectoryMapper} for the given class. Upon the * first encounter of the given class, mapping is attempted. If mapping is successful * the mapper is returned. Subsequent requests for same class return a cached mapper. - * @param clazz + * @param clazz The Class to return an object directory mapper for. * @return An {@link ObjectDirectoryMapper} for the Class clazz * @throws MappingException when the mapping information for the given class contains errors. */ diff --git a/spring-ldap-odm/src/main/java/org/springframework/ldap/odm/typeconversion/package.html b/spring-ldap-odm/src/main/java/org/springframework/ldap/odm/typeconversion/package.html new file mode 100644 index 00000000..38316f67 --- /dev/null +++ b/spring-ldap-odm/src/main/java/org/springframework/ldap/odm/typeconversion/package.html @@ -0,0 +1,7 @@ + + + +Contains support classes used to assemble an LdapDao implementation. + + + \ No newline at end of file diff --git a/spring-ldap-odm/src/test/java/org/springframework/ldap/odm/typeconversion/ValidConversionTypeTest.java b/spring-ldap-odm/src/test/java/org/springframework/ldap/odm/typeconversion/ValidConversionTypeTest.java index da69ecc3..a5241bc5 100644 --- a/spring-ldap-odm/src/test/java/org/springframework/ldap/odm/typeconversion/ValidConversionTypeTest.java +++ b/spring-ldap-odm/src/test/java/org/springframework/ldap/odm/typeconversion/ValidConversionTypeTest.java @@ -7,11 +7,10 @@ package org.springframework.ldap.odm.typeconversion; import junit.framework.TestCase; +import junit.framework.Assert; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.springframework.ldap.core.DistinguishedName; -import org.testng.Assert; - import javax.naming.ldap.LdapName; import java.util.Date; import java.util.List;