directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r808080 - in /directory/apacheds/branches/apacheds-schema: core-integ/src/test/java/org/apache/directory/server/core/schema/ core/src/main/java/org/apache/directory/server/core/schema/ schema-bootstrap/src/main/java/org/apache/directory/ser...
Date Wed, 26 Aug 2009 16:08:01 GMT
Author: elecharny
Date: Wed Aug 26 16:08:00 2009
New Revision: 808080

URL: http://svn.apache.org/viewvc?rev=808080&view=rev
Log:
o Replaced the getSyntaxRegistry by the getLdapSyntaxRegistry globally
o Removed the AttributeTypeImpl class

Removed:
    directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/schema/AttributeTypeImpl.java
Modified:
    directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaMatchingRuleHandlerIT.java
    directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/schema/DescriptionParsers.java
    directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/schema/PartitionSchemaLoader.java
    directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/schema/SchemaEntityFactory.java
    directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/schema/SchemaService.java
    directory/apacheds/branches/apacheds-schema/schema-bootstrap/src/main/java/org/apache/directory/server/schema/bootstrap/ApachemetaMatchingRuleProducer.java
    directory/apacheds/branches/apacheds-schema/schema-bootstrap/src/main/java/org/apache/directory/server/schema/bootstrap/BootstrapSchemaLoader.java
    directory/apacheds/branches/apacheds-schema/schema-extras/src/main/java/org/apache/directory/server/schema/bootstrap/NisSyntaxProducer.java
    directory/apacheds/branches/apacheds-schema/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/GreaterEqTest.java
    directory/apacheds/branches/apacheds-schema/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/LessEqTest.java

Modified: directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaMatchingRuleHandlerIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaMatchingRuleHandlerIT.java?rev=808080&r1=808079&r2=808080&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaMatchingRuleHandlerIT.java
(original)
+++ directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaMatchingRuleHandlerIT.java
Wed Aug 26 16:08:00 2009
@@ -290,7 +290,7 @@
 //        }
 //
 //        assertTrue( "syntax should still be in the registry after delete failure", 
-//            registries.getSyntaxRegistry().hasSyntax( OID ) );
+//            getLdapSyntaxRegistry().hasSyntax( OID ) );
 //    }
 //    
 //    
@@ -316,7 +316,7 @@
 //        }
 //
 //        assertTrue( "syntax should still be in the registry after move failure", 
-//            registries.getSyntaxRegistry().hasSyntax( OID ) );
+//            registries.getLdapSyntaxRegistry().hasSyntax( OID ) );
 //    }
 //
 //

Modified: directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/schema/DescriptionParsers.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/schema/DescriptionParsers.java?rev=808080&r1=808079&r2=808080&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/schema/DescriptionParsers.java
(original)
+++ directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/schema/DescriptionParsers.java
Wed Aug 26 16:08:00 2009
@@ -335,7 +335,7 @@
             }
             
 
-            AttributeTypeImpl at = new AttributeTypeImpl( desc.getNumericOid(), globalRegistries
);
+            AttributeType at = new AttributeType( desc.getNumericOid() );
             at.setCanUserModify( desc.isUserModifiable() );
             at.setCollective( desc.isCollective() );
             at.setEqualityOid( desc.getEqualityMatchingRule() );
@@ -346,6 +346,8 @@
             at.setSyntaxOid( desc.getSyntax() );
             at.setUsage( desc.getUsage() );
             
+            at.applyRegistries( globalRegistries );
+            
             setSchemaObjectProperties( desc, at );
 
             attributeTypes[pos++] = at;

Modified: directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/schema/PartitionSchemaLoader.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/schema/PartitionSchemaLoader.java?rev=808080&r1=808079&r2=808080&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/schema/PartitionSchemaLoader.java
(original)
+++ directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/schema/PartitionSchemaLoader.java
Wed Aug 26 16:08:00 2009
@@ -665,7 +665,7 @@
             resultDN.normalize( atRegistry.getNormalizerMapping() );
             ServerEntry attrs = lookupPartition( resultDN );
             LdapSyntax syntax = factory.getSyntax( attrs, targetRegistries, schema.getSchemaName()
);
-            targetRegistries.getSyntaxRegistry().register( syntax );
+            targetRegistries.getLdapSyntaxRegistry().register( syntax );
         }
     }
 

Modified: directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/schema/SchemaEntityFactory.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/schema/SchemaEntityFactory.java?rev=808080&r1=808079&r2=808080&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/schema/SchemaEntityFactory.java
(original)
+++ directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/schema/SchemaEntityFactory.java
Wed Aug 26 16:08:00 2009
@@ -642,8 +642,10 @@
     public AttributeType getAttributeType( ServerEntry entry, Registries targetRegistries,
String schema ) throws NamingException
     {
         String oid = entry.get( MetaSchemaConstants.M_OID_AT ).getString();
-        AttributeTypeImpl at = new AttributeTypeImpl( oid, targetRegistries );
-        at.setSchema( schema );
+        AttributeType at = new AttributeType( oid );
+        
+        at.applyRegistries( targetRegistries );
+        at.setSchemaName( schema );
         setSchemaObjectProperties( at, entry );
         
         if ( entry.get( MetaSchemaConstants.M_SYNTAX_AT ) != null )

Modified: directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/schema/SchemaService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/schema/SchemaService.java?rev=808080&r1=808079&r2=808080&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/schema/SchemaService.java
(original)
+++ directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/schema/SchemaService.java
Wed Aug 26 16:08:00 2009
@@ -262,7 +262,7 @@
         ServerAttribute attr = new DefaultServerAttribute( 
             registries.getAttributeTypeRegistry().lookup( SchemaConstants.LDAP_SYNTAXES_AT
) );
 
-        Iterator<LdapSyntax> list = registries.getSyntaxRegistry().iterator();
+        Iterator<LdapSyntax> list = registries.getLdapSyntaxRegistry().iterator();
 
         while ( list.hasNext() )
         {

Modified: directory/apacheds/branches/apacheds-schema/schema-bootstrap/src/main/java/org/apache/directory/server/schema/bootstrap/ApachemetaMatchingRuleProducer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/schema-bootstrap/src/main/java/org/apache/directory/server/schema/bootstrap/ApachemetaMatchingRuleProducer.java?rev=808080&r1=808079&r2=808080&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/schema-bootstrap/src/main/java/org/apache/directory/server/schema/bootstrap/ApachemetaMatchingRuleProducer.java
(original)
+++ directory/apacheds/branches/apacheds-schema/schema-bootstrap/src/main/java/org/apache/directory/server/schema/bootstrap/ApachemetaMatchingRuleProducer.java
Wed Aug 26 16:08:00 2009
@@ -78,13 +78,13 @@
         matchingRule = new ObjectClassTypeMatch();
         cb.schemaObjectProduced( this, matchingRule.getOid(), matchingRule );
         
-        matchingRule = new NumericOidMatch( registries.getSyntaxRegistry() );
+        matchingRule = new NumericOidMatch( registries.getLdapSyntaxRegistry() );
         cb.schemaObjectProduced( this, matchingRule.getOid(), matchingRule );
         
-        matchingRule = new SupDITStructureRuleMatch( registries.getSyntaxRegistry() );
+        matchingRule = new SupDITStructureRuleMatch( registries.getLdapSyntaxRegistry() );
         cb.schemaObjectProduced( this, matchingRule.getOid(), matchingRule );
         
-        matchingRule = new RuleIdMatch( registries.getSyntaxRegistry() );
+        matchingRule = new RuleIdMatch( registries.getLdapSyntaxRegistry() );
         cb.schemaObjectProduced( this, matchingRule.getOid(), matchingRule );
     }
     

Modified: directory/apacheds/branches/apacheds-schema/schema-bootstrap/src/main/java/org/apache/directory/server/schema/bootstrap/BootstrapSchemaLoader.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/schema-bootstrap/src/main/java/org/apache/directory/server/schema/bootstrap/BootstrapSchemaLoader.java?rev=808080&r1=808079&r2=808080&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/schema-bootstrap/src/main/java/org/apache/directory/server/schema/bootstrap/BootstrapSchemaLoader.java
(original)
+++ directory/apacheds/branches/apacheds-schema/schema-bootstrap/src/main/java/org/apache/directory/server/schema/bootstrap/BootstrapSchemaLoader.java
Wed Aug 26 16:08:00 2009
@@ -274,7 +274,7 @@
                     ( ( BootstrapldapSyntax ) syntax ).setSchema( schema.getSchemaName()
);
                 }
 
-                LdapSyntaxRegistry syntaxRegistry = registries.getSyntaxRegistry();
+                LdapSyntaxRegistry syntaxRegistry = registries.getLdapSyntaxRegistry();
                 syntaxRegistry.register( syntax );
                 break;
                 

Modified: directory/apacheds/branches/apacheds-schema/schema-extras/src/main/java/org/apache/directory/server/schema/bootstrap/NisSyntaxProducer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/schema-extras/src/main/java/org/apache/directory/server/schema/bootstrap/NisSyntaxProducer.java?rev=808080&r1=808079&r2=808080&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/schema-extras/src/main/java/org/apache/directory/server/schema/bootstrap/NisSyntaxProducer.java
(original)
+++ directory/apacheds/branches/apacheds-schema/schema-extras/src/main/java/org/apache/directory/server/schema/bootstrap/NisSyntaxProducer.java
Wed Aug 26 16:08:00 2009
@@ -53,11 +53,11 @@
      */
     public void produce( Registries registries, ProducerCallback cb ) throws NamingException
     {
-        BootstrapSyntax syntax;
+        BootstrapldapSyntax syntax;
         SyntaxCheckerRegistry syntaxCheckerRegistry = registries.getSyntaxCheckerRegistry();
 
         // 1.3.6.1.1.1.0.0 - RFC2307 NIS Netgroup Triple
-        syntax = new BootstrapSyntax( "1.3.6.1.1.1.0.0", syntaxCheckerRegistry );
+        syntax = new BootstrapldapSyntax( "1.3.6.1.1.1.0.0", syntaxCheckerRegistry );
         syntax.setDescription( "RFC2307 NIS Netgroup Triple" );
         syntax.setNames( new String[]
             { "NIS Netgroup Triple" } );
@@ -65,7 +65,7 @@
         cb.schemaObjectProduced( this, syntax.getOid(), syntax );
 
         // 1.3.6.1.1.1.0.1 - RFC2307 Boot Parameter Syntax
-        syntax = new BootstrapSyntax( "1.3.6.1.1.1.0.1", syntaxCheckerRegistry );
+        syntax = new BootstrapldapSyntax( "1.3.6.1.1.1.0.1", syntaxCheckerRegistry );
         syntax.setNames( new String[]
             { "NIS Boot Parameter" } );
         syntax.setHumanReadable( true );

Modified: directory/apacheds/branches/apacheds-schema/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/GreaterEqTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/GreaterEqTest.java?rev=808080&r1=808079&r2=808080&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/GreaterEqTest.java
(original)
+++ directory/apacheds/branches/apacheds-schema/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/GreaterEqTest.java
Wed Aug 26 16:08:00 2009
@@ -672,7 +672,7 @@
     {
         AttributeType at = new NoMatchingRuleAttributeType();
         registries.getAttributeTypeRegistry().register( at );
-        registries.getSyntaxRegistry().register( at.getSyntax() );
+        registries.getLdapSyntaxRegistry().register( at.getSyntax() );
         SyntaxCheckerDescription desc = new SyntaxCheckerDescription( at.getSyntax().getOid()
);
         desc.setDescription( "bogus" );
         desc.setFqcn( BogusSyntax.class.getName() );
@@ -693,7 +693,7 @@
     {
         AttributeType at = new OrderingOnlyMatchingRuleAttributeType();
         registries.getAttributeTypeRegistry().register( at );
-        registries.getSyntaxRegistry().register( at.getSyntax() );
+        registries.getLdapSyntaxRegistry().register( at.getSyntax() );
         SyntaxCheckerDescription desc = new SyntaxCheckerDescription( at.getSyntax().getOid()
);
         desc.setDescription( "bogus" );
         desc.setFqcn( BogusSyntax.class.getName() );

Modified: directory/apacheds/branches/apacheds-schema/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/LessEqTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/LessEqTest.java?rev=808080&r1=808079&r2=808080&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/LessEqTest.java
(original)
+++ directory/apacheds/branches/apacheds-schema/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/LessEqTest.java
Wed Aug 26 16:08:00 2009
@@ -734,7 +734,7 @@
     {
         AttributeType at = new OrderingOnlyMatchingRuleAttributeType();
         registries.getAttributeTypeRegistry().register( at );
-        registries.getSyntaxRegistry().register( at.getSyntax() );
+        registries.getLdapSyntaxRegistry().register( at.getSyntax() );
         SyntaxCheckerDescription desc = new SyntaxCheckerDescription( at.getSyntax().getOid()
);
         desc.setDescription( "bogus" );
         desc.setFqcn( BogusSyntax.class.getName() );



Mime
View raw message