directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r1080939 [3/3] - in /directory: apacheds/branches/akarasulu/ apacheds/branches/akarasulu/core-api/src/main/java/org/apache/directory/server/core/entry/ apacheds/branches/akarasulu/core-api/src/main/java/org/apache/directory/server/core/sche...
Date Sat, 12 Mar 2011 15:08:51 GMT
Modified: directory/shared/branches/akarasulu/ldap/schema/data/src/main/java/org/apache/directory/shared/ldap/schemamanager/impl/DefaultSchemaManager.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/akarasulu/ldap/schema/data/src/main/java/org/apache/directory/shared/ldap/schemamanager/impl/DefaultSchemaManager.java?rev=1080939&r1=1080938&r2=1080939&view=diff
==============================================================================
--- directory/shared/branches/akarasulu/ldap/schema/data/src/main/java/org/apache/directory/shared/ldap/schemamanager/impl/DefaultSchemaManager.java
(original)
+++ directory/shared/branches/akarasulu/ldap/schema/data/src/main/java/org/apache/directory/shared/ldap/schemamanager/impl/DefaultSchemaManager.java
Sat Mar 12 15:08:48 2011
@@ -55,6 +55,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.model.schema.SchemaObject;
 import org.apache.directory.shared.ldap.model.schema.SchemaObjectWrapper;
 import org.apache.directory.shared.ldap.model.schema.SyntaxChecker;
+import org.apache.directory.shared.ldap.model.schema.MutableSyntaxCheckerImpl;
 import org.apache.directory.shared.ldap.model.schema.normalizers.OidNormalizer;
 import org.apache.directory.shared.ldap.model.schema.registries.AttributeTypeRegistry;
 import org.apache.directory.shared.ldap.model.schema.registries.ComparatorRegistry;
@@ -282,7 +283,7 @@ public class DefaultSchemaManager implem
         Map<String, Set<SchemaObjectWrapper>> schemaObjects = registries.getObjectBySchemaName();
         Set<SchemaObjectWrapper> content = schemaObjects.get( Strings.toLowerCase(
schema.getSchemaName() ) );
 
-        List<MutableSchemaObject> toBeDeleted = new ArrayList<MutableSchemaObject>();
+        List<SchemaObject> toBeDeleted = new ArrayList<SchemaObject>();
 
         // Buid an intermediate list to avoid concurrent modifications
         for ( SchemaObjectWrapper schemaObjectWrapper : content )
@@ -933,7 +934,7 @@ public class DefaultSchemaManager implem
     {
         for ( Entry entry : schemaLoader.loadSyntaxCheckers( schema ) )
         {
-            SyntaxChecker syntaxChecker = factory.getSyntaxChecker( this, entry, registries,
schema.getSchemaName() );
+            MutableSyntaxCheckerImpl syntaxChecker = factory.getSyntaxChecker( this, entry,
registries, schema.getSchemaName() );
 
             addSchemaObject( registries, syntaxChecker, schema );
         }
@@ -1510,7 +1511,7 @@ public class DefaultSchemaManager implem
     /**
      * {@inheritDoc}
      */
-    public SyntaxCheckerRegistry getSyntaxCheckerRegistry()
+    public SyntaxCheckerRegistry<SyntaxChecker> getSyntaxCheckerRegistry()
     {
         return new ImmutableSyntaxCheckerRegistry( registries.getSyntaxCheckerRegistry()
);
     }
@@ -1627,7 +1628,7 @@ public class DefaultSchemaManager implem
     /**
      * Get the inner SchemaObject if it's not a C/N/SC
      */
-    private MutableSchemaObject getSchemaObject( MutableSchemaObject schemaObject ) throws
LdapException
+    private SchemaObject getSchemaObject( SchemaObject schemaObject ) throws LdapException
     {
         if ( schemaObject instanceof MutableLoadableSchemaObject )
         {
@@ -1822,7 +1823,7 @@ public class DefaultSchemaManager implem
     /**
      * {@inheritDoc}
      */
-    public boolean delete( MutableSchemaObject schemaObject ) throws LdapException
+    public boolean delete( SchemaObject schemaObject ) throws LdapException
     {
         // First, clear the errors
         errors.clear();
@@ -1846,7 +1847,7 @@ public class DefaultSchemaManager implem
             }
 
             // Get the SchemaObject to delete if it's not a LoadableSchemaObject
-            MutableSchemaObject toDelete = getSchemaObject( schemaObject );
+            SchemaObject toDelete = getSchemaObject( schemaObject );
 
             // First check that this SchemaObject does not have any referencing SchemaObjects
             Set<SchemaObjectWrapper> referencing = registries.getReferencing( toDelete
);

Modified: directory/shared/branches/akarasulu/ldap/schema/data/src/test/java/org/apache/directory/shared/ldap/schemaloader/SchemaManagerAddTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/akarasulu/ldap/schema/data/src/test/java/org/apache/directory/shared/ldap/schemaloader/SchemaManagerAddTest.java?rev=1080939&r1=1080938&r2=1080939&view=diff
==============================================================================
--- directory/shared/branches/akarasulu/ldap/schema/data/src/test/java/org/apache/directory/shared/ldap/schemaloader/SchemaManagerAddTest.java
(original)
+++ directory/shared/branches/akarasulu/ldap/schema/data/src/test/java/org/apache/directory/shared/ldap/schemaloader/SchemaManagerAddTest.java
Sat Mar 12 15:08:48 2011
@@ -45,6 +45,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.model.schema.ObjectClass;
 import org.apache.directory.shared.ldap.model.schema.ObjectClassTypeEnum;
 import org.apache.directory.shared.ldap.model.schema.SchemaManager;
+import org.apache.directory.shared.ldap.model.schema.MutableSyntaxCheckerImpl;
 import org.apache.directory.shared.ldap.model.schema.SyntaxChecker;
 import org.apache.directory.shared.ldap.model.schema.UsageEnum;
 import org.apache.directory.shared.ldap.model.schema.comparators.BooleanComparator;
@@ -1920,7 +1921,7 @@ public class SchemaManagerAddTest
         int goidSize = schemaManager.getGlobalOidRegistry().size();
 
         String oid = "0.0.0";
-        SyntaxChecker syntaxChecker = new RegexSyntaxChecker( oid );
+        MutableSyntaxCheckerImpl syntaxChecker = new RegexSyntaxChecker( oid );
 
         assertTrue( schemaManager.add( syntaxChecker ) );
 
@@ -1945,7 +1946,7 @@ public class SchemaManagerAddTest
         int goidSize = schemaManager.getGlobalOidRegistry().size();
 
         String oid = "0.0.0";
-        SyntaxChecker syntaxChecker = new RegexSyntaxChecker( oid );
+        MutableSyntaxCheckerImpl syntaxChecker = new RegexSyntaxChecker( oid );
 
         assertTrue( schemaManager.add( syntaxChecker ) );
 
@@ -1959,7 +1960,7 @@ public class SchemaManagerAddTest
         assertEquals( nrSize + 1, schemaManager.getSyntaxCheckerRegistry().size() );
         assertEquals( goidSize, schemaManager.getGlobalOidRegistry().size() );
 
-        SyntaxChecker syntaxChecker2 = new RegexSyntaxChecker( oid );
+        MutableSyntaxCheckerImpl syntaxChecker2 = new RegexSyntaxChecker( oid );
 
         assertFalse( schemaManager.add( syntaxChecker2 ) );
 
@@ -1987,7 +1988,7 @@ public class SchemaManagerAddTest
         int goidSize = schemaManager.getGlobalOidRegistry().size();
 
         String oid = "0.0.0";
-        SyntaxChecker syntaxChecker = new RegexSyntaxChecker( oid );
+        MutableSyntaxCheckerImpl syntaxChecker = new RegexSyntaxChecker( oid );
 
         // using java.sql.ResultSet cause it is very unlikely to get loaded
         // in ADS, as the FQCN is not the one expected

Modified: directory/shared/branches/akarasulu/ldap/schema/data/src/test/java/org/apache/directory/shared/ldap/schemaloader/SchemaManagerDelTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/akarasulu/ldap/schema/data/src/test/java/org/apache/directory/shared/ldap/schemaloader/SchemaManagerDelTest.java?rev=1080939&r1=1080938&r2=1080939&view=diff
==============================================================================
--- directory/shared/branches/akarasulu/ldap/schema/data/src/test/java/org/apache/directory/shared/ldap/schemaloader/SchemaManagerDelTest.java
(original)
+++ directory/shared/branches/akarasulu/ldap/schema/data/src/test/java/org/apache/directory/shared/ldap/schemaloader/SchemaManagerDelTest.java
Sat Mar 12 15:08:48 2011
@@ -39,10 +39,12 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.model.schema.LdapComparator;
 import org.apache.directory.shared.ldap.model.schema.LdapSyntax;
 import org.apache.directory.shared.ldap.model.schema.MatchingRule;
+import org.apache.directory.shared.ldap.model.schema.MutableSyntaxChecker;
 import org.apache.directory.shared.ldap.model.schema.Normalizer;
 import org.apache.directory.shared.ldap.model.schema.ObjectClass;
 import org.apache.directory.shared.ldap.model.schema.SchemaManager;
 import org.apache.directory.shared.ldap.model.schema.SyntaxChecker;
+import org.apache.directory.shared.ldap.model.schema.MutableSyntaxCheckerImpl;
 import org.apache.directory.shared.ldap.model.schema.comparators.BooleanComparator;
 import org.apache.directory.shared.ldap.model.schema.normalizers.BooleanNormalizer;
 import org.apache.directory.shared.ldap.model.schema.syntaxCheckers.BooleanSyntaxChecker;
@@ -1016,14 +1018,14 @@ public class SchemaManagerDelTest
         int scrSize = schemaManager.getSyntaxCheckerRegistry().size();
         int goidSize = schemaManager.getGlobalOidRegistry().size();
 
-        SyntaxChecker sc = new BooleanSyntaxChecker();
+        BooleanSyntaxChecker sc = new BooleanSyntaxChecker();
         sc.setOid( "0.1.1" );
         assertTrue( schemaManager.add( sc ) );
 
         assertEquals( scrSize + 1, schemaManager.getSyntaxCheckerRegistry().size() );
         assertEquals( goidSize, schemaManager.getGlobalOidRegistry().size() );
 
-        sc = schemaManager.lookupSyntaxCheckerRegistry( "0.1.1" );
+        sc = ( BooleanSyntaxChecker ) schemaManager.lookupSyntaxCheckerRegistry( "0.1.1"
);
         assertNotNull( sc );
         assertTrue( schemaManager.delete( sc ) );
 
@@ -1049,7 +1051,7 @@ public class SchemaManagerDelTest
         int scrSize = schemaManager.getSyntaxCheckerRegistry().size();
         int goidSize = schemaManager.getGlobalOidRegistry().size();
 
-        SyntaxChecker sc = new BooleanSyntaxChecker();
+        MutableSyntaxCheckerImpl sc = new BooleanSyntaxChecker();
         sc.setOid( "0.0" ); 
         assertFalse( schemaManager.delete( sc ) );
 



Mime
View raw message