directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1780564 - in /directory/shared/trunk: integ-osgi/src/test/java/org/apache/directory/api/osgi/ApiLdapCodecCoreOsgiTest.java ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/osgi/DefaultLdapCodecService.java
Date Fri, 27 Jan 2017 14:37:12 GMT
Author: elecharny
Date: Fri Jan 27 14:37:12 2017
New Revision: 1780564

URL: http://svn.apache.org/viewvc?rev=1780564&view=rev
Log:
Added the SortReqest/Response control in the loaded control list in the DefaultLdapCodecService

Modified:
    directory/shared/trunk/integ-osgi/src/test/java/org/apache/directory/api/osgi/ApiLdapCodecCoreOsgiTest.java
    directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/osgi/DefaultLdapCodecService.java

Modified: directory/shared/trunk/integ-osgi/src/test/java/org/apache/directory/api/osgi/ApiLdapCodecCoreOsgiTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/integ-osgi/src/test/java/org/apache/directory/api/osgi/ApiLdapCodecCoreOsgiTest.java?rev=1780564&r1=1780563&r2=1780564&view=diff
==============================================================================
--- directory/shared/trunk/integ-osgi/src/test/java/org/apache/directory/api/osgi/ApiLdapCodecCoreOsgiTest.java
(original)
+++ directory/shared/trunk/integ-osgi/src/test/java/org/apache/directory/api/osgi/ApiLdapCodecCoreOsgiTest.java
Fri Jan 27 14:37:12 2017
@@ -40,6 +40,7 @@ import org.apache.directory.api.ldap.cod
 import org.apache.directory.api.ldap.codec.search.SubstringFilter;
 import org.apache.directory.api.ldap.model.message.SearchRequest;
 import org.apache.directory.api.ldap.model.message.SearchRequestImpl;
+import org.apache.directory.api.ldap.model.message.controls.SortRequest;
 import org.junit.Test;
 import org.osgi.framework.ServiceReference;
 
@@ -100,8 +101,11 @@ public class ApiLdapCodecCoreOsgiTest ex
     {
         assertTrue( LdapApiServiceFactory.isInitialized() );
         assertFalse( LdapApiServiceFactory.isUsingStandaloneImplementation() );
-        assertNotNull( LdapApiServiceFactory.getSingleton() );
-        assertNotNull( LdapApiServiceFactory.getSingleton().getProtocolCodecFactory() );
+        
+        LdapApiService ldapApiService = LdapApiServiceFactory.getSingleton();
+        assertNotNull( ldapApiService );
+        assertNotNull( ldapApiService.getProtocolCodecFactory() );
+        
+        assertTrue( ldapApiService.isControlRegistered( SortRequest.OID ) );
     }
-
 }

Modified: directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/osgi/DefaultLdapCodecService.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/osgi/DefaultLdapCodecService.java?rev=1780564&r1=1780563&r2=1780564&view=diff
==============================================================================
--- directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/osgi/DefaultLdapCodecService.java
(original)
+++ directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/osgi/DefaultLdapCodecService.java
Fri Jan 27 14:37:12 2017
@@ -48,6 +48,8 @@ import org.apache.directory.api.ldap.cod
 import org.apache.directory.api.ldap.codec.controls.search.pagedSearch.PagedResultsFactory;
 import org.apache.directory.api.ldap.codec.controls.search.persistentSearch.PersistentSearchFactory;
 import org.apache.directory.api.ldap.codec.controls.search.subentries.SubentriesFactory;
+import org.apache.directory.api.ldap.codec.controls.sort.SortRequestFactory;
+import org.apache.directory.api.ldap.codec.controls.sort.SortResponseFactory;
 import org.apache.directory.api.ldap.model.message.Control;
 import org.apache.directory.api.ldap.model.message.ExtendedRequest;
 import org.apache.directory.api.ldap.model.message.ExtendedRequestImpl;
@@ -61,6 +63,8 @@ import org.apache.directory.api.ldap.mod
 import org.apache.directory.api.ldap.model.message.controls.PagedResults;
 import org.apache.directory.api.ldap.model.message.controls.PersistentSearch;
 import org.apache.directory.api.ldap.model.message.controls.ProxiedAuthz;
+import org.apache.directory.api.ldap.model.message.controls.SortRequest;
+import org.apache.directory.api.ldap.model.message.controls.SortResponse;
 import org.apache.directory.api.ldap.model.message.controls.Subentries;
 import org.apache.directory.api.util.Strings;
 import org.apache.directory.api.util.exception.NotImplementedException;
@@ -131,6 +135,14 @@ public class DefaultLdapCodecService imp
         ControlFactory<Subentries> subentriesFactory = new SubentriesFactory( this
);
         controlFactories.put( subentriesFactory.getOid(), subentriesFactory );
         LOG.info( "Registered pre-bundled control factory: {}", subentriesFactory.getOid()
);
+
+        ControlFactory<SortRequest> sortRequestFactory = new SortRequestFactory( this
);
+        controlFactories.put( sortRequestFactory.getOid(), sortRequestFactory );
+        LOG.info( "Registered pre-bundled control factory: {}", sortRequestFactory.getOid()
);
+
+        ControlFactory<SortResponse> sortResponseFactory = new SortResponseFactory(
this );
+        controlFactories.put( sortResponseFactory.getOid(), sortResponseFactory );
+        LOG.info( "Registered pre-bundled control factory: {}", sortResponseFactory.getOid()
);
     }
 
 



Mime
View raw message