From 0d9f0a0e988060f438114ba35e1986aa5e4256d3 Mon Sep 17 00:00:00 2001 From: Ulrik Sandberg Date: Thu, 20 Nov 2008 15:38:42 +0000 Subject: [PATCH] Minor cleanup. --- .../core/simple/SimpleLdapOperations.java | 37 ++++++++++++------- 1 file changed, 23 insertions(+), 14 deletions(-) diff --git a/core-tiger/src/main/java/org/springframework/ldap/core/simple/SimpleLdapOperations.java b/core-tiger/src/main/java/org/springframework/ldap/core/simple/SimpleLdapOperations.java index 9f3e9c75..780603a6 100644 --- a/core-tiger/src/main/java/org/springframework/ldap/core/simple/SimpleLdapOperations.java +++ b/core-tiger/src/main/java/org/springframework/ldap/core/simple/SimpleLdapOperations.java @@ -55,7 +55,8 @@ public interface SimpleLdapOperations { * mapped by the ParametrizedContextMapper. * @throws NamingException if any error occurs. */ - List search(String base, String filter, ParameterizedContextMapper mapper); + List search(String base, String filter, + ParameterizedContextMapper mapper); /** * Search for a List of type T using the supplied filter and link @@ -70,7 +71,8 @@ public interface SimpleLdapOperations { * @throws NamingException if any error occurs. * @since 1.3 */ - List search(Name base, String filter, ParameterizedContextMapper mapper); + List search(Name base, String filter, + ParameterizedContextMapper mapper); /** * Search for a List of type T using the supplied filter, SearchControls, @@ -88,8 +90,8 @@ public interface SimpleLdapOperations { * mapped by the ParametrizedContextMapper. * @throws NamingException if any error occurs. */ - List search(String base, String filter, SearchControls controls, ParameterizedContextMapper mapper, - DirContextProcessor processor); + List search(String base, String filter, SearchControls controls, + ParameterizedContextMapper mapper, DirContextProcessor processor); /** * Search for a List of type T using the supplied filter, SearchControls, @@ -108,8 +110,8 @@ public interface SimpleLdapOperations { * @throws NamingException if any error occurs. * @since 1.3 */ - List search(Name base, String filter, SearchControls controls, ParameterizedContextMapper mapper, - DirContextProcessor processor); + List search(Name base, String filter, SearchControls controls, + ParameterizedContextMapper mapper, DirContextProcessor processor); /** * Perform a lookup of the specified DN and map the result using the mapper. @@ -142,11 +144,13 @@ public interface SimpleLdapOperations { * @param mapper the mapper to use for the search. * @return the single object returned by the mapper that matches the search * criteria. - * @throws IncorrectResultSizeDataAccessException if the result is not one unique entry + * @throws IncorrectResultSizeDataAccessException if the result is not one + * unique entry * @since 1.3 */ - T searchForObject(String base, String filter, ParameterizedContextMapper mapper); - + T searchForObject(String base, String filter, + ParameterizedContextMapper mapper); + /** * Perform a search for a unique entry matching the specified search * criteria and return the found object. If no entry is found or if there @@ -157,10 +161,12 @@ public interface SimpleLdapOperations { * @param mapper the mapper to use for the search. * @return the single object returned by the mapper that matches the search * criteria. - * @throws IncorrectResultSizeDataAccessException if the result is not one unique entry + * @throws IncorrectResultSizeDataAccessException if the result is not one + * unique entry * @since 1.3 */ - T searchForObject(Name base, String filter, ParameterizedContextMapper mapper); + T searchForObject(Name base, String filter, + ParameterizedContextMapper mapper); /** * Look up the specified DN, and automatically cast it to a @@ -221,6 +227,7 @@ public interface SimpleLdapOperations { * @param ctx the context to bind * @throws IllegalStateException if no DN is set or if the instance is in * update mode. + * @since 1.3 */ void bind(DirContextOperations ctx); @@ -263,7 +270,7 @@ public interface SimpleLdapOperations { * @throws NamingException if any error occurs. */ void modifyAttributes(DirContextOperations ctx); - + /** * Utility method to perform a simple LDAP 'bind' authentication. Search for * the LDAP entry to authenticate using the supplied base DN and filter; use @@ -276,7 +283,8 @@ public interface SimpleLdapOperations { *
 	 * AndFilter filter = new AndFilter();
 	 * filter.and("objectclass", "person").and("uid", userId);
-	 * boolean authenticated = ldapTemplate.authenticate(DistinguishedName.EMPTY_PATH, filter.toString(), password);
+	 * boolean authenticated = ldapTemplate.authenticate(DistinguishedName.EMPTY_PATH,
+	 * 		filter.toString(), password);
 	 * 
* * @param base the DN to use as the base of the search. @@ -300,7 +308,8 @@ public interface SimpleLdapOperations { *
 	 * AndFilter filter = new AndFilter();
 	 * filter.and("objectclass", "person").and("uid", userId);
-	 * boolean authenticated = ldapTemplate.authenticate(DistinguishedName.EMPTY_PATH, filter.toString(), password);
+	 * boolean authenticated = ldapTemplate.authenticate(DistinguishedName.EMPTY_PATH,
+	 * 		filter.toString(), password);
 	 * 
* * @param base the DN to use as the base of the search.