directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r491471 [5/5] - in /directory/trunks: ./ apacheds/ apacheds/bootstrap-partition/ apacheds/bootstrap-partition/src/ apacheds/bootstrap-partition/src/main/ apacheds/bootstrap-partition/src/main/java/ apacheds/bootstrap-partition/src/main/java...
Date Sun, 31 Dec 2006 19:46:55 GMT
Modified: directory/trunks/apacheds/server-tools/src/main/java/org/apache/directory/server/tools/commands/dumpcmd/DumpCommandExecutor.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/server-tools/src/main/java/org/apache/directory/server/tools/commands/dumpcmd/DumpCommandExecutor.java?view=diff&rev=491471&r1=491470&r2=491471
==============================================================================
--- directory/trunks/apacheds/server-tools/src/main/java/org/apache/directory/server/tools/commands/dumpcmd/DumpCommandExecutor.java
(original)
+++ directory/trunks/apacheds/server-tools/src/main/java/org/apache/directory/server/tools/commands/dumpcmd/DumpCommandExecutor.java
Sun Dec 31 11:46:40 2006
@@ -18,7 +18,7 @@
  *  
  */
 package org.apache.directory.server.tools.commands.dumpcmd;
-
+ 
 
 import java.io.File;
 import java.io.FileWriter;
@@ -46,9 +46,10 @@
 import org.apache.directory.server.core.partition.impl.btree.Tuple;
 import org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmIndex;
 import org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmMasterTable;
-import org.apache.directory.server.core.schema.AttributeTypeRegistry;
-import org.apache.directory.server.core.schema.bootstrap.BootstrapRegistries;
-import org.apache.directory.server.core.schema.bootstrap.BootstrapSchemaLoader;
+//import org.apache.directory.server.core.schema.bootstrap.BootstrapSchemaLoader;
+import org.apache.directory.server.schema.bootstrap.BootstrapSchemaLoader;
+import org.apache.directory.server.schema.registries.AttributeTypeRegistry;
+import org.apache.directory.server.schema.registries.DefaultRegistries;
 import org.apache.directory.server.tools.ToolCommandListener;
 import org.apache.directory.server.tools.execution.BaseToolCommandExecutor;
 import org.apache.directory.server.tools.util.ListenerParameter;
@@ -75,9 +76,9 @@
     public static final String EXCLUDEDATTRIBUTES_PARAMETER = "excluded-attributes";
     public static final String INCLUDEOPERATIONAL_PARAMETER = "include-operational";
 
-    private BootstrapRegistries bootstrapRegistries = new BootstrapRegistries();
-    private BootstrapSchemaLoader loader = new BootstrapSchemaLoader();
-    private Set exclusions = new HashSet();
+    private DefaultRegistries bootstrapRegistries = new DefaultRegistries( "bootstrap", new
BootstrapSchemaLoader() );
+    //private BootstrapSchemaLoader loader = new BootstrapSchemaLoader();
+    private Set<String> exclusions = new HashSet<String>();
     private boolean includeOperational = false;
     private String outputFile;
     private String[] partitions;
@@ -140,7 +141,14 @@
     private void execute() throws Exception
     {
         getLayout().verifyInstallation();
-        loader.load( getConfiguration().getBootstrapSchemas(), bootstrapRegistries );
+        
+        if ( true )
+        {
+            throw new RuntimeException( "Schema initialization is a bit messed up or needs
to be " +
+                    "/n re-evaluated here." );
+        }
+        
+        // loader.load( getConfiguration().getBootstrapSchemas(), bootstrapRegistries );
 
         PrintWriter out = null;
         if ( excludedAttributes != null )
@@ -173,7 +181,7 @@
 
     private void processParameters( Parameter[] params )
     {
-        Map parameters = new HashMap();
+        Map<String, Object> parameters = new HashMap<String, Object>();
         for ( int i = 0; i < params.length; i++ )
         {
             Parameter parameter = params[i];
@@ -258,7 +266,7 @@
 
     private void processListeners( ListenerParameter[] listeners )
     {
-        Map parameters = new HashMap();
+        Map<String, ToolCommandListener> parameters = new HashMap<String, ToolCommandListener>();
         for ( int i = 0; i < listeners.length; i++ )
         {
             ListenerParameter parameter = listeners[i];
@@ -346,7 +354,7 @@
 
     private void filterAttributes( String dn, Attributes entry ) throws NamingException
     {
-        List toRemove = new ArrayList();
+        List<String> toRemove = new ArrayList<String>();
         AttributeTypeRegistry registry = bootstrapRegistries.getAttributeTypeRegistry();
         NamingEnumeration attrs = entry.getAll();
         while ( attrs.hasMore() )

Modified: directory/trunks/apacheds/server-unit/src/test/java/org/apache/directory/server/MiscTest.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/server-unit/src/test/java/org/apache/directory/server/MiscTest.java?view=diff&rev=491471&r1=491470&r2=491471
==============================================================================
--- directory/trunks/apacheds/server-unit/src/test/java/org/apache/directory/server/MiscTest.java
(original)
+++ directory/trunks/apacheds/server-unit/src/test/java/org/apache/directory/server/MiscTest.java
Sun Dec 31 11:46:40 2006
@@ -25,6 +25,7 @@
 import netscape.ldap.LDAPException;
 
 import org.apache.directory.server.core.configuration.MutablePartitionConfiguration;
+import org.apache.directory.server.core.configuration.PartitionConfiguration;
 import org.apache.directory.server.unit.AbstractServerTest;
 import org.apache.directory.shared.asn1.util.Asn1StringUtils;
 import org.apache.directory.shared.ldap.message.Control;
@@ -78,8 +79,8 @@
         }
         else if ( this.getName().equals( "testUserAuthOnMixedCaseSuffix" ) )
         {
-            Set partitions = new HashSet();
-            partitions.addAll( configuration.getContextPartitionConfigurations() );
+            Set<PartitionConfiguration> partitions = new HashSet();
+            partitions.addAll( configuration.getPartitionConfigurations() );
             MutablePartitionConfiguration partition = new MutablePartitionConfiguration();
             partition.setSuffix( "dc=aPache,dc=org" );
             Attributes entry = new BasicAttributes( "dc", "aPache", true );
@@ -91,7 +92,7 @@
             partition.setContextEntry( entry );
             partition.setIndexedAttributes( Collections.singleton( "dc" ) );
             partitions.add( partition );
-            configuration.setContextPartitionConfigurations( partitions );
+            configuration.setPartitionConfigurations( partitions );
         }
         else if ( this.getName().equals( "testAnonymousBindsEnabledBaseSearch" ) )
         {
@@ -100,7 +101,7 @@
 
             // create a partition to search
             Set partitions = new HashSet();
-            partitions.addAll( configuration.getContextPartitionConfigurations() );
+            partitions.addAll( configuration.getPartitionConfigurations() );
             MutablePartitionConfiguration partition = new MutablePartitionConfiguration();
             partition.setSuffix( "dc=apache,dc=org" );
             Attributes entry = new BasicAttributes( "dc", "apache", true );
@@ -112,7 +113,7 @@
             partition.setContextEntry( entry );
             partition.setIndexedAttributes( Collections.singleton( "dc" ) );
             partitions.add( partition );
-            configuration.setContextPartitionConfigurations( partitions );
+            configuration.setPartitionConfigurations( partitions );
         }
 
         super.setUp();

Modified: directory/trunks/apacheds/server-unit/src/test/java/org/apache/directory/server/ModifyRemoveTest.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/server-unit/src/test/java/org/apache/directory/server/ModifyRemoveTest.java?view=diff&rev=491471&r1=491470&r2=491471
==============================================================================
--- directory/trunks/apacheds/server-unit/src/test/java/org/apache/directory/server/ModifyRemoveTest.java
(original)
+++ directory/trunks/apacheds/server-unit/src/test/java/org/apache/directory/server/ModifyRemoveTest.java
Sun Dec 31 11:46:40 2006
@@ -100,7 +100,7 @@
     {
         super.setUp();
 
-        Hashtable env = new Hashtable();
+        Hashtable<String,Object> env = new Hashtable<String,Object>();
         env.put( "java.naming.factory.initial", "com.sun.jndi.ldap.LdapCtxFactory" );
         env.put( "java.naming.provider.url", "ldap://localhost:" + port + "/ou=system" );
         env.put( "java.naming.security.principal", "uid=admin,ou=system" );
@@ -114,7 +114,6 @@
         Attributes attributes = this.getPersonAttributes( "Amos", "Tori Amos" );
         attributes.put( "description", "an American singer-songwriter" );
         ctx.createSubcontext( RDN, attributes );
-
     }
 
 

Modified: directory/trunks/apacheds/server-unit/src/test/java/org/apache/directory/server/jndi/ServerContextFactoryTest.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/server-unit/src/test/java/org/apache/directory/server/jndi/ServerContextFactoryTest.java?view=diff&rev=491471&r1=491470&r2=491471
==============================================================================
--- directory/trunks/apacheds/server-unit/src/test/java/org/apache/directory/server/jndi/ServerContextFactoryTest.java
(original)
+++ directory/trunks/apacheds/server-unit/src/test/java/org/apache/directory/server/jndi/ServerContextFactoryTest.java
Sun Dec 31 11:46:40 2006
@@ -129,7 +129,7 @@
 
         pcfgs.add( pcfg );
 
-        configuration.setContextPartitionConfigurations( pcfgs );
+        configuration.setPartitionConfigurations( pcfgs );
 
         super.setUp();
     }

Propchange: directory/trunks/apacheds/utils/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Sun Dec 31 11:46:40 2006
@@ -0,0 +1,16 @@
+target
+.clover
+.wtpmodules
+.settings
+.deployables
+apache.org
+.metadata
+*.md5
+*.log
+*.iml
+*.ipr
+*.iws
+.project
+.classpath
+
+nbproject

Propchange: directory/trunks/daemon/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Sun Dec 31 11:46:40 2006
@@ -1 +1,2 @@
 workspace
+*.iml

Propchange: directory/trunks/shared/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Sun Dec 31 11:46:40 2006
@@ -1,4 +1,5 @@
 *.ipr
+*.iml
 *.iws
 ' to '*.iml
 *.ipr

Modified: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/schema/AbstractAttributeType.java
URL: http://svn.apache.org/viewvc/directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/schema/AbstractAttributeType.java?view=diff&rev=491471&r1=491470&r2=491471
==============================================================================
--- directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/schema/AbstractAttributeType.java
(original)
+++ directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/schema/AbstractAttributeType.java
Sun Dec 31 11:46:40 2006
@@ -62,7 +62,7 @@
      * @param oid
      *            the IANA OID number for the attributeType
      */
-    protected AbstractAttributeType(String oid)
+    protected AbstractAttributeType( String oid )
     {
         super( oid );
     }

Modified: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/schema/AbstractMatchingRule.java
URL: http://svn.apache.org/viewvc/directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/schema/AbstractMatchingRule.java?view=diff&rev=491471&r1=491470&r2=491471
==============================================================================
--- directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/schema/AbstractMatchingRule.java
(original)
+++ directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/schema/AbstractMatchingRule.java
Sun Dec 31 11:46:40 2006
@@ -36,10 +36,9 @@
     /**
      * Creates a MatchingRule using the minimal set of required information.
      * 
-     * @param oid
-     *            the object identifier for this matching rule
+     * @param oid the object identifier for this matching rule
      */
-    protected AbstractMatchingRule(String oid)
+    protected AbstractMatchingRule( String oid )
     {
         super( oid );
     }

Modified: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/schema/CachingNormalizer.java
URL: http://svn.apache.org/viewvc/directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/schema/CachingNormalizer.java?view=diff&rev=491471&r1=491470&r2=491471
==============================================================================
--- directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/schema/CachingNormalizer.java
(original)
+++ directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/schema/CachingNormalizer.java
Sun Dec 31 11:46:40 2006
@@ -33,6 +33,8 @@
  */
 public class CachingNormalizer implements Normalizer
 {
+    private static final long serialVersionUID = 1L;
+
     /** Cache maximum size default */
     public static final int CACHE_MAX = 250;
 
@@ -40,7 +42,7 @@
     private final SynchronizedLRUMap cache;
 
     /** The underlying decorated Normalizer */
-    private final Normalizer normalizer;
+    protected final Normalizer normalizer;
 
 
     // ------------------------------------------------------------------------
@@ -51,10 +53,9 @@
      * Creates a CachingNormalizer that decorates another normalizer using a
      * default cache size.
      * 
-     * @param normalizer
-     *            the underlying Normalizer being decorated
+     * @param normalizer the underlying Normalizer being decorated
      */
-    public CachingNormalizer(Normalizer normalizer)
+    public CachingNormalizer( Normalizer normalizer )
     {
         this( normalizer, CACHE_MAX );
     }
@@ -64,12 +65,10 @@
      * Creates a CachingNormalizer that decorates another normalizer using a
      * specified cache size.
      * 
-     * @param normalizer
-     *            the underlying Normalizer being decorated
-     * @param cacheSz
-     *            the maximum size of the name cache
+     * @param normalizer the underlying Normalizer being decorated
+     * @param cacheSz the maximum size of the name cache
      */
-    public CachingNormalizer(Normalizer normalizer, int cacheSz)
+    public CachingNormalizer( Normalizer normalizer, int cacheSz )
     {
         this.normalizer = normalizer;
         cache = new SynchronizedLRUMap( cacheSz );

Modified: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/schema/NormalizingComparator.java
URL: http://svn.apache.org/viewvc/directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/schema/NormalizingComparator.java?view=diff&rev=491471&r1=491470&r2=491471
==============================================================================
--- directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/schema/NormalizingComparator.java
(original)
+++ directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/schema/NormalizingComparator.java
Sun Dec 31 11:46:40 2006
@@ -48,12 +48,10 @@
     /**
      * A comparator which normalizes a value first before comparing them.
      * 
-     * @param normalizer
-     *            the Normalizer to normalize values with before comparing
-     * @param comparator
-     *            the underlying comparator to use for comparisons
+     * @param normalizer the Normalizer to normalize values with before comparing
+     * @param comparator the underlying comparator to use for comparisons
      */
-    public NormalizingComparator(Normalizer normalizer, Comparator comparator)
+    public NormalizingComparator( Normalizer normalizer, Comparator comparator )
     {
         this.normalizer = normalizer;
         this.comparator = comparator;

Modified: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/schema/ObjectClassTypeEnum.java
URL: http://svn.apache.org/viewvc/directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/schema/ObjectClassTypeEnum.java?view=diff&rev=491471&r1=491470&r2=491471
==============================================================================
--- directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/schema/ObjectClassTypeEnum.java
(original)
+++ directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/schema/ObjectClassTypeEnum.java
Sun Dec 31 11:46:40 2006
@@ -91,7 +91,7 @@
 
         if ( upperCase.equals( "STRUCTURAL" ) )
         {
-            return ABSTRACT;
+            return STRUCTURAL;
         }
         else if ( upperCase.equals( "AUXILIARY" ) )
         {

Modified: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/schema/syntax/AbstractSyntaxChecker.java
URL: http://svn.apache.org/viewvc/directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/schema/syntax/AbstractSyntaxChecker.java?view=diff&rev=491471&r1=491470&r2=491471
==============================================================================
--- directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/schema/syntax/AbstractSyntaxChecker.java
(original)
+++ directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/schema/syntax/AbstractSyntaxChecker.java
Sun Dec 31 11:46:40 2006
@@ -60,6 +60,7 @@
         return oid;
     }
     
+
     /* (non-Javadoc)
      * @see org.apache.directory.shared.ldap.schema.SyntaxChecker#assertSyntax(java.lang.Object)
      */

Modified: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/schema/syntax/AcceptAllSyntaxChecker.java
URL: http://svn.apache.org/viewvc/directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/schema/syntax/AcceptAllSyntaxChecker.java?view=diff&rev=491471&r1=491470&r2=491471
==============================================================================
--- directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/schema/syntax/AcceptAllSyntaxChecker.java
(original)
+++ directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/schema/syntax/AcceptAllSyntaxChecker.java
Sun Dec 31 11:46:40 2006
@@ -20,22 +20,49 @@
 package org.apache.directory.shared.ldap.schema.syntax;
 
 
+import javax.naming.NamingException;
+
+
 /**
  * A SyntaxChecker implementation which accepts all values as valid.
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$
  */
-public class AcceptAllSyntaxChecker extends AbstractSyntaxChecker
+public class AcceptAllSyntaxChecker implements SyntaxChecker
 {
+    /** the OID of the Syntax this checker is associated with */
+    private String oid;
+
+
     /**
      * Creates a SyntaxChecker which accepts all values.
      * 
      * @param oid the oid of the Syntax this checker is associated with
      */
-    public AcceptAllSyntaxChecker(String oid)
+    public AcceptAllSyntaxChecker( String oid )
     {
-        super( oid );
+        this.oid = oid;
+    }
+
+    
+    public AcceptAllSyntaxChecker()
+    {
+    }
+
+    
+    public void setSyntaxOid( String oid )
+    {
+        this.oid = oid;
+    }
+    
+    
+    /**
+     * @see SyntaxChecker#getSyntaxOid()
+     */
+    public String getSyntaxOid()
+    {
+        return oid;
     }
 
 
@@ -47,5 +74,15 @@
     public boolean isValidSyntax( Object value )
     {
         return true;
+    }
+
+
+    /**
+     * Does nothing but return immediately and no exceptions are ever thrown.
+     * 
+     * @see SyntaxChecker#assertSyntax(Object)
+     */
+    public void assertSyntax( Object value ) throws NamingException
+    {
     }
 }

Modified: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/schema/syntax/BinarySyntaxChecker.java
URL: http://svn.apache.org/viewvc/directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/schema/syntax/BinarySyntaxChecker.java?view=diff&rev=491471&r1=491470&r2=491471
==============================================================================
--- directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/schema/syntax/BinarySyntaxChecker.java
(original)
+++ directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/schema/syntax/BinarySyntaxChecker.java
Sun Dec 31 11:46:40 2006
@@ -31,15 +31,18 @@
     /** the Apache assigned internal OID for this syntax checker */
     private static final String SC_OID = "1.3.6.1.4.1.1466.115.121.1.5";
 
+    public static final SyntaxChecker INSTANCE = new BinarySyntaxChecker();
+
 
     /**
-     * Private default constructor to prevent unnecessary instantiation.
+     * Bogus this should be public and not private.
      */
     public BinarySyntaxChecker()
     {
         super( SC_OID );
     }
 
+
     /**
      * 
      * Creates a new instance of BinarySyntaxChecker.
@@ -51,6 +54,7 @@
     {
         super( oid );
     }
+
     
     /**
      * @see org.apache.directory.shared.ldap.schema.syntax.SyntaxChecker#isValidSyntax(Object)



Mime
View raw message