directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1103786 - in /directory/shared/branches/shared-osgi: integ/src/test/java/org/apache/directory/shared/ldap/codec/api/ ldap/codec/standalone/ ldap/codec/standalone/src/main/java/org/apache/directory/shared/ldap/codec/standalone/ ldap/codec/s...
Date Mon, 16 May 2011 16:27:15 GMT
Author: elecharny
Date: Mon May 16 16:27:15 2011
New Revision: 1103786

URL: http://svn.apache.org/viewvc?rev=1103786&view=rev
Log:
First drop of another approach for loading extension points

Added:
    directory/shared/branches/shared-osgi/ldap/codec/standalone/src/main/java/org/apache/directory/shared/ldap/codec/standalone/StandaloneLdapApiService.java
      - copied, changed from r1103720, directory/shared/branches/shared-osgi/ldap/codec/standalone/src/main/java/org/apache/directory/shared/ldap/codec/standalone/StandaloneLdapCodecService.java
Removed:
    directory/shared/branches/shared-osgi/ldap/codec/standalone/src/main/java/org/apache/directory/shared/ldap/codec/standalone/StandaloneLdapCodecService.java
Modified:
    directory/shared/branches/shared-osgi/integ/src/test/java/org/apache/directory/shared/ldap/codec/api/StandaloneLdapCodecServiceTest.java
    directory/shared/branches/shared-osgi/ldap/codec/standalone/pom.xml
    directory/shared/branches/shared-osgi/ldap/codec/standalone/src/main/java/org/apache/directory/shared/ldap/codec/standalone/CodecHostActivator.java
    directory/shared/branches/shared-osgi/ldap/codec/standalone/src/test/java/org/apache/directory/shared/ldap/codec/osgi/AbstractCodecServiceTest.java

Modified: directory/shared/branches/shared-osgi/integ/src/test/java/org/apache/directory/shared/ldap/codec/api/StandaloneLdapCodecServiceTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-osgi/integ/src/test/java/org/apache/directory/shared/ldap/codec/api/StandaloneLdapCodecServiceTest.java?rev=1103786&r1=1103785&r2=1103786&view=diff
==============================================================================
--- directory/shared/branches/shared-osgi/integ/src/test/java/org/apache/directory/shared/ldap/codec/api/StandaloneLdapCodecServiceTest.java
(original)
+++ directory/shared/branches/shared-osgi/integ/src/test/java/org/apache/directory/shared/ldap/codec/api/StandaloneLdapCodecServiceTest.java
Mon May 16 16:27:15 2011
@@ -23,7 +23,7 @@ package org.apache.directory.shared.ldap
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
 
-import org.apache.directory.shared.ldap.codec.standalone.StandaloneLdapCodecService;
+import org.apache.directory.shared.ldap.codec.standalone.StandaloneLdapApiService;
 import org.apache.directory.shared.ldap.extras.controls.ppolicy.PasswordPolicy;
 import org.apache.directory.shared.ldap.extras.extended.StoredProcedureRequest;
 import org.apache.directory.shared.ldap.extras.extended.StoredProcedureRequestImpl;
@@ -43,9 +43,9 @@ public class StandaloneLdapCodecServiceT
      * Test method for {@link org.apache.directory.shared.ldap.codec.standalone.StandaloneLdapCodecService#StandaloneLdapCodecService()}.
      */
     @Test
-    public void testLoadingExtras()
+    public void testLoadingExtras() throws Exception
     {
-        StandaloneLdapCodecService codec = new StandaloneLdapCodecService();
+        StandaloneLdapApiService codec = new StandaloneLdapApiService();
         
         assertTrue( codec.isControlRegistered( PasswordPolicy.OID ) );
 
@@ -59,9 +59,9 @@ public class StandaloneLdapCodecServiceT
      * Test an extended operation.
      */
     @Test
-    public void testLoadingExtendedOperation()
+    public void testLoadingExtendedOperation() throws Exception
     {
-        StandaloneLdapCodecService codec = new StandaloneLdapCodecService();
+        StandaloneLdapApiService codec = new StandaloneLdapApiService();
         StoredProcedureRequest req = new StoredProcedureRequestImpl();
         req.setLanguage( "Java" );
         req.setProcedure( Strings.getBytesUtf8( "bogusProc" ) );

Modified: directory/shared/branches/shared-osgi/ldap/codec/standalone/pom.xml
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-osgi/ldap/codec/standalone/pom.xml?rev=1103786&r1=1103785&r2=1103786&view=diff
==============================================================================
--- directory/shared/branches/shared-osgi/ldap/codec/standalone/pom.xml (original)
+++ directory/shared/branches/shared-osgi/ldap/codec/standalone/pom.xml Mon May 16 16:27:15
2011
@@ -57,6 +57,11 @@
       <groupId>${project.groupId}</groupId>
       <artifactId>shared-ldap-codec-core</artifactId>
     </dependency> 
+    
+    <dependency>
+      <groupId>${project.groupId}</groupId>
+      <artifactId>shared-ldap-extras-codec-api</artifactId>
+    </dependency> 
 
     <dependency>
       <groupId>org.apache.felix</groupId>
@@ -81,6 +86,17 @@
             <org.osgi.framework.storage>
               osgi-cache
             </org.osgi.framework.storage>
+            <default.controls>
+              org.apache.directory.shared.ldap.codec.controls.cascade.CascadeFactory,
+              org.apache.directory.shared.ldap.codec.controls.manageDsaIT.ManageDsaITFactory,
+              org.apache.directory.shared.ldap.codec.controls.search.entryChange.EntryChangeFactory,
+              org.apache.directory.shared.ldap.codec.controls.search.pagedSearch.PagedResultsFactory,
+              org.apache.directory.shared.ldap.codec.controls.search.persistentSearch.PersistentSearchFactory,
+              org.apache.directory.shared.ldap.codec.controls.search.persistentSearch.PersistentSearchFactory
+            </default.controls>
+            <extra.controls>
+              
+            </extra.controls>
           </systemPropertyVariables>
         </configuration>
       </plugin>

Modified: directory/shared/branches/shared-osgi/ldap/codec/standalone/src/main/java/org/apache/directory/shared/ldap/codec/standalone/CodecHostActivator.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-osgi/ldap/codec/standalone/src/main/java/org/apache/directory/shared/ldap/codec/standalone/CodecHostActivator.java?rev=1103786&r1=1103785&r2=1103786&view=diff
==============================================================================
--- directory/shared/branches/shared-osgi/ldap/codec/standalone/src/main/java/org/apache/directory/shared/ldap/codec/standalone/CodecHostActivator.java
(original)
+++ directory/shared/branches/shared-osgi/ldap/codec/standalone/src/main/java/org/apache/directory/shared/ldap/codec/standalone/CodecHostActivator.java
Mon May 16 16:27:15 2011
@@ -20,9 +20,6 @@
 package org.apache.directory.shared.ldap.codec.standalone;
 
 
-import java.io.File;
-import java.io.FileFilter;
-
 import org.apache.directory.shared.ldap.codec.api.LdapCodecService;
 import org.osgi.framework.Bundle;
 import org.osgi.framework.BundleActivator;
@@ -37,12 +34,12 @@ import org.osgi.framework.ServiceRegistr
  */
 public class CodecHostActivator implements BundleActivator
 {
-    private StandaloneLdapCodecService codec;
+    private StandaloneLdapApiService codec;
     private ServiceRegistration registration;
     private BundleContext bundleContext;
     
     
-    public CodecHostActivator( StandaloneLdapCodecService codec )
+    public CodecHostActivator( StandaloneLdapApiService codec )
     {
         this.codec = codec;
     }
@@ -57,6 +54,7 @@ public class CodecHostActivator implemen
         
         registration = bundleContext.registerService( LdapCodecService.class.getName(), codec,
null );
         
+        /*
         if ( codec.getPluginDirectory() != null )
         {
             File[] files = codec.getPluginDirectory().listFiles( new FileFilter()
@@ -78,6 +76,7 @@ public class CodecHostActivator implemen
                 bundle.start();
             }
         }
+        */
     }
     
 

Copied: directory/shared/branches/shared-osgi/ldap/codec/standalone/src/main/java/org/apache/directory/shared/ldap/codec/standalone/StandaloneLdapApiService.java
(from r1103720, directory/shared/branches/shared-osgi/ldap/codec/standalone/src/main/java/org/apache/directory/shared/ldap/codec/standalone/StandaloneLdapCodecService.java)
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-osgi/ldap/codec/standalone/src/main/java/org/apache/directory/shared/ldap/codec/standalone/StandaloneLdapApiService.java?p2=directory/shared/branches/shared-osgi/ldap/codec/standalone/src/main/java/org/apache/directory/shared/ldap/codec/standalone/StandaloneLdapApiService.java&p1=directory/shared/branches/shared-osgi/ldap/codec/standalone/src/main/java/org/apache/directory/shared/ldap/codec/standalone/StandaloneLdapCodecService.java&r1=1103720&r2=1103786&rev=1103786&view=diff
==============================================================================
--- directory/shared/branches/shared-osgi/ldap/codec/standalone/src/main/java/org/apache/directory/shared/ldap/codec/standalone/StandaloneLdapCodecService.java
(original)
+++ directory/shared/branches/shared-osgi/ldap/codec/standalone/src/main/java/org/apache/directory/shared/ldap/codec/standalone/StandaloneLdapApiService.java
Mon May 16 16:27:15 2011
@@ -20,16 +20,12 @@
 package org.apache.directory.shared.ldap.codec.standalone;
 
 
-import java.io.File;
+import java.lang.reflect.Constructor;
 import java.nio.ByteBuffer;
-import java.util.ArrayList;
 import java.util.Collections;
 import java.util.HashMap;
-import java.util.HashSet;
 import java.util.Iterator;
-import java.util.List;
 import java.util.Map;
-import java.util.Set;
 
 import javax.naming.NamingException;
 import javax.naming.ldap.BasicControl;
@@ -47,12 +43,6 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.codec.api.LdapMessageContainer;
 import org.apache.directory.shared.ldap.codec.api.MessageDecorator;
 import org.apache.directory.shared.ldap.codec.api.UnsolicitedResponseFactory;
-import org.apache.directory.shared.ldap.codec.controls.cascade.CascadeFactory;
-import org.apache.directory.shared.ldap.codec.controls.manageDsaIT.ManageDsaITFactory;
-import org.apache.directory.shared.ldap.codec.controls.search.entryChange.EntryChangeFactory;
-import org.apache.directory.shared.ldap.codec.controls.search.pagedSearch.PagedResultsFactory;
-import org.apache.directory.shared.ldap.codec.controls.search.persistentSearch.PersistentSearchFactory;
-import org.apache.directory.shared.ldap.codec.controls.search.subentries.SubentriesFactory;
 import org.apache.directory.shared.ldap.model.message.Control;
 import org.apache.directory.shared.ldap.model.message.ExtendedRequest;
 import org.apache.directory.shared.ldap.model.message.ExtendedRequestImpl;
@@ -60,14 +50,11 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.model.message.ExtendedResponseImpl;
 import org.apache.directory.shared.ldap.model.message.Message;
 import org.apache.directory.shared.ldap.model.message.controls.OpaqueControl;
-import org.apache.directory.shared.util.OsgiUtils;
 import org.apache.directory.shared.util.Strings;
 import org.apache.directory.shared.util.exception.NotImplementedException;
 import org.apache.felix.framework.Felix;
-import org.apache.felix.framework.util.FelixConstants;
 import org.apache.mina.filter.codec.ProtocolCodecFactory;
 import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -78,52 +65,11 @@ import org.slf4j.LoggerFactory;
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
-public class StandaloneLdapCodecService implements LdapCodecService
+public class StandaloneLdapApiService implements LdapCodecService
 {
-    /** Missing felix constants for cache directory locking */
-    public static final String FELIX_CACHE_LOCKING = "felix.cache.locking";
-
-    /** Missing felix constants for cache root directory path */
-    public static final String FELIX_CACHE_ROOTDIR = "felix.cache.rootdir";
-
     /** A logger */
-    private static final Logger LOG = LoggerFactory.getLogger( StandaloneLdapCodecService.class
);
-    
-    /**
-     * This should be constructed at class initialization time by reading the
-     * Export-Package attribute of the this jar's manifest file.
-     */
-    private static final String[] SYSTEM_PACKAGES =
-    {
-        "org.slf4j; version=1.6.0",
-        "org.apache.directory.shared.i18n; version=1.0.0",
-        "org.apache.directory.shared.util; version=1.0.0",
-        "org.apache.directory.shared.util.exception; version=1.0.0",
-        "org.apache.directory.shared.asn1; version=1.0.0",
-        "org.apache.directory.shared.asn1.util; version=1.0.0",
-        "org.apache.directory.shared.asn1.ber; version=1.0.0",
-        "org.apache.directory.shared.asn1.ber.tlv; version=1.0.0",
-        "org.apache.directory.shared.asn1.ber.grammar; version=1.0.0",
-        "org.apache.directory.shared.asn1.actions; version=1.0.0",
-        "org.apache.directory.shared.ldap.asn1.ber; version=1.0.0",
-        "org.apache.directory.shared.ldap.model; version=1.0.0",
-        "org.apache.directory.shared.ldap.model.exception; version=1.0.0",
-        "org.apache.directory.shared.ldap.model.filter; version=1.0.0",
-        "org.apache.directory.shared.ldap.model.name; version=1.0.0",
-        "org.apache.directory.shared.ldap.model.entry; version=1.0.0",
-        "org.apache.directory.shared.ldap.model.schema; version=1.0.0",
-        "org.apache.directory.shared.ldap.model.message; version=1.0.0",
-        "org.apache.directory.shared.ldap.model.message.controls; version=1.0.0",
-        "org.apache.directory.shared.ldap.codec.controls; version=1.0.0",
-        "org.apache.directory.shared.ldap.codec.api; version=1.0.0",
-        "org.apache.directory.shared.ldap.model.url; version=1.0.0",
-        "org.apache.directory.shared.ldap.extras.controls",
-        "org.apache.directory.shared.ldap.extras.extended"
-    };
+    private static final Logger LOG = LoggerFactory.getLogger( StandaloneLdapApiService.class
);
  
-    /** System property checked if the pluginProperty is null */
-    public static final String PLUGIN_DIRECTORY_PROPERTY = "codec.plugin.directory";
-    
     /** The map of registered {@link org.apache.directory.shared.ldap.codec.api.ControlFactory}'s
*/
     private Map<String,ControlFactory<?,?>> controlFactories = new HashMap<String,
ControlFactory<?,?>>();
 
@@ -141,94 +87,10 @@ public class StandaloneLdapCodecService 
     
     /** The embedded {@link Felix} instance */
     private Felix felix;
-
-    /** Felix's bundle cache directory */
-    private File cacheDirectory;
-    
-    /** The plugin (bundle) containing directory to load codec extensions from */
-    private File pluginDirectory;
-    
     
-    private void initPluginDirectory( File pluginDirectory )
-    {
-        // Use the given directory if not null, or use the default one
-        if ( pluginDirectory == null )
-        {
-            this.pluginDirectory = getPluginDirectoryDefault();
-            LOG.info( "Null plugin directory provided, using default instead: {}", this.pluginDirectory
);
-        }
-        else
-        {
-            this.pluginDirectory = pluginDirectory;
-            LOG.info( "Valid plugin directory provided: {}", this.pluginDirectory );
-        }
-        
-        // Now, if we have a plugin directory, check that it's a directory and that it's
readable
-        if ( this.pluginDirectory != null )
-        {
-            if ( ( ! this.pluginDirectory.exists() ) && ! this.pluginDirectory.mkdirs()
)
-            {
-                String msg = "The provided plugin directory is not creatable:" + this.pluginDirectory.getAbsolutePath();
-                LOG.error( msg );
-                throw new IllegalArgumentException( msg );
-            }
+    /** The list of default controls to load at startup */ 
+    private static String DEFAULT_CONTROLS_LIST = "default.controls";
 
-            if ( ! this.pluginDirectory.isDirectory() )
-            {
-                String msg = "The provided plugin directory is not a directory:" + this.pluginDirectory.getAbsolutePath();
-                LOG.error( msg );
-                throw new IllegalArgumentException( msg );
-            }
-            else if ( ! this.pluginDirectory.canRead() )
-            {
-                String msg = "The provided plugin directory is not readable:" + this.pluginDirectory.getAbsolutePath();
-                LOG.error( msg );
-                throw new IllegalArgumentException( msg );
-            }
-        }
-    }
-    
-    
-    private void initCacheDirectory( File cacheDirectory )
-    {
-        // Use the given directory if not null, or use the default one
-        if ( cacheDirectory == null )
-        {
-            this.cacheDirectory = getCacheDirectoryDefault();
-            LOG.info( "Null cache directory provided, using default instead: {}", this.cacheDirectory
);
-        }
-        else
-        {
-            this.cacheDirectory = cacheDirectory;
-            LOG.info( "Valid cache directory provided: {}", this.cacheDirectory );
-        }
-        
-        // Now, if we have a cache directory, check that it's a directory and that it's readable
-        if ( this.cacheDirectory != null )
-        {
-            if ( ! this.cacheDirectory.exists() &&  ( ! this.cacheDirectory.mkdirs()
) )
-            {
-                String msg = "The provided cache directory can't be created:" + this.cacheDirectory.getAbsolutePath();
-                LOG.error( msg );
-                throw new IllegalArgumentException( msg );
-            }
-            
-            if ( ! this.cacheDirectory.isDirectory() )
-            {
-                String msg = "The provided cache directory is not a directory:" + this.cacheDirectory.getAbsolutePath();
-                LOG.error( msg );
-                throw new IllegalArgumentException( msg );
-            }
-            else if ( ! this.cacheDirectory.canRead() )
-            {
-                String msg = "The provided cache directory is not readable:" + this.cacheDirectory.getAbsolutePath();
-                LOG.error( msg );
-                throw new IllegalArgumentException( msg );
-            }
-        }
-    }
-    
-    
     /**
      * Creates a new instance of StandaloneLdapCodecService. Optionally checks for
      * system property {@link #PLUGIN_DIRECTORY_PROPERTY}. Intended for use by 
@@ -292,130 +154,65 @@ public class StandaloneLdapCodecService 
      *   &lt;/build&gt;
      * </pre>
      */
-    public StandaloneLdapCodecService()
-    {
-        this( null, null );
-    }
-    
-    
-    /**
-     * Creates a new instance of StandaloneLdapCodecService.
-     * 
-     * @param pluginDirectory The directory where plugins are stored
-     * @param cacheDirectory The directory where the embedded Felix manages 
-     * its cache
-     */
-    public StandaloneLdapCodecService( File pluginDirectory, File cacheDirectory )
+    public StandaloneLdapApiService() throws Exception
     {
+        // Load the controls
+        loadControls();
         
-        // -------------------------------------------------------------------
-        // Handle plugin directory
-        // -------------------------------------------------------------------
-        initPluginDirectory( pluginDirectory );
+        // Load the extended operations
+        //loadExtendedOperations();
         
-        // -------------------------------------------------------------------
-        // Handle cache directory
-        // -------------------------------------------------------------------
-        initCacheDirectory( cacheDirectory );
+        // Load the schema elements
+        //loadSchemaElements();
         
-        // Load the default controls
-        loadStockControls();
+        // Load the network layer
+        //loadNetworkLayer()
         
         // Start the Felix container
-        setupFelix();
-        
-        if ( protocolCodecFactory == null )
-        {
-            try
-            {
-                @SuppressWarnings("unchecked")
-                Class<? extends ProtocolCodecFactory> clazz = ( Class<? extends
ProtocolCodecFactory> ) 
-                    Class.forName( DEFAULT_PROTOCOL_CODEC_FACTORY );
-                protocolCodecFactory = clazz.newInstance();
-            }
-            catch( Exception cause )
-            {
-                throw new RuntimeException( "Failed to load default codec factory.", cause
);
-            }
-        }
+        //loadExtendedControls();
     }
     
     
-    /**
-     * Uses system properties and default considerations to create a cache 
-     * directory that can be used when one is not provided.
-     *
-     * @see FelixConstants#FRAMEWORK_STORAGE
-     * @return The cache directory default.
-     */
-    private File getCacheDirectoryDefault()
+    private void loadControls() throws Exception
     {
-        String frameworkStorage = System.getProperties().getProperty( FelixConstants.FRAMEWORK_STORAGE
);
-        LOG.info( "{}: {}", FelixConstants.FRAMEWORK_STORAGE, frameworkStorage );
+        // first load the default controls
+        loadDefaultControls();
         
-        String felixCacheRootdir = System.getProperties().getProperty( FELIX_CACHE_ROOTDIR
);
-        LOG.info( "{}: {}", FELIX_CACHE_ROOTDIR, felixCacheRootdir );
-
-        try
-        {
-            if ( frameworkStorage == null )
-            {
-                if ( felixCacheRootdir == null )
-                {
-                    return new File( File.createTempFile( "dummy", null ).getParentFile(),

-                        "osgi-cache-" + Integer.toString( this.hashCode() ) );
-                }
-                else
-                {
-                    return new File( new File ( felixCacheRootdir ), 
-                        "osgi-cache-" + Integer.toString( this.hashCode() ) );
-                }
-            } 
-            else if ( felixCacheRootdir == null )
-            {
-                return new File( frameworkStorage + "-" + Integer.toString( this.hashCode()
) );
-            }
-            
-            // else if both are not null now
-            return new File( new File ( felixCacheRootdir ), 
-                frameworkStorage + "-" + Integer.toString( this.hashCode() ) );
-        }
-        catch ( Exception e ) 
-        {
-            String message = "Failure to create temporary cache directory: " + e.getMessage();
-            LOG.warn( message, e );
-            return null;
-        }
+        // The load the extra controls
+        //loadExtraControls();
     }
     
     
     /**
-     * Gets the optional system property value for the pluginDirectory if one 
-     * is provided.
-     *
-     * @return The path for the pluginDirectory or null if not provided.
+     * Loads the Controls implement out of the box in the codec.
      */
-    private File getPluginDirectoryDefault()
+    private void loadDefaultControls() throws Exception
     {
-        String value = System.getProperty( StandaloneLdapCodecService.PLUGIN_DIRECTORY_PROPERTY
);
-        LOG.info( "{}: {}", PLUGIN_DIRECTORY_PROPERTY, value );
+        // Load defaults from command line properties if it exists
+         String defaultControlsList = System.getProperty( DEFAULT_CONTROLS_LIST );
         
-        if ( value == null )
+        for ( String control : defaultControlsList.split( "," ) )
         {
-            return null;
+            System.out.println( control );
+
+            Class<?>[] types = new Class<?>[] { LdapCodecService.class };
+            Class<? extends ControlFactory<?, ?>> clazz = ( Class<? extends
ControlFactory<?, ?>> )Class.forName( control );
+            Constructor<?> constructor = clazz.getConstructor(types);
+            
+            ControlFactory<?, ?> factory = (ControlFactory<?, ?>)constructor.newInstance(
new Object[]{ this } );
+            controlFactories.put( factory.getOid(), factory );
+            LOG.info( "Registered pre-bundled control factory: {}", factory.getOid() );
         }
-        
-        return new File( value );
     }
     
-    
+
     /**
      * Assembles the <code>org.osgi.framework.system.packages.extra</code> list
      * of system packages exported by the embedding host to interact with bundles
      * running inside {@link Felix}.
      * 
      * @return A comma delimited list of exported host packages.
-     */
+     *
     private String getSystemPackages()
     {
         Set<String> pkgs = new HashSet<String>();
@@ -458,7 +255,7 @@ public class StandaloneLdapCodecService 
     
     /**
      * Sets up a {@link Felix} instance.
-     */
+     *
     private void setupFelix()
     {
         // initialize activator and setup system bundle activators
@@ -535,36 +332,6 @@ public class StandaloneLdapCodecService 
     }
     
     
-    /**
-     * Loads the Controls implement out of the box in the codec.
-     */
-    private void loadStockControls()
-    {
-        ControlFactory<?, ?> factory = new CascadeFactory( this );
-        controlFactories.put( factory.getOid(), factory );
-        LOG.info( "Registered pre-bundled control factory: {}", factory.getOid() );
-        
-        factory = new EntryChangeFactory( this );
-        controlFactories.put( factory.getOid(), factory );
-        LOG.info( "Registered pre-bundled control factory: {}", factory.getOid() );
-        
-        factory = new ManageDsaITFactory( this );
-        controlFactories.put( factory.getOid(), factory );
-        LOG.info( "Registered pre-bundled control factory: {}", factory.getOid() );
-        
-        factory = new PagedResultsFactory( this );
-        controlFactories.put( factory.getOid(), factory );
-        LOG.info( "Registered pre-bundled control factory: {}", factory.getOid() );
-        
-        factory = new PersistentSearchFactory( this );
-        controlFactories.put( factory.getOid(), factory );
-        LOG.info( "Registered pre-bundled control factory: {}", factory.getOid() );
-
-        factory = new SubentriesFactory( this );
-        controlFactories.put( factory.getOid(), factory );
-        LOG.info( "Registered pre-bundled control factory: {}", factory.getOid() );
-    }
-    
     //-------------------------------------------------------------------------
     // LdapCodecService implementation methods
     //-------------------------------------------------------------------------
@@ -740,20 +507,6 @@ public class StandaloneLdapCodecService 
 
 
     /**
-     * Gets the plugin directory containing codec extension bundles to load. 
-     * If null, the service checks to see if system properties were used to 
-     * specify the plugin directory. 
-     *
-     * @see {@link #PLUGIN_DIRECTORY_PROPERTY}
-     * @return The directory containing plugins.
-     */
-    public File getPluginDirectory()
-    {
-        return pluginDirectory;
-    }
-
-
-    /**
      * {@inheritDoc}
      */
     public Iterator<String> registeredUnsolicitedResponses()

Modified: directory/shared/branches/shared-osgi/ldap/codec/standalone/src/test/java/org/apache/directory/shared/ldap/codec/osgi/AbstractCodecServiceTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-osgi/ldap/codec/standalone/src/test/java/org/apache/directory/shared/ldap/codec/osgi/AbstractCodecServiceTest.java?rev=1103786&r1=1103785&r2=1103786&view=diff
==============================================================================
--- directory/shared/branches/shared-osgi/ldap/codec/standalone/src/test/java/org/apache/directory/shared/ldap/codec/osgi/AbstractCodecServiceTest.java
(original)
+++ directory/shared/branches/shared-osgi/ldap/codec/standalone/src/test/java/org/apache/directory/shared/ldap/codec/osgi/AbstractCodecServiceTest.java
Mon May 16 16:27:15 2011
@@ -21,7 +21,7 @@ package org.apache.directory.shared.ldap
 
 
 import org.apache.directory.shared.ldap.codec.api.LdapEncoder;
-import org.apache.directory.shared.ldap.codec.standalone.StandaloneLdapCodecService;
+import org.apache.directory.shared.ldap.codec.standalone.StandaloneLdapApiService;
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
 
@@ -34,7 +34,7 @@ import org.junit.BeforeClass;
 public abstract class AbstractCodecServiceTest
 {
     /** The codec service */
-    protected static StandaloneLdapCodecService codec;
+    protected static StandaloneLdapApiService codec;
 
     /** The encoder instance */
     protected static LdapEncoder encoder;
@@ -44,9 +44,9 @@ public abstract class AbstractCodecServi
      * Initialize the codec service
      */
     @BeforeClass
-    public static void setupLdapCodecService()
+    public static void setupLdapApiService() throws Exception
     {
-        codec = new StandaloneLdapCodecService();
+        codec = new StandaloneLdapApiService();
         encoder = new LdapEncoder( codec );
     }
 



Mime
View raw message