[java-identity-provider COMMIT] in /trunk: idp-attribute-resolver-impl/src/main/java/net/shibboleth/idp/attribute/res...

noreply at shibboleth.net noreply at shibboleth.net
Tue Oct 23 15:42:21 EDT 2012


Author: tzeller
Date: Tue Oct 23 15:42:21 2012
New Revision: 4227

URL: http://svn.shibboleth.net/view/java-identity-provider?rev=4227&view=rev
Log:
Update ldaptive to 1.0-RC5 from RC3, which renames LdapResult to SearchResult.

Added:
    trunk/idp-attribute-resolver-impl/src/main/java/net/shibboleth/idp/attribute/resolver/impl/dc/ldap/SearchResultMappingStrategy.java
      - copied, changed from r4216, trunk/idp-attribute-resolver-impl/src/main/java/net/shibboleth/idp/attribute/resolver/impl/dc/ldap/LdapResultMappingStrategy.java
Modified:
    trunk/idp-attribute-resolver-impl/src/main/java/net/shibboleth/idp/attribute/resolver/impl/dc/ldap/LdapDataConnector.java
    trunk/idp-attribute-resolver-impl/src/main/java/net/shibboleth/idp/attribute/resolver/impl/dc/ldap/LdapResultMappingStrategy.java
    trunk/idp-attribute-resolver-impl/src/main/java/net/shibboleth/idp/attribute/resolver/impl/dc/ldap/StringAttributeValueMappingStrategy.java
    trunk/idp-parent/pom.xml

Modified: trunk/idp-attribute-resolver-impl/src/main/java/net/shibboleth/idp/attribute/resolver/impl/dc/ldap/LdapDataConnector.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-attribute-resolver-impl/src/main/java/net/shibboleth/idp/attribute/resolver/impl/dc/ldap/LdapDataConnector.java?rev=4227&r1=4226&r2=4227&view=diff
==============================================================================
--- trunk/idp-attribute-resolver-impl/src/main/java/net/shibboleth/idp/attribute/resolver/impl/dc/ldap/LdapDataConnector.java (original)
+++ trunk/idp-attribute-resolver-impl/src/main/java/net/shibboleth/idp/attribute/resolver/impl/dc/ldap/LdapDataConnector.java Tue Oct 23 15:42:21 2012
@@ -33,10 +33,9 @@
 import org.ldaptive.Connection;
 import org.ldaptive.ConnectionFactory;
 import org.ldaptive.LdapException;
-import org.ldaptive.LdapResult;
 import org.ldaptive.SearchOperation;
 import org.ldaptive.SearchRequest;
-
+import org.ldaptive.SearchResult;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -61,8 +60,8 @@
     /** Builder used to create the search requests executed against the LDAP. */
     private SearchRequestBuilder requestBuilder;
 
-    /** Strategy for mapping from a {@link ResultSet} to a collection of {@link Attribute}s. */
-    private LdapResultMappingStrategy mappingStrategy;
+    /** Strategy for mapping from a {@link SearchResult} to a collection of {@link Attribute}s. */
+    private SearchResultMappingStrategy mappingStrategy;
 
     /** Whether an empty result set is an error. */
     private boolean noResultIsAnError;
@@ -113,20 +112,20 @@
     }
 
     /**
-     * Gets the strategy for mapping from a {@link LdapResult} to a collection of {@link Attribute}s.
-     * 
-     * @return strategy for mapping from a {@link LdapResult} to a collection of {@link Attribute}s
-     */
-    public LdapResultMappingStrategy getLdapResultMappingStrategy() {
+     * Gets the strategy for mapping from a {@link SearchResult} to a collection of {@link Attribute}s.
+     * 
+     * @return strategy for mapping from a {@link SearchResult} to a collection of {@link Attribute}s
+     */
+    public SearchResultMappingStrategy getSearchResultMappingStrategy() {
         return mappingStrategy;
     }
 
     /**
-     * Sets the strategy for mapping from a {@link LdapResult} to a collection of {@link Attribute}s.
-     * 
-     * @param strategy strategy for mapping from a {@link LdapResult} to a collection of {@link Attribute}s
-     */
-    public void setLdapResultMappingStrategy(@Nonnull final LdapResultMappingStrategy strategy) {
+     * Sets the strategy for mapping from a {@link SearchResult} to a collection of {@link Attribute}s.
+     * 
+     * @param strategy strategy for mapping from a {@link SearchResult} to a collection of {@link Attribute}s
+     */
+    public void setSearchResultMappingStrategy(@Nonnull final SearchResultMappingStrategy strategy) {
         ComponentSupport.ifInitializedThrowUnmodifiabledComponentException(this);
         ComponentSupport.ifDestroyedThrowDestroyedComponentException(this);
 
@@ -264,7 +263,7 @@
             connection = connectionFactory.getConnection();
             connection.open();
             final SearchOperation search = new SearchOperation(connection);
-            final LdapResult result = search.execute(request).getResult();
+            final SearchResult result = search.execute(request).getResult();
 
             final Optional<Map<String, Attribute>> resolvedAttributes = mappingStrategy.map(result);
             if (!resolvedAttributes.isPresent() && noResultIsAnError) {

Copied: trunk/idp-attribute-resolver-impl/src/main/java/net/shibboleth/idp/attribute/resolver/impl/dc/ldap/SearchResultMappingStrategy.java (from r4216, trunk/idp-attribute-resolver-impl/src/main/java/net/shibboleth/idp/attribute/resolver/impl/dc/ldap/LdapResultMappingStrategy.java)

[... 69 lines stripped ...]


More information about the commits mailing list