directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r1080939 [1/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
Author: akarasulu
Date: Sat Mar 12 15:08:48 2011
New Revision: 1080939

URL: http://svn.apache.org/viewvc?rev=1080939&view=rev
Log:
separated out interfaces for both mutable and immutable syntaxCheckers

Added:
    directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/MutableSyntaxChecker.java
    directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/MutableSyntaxCheckerImpl.java
      - copied, changed from r1080405, directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/SyntaxChecker.java
Modified:
    directory/apacheds/branches/akarasulu/core-api/src/main/java/org/apache/directory/server/core/entry/TestServerEntryUtils.java
    directory/apacheds/branches/akarasulu/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/SyntaxCheckerSynchronizer.java
    directory/apacheds/branches/akarasulu/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaSyntaxCheckerHandlerIT.java
    directory/apacheds/branches/akarasulu/core-integ/src/test/java/org/apache/directory/server/core/schema/SubschemaSubentryIT.java
    directory/apacheds/branches/akarasulu/core-integ/src/test/resources/org/apache/directory/server/core/schema/DummySyntaxChecker.bytecode
    directory/apacheds/branches/akarasulu/core/src/main/java/org/apache/directory/server/core/schema/AttributesFactory.java
    directory/apacheds/branches/akarasulu/pom.xml
    directory/apacheds/branches/akarasulu/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/BogusSyntax.java
    directory/project/trunk/resources/dictionary
    directory/shared/branches/akarasulu/ldap/extras/aci/src/main/java/org/apache/directory/shared/ldap/aci/ACIItemSyntaxChecker.java
    directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/entry/EntryUtils.java
    directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/DescriptionUtils.java
    directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/EntityFactory.java
    directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/LdapSyntax.java
    directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/LoadableSchemaObject.java
    directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/MutableLoadableSchemaObject.java
    directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/SchemaManager.java
    directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/SchemaObjectWrapper.java
    directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/SchemaUtils.java
    directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/SyntaxChecker.java
    directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/DefaultSyntaxCheckerRegistry.java
    directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/ImmutableSyntaxCheckerRegistry.java
    directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/Registries.java
    directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/SyntaxCheckerRegistry.java
    directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/syntaxCheckers/AccessPointSyntaxChecker.java
    directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/syntaxCheckers/AttributeTypeDescriptionSyntaxChecker.java
    directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/syntaxCheckers/AttributeTypeUsageSyntaxChecker.java
    directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/syntaxCheckers/BinarySyntaxChecker.java
    directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/syntaxCheckers/BitStringSyntaxChecker.java
    directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/syntaxCheckers/BooleanSyntaxChecker.java
    directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/syntaxCheckers/CountrySyntaxChecker.java
    directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/syntaxCheckers/CsnSidSyntaxChecker.java
    directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/syntaxCheckers/CsnSyntaxChecker.java
    directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/syntaxCheckers/DITContentRuleDescriptionSyntaxChecker.java
    directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/syntaxCheckers/DITStructureRuleDescriptionSyntaxChecker.java
    directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/syntaxCheckers/DLSubmitPermissionSyntaxChecker.java
    directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/syntaxCheckers/DNSyntaxChecker.java
    directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/syntaxCheckers/DSAQualitySyntaxSyntaxChecker.java
    directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/syntaxCheckers/DSETypeSyntaxChecker.java
    directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/syntaxCheckers/DataQualitySyntaxSyntaxChecker.java
    directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/syntaxCheckers/DeliveryMethodSyntaxChecker.java
    directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/syntaxCheckers/DirectoryStringSyntaxChecker.java
    directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/syntaxCheckers/GeneralizedTimeSyntaxChecker.java
    directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/syntaxCheckers/Ia5StringSyntaxChecker.java
    directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/syntaxCheckers/IntegerSyntaxChecker.java
    directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/syntaxCheckers/JavaByteSyntaxChecker.java
    directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/syntaxCheckers/JavaIntegerSyntaxChecker.java
    directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/syntaxCheckers/JavaLongSyntaxChecker.java
    directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/syntaxCheckers/JavaShortSyntaxChecker.java
    directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/syntaxCheckers/JpegSyntaxChecker.java
    directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/syntaxCheckers/LdapSyntaxDescriptionSyntaxChecker.java
    directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/syntaxCheckers/MHSORAddressSyntaxChecker.java
    directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/syntaxCheckers/MailPreferenceSyntaxChecker.java
    directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/syntaxCheckers/MasterAndShadowAccessPointSyntaxChecker.java
    directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/syntaxCheckers/MatchingRuleDescriptionSyntaxChecker.java
    directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/syntaxCheckers/MatchingRuleUseDescriptionSyntaxChecker.java
    directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/syntaxCheckers/NameAndOptionalUIDSyntaxChecker.java
    directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/syntaxCheckers/NameFormDescriptionSyntaxChecker.java
    directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/syntaxCheckers/NumberSyntaxChecker.java
    directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/syntaxCheckers/NumericOidSyntaxChecker.java
    directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/syntaxCheckers/NumericStringSyntaxChecker.java
    directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/syntaxCheckers/ObjectClassDescriptionSyntaxChecker.java
    directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/syntaxCheckers/ObjectClassTypeSyntaxChecker.java
    directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/syntaxCheckers/ObjectNameSyntaxChecker.java
    directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/syntaxCheckers/OctetStringSyntaxChecker.java
    directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/syntaxCheckers/OidLenSyntaxChecker.java
    directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/syntaxCheckers/OidSyntaxChecker.java
    directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/syntaxCheckers/OtherMailboxSyntaxChecker.java
    directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/syntaxCheckers/PostalAddressSyntaxChecker.java
    directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/syntaxCheckers/PrintableStringSyntaxChecker.java
    directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/syntaxCheckers/ProtocolInformationSyntaxChecker.java
    directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/syntaxCheckers/RegexSyntaxChecker.java
    directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/syntaxCheckers/SubtreeSpecificationSyntaxChecker.java
    directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/syntaxCheckers/SupplierAndConsumerSyntaxChecker.java
    directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/syntaxCheckers/SupplierInformationSyntaxChecker.java
    directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/syntaxCheckers/SupplierOrConsumerSyntaxChecker.java
    directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/syntaxCheckers/TelephoneNumberSyntaxChecker.java
    directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/syntaxCheckers/TeletexTerminalIdentifierSyntaxChecker.java
    directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/syntaxCheckers/TelexNumberSyntaxChecker.java
    directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/syntaxCheckers/UtcTimeSyntaxChecker.java
    directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/syntaxCheckers/UuidSyntaxChecker.java
    directory/shared/branches/akarasulu/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/entry/BinaryValueTest.java
    directory/shared/branches/akarasulu/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/entry/StringValueAttributeTypeTest.java
    directory/shared/branches/akarasulu/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/SyntaxCheckerTest.java
    directory/shared/branches/akarasulu/ldap/schema/data/src/main/java/org/apache/directory/shared/ldap/schemaloader/SchemaEntityFactory.java
    directory/shared/branches/akarasulu/ldap/schema/data/src/main/java/org/apache/directory/shared/ldap/schemamanager/impl/DefaultSchemaManager.java
    directory/shared/branches/akarasulu/ldap/schema/data/src/test/java/org/apache/directory/shared/ldap/schemaloader/SchemaManagerAddTest.java
    directory/shared/branches/akarasulu/ldap/schema/data/src/test/java/org/apache/directory/shared/ldap/schemaloader/SchemaManagerDelTest.java

Modified: directory/apacheds/branches/akarasulu/core-api/src/main/java/org/apache/directory/server/core/entry/TestServerEntryUtils.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/akarasulu/core-api/src/main/java/org/apache/directory/server/core/entry/TestServerEntryUtils.java?rev=1080939&r1=1080938&r2=1080939&view=diff
==============================================================================
--- directory/apacheds/branches/akarasulu/core-api/src/main/java/org/apache/directory/server/core/entry/TestServerEntryUtils.java (original)
+++ directory/apacheds/branches/akarasulu/core-api/src/main/java/org/apache/directory/server/core/entry/TestServerEntryUtils.java Sat Mar 12 15:08:48 2011
@@ -28,7 +28,7 @@ import org.apache.directory.shared.ldap.
 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.Normalizer;
-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.ByteArrayComparator;
 import org.apache.directory.shared.ldap.model.schema.normalizers.DeepTrimToLowerNormalizer;
 import org.apache.directory.shared.util.Strings;
@@ -64,6 +64,8 @@ public class TestServerEntryUtils
      */
     static class MR extends MatchingRule
     {
+        private static final long serialVersionUID = -5428997199906309370L;
+
         protected MR( String oid )
         {
             super( oid );
@@ -93,15 +95,15 @@ public class TestServerEntryUtils
     }
 
     /* no protection*/ 
-    //This will suppress PMD.AvoidUsingHardCodedIP warnings in this class
-    @SuppressWarnings("PMD.AvoidUsingHardCodedIP")
     static AttributeType getCaseIgnoringAttributeNoNumbersType()
     {
         AttributeType attributeType = new AttributeType( "1.1.3.1" );
         LdapSyntax syntax = new LdapSyntax( "1.1.1.1", "", true );
 
-        syntax.setSyntaxChecker( new SyntaxChecker( "1.1.2.1" )
+        syntax.setSyntaxChecker( new MutableSyntaxCheckerImpl( "1.1.2.1" )
         {
+            private static final long serialVersionUID = -5428997199906309370L;
+
             public boolean isValidSyntax( Object value )
             {
                 if ( !( value instanceof String ) )
@@ -120,6 +122,12 @@ public class TestServerEntryUtils
                 }
                 return true;
             }
+
+            @Override
+            public MutableSyntaxCheckerImpl copy()
+            {
+                return null;
+            }
         } );
         
         MatchingRule matchingRule = new MatchingRule( "1.1.2.1" );
@@ -128,6 +136,7 @@ public class TestServerEntryUtils
 
         matchingRule.setLdapComparator( new LdapComparator<String>( matchingRule.getOid() )
         {
+            private static final long serialVersionUID = -5428997199906309370L;
             public int compare( String o1, String o2 )
             {
                 return ( o1 == null ? 
@@ -135,6 +144,7 @@ public class TestServerEntryUtils
                     ( o2 == null ? 1 : o1.compareTo( o2 ) ) );
             }
 
+            @SuppressWarnings("unused")
             int getValue( String val )
             {
                 if ( val.equals( "LOW" ) ) 
@@ -156,6 +166,7 @@ public class TestServerEntryUtils
         
         Normalizer normalizer = new Normalizer( "1.1.1" )
         {
+            private static final long serialVersionUID = -5428997199906309370L;
             public Value<?> normalize( Value<?> value ) throws LdapException
             {
                 if ( !value.isBinary() )
@@ -188,12 +199,20 @@ public class TestServerEntryUtils
         attributeType.addName( "1.1" );
         LdapSyntax syntax = new LdapSyntax( "1.1.1", "", true );
 
-        syntax.setSyntaxChecker( new SyntaxChecker( "1.1.2" )
+        syntax.setSyntaxChecker( new MutableSyntaxCheckerImpl( "1.1.2" )
         {
+            private static final long serialVersionUID = -5428997199906309370L;
+
             public boolean isValidSyntax( Object value )
             {
                 return ((String)value == null) || (((String)value).length() < 7) ;
             }
+
+            @Override
+            public MutableSyntaxCheckerImpl copy()
+            {
+                return null;
+            }
         } );
         
         MatchingRule matchingRule = new MatchingRule( "1.1.2" );
@@ -202,6 +221,7 @@ public class TestServerEntryUtils
 
         matchingRule.setLdapComparator( new LdapComparator<String>( matchingRule.getOid() )
         {
+            private static final long serialVersionUID = -5428997199906309370L;
             public int compare( String o1, String o2 )
             {
                 return ( ( o1 == null ) ? 
@@ -224,12 +244,20 @@ public class TestServerEntryUtils
         AttributeType attributeType = new AttributeType( "1.2" );
         LdapSyntax syntax = new LdapSyntax( "1.2.1", "", true );
 
-        syntax.setSyntaxChecker( new SyntaxChecker( "1.2.1" )
+        syntax.setSyntaxChecker( new MutableSyntaxCheckerImpl( "1.2.1" )
         {
+            private static final long serialVersionUID = -5428997199906309370L;
             public boolean isValidSyntax( Object value )
             {
                 return ( value == null ) || ( ((byte[])value).length < 5 );
             }
+            
+            @Override
+            public MutableSyntaxCheckerImpl copy()
+            {
+                // TODO Auto-generated method stub
+                return null;
+            }
         } );
 
         MatchingRule matchingRule = new MatchingRule( "1.2.2" );
@@ -239,6 +267,7 @@ public class TestServerEntryUtils
         
         matchingRule.setNormalizer( new Normalizer( "1.1.1" )
         {
+            private static final long serialVersionUID = -5428997199906309370L;
             public Value<?> normalize( Value<?> value ) throws LdapException
             {
                 if ( value.isBinary() )

Modified: directory/apacheds/branches/akarasulu/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/SyntaxCheckerSynchronizer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/akarasulu/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/SyntaxCheckerSynchronizer.java?rev=1080939&r1=1080938&r2=1080939&view=diff
==============================================================================
--- directory/apacheds/branches/akarasulu/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/SyntaxCheckerSynchronizer.java (original)
+++ directory/apacheds/branches/akarasulu/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/SyntaxCheckerSynchronizer.java Sat Mar 12 15:08:48 2011
@@ -34,6 +34,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.model.name.Rdn;
 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.registries.Registries;
 import org.apache.directory.shared.ldap.model.schema.registries.Schema;
 import org.apache.directory.shared.util.Strings;
@@ -75,7 +76,7 @@ public class SyntaxCheckerSynchronizer e
         Entry entry = modifyContext.getEntry();
         String schemaName = getSchemaName( name );
         String oid = getOid( entry );
-        SyntaxChecker syntaxChecker = factory.getSyntaxChecker( schemaManager, targetEntry, schemaManager
+        MutableSyntaxCheckerImpl syntaxChecker = factory.getSyntaxChecker( schemaManager, targetEntry, schemaManager
             .getRegistries(), schemaName );
 
         if ( isSchemaEnabled( schemaName ) )
@@ -109,7 +110,7 @@ public class SyntaxCheckerSynchronizer e
         // Build the new SyntaxChecker from the given entry
         String schemaName = getSchemaName( dn );
 
-        SyntaxChecker syntaxChecker = factory.getSyntaxChecker( schemaManager, entry, schemaManager.getRegistries(),
+        MutableSyntaxCheckerImpl syntaxChecker = factory.getSyntaxChecker( schemaManager, entry, schemaManager.getRegistries(),
             schemaName );
 
         // At this point, the constructed SyntaxChecker has not been checked against the 
@@ -164,11 +165,11 @@ public class SyntaxCheckerSynchronizer e
         }
 
         // Test that the Oid exists
-        SyntaxChecker syntaxChecker = null;
+        MutableSyntaxCheckerImpl syntaxChecker = null;
 
         try
         {
-            syntaxChecker = ( SyntaxChecker ) checkSyntaxCheckerOidExists( entry );
+            syntaxChecker = ( MutableSyntaxCheckerImpl ) checkSyntaxCheckerOidExists( entry );
         }
         catch ( LdapSchemaViolationException lsve )
         {
@@ -240,7 +241,7 @@ public class SyntaxCheckerSynchronizer e
 
         if ( isSchemaEnabled( schemaName ) )
         {
-            SyntaxChecker syntaxChecker = factory.getSyntaxChecker( schemaManager, targetEntry, schemaManager
+            MutableSyntaxCheckerImpl syntaxChecker = factory.getSyntaxChecker( schemaManager, targetEntry, schemaManager
                 .getRegistries(), schemaName );
             schemaManager.unregisterSyntaxChecker( oldOid );
             schemaManager.add( syntaxChecker );
@@ -273,7 +274,7 @@ public class SyntaxCheckerSynchronizer e
         }
 
         targetEntry.put( MetaSchemaConstants.M_OID_AT, newOid );
-        SyntaxChecker syntaxChecker = factory.getSyntaxChecker( schemaManager, targetEntry, schemaManager
+        MutableSyntaxCheckerImpl syntaxChecker = factory.getSyntaxChecker( schemaManager, targetEntry, schemaManager
             .getRegistries(), newSchemaName );
 
         if ( isSchemaEnabled( oldSchemaName ) )
@@ -301,7 +302,7 @@ public class SyntaxCheckerSynchronizer e
                 I18n.err( I18n.ERR_393, oid ) );
         }
 
-        SyntaxChecker syntaxChecker = factory.getSyntaxChecker( schemaManager, entry, schemaManager.getRegistries(),
+        MutableSyntaxCheckerImpl syntaxChecker = factory.getSyntaxChecker( schemaManager, entry, schemaManager.getRegistries(),
             newSchemaName );
 
         if ( isSchemaEnabled( oldSchemaName ) )

Modified: directory/apacheds/branches/akarasulu/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaSyntaxCheckerHandlerIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/akarasulu/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaSyntaxCheckerHandlerIT.java?rev=1080939&r1=1080938&r2=1080939&view=diff
==============================================================================
--- directory/apacheds/branches/akarasulu/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaSyntaxCheckerHandlerIT.java (original)
+++ directory/apacheds/branches/akarasulu/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaSyntaxCheckerHandlerIT.java Sat Mar 12 15:08:48 2011
@@ -46,7 +46,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.model.name.Dn;
 import org.apache.directory.shared.ldap.model.schema.LdapSyntax;
 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.syntaxCheckers.OctetStringSyntaxChecker;
 import org.apache.directory.shared.ldap.util.JndiUtils;
 import org.junit.Before;
@@ -622,8 +622,12 @@ public class MetaSyntaxCheckerHandlerIT 
             .getSyntaxCheckerRegistry().getSchemaName( OID ), "apachemeta" );
     }
 
-    public static class BogusSyntaxChecker extends SyntaxChecker
+    
+    public static class BogusSyntaxChecker extends MutableSyntaxCheckerImpl
     {
+        private static final long serialVersionUID = 5090483112935298981L;
+
+
         public BogusSyntaxChecker()
         {
             super( OID );
@@ -634,10 +638,20 @@ public class MetaSyntaxCheckerHandlerIT 
         {
             return false;
         }
+
+
+        @Override
+        public MutableSyntaxCheckerImpl copy()
+        {
+            // TODO Auto-generated method stub
+            return null;
+        }
     }
 
+    
     class DummySyntax extends LdapSyntax
     {
+        private static final long serialVersionUID = 5090483112935298981L;
         public DummySyntax()
         {
             super( OID );

Modified: directory/apacheds/branches/akarasulu/core-integ/src/test/java/org/apache/directory/server/core/schema/SubschemaSubentryIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/akarasulu/core-integ/src/test/java/org/apache/directory/server/core/schema/SubschemaSubentryIT.java?rev=1080939&r1=1080938&r2=1080939&view=diff
==============================================================================
--- directory/apacheds/branches/akarasulu/core-integ/src/test/java/org/apache/directory/server/core/schema/SubschemaSubentryIT.java (original)
+++ directory/apacheds/branches/akarasulu/core-integ/src/test/java/org/apache/directory/server/core/schema/SubschemaSubentryIT.java Sat Mar 12 15:08:48 2011
@@ -74,7 +74,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.model.schema.MatchingRule;
 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.DeepTrimNormalizer;
 import org.apache.directory.shared.ldap.model.schema.parsers.AttributeTypeDescriptionSchemaParser;
@@ -288,7 +288,7 @@ public class SubschemaSubentryIT extends
 
             Entry serverEntry = ServerEntryUtils.toServerEntry( attrs, Dn.ROOT_DSE, getService().getSchemaManager() );
 
-            SyntaxChecker syntaxChecker = factory.getSyntaxChecker( schemaManager, serverEntry, getService()
+            MutableSyntaxCheckerImpl syntaxChecker = factory.getSyntaxChecker( schemaManager, serverEntry, getService()
                 .getSchemaManager().getRegistries(), schemaName );
             assertEquals( oid, syntaxChecker.getOid() );
         }

Modified: directory/apacheds/branches/akarasulu/core-integ/src/test/resources/org/apache/directory/server/core/schema/DummySyntaxChecker.bytecode
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/akarasulu/core-integ/src/test/resources/org/apache/directory/server/core/schema/DummySyntaxChecker.bytecode?rev=1080939&r1=1080938&r2=1080939&view=diff
==============================================================================
Binary files - no diff available.

Modified: directory/apacheds/branches/akarasulu/core/src/main/java/org/apache/directory/server/core/schema/AttributesFactory.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/akarasulu/core/src/main/java/org/apache/directory/server/core/schema/AttributesFactory.java?rev=1080939&r1=1080938&r2=1080939&view=diff
==============================================================================
--- directory/apacheds/branches/akarasulu/core/src/main/java/org/apache/directory/server/core/schema/AttributesFactory.java (original)
+++ directory/apacheds/branches/akarasulu/core/src/main/java/org/apache/directory/server/core/schema/AttributesFactory.java Sat Mar 12 15:08:48 2011
@@ -43,7 +43,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.model.schema.SchemaManager;
 import org.apache.directory.shared.ldap.model.schema.MutableSchemaObject;
 import org.apache.directory.shared.ldap.model.schema.SchemaObject;
-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.registries.Schema;
 import org.apache.directory.shared.util.DateUtils;
 
@@ -127,7 +127,7 @@ public class AttributesFactory
     }
     
     
-    public Entry getAttributes( SyntaxChecker syntaxChecker, Schema schema, SchemaManager schemaManager )
+    public Entry getAttributes( MutableSyntaxCheckerImpl syntaxChecker, Schema schema, SchemaManager schemaManager )
     {
         Entry entry = new DefaultEntry( schemaManager );
 

Modified: directory/apacheds/branches/akarasulu/pom.xml
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/akarasulu/pom.xml?rev=1080939&r1=1080938&r2=1080939&view=diff
==============================================================================
--- directory/apacheds/branches/akarasulu/pom.xml (original)
+++ directory/apacheds/branches/akarasulu/pom.xml Sat Mar 12 15:08:48 2011
@@ -172,6 +172,7 @@
               <exclude>**/.project</exclude>
               <exclude>**/.settings/**/*</exclude>
               <!-- IDEA_DEFAULT_EXCLUDES -->
+              <exclude>**/*.bytecode</exclude>
               <exclude>**/*.iml</exclude>
               <exclude>**/*.ipr</exclude>
               <exclude>**/*.iws</exclude>

Modified: directory/apacheds/branches/akarasulu/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/BogusSyntax.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/akarasulu/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/BogusSyntax.java?rev=1080939&r1=1080938&r2=1080939&view=diff
==============================================================================
--- directory/apacheds/branches/akarasulu/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/BogusSyntax.java (original)
+++ directory/apacheds/branches/akarasulu/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/BogusSyntax.java Sat Mar 12 15:08:48 2011
@@ -21,7 +21,7 @@ package org.apache.directory.server.xdbm
 
 
 import org.apache.directory.shared.ldap.model.schema.LdapSyntax;
-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.syntaxCheckers.OctetStringSyntaxChecker;
 
 
@@ -43,7 +43,7 @@ public class BogusSyntax extends LdapSyn
     }
 
 
-    public SyntaxChecker getSyntaxChecker()
+    public MutableSyntaxCheckerImpl getSyntaxChecker()
     {
         return new OctetStringSyntaxChecker();
     }

Modified: directory/project/trunk/resources/dictionary
URL: http://svn.apache.org/viewvc/directory/project/trunk/resources/dictionary?rev=1080939&r1=1080938&r2=1080939&view=diff
==============================================================================
--- directory/project/trunk/resources/dictionary (original)
+++ directory/project/trunk/resources/dictionary Sat Mar 12 15:08:48 2011
@@ -188,3 +188,4 @@ osgi
 offline
 newrdn
 deleteoldrdn
+covariant

Modified: directory/shared/branches/akarasulu/ldap/extras/aci/src/main/java/org/apache/directory/shared/ldap/aci/ACIItemSyntaxChecker.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/akarasulu/ldap/extras/aci/src/main/java/org/apache/directory/shared/ldap/aci/ACIItemSyntaxChecker.java?rev=1080939&r1=1080938&r2=1080939&view=diff
==============================================================================
--- directory/shared/branches/akarasulu/ldap/extras/aci/src/main/java/org/apache/directory/shared/ldap/aci/ACIItemSyntaxChecker.java (original)
+++ directory/shared/branches/akarasulu/ldap/extras/aci/src/main/java/org/apache/directory/shared/ldap/aci/ACIItemSyntaxChecker.java Sat Mar 12 15:08:48 2011
@@ -23,7 +23,7 @@ import java.text.ParseException;
 
 import org.apache.directory.shared.ldap.model.constants.SchemaConstants;
 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.util.Strings;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -36,7 +36,7 @@ import org.slf4j.LoggerFactory;
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
 @SuppressWarnings("serial")
-public class ACIItemSyntaxChecker extends SyntaxChecker
+public class ACIItemSyntaxChecker extends MutableSyntaxCheckerImpl
 {
     /** A logger for this class */
     private static final Logger LOG = LoggerFactory.getLogger( ACIItemSyntaxChecker.class );

Modified: directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/entry/EntryUtils.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/entry/EntryUtils.java?rev=1080939&r1=1080938&r2=1080939&view=diff
==============================================================================
--- directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/entry/EntryUtils.java (original)
+++ directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/entry/EntryUtils.java Sat Mar 12 15:08:48 2011
@@ -26,7 +26,7 @@ import org.apache.directory.shared.ldap.
 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.Normalizer;
-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.ByteArrayComparator;
 import org.apache.directory.shared.ldap.model.schema.normalizers.DeepTrimToLowerNormalizer;
 import org.apache.directory.shared.util.Strings;
@@ -74,7 +74,6 @@ public class EntryUtils
     /**
      * A local Syntax class used for the tests
      */
-    @SuppressWarnings("PMD.AvoidUsingHardCodedIP")
     public static LdapSyntax syntaxFactory( String oid, boolean humanReadable )
     {
         LdapSyntax ldapSyntax = new LdapSyntax( oid );
@@ -83,6 +82,7 @@ public class EntryUtils
         
         return ldapSyntax;
     }
+
     static class S extends LdapSyntax
     {
         private static final long serialVersionUID = 1L;
@@ -98,7 +98,7 @@ public class EntryUtils
         AttributeType attributeType = new AttributeType( "1.1.3.1" );
         LdapSyntax syntax = new LdapSyntax( "1.1.1.1", "", true );
 
-        syntax.setSyntaxChecker( new SyntaxChecker( "1.1.2.1" )
+        syntax.setSyntaxChecker( new MutableSyntaxCheckerImpl( "1.1.2.1" )
         {
             private static final long serialVersionUID = 1L;
 
@@ -120,6 +120,13 @@ public class EntryUtils
                 }
                 return true;
             }
+
+            @Override
+            public MutableSyntaxCheckerImpl copy()
+            {
+                // TODO Auto-generated method stub
+                return null;
+            }
         } );
         
         MatchingRule matchingRule = new MatchingRule( "1.1.2.1" );
@@ -175,7 +182,7 @@ public class EntryUtils
         attributeType.addName( "1.1" );
         LdapSyntax syntax = new LdapSyntax( "1.1.1", "", true );
 
-        syntax.setSyntaxChecker( new SyntaxChecker( "1.1.2" )
+        syntax.setSyntaxChecker( new MutableSyntaxCheckerImpl( "1.1.2" )
         {
             private static final long serialVersionUID = 1L;
 
@@ -183,6 +190,13 @@ public class EntryUtils
             {
                 return ((String)value == null) || (((String)value).length() < 7) ;
             }
+
+            @Override
+            public MutableSyntaxCheckerImpl copy()
+            {
+                // TODO Auto-generated method stub
+                return null;
+            }
         } );
         
         MatchingRule matchingRule = new MatchingRule( "1.1.2" );
@@ -215,7 +229,7 @@ public class EntryUtils
         AttributeType attributeType = new AttributeType( "1.2" );
         LdapSyntax syntax = new LdapSyntax( "1.2.1", "", true );
 
-        syntax.setSyntaxChecker( new SyntaxChecker( "1.2.1" )
+        syntax.setSyntaxChecker( new MutableSyntaxCheckerImpl( "1.2.1" )
         {
             private static final long serialVersionUID = 1L;
 
@@ -223,6 +237,13 @@ public class EntryUtils
             {
                 return ( value == null ) || ( ((byte[])value).length < 5 );
             }
+
+            @Override
+            public MutableSyntaxCheckerImpl copy()
+            {
+                // TODO Auto-generated method stub
+                return null;
+            }
         } );
 
         MatchingRule matchingRule = new MatchingRule( "1.2.2" );

Modified: directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/DescriptionUtils.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/DescriptionUtils.java?rev=1080939&r1=1080938&r2=1080939&view=diff
==============================================================================
--- directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/DescriptionUtils.java (original)
+++ directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/DescriptionUtils.java Sat Mar 12 15:08:48 2011
@@ -789,7 +789,7 @@ public final class DescriptionUtils
      *            the SyntaxChecker to generate the description for
      * @return the SyntaxCheckerDescription string
      */
-    public static String getDescription( SyntaxChecker syntaxChecker )
+    public static String getDescription( MutableSyntaxCheckerImpl syntaxChecker )
     {
         return getLoadableDescription( syntaxChecker );
     }

Modified: directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/EntityFactory.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/EntityFactory.java?rev=1080939&r1=1080938&r2=1080939&view=diff
==============================================================================
--- directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/EntityFactory.java (original)
+++ directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/EntityFactory.java Sat Mar 12 15:08:48 2011
@@ -156,7 +156,7 @@ public interface EntityFactory
      * @return the loaded SyntaxChecker
      * @throws LdapException if anything fails during loading
      */
-    SyntaxChecker getSyntaxChecker( SchemaManager schemaManager, Entry entry, Registries targetRegistries, String schemaName ) throws LdapException;
+    MutableSyntaxCheckerImpl getSyntaxChecker( SchemaManager schemaManager, Entry entry, Registries targetRegistries, String schemaName ) throws LdapException;
     
 
     /**

Modified: directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/LdapSyntax.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/LdapSyntax.java?rev=1080939&r1=1080938&r2=1080939&view=diff
==============================================================================
--- directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/LdapSyntax.java (original)
+++ directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/LdapSyntax.java Sat Mar 12 15:08:48 2011
@@ -70,8 +70,6 @@ import org.apache.directory.shared.ldap.
  * @see DescriptionUtils#getDescription(Syntax)
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-// super.hashCode is final
-@SuppressWarnings("PMD.OverrideBothEqualsAndHashcode")
 public class LdapSyntax extends AbstractMutableSchemaObject
 {
     private static final long serialVersionUID = 1L;
@@ -80,7 +78,7 @@ public class LdapSyntax extends Abstract
     protected boolean isHumanReadable = false;
 
     /** The associated SyntaxChecker */
-    protected SyntaxChecker syntaxChecker;
+    protected MutableSyntaxChecker syntaxChecker;
 
 
     /**
@@ -158,7 +156,7 @@ public class LdapSyntax extends Abstract
      * 
      * @return the SyntaxChecker
      */
-    public SyntaxChecker getSyntaxChecker()
+    public MutableSyntaxChecker getSyntaxChecker()
     {
         return syntaxChecker;
     }
@@ -169,7 +167,7 @@ public class LdapSyntax extends Abstract
      *
      * @param syntaxChecker The associated SyntaxChecker
      */
-    public void setSyntaxChecker( SyntaxChecker syntaxChecker )
+    public void setSyntaxChecker( MutableSyntaxCheckerImpl syntaxChecker )
     {
         if ( locked )
         {
@@ -188,7 +186,7 @@ public class LdapSyntax extends Abstract
      *
      * @param newSyntaxChecker The associated SyntaxChecker
      */
-    public void updateSyntaxChecker( SyntaxChecker newSyntaxChecker )
+    public void updateSyntaxChecker( MutableSyntaxCheckerImpl newSyntaxChecker )
     {
         if ( locked )
         {
@@ -219,7 +217,7 @@ public class LdapSyntax extends Abstract
             try
             {
                 // Gets the associated SyntaxChecker
-                syntaxChecker = registries.getSyntaxCheckerRegistry().lookup( oid );
+                syntaxChecker = ( MutableSyntaxChecker ) registries.getSyntaxCheckerRegistry().lookup( oid );
             }
             catch ( LdapException ne )
             {
@@ -240,13 +238,11 @@ public class LdapSyntax extends Abstract
     /**
      * {@inheritDoc}
      */
-    @SuppressWarnings("PMD.CollapsibleIfStatements")
-    // Used because of comments
     public void removeFromRegistries( List<Throwable> errors, Registries registries ) throws LdapException
     {
         if ( registries != null )
         {
-            /**
+            /*
              * Remove the Syntax references (using and usedBy) : 
              * S -> SC
              */

Modified: directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/LoadableSchemaObject.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/LoadableSchemaObject.java?rev=1080939&r1=1080938&r2=1080939&view=diff
==============================================================================
--- directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/LoadableSchemaObject.java (original)
+++ directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/LoadableSchemaObject.java Sat Mar 12 15:08:48 2011
@@ -27,6 +27,8 @@ package org.apache.directory.shared.ldap
  */
 public interface LoadableSchemaObject extends SchemaObject
 {
+    LoadableSchemaObject copy();
+    
     /**
      * Gets the base64 encoded bytecode associated with this 
      * LoadableSchemaObject.

Modified: directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/MutableLoadableSchemaObject.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/MutableLoadableSchemaObject.java?rev=1080939&r1=1080938&r2=1080939&view=diff
==============================================================================
--- directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/MutableLoadableSchemaObject.java (original)
+++ directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/MutableLoadableSchemaObject.java Sat Mar 12 15:08:48 2011
@@ -25,8 +25,10 @@ package org.apache.directory.shared.ldap
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public interface MutableLoadableSchemaObject extends LoadableSchemaObject
+public interface MutableLoadableSchemaObject extends LoadableSchemaObject, MutableSchemaObject
 {
+    MutableLoadableSchemaObject copy();
+    
     /**
      * Stores some bytecode representing the compiled Java class for this
      * SchemaObject instance.

Added: directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/MutableSyntaxChecker.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/MutableSyntaxChecker.java?rev=1080939&view=auto
==============================================================================
--- directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/MutableSyntaxChecker.java (added)
+++ directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/MutableSyntaxChecker.java Sat Mar 12 15:08:48 2011
@@ -0,0 +1,38 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *  
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *  
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License. 
+ *  
+ */
+package org.apache.directory.shared.ldap.model.schema;
+
+
+/**
+ * Used to validate values of a particular syntax. This interface does not
+ * correlate to any LDAP or X.500 construct. It has been created as a means to
+ * enforce a syntax within the Eve server.
+ * 
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public interface MutableSyntaxChecker extends MutableLoadableSchemaObject, SyntaxChecker
+{
+    /**
+     * For covariant return type.
+     * 
+     * {@inheritDoc}
+     */
+    MutableSyntaxChecker copy();
+}
\ No newline at end of file

Copied: directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/MutableSyntaxCheckerImpl.java (from r1080405, directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/SyntaxChecker.java)
URL: http://svn.apache.org/viewvc/directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/MutableSyntaxCheckerImpl.java?p2=directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/MutableSyntaxCheckerImpl.java&p1=directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/SyntaxChecker.java&r1=1080405&r2=1080939&rev=1080939&view=diff
==============================================================================
--- directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/SyntaxChecker.java (original)
+++ directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/MutableSyntaxCheckerImpl.java Sat Mar 12 15:08:48 2011
@@ -32,7 +32,7 @@ import org.apache.directory.shared.ldap.
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public abstract class SyntaxChecker extends MutableLoadableSchemaObjectImpl
+public abstract class MutableSyntaxCheckerImpl extends MutableLoadableSchemaObjectImpl implements MutableSyntaxChecker
 {
     private static final long serialVersionUID = -6028809434764891692L;
 
@@ -41,7 +41,7 @@ public abstract class SyntaxChecker exte
      * The SyntaxChecker base constructor
      * @param oid The associated OID
      */
-    protected SyntaxChecker( String oid )
+    protected MutableSyntaxCheckerImpl( String oid )
     {
         super( SchemaObjectType.SYNTAX_CHECKER, oid );
     }
@@ -51,27 +51,35 @@ public abstract class SyntaxChecker exte
      * The SyntaxChecker default constructor where the oid is set after 
      * instantiation.
      */
-    protected SyntaxChecker()
+    protected MutableSyntaxCheckerImpl()
     {
         super( SchemaObjectType.SYNTAX_CHECKER );
     }
+    
+    
+    public MutableSyntaxCheckerImpl copy()
+    {
+        return new MutableSyntaxCheckerImpl()
+        {
+            private static final long serialVersionUID = 1L;
+
+            @Override
+            public boolean isValidSyntax( Object value )
+            {
+                return this.isValidSyntax( value );
+            }
+        };
+    }
 
 
-    /**
-     * Determines if the attribute's value conforms to the attribute syntax.
-     * 
-     * @param value the value of some attribute with the syntax
-     * @return true if the value is in the valid syntax, false otherwise
+    /* (non-Javadoc)
+     * @see org.apache.directory.shared.ldap.model.schema.SyntaxChecker#isValidSyntax(java.lang.Object)
      */
     public abstract boolean isValidSyntax( Object value );
 
 
-    /**
-     * Asserts whether or not the attribute's value conforms to the attribute
-     * syntax.
-     * 
-     * @param value the value of some attribute with the syntax
-     * @throws LdapException if the value does not conform to the attribute syntax.
+    /* (non-Javadoc)
+     * @see org.apache.directory.shared.ldap.model.schema.SyntaxChecker#assertSyntax(java.lang.Object)
      */
     public void assertSyntax( Object value ) throws LdapException
     {
@@ -105,7 +113,7 @@ public abstract class SyntaxChecker exte
             return false;
         }
 
-        return o instanceof SyntaxChecker;
+        return o instanceof MutableSyntaxCheckerImpl;
     }
 
 

Modified: directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/SchemaManager.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/SchemaManager.java?rev=1080939&r1=1080938&r2=1080939&view=diff
==============================================================================
--- directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/SchemaManager.java (original)
+++ directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/SchemaManager.java Sat Mar 12 15:08:48 2011
@@ -598,7 +598,7 @@ public interface SchemaManager
      * 
      * @return A reference to the SyntaxChecker registry.
      */
-    SyntaxCheckerRegistry getSyntaxCheckerRegistry();
+    SyntaxCheckerRegistry<? extends SyntaxChecker> getSyntaxCheckerRegistry();
 
 
     /**
@@ -676,7 +676,7 @@ public interface SchemaManager
      * @throws Exception if the SchemaObject is not registered or
      * the deletion operation is not supported
      */
-    boolean delete( MutableSchemaObject schemaObject ) throws LdapException;
+    boolean delete( SchemaObject schemaObject ) throws LdapException;
 
 
     /**

Modified: directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/SchemaObjectWrapper.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/SchemaObjectWrapper.java?rev=1080939&r1=1080938&r2=1080939&view=diff
==============================================================================
--- directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/SchemaObjectWrapper.java (original)
+++ directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/SchemaObjectWrapper.java Sat Mar 12 15:08:48 2011
@@ -31,7 +31,7 @@ package org.apache.directory.shared.ldap
 public class SchemaObjectWrapper
 {
     /** The internal schemaObject */
-    private MutableSchemaObject schemaObject;
+    private SchemaObject schemaObject;
 
 
     /**
@@ -39,7 +39,7 @@ public class SchemaObjectWrapper
      *
      * @param schemaObject The contained SchemaObject
      */
-    public SchemaObjectWrapper( MutableSchemaObject schemaObject )
+    public SchemaObjectWrapper( SchemaObject schemaObject )
     {
         this.schemaObject = schemaObject;
     }
@@ -84,7 +84,7 @@ public class SchemaObjectWrapper
     /**
      *  @return The interned SchemaObject
      */
-    public MutableSchemaObject get()
+    public SchemaObject get()
     {
         return schemaObject;
     }

Modified: directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/SchemaUtils.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/SchemaUtils.java?rev=1080939&r1=1080938&r2=1080939&view=diff
==============================================================================
--- directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/SchemaUtils.java (original)
+++ directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/SchemaUtils.java Sat Mar 12 15:08:48 2011
@@ -1068,7 +1068,7 @@ public final class SchemaUtils
      * @param description The description to transform to a String
      * @return
      */
-    public static String render( MutableLoadableSchemaObjectImpl description )
+    public static String render( LoadableSchemaObject description )
     {
         StringBuffer buf = new StringBuffer();
         buf.append( "( " ).append( description.getOid() );

Modified: directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/SyntaxChecker.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/SyntaxChecker.java?rev=1080939&r1=1080938&r2=1080939&view=diff
==============================================================================
--- directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/SyntaxChecker.java (original)
+++ directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/SyntaxChecker.java Sat Mar 12 15:08:48 2011
@@ -21,8 +21,6 @@ package org.apache.directory.shared.ldap
 
 
 import org.apache.directory.shared.ldap.model.exception.LdapException;
-import org.apache.directory.shared.ldap.model.exception.LdapInvalidAttributeValueException;
-import org.apache.directory.shared.ldap.model.message.ResultCodeEnum;
 
 
 /**
@@ -32,38 +30,23 @@ import org.apache.directory.shared.ldap.
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public abstract class SyntaxChecker extends MutableLoadableSchemaObjectImpl
+public interface SyntaxChecker extends LoadableSchemaObject
 {
-    private static final long serialVersionUID = -6028809434764891692L;
-
-
     /**
-     * The SyntaxChecker base constructor
-     * @param oid The associated OID
-     */
-    protected SyntaxChecker( String oid )
-    {
-        super( SchemaObjectType.SYNTAX_CHECKER, oid );
-    }
-
-
-    /**
-     * The SyntaxChecker default constructor where the oid is set after 
-     * instantiation.
+     * For covariant return type.
+     * 
+     * {@inheritDoc}
      */
-    protected SyntaxChecker()
-    {
-        super( SchemaObjectType.SYNTAX_CHECKER );
-    }
-
-
+    SyntaxChecker copy();
+    
+    
     /**
      * Determines if the attribute's value conforms to the attribute syntax.
      * 
      * @param value the value of some attribute with the syntax
      * @return true if the value is in the valid syntax, false otherwise
      */
-    public abstract boolean isValidSyntax( Object value );
+    boolean isValidSyntax( Object value );
 
 
     /**
@@ -73,48 +56,5 @@ public abstract class SyntaxChecker exte
      * @param value the value of some attribute with the syntax
      * @throws LdapException if the value does not conform to the attribute syntax.
      */
-    public void assertSyntax( Object value ) throws LdapException
-    {
-        if ( !isValidSyntax( value ) )
-        {
-            throw new LdapInvalidAttributeValueException( ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX );
-        }
-    }
-
-
-    /**
-     * Store the SchemaManager in this instance. It may be necessary for some
-     * syntaxChecker which needs to have access to the oidNormalizer Map.
-     *
-     * @param schemaManager the schemaManager to store
-     */
-    public void setSchemaManager( SchemaManager schemaManager )
-    {
-        // Do nothing (general case).
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public boolean equals( Object o )
-    {
-        if ( !super.equals( o ) )
-        {
-            return false;
-        }
-
-        return o instanceof SyntaxChecker;
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public String toString()
-    {
-        return objectType + " " + DescriptionUtils.getDescription( this );
-    }
-}
+    void assertSyntax( Object value ) throws LdapException;
+}
\ No newline at end of file

Modified: directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/DefaultSyntaxCheckerRegistry.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/DefaultSyntaxCheckerRegistry.java?rev=1080939&r1=1080938&r2=1080939&view=diff
==============================================================================
--- directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/DefaultSyntaxCheckerRegistry.java (original)
+++ directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/DefaultSyntaxCheckerRegistry.java Sat Mar 12 15:08:48 2011
@@ -21,9 +21,8 @@ package org.apache.directory.shared.ldap
 
 
 import org.apache.directory.shared.ldap.model.exception.LdapException;
-import org.apache.directory.shared.ldap.model.schema.MutableSchemaObject;
+import org.apache.directory.shared.ldap.model.schema.MutableSyntaxChecker;
 import org.apache.directory.shared.ldap.model.schema.SchemaObjectType;
-import org.apache.directory.shared.ldap.model.schema.SyntaxChecker;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -33,8 +32,8 @@ import org.slf4j.LoggerFactory;
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class DefaultSyntaxCheckerRegistry extends DefaultSchemaObjectRegistry<SyntaxChecker>
-    implements SyntaxCheckerRegistry
+public class DefaultSyntaxCheckerRegistry extends DefaultSchemaObjectRegistry<MutableSyntaxChecker>
+    implements SyntaxCheckerRegistry<MutableSyntaxChecker>
 {
     /** static class logger */
     private static final Logger LOG = LoggerFactory.getLogger( DefaultSyntaxCheckerRegistry.class );
@@ -48,7 +47,7 @@ public class DefaultSyntaxCheckerRegistr
      */
     public DefaultSyntaxCheckerRegistry()
     {
-        super( SchemaObjectType.SYNTAX_CHECKER, new OidRegistry<SyntaxChecker>() );
+        super( SchemaObjectType.SYNTAX_CHECKER, new OidRegistry<MutableSyntaxChecker>() );
     }
 
 
@@ -64,12 +63,12 @@ public class DefaultSyntaxCheckerRegistr
 
         // Loop on all the SchemaObjects stored and remove those associated
         // with the give schemaName
-        for ( SyntaxChecker syntaxChecker : this )
+        for ( MutableSyntaxChecker syntaxChecker : this )
         {
             if ( schemaName.equalsIgnoreCase( syntaxChecker.getSchemaName() ) )
             {
                 String oid = syntaxChecker.getOid();
-                MutableSchemaObject removed = unregister( oid );
+                MutableSyntaxChecker removed = unregister( oid );
 
                 if ( DEBUG )
                 {
@@ -115,7 +114,7 @@ public class DefaultSyntaxCheckerRegistr
                 sb.append( ", " );
             }
 
-            SyntaxChecker syntaxChecker = byName.get( name );
+            MutableSyntaxChecker syntaxChecker = byName.get( name );
 
             String fqcn = syntaxChecker.getFqcn();
             int lastDotPos = fqcn.lastIndexOf( '.' );

Modified: directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/ImmutableSyntaxCheckerRegistry.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/ImmutableSyntaxCheckerRegistry.java?rev=1080939&r1=1080938&r2=1080939&view=diff
==============================================================================
--- directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/ImmutableSyntaxCheckerRegistry.java (original)
+++ directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/ImmutableSyntaxCheckerRegistry.java Sat Mar 12 15:08:48 2011
@@ -35,10 +35,10 @@ import org.apache.directory.shared.ldap.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class ImmutableSyntaxCheckerRegistry implements SyntaxCheckerRegistry
+public class ImmutableSyntaxCheckerRegistry<R extends SyntaxChecker> implements SyntaxCheckerRegistry<R>
 {
     /** The wrapped SyntaxChecker registry */
-    SyntaxCheckerRegistry immutableSyntaxCheckerRegistry;
+    SyntaxCheckerRegistry<R> immutableSyntaxCheckerRegistry;
 
 
     /**
@@ -46,7 +46,7 @@ public class ImmutableSyntaxCheckerRegis
      *
      * @param syntaxCheckerRegistry The wrapped SyntaxChecker registry
      */
-    public ImmutableSyntaxCheckerRegistry( SyntaxCheckerRegistry syntaxCheckerRegistry )
+    public ImmutableSyntaxCheckerRegistry( SyntaxCheckerRegistry<R> syntaxCheckerRegistry )
     {
         immutableSyntaxCheckerRegistry = syntaxCheckerRegistry;
     }
@@ -64,7 +64,7 @@ public class ImmutableSyntaxCheckerRegis
     /**
      * {@inheritDoc}
      */
-    public SyntaxChecker unregister( String numericOid ) throws LdapException
+    public R unregister( String numericOid ) throws LdapException
     {
         throw new LdapUnwillingToPerformException( ResultCodeEnum.NO_SUCH_OPERATION, I18n.err( I18n.ERR_04285 ) );
     }
@@ -82,9 +82,9 @@ public class ImmutableSyntaxCheckerRegis
     /**
      * {@inheritDoc}
      */
-    public ImmutableSyntaxCheckerRegistry copy()
+    public ImmutableSyntaxCheckerRegistry<R> copy()
     {
-        return ( ImmutableSyntaxCheckerRegistry ) immutableSyntaxCheckerRegistry.copy();
+        return new ImmutableSyntaxCheckerRegistry<R>( immutableSyntaxCheckerRegistry );
     }
 
 
@@ -136,7 +136,7 @@ public class ImmutableSyntaxCheckerRegis
     /**
      * {@inheritDoc}
      */
-    public Iterator<SyntaxChecker> iterator()
+    public Iterator<R> iterator()
     {
         return immutableSyntaxCheckerRegistry.iterator();
     }
@@ -145,7 +145,7 @@ public class ImmutableSyntaxCheckerRegis
     /**
      * {@inheritDoc}
      */
-    public SyntaxChecker lookup( String oid ) throws LdapException
+    public R lookup( String oid ) throws LdapException
     {
         return immutableSyntaxCheckerRegistry.lookup( oid );
     }
@@ -172,7 +172,7 @@ public class ImmutableSyntaxCheckerRegis
     /**
      * {@inheritDoc}
      */
-    public SyntaxChecker get( String oid )
+    public R get( String oid )
     {
         return immutableSyntaxCheckerRegistry.get( oid );
     }
@@ -190,7 +190,7 @@ public class ImmutableSyntaxCheckerRegis
     /**
      * {@inheritDoc}
      */
-    public SyntaxChecker unregister( SyntaxChecker schemaObject ) throws LdapException
+    public R unregister( SyntaxChecker schemaObject ) throws LdapException
     {
         throw new LdapUnwillingToPerformException( ResultCodeEnum.NO_SUCH_OPERATION, I18n.err( I18n.ERR_04285 ) );
     }

Modified: directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/Registries.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/Registries.java?rev=1080939&r1=1080938&r2=1080939&view=diff
==============================================================================
--- directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/Registries.java (original)
+++ directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/Registries.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.MutableLoadableSchemaObject;
 import org.apache.directory.shared.ldap.model.schema.MatchingRule;
 import org.apache.directory.shared.ldap.model.schema.MatchingRuleUse;
+import org.apache.directory.shared.ldap.model.schema.MutableSyntaxChecker;
 import org.apache.directory.shared.ldap.model.schema.NameForm;
 import org.apache.directory.shared.ldap.model.schema.Normalizer;
 import org.apache.directory.shared.ldap.model.schema.ObjectClass;
@@ -105,7 +106,7 @@ public class Registries implements Schem
     protected OidRegistry<MutableSchemaObject> globalOidRegistry;
 
     /** The SyntaxChecker registry */
-    protected SyntaxCheckerRegistry syntaxCheckerRegistry;
+    protected DefaultSyntaxCheckerRegistry syntaxCheckerRegistry;
 
     /** The LdapSyntax registry */
     protected LdapSyntaxRegistry ldapSyntaxRegistry;
@@ -263,7 +264,7 @@ public class Registries implements Schem
     /**
      * @return The SyntaxChecker registry
      */
-    public SyntaxCheckerRegistry getSyntaxCheckerRegistry()
+    public SyntaxCheckerRegistry<? extends SyntaxChecker> getSyntaxCheckerRegistry()
     {
         return syntaxCheckerRegistry;
     }
@@ -482,7 +483,7 @@ public class Registries implements Schem
         // Check the SyntaxCheckers
         for ( SyntaxChecker syntaxChecker : syntaxCheckerRegistry )
         {
-            resolve( syntaxChecker, errors );
+            resolve( ( MutableSyntaxChecker ) syntaxChecker, errors );
         }
 
         // Step 2 :
@@ -856,7 +857,7 @@ public class Registries implements Schem
     {
         for ( SyntaxChecker syntaxChecker : syntaxCheckerRegistry )
         {
-            buildReference( errors, syntaxChecker );
+            buildReference( errors, ( MutableSyntaxChecker ) syntaxChecker );
         }
     }
 
@@ -974,7 +975,7 @@ public class Registries implements Schem
      * @param normalizer the SyntaxChecker
      * @param errors the list of errors to add exceptions to
      */
-    private void resolve( SyntaxChecker syntaxChecker, List<Throwable> errors )
+    private void resolve( MutableSyntaxChecker syntaxChecker, List<Throwable> errors )
     {
         // This is currently doing nothing.
         try
@@ -1607,7 +1608,7 @@ public class Registries implements Schem
                     break;
 
                 case SYNTAX_CHECKER:
-                    syntaxCheckerRegistry.register( ( SyntaxChecker ) schemaObject );
+                    syntaxCheckerRegistry.register( ( MutableSyntaxChecker ) schemaObject );
                     break;
             }
         }
@@ -1625,7 +1626,7 @@ public class Registries implements Schem
      * @param schemaObject The schemaObject to register
      * @throws LdapException If there is a problem
      */
-    public void associateWithSchema( List<Throwable> errors, MutableSchemaObject schemaObject )
+    public void associateWithSchema( List<Throwable> errors, SchemaObject schemaObject )
     {
         LOG.debug( "Registering {}:{}", schemaObject.getObjectType(), schemaObject.getOid() );
 
@@ -1672,7 +1673,7 @@ public class Registries implements Schem
             {
                 try
                 {
-                    globalOidRegistry.register( schemaObject );
+                    globalOidRegistry.register( ( MutableSchemaObject ) schemaObject );
                 }
                 catch ( LdapException ne )
                 {
@@ -1825,7 +1826,7 @@ public class Registries implements Schem
                 break;
 
             case SYNTAX_CHECKER:
-                unregistered = syntaxCheckerRegistry.unregister( ( SyntaxChecker ) schemaObject );
+                unregistered = syntaxCheckerRegistry.unregister( ( MutableSyntaxChecker ) schemaObject );
                 break;
         }
 
@@ -2614,7 +2615,7 @@ public class Registries implements Schem
 
             for ( SchemaObjectWrapper schemaObjectWrapper : schemaObjects.get( schemaName ) )
             {
-                MutableSchemaObject original = schemaObjectWrapper.get();
+                SchemaObject original = schemaObjectWrapper.get();
 
                 try
                 {
@@ -2704,7 +2705,7 @@ public class Registries implements Schem
      * @param schemaObject The SchemaObject to remove
      * @return The list of SchemaObjects referencing the SchemaObjetc we want to remove
      */
-    public Set<SchemaObjectWrapper> getReferencing( MutableSchemaObject schemaObject )
+    public Set<SchemaObjectWrapper> getReferencing( SchemaObject schemaObject )
     {
         SchemaObjectWrapper schemaObjectWrapper = new SchemaObjectWrapper( schemaObject );
 

Modified: directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/SyntaxCheckerRegistry.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/SyntaxCheckerRegistry.java?rev=1080939&r1=1080938&r2=1080939&view=diff
==============================================================================
--- directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/SyntaxCheckerRegistry.java (original)
+++ directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/SyntaxCheckerRegistry.java Sat Mar 12 15:08:48 2011
@@ -29,30 +29,10 @@ import org.apache.directory.shared.ldap.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public interface SyntaxCheckerRegistry extends SchemaObjectRegistry<SyntaxChecker>,
-    Iterable<SyntaxChecker>
+public interface SyntaxCheckerRegistry<R extends SyntaxChecker> 
+    extends SchemaObjectRegistry<R>, Iterable<R>
 {
     /**
-     * Registers a new SyntaxChecker with this registry.
-     *
-     * @param syntaxChecker the SyntaxChecker to register
-     * @throws LdapException if the SyntaxChecker is already registered or
-     * the registration operation is not supported
-     */
-    void register( SyntaxChecker syntaxChecker ) throws LdapException;
-
-
-    /**
-     * Removes the SyntaxChecker registered with this registry, using its
-     * numeric OID.
-     * 
-     * @param numericOid the numeric identifier
-     * @throws LdapException if the numeric identifier is invalid
-     */
-    SyntaxChecker unregister( String numericOid ) throws LdapException;
-    
-    
-    /**
      * Unregisters all SyntaxCheckers defined for a specific schema from
      * this registry.
      * 
@@ -64,5 +44,5 @@ public interface SyntaxCheckerRegistry e
     /**
      * Copy the SyntaxCheckerRegistry
      */
-    SyntaxCheckerRegistry copy();
+    SyntaxCheckerRegistry<R> copy();
 }

Modified: directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/syntaxCheckers/AccessPointSyntaxChecker.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/syntaxCheckers/AccessPointSyntaxChecker.java?rev=1080939&r1=1080938&r2=1080939&view=diff
==============================================================================
--- directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/syntaxCheckers/AccessPointSyntaxChecker.java (original)
+++ directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/syntaxCheckers/AccessPointSyntaxChecker.java Sat Mar 12 15:08:48 2011
@@ -20,7 +20,7 @@
 package org.apache.directory.shared.ldap.model.schema.syntaxCheckers;
 
 import org.apache.directory.shared.ldap.model.constants.SchemaConstants;
-import org.apache.directory.shared.ldap.model.schema.SyntaxChecker;
+import org.apache.directory.shared.ldap.model.schema.MutableSyntaxCheckerImpl;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -31,7 +31,7 @@ import org.slf4j.LoggerFactory;
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
 @SuppressWarnings("serial")
-public class AccessPointSyntaxChecker extends SyntaxChecker
+public class AccessPointSyntaxChecker extends MutableSyntaxCheckerImpl
 {
     /** A logger for this class */
     private static final Logger LOG = LoggerFactory.getLogger( AccessPointSyntaxChecker.class );

Modified: directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/syntaxCheckers/AttributeTypeDescriptionSyntaxChecker.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/syntaxCheckers/AttributeTypeDescriptionSyntaxChecker.java?rev=1080939&r1=1080938&r2=1080939&view=diff
==============================================================================
--- directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/syntaxCheckers/AttributeTypeDescriptionSyntaxChecker.java (original)
+++ directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/syntaxCheckers/AttributeTypeDescriptionSyntaxChecker.java Sat Mar 12 15:08:48 2011
@@ -23,7 +23,7 @@ package org.apache.directory.shared.ldap
 import java.text.ParseException;
 
 import org.apache.directory.shared.ldap.model.constants.SchemaConstants;
-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.parsers.AttributeTypeDescriptionSchemaParser;
 import org.apache.directory.shared.util.Strings;
 import org.slf4j.Logger;
@@ -72,7 +72,7 @@ import org.slf4j.LoggerFactory;
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
 @SuppressWarnings("serial")
-public class AttributeTypeDescriptionSyntaxChecker extends SyntaxChecker
+public class AttributeTypeDescriptionSyntaxChecker extends MutableSyntaxCheckerImpl
 {
     /** A logger for this class */
     private static final Logger LOG = LoggerFactory.getLogger( AttributeTypeDescriptionSyntaxChecker.class );

Modified: directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/syntaxCheckers/AttributeTypeUsageSyntaxChecker.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/syntaxCheckers/AttributeTypeUsageSyntaxChecker.java?rev=1080939&r1=1080938&r2=1080939&view=diff
==============================================================================
--- directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/syntaxCheckers/AttributeTypeUsageSyntaxChecker.java (original)
+++ directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/syntaxCheckers/AttributeTypeUsageSyntaxChecker.java Sat Mar 12 15:08:48 2011
@@ -21,7 +21,7 @@ package org.apache.directory.shared.ldap
 
 
 import org.apache.directory.shared.ldap.model.constants.SchemaConstants;
-import org.apache.directory.shared.ldap.model.schema.SyntaxChecker;
+import org.apache.directory.shared.ldap.model.schema.MutableSyntaxCheckerImpl;
 import org.apache.directory.shared.util.Strings;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -38,7 +38,7 @@ import org.slf4j.LoggerFactory;
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
 @SuppressWarnings("serial")
-public class AttributeTypeUsageSyntaxChecker extends SyntaxChecker
+public class AttributeTypeUsageSyntaxChecker extends MutableSyntaxCheckerImpl
 {
     /** A logger for this class */
     private static final Logger LOG = LoggerFactory.getLogger( AttributeTypeUsageSyntaxChecker.class );

Modified: directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/syntaxCheckers/BinarySyntaxChecker.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/syntaxCheckers/BinarySyntaxChecker.java?rev=1080939&r1=1080938&r2=1080939&view=diff
==============================================================================
--- directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/syntaxCheckers/BinarySyntaxChecker.java (original)
+++ directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/syntaxCheckers/BinarySyntaxChecker.java Sat Mar 12 15:08:48 2011
@@ -20,7 +20,7 @@
 package org.apache.directory.shared.ldap.model.schema.syntaxCheckers;
 
 import org.apache.directory.shared.ldap.model.constants.SchemaConstants;
-import org.apache.directory.shared.ldap.model.schema.SyntaxChecker;
+import org.apache.directory.shared.ldap.model.schema.MutableSyntaxCheckerImpl;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -31,7 +31,7 @@ import org.slf4j.LoggerFactory;
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
 @SuppressWarnings("serial")
-public class BinarySyntaxChecker extends SyntaxChecker
+public class BinarySyntaxChecker extends MutableSyntaxCheckerImpl
 {
     /** A logger for this class */
     private static final Logger LOG = LoggerFactory.getLogger( BinarySyntaxChecker.class );

Modified: directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/syntaxCheckers/BitStringSyntaxChecker.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/syntaxCheckers/BitStringSyntaxChecker.java?rev=1080939&r1=1080938&r2=1080939&view=diff
==============================================================================
--- directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/syntaxCheckers/BitStringSyntaxChecker.java (original)
+++ directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/syntaxCheckers/BitStringSyntaxChecker.java Sat Mar 12 15:08:48 2011
@@ -21,7 +21,7 @@ package org.apache.directory.shared.ldap
 
 
 import org.apache.directory.shared.ldap.model.constants.SchemaConstants;
-import org.apache.directory.shared.ldap.model.schema.SyntaxChecker;
+import org.apache.directory.shared.ldap.model.schema.MutableSyntaxCheckerImpl;
 import org.apache.directory.shared.util.Chars;
 import org.apache.directory.shared.util.Strings;
 import org.slf4j.Logger;
@@ -41,7 +41,7 @@ import org.slf4j.LoggerFactory;
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
 @SuppressWarnings("serial")
-public class BitStringSyntaxChecker extends SyntaxChecker
+public class BitStringSyntaxChecker extends MutableSyntaxCheckerImpl
 {
     /** A logger for this class */
     private static final Logger LOG = LoggerFactory.getLogger( BitStringSyntaxChecker.class );

Modified: directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/syntaxCheckers/BooleanSyntaxChecker.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/syntaxCheckers/BooleanSyntaxChecker.java?rev=1080939&r1=1080938&r2=1080939&view=diff
==============================================================================
--- directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/syntaxCheckers/BooleanSyntaxChecker.java (original)
+++ directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/syntaxCheckers/BooleanSyntaxChecker.java Sat Mar 12 15:08:48 2011
@@ -21,7 +21,7 @@ package org.apache.directory.shared.ldap
 
 
 import org.apache.directory.shared.ldap.model.constants.SchemaConstants;
-import org.apache.directory.shared.ldap.model.schema.SyntaxChecker;
+import org.apache.directory.shared.ldap.model.schema.MutableSyntaxCheckerImpl;
 import org.apache.directory.shared.util.Strings;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -38,7 +38,7 @@ import org.slf4j.LoggerFactory;
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
 @SuppressWarnings("serial")
-public class BooleanSyntaxChecker extends SyntaxChecker
+public class BooleanSyntaxChecker extends MutableSyntaxCheckerImpl
 {
     /** A logger for this class */
     private static final Logger LOG = LoggerFactory.getLogger( BooleanSyntaxChecker.class );

Modified: directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/syntaxCheckers/CountrySyntaxChecker.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/syntaxCheckers/CountrySyntaxChecker.java?rev=1080939&r1=1080938&r2=1080939&view=diff
==============================================================================
--- directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/syntaxCheckers/CountrySyntaxChecker.java (original)
+++ directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/syntaxCheckers/CountrySyntaxChecker.java Sat Mar 12 15:08:48 2011
@@ -24,7 +24,7 @@ import java.util.HashSet;
 import java.util.Set;
 
 import org.apache.directory.shared.ldap.model.constants.SchemaConstants;
-import org.apache.directory.shared.ldap.model.schema.SyntaxChecker;
+import org.apache.directory.shared.ldap.model.schema.MutableSyntaxCheckerImpl;
 import org.apache.directory.shared.util.Strings;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -42,7 +42,7 @@ import org.slf4j.LoggerFactory;
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
 @SuppressWarnings("serial")
-public class CountrySyntaxChecker extends SyntaxChecker
+public class CountrySyntaxChecker extends MutableSyntaxCheckerImpl
 {
     /** A logger for this class */
     private static final Logger LOG = LoggerFactory.getLogger( CountrySyntaxChecker.class );

Modified: directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/syntaxCheckers/CsnSidSyntaxChecker.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/syntaxCheckers/CsnSidSyntaxChecker.java?rev=1080939&r1=1080938&r2=1080939&view=diff
==============================================================================
--- directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/syntaxCheckers/CsnSidSyntaxChecker.java (original)
+++ directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/syntaxCheckers/CsnSidSyntaxChecker.java Sat Mar 12 15:08:48 2011
@@ -20,7 +20,7 @@
 package org.apache.directory.shared.ldap.model.schema.syntaxCheckers;
 
 import org.apache.directory.shared.ldap.model.constants.SchemaConstants;
-import org.apache.directory.shared.ldap.model.schema.SyntaxChecker;
+import org.apache.directory.shared.ldap.model.schema.MutableSyntaxCheckerImpl;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -31,7 +31,7 @@ import org.slf4j.LoggerFactory;
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
 @SuppressWarnings("serial")
-public class CsnSidSyntaxChecker extends SyntaxChecker
+public class CsnSidSyntaxChecker extends MutableSyntaxCheckerImpl
 {
     /** A logger for this class */
     private static final Logger LOG = LoggerFactory.getLogger( CsnSidSyntaxChecker.class );

Modified: directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/syntaxCheckers/CsnSyntaxChecker.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/syntaxCheckers/CsnSyntaxChecker.java?rev=1080939&r1=1080938&r2=1080939&view=diff
==============================================================================
--- directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/syntaxCheckers/CsnSyntaxChecker.java (original)
+++ directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/syntaxCheckers/CsnSyntaxChecker.java Sat Mar 12 15:08:48 2011
@@ -22,7 +22,7 @@ package org.apache.directory.shared.ldap
 import org.apache.directory.shared.ldap.model.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.model.csn.Csn;
 import org.apache.directory.shared.ldap.model.csn.InvalidCSNException;
-import org.apache.directory.shared.ldap.model.schema.SyntaxChecker;
+import org.apache.directory.shared.ldap.model.schema.MutableSyntaxCheckerImpl;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -33,7 +33,7 @@ import org.slf4j.LoggerFactory;
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
 @SuppressWarnings("serial")
-public class CsnSyntaxChecker extends SyntaxChecker
+public class CsnSyntaxChecker extends MutableSyntaxCheckerImpl
 {
     /** A logger for this class */
     private static final Logger LOG = LoggerFactory.getLogger( CsnSyntaxChecker.class );



Mime
View raw message