directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1786491 [1/3] - in /directory/shared/branches/shared-value/ldap: model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/ model/src/test/java/org/apache/directory/api/ldap/model/schema/syntaxes/ schema/data/src/test/j...
Date Sat, 11 Mar 2017 07:45:21 GMT
Author: elecharny
Date: Sat Mar 11 07:45:20 2017
New Revision: 1786491

URL: http://svn.apache.org/viewvc?rev=1786491&view=rev
Log:
Added an INSTANCE in each SyntaxChecker, a bit of Javadoc cleanup, SonarLint fixes, etc...

Modified:
    directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/AccessPointSyntaxChecker.java
    directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/AttributeTypeDescriptionSyntaxChecker.java
    directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/AttributeTypeUsageSyntaxChecker.java
    directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/AudioSyntaxChecker.java
    directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/BinarySyntaxChecker.java
    directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/BitStringSyntaxChecker.java
    directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/BooleanSyntaxChecker.java
    directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/CertificateListSyntaxChecker.java
    directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/CertificatePairSyntaxChecker.java
    directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/CertificateSyntaxChecker.java
    directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/ComparatorSyntaxChecker.java
    directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/CountrySyntaxChecker.java
    directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/CsnSidSyntaxChecker.java
    directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/CsnSyntaxChecker.java
    directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/DataQualitySyntaxSyntaxChecker.java
    directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/DeliveryMethodSyntaxChecker.java
    directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/DerefAliasSyntaxChecker.java
    directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/DirectoryStringSyntaxChecker.java
    directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/DitContentRuleDescriptionSyntaxChecker.java
    directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/DitStructureRuleDescriptionSyntaxChecker.java
    directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/DlSubmitPermissionSyntaxChecker.java
    directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/DnSyntaxChecker.java
    directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/DsaQualitySyntaxSyntaxChecker.java
    directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/DseTypeSyntaxChecker.java
    directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/EnhancedGuideSyntaxChecker.java
    directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/FacsimileTelephoneNumberSyntaxChecker.java
    directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/FaxSyntaxChecker.java
    directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/GeneralizedTimeSyntaxChecker.java
    directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/GuideSyntaxChecker.java
    directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/Ia5StringSyntaxChecker.java
    directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/IntegerSyntaxChecker.java
    directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/JavaByteSyntaxChecker.java
    directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/JavaIntegerSyntaxChecker.java
    directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/JavaLongSyntaxChecker.java
    directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/JavaShortSyntaxChecker.java
    directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/JpegSyntaxChecker.java
    directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/LdapSyntaxDescriptionSyntaxChecker.java
    directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/MailPreferenceSyntaxChecker.java
    directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/MasterAndShadowAccessPointSyntaxChecker.java
    directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/MatchingRuleDescriptionSyntaxChecker.java
    directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/MatchingRuleUseDescriptionSyntaxChecker.java
    directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/MhsOrAddressSyntaxChecker.java
    directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/NameAndOptionalUIDSyntaxChecker.java
    directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/NameFormDescriptionSyntaxChecker.java
    directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/NormalizerSyntaxChecker.java
    directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/NumberSyntaxChecker.java
    directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/NumericOidSyntaxChecker.java
    directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/NumericStringSyntaxChecker.java
    directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/ObjectClassDescriptionSyntaxChecker.java
    directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/ObjectClassTypeSyntaxChecker.java
    directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/ObjectNameSyntaxChecker.java
    directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/OctetStringSyntaxChecker.java
    directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/OidLenSyntaxChecker.java
    directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/OidSyntaxChecker.java
    directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/OpenLdapObjectIdentifierMacro.java
    directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/OtherMailboxSyntaxChecker.java
    directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/PostalAddressSyntaxChecker.java
    directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/PresentationAddressSyntaxChecker.java
    directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/PrintableStringSyntaxChecker.java
    directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/ProtocolInformationSyntaxChecker.java
    directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/RegexSyntaxChecker.java
    directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/SearchScopeSyntaxChecker.java
    directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/SubstringAssertionSyntaxChecker.java
    directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/SubtreeSpecificationSyntaxChecker.java
    directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/SupplierAndConsumerSyntaxChecker.java
    directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/SupplierInformationSyntaxChecker.java
    directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/SupplierOrConsumerSyntaxChecker.java
    directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/SupportedAlgorithmSyntaxChecker.java
    directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/SyntaxCheckerSyntaxChecker.java
    directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/TelephoneNumberSyntaxChecker.java
    directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/TeletexTerminalIdentifierSyntaxChecker.java
    directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/TelexNumberSyntaxChecker.java
    directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/UtcTimeSyntaxChecker.java
    directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/UuidSyntaxChecker.java
    directory/shared/branches/shared-value/ldap/model/src/test/java/org/apache/directory/api/ldap/model/schema/syntaxes/BooleanSyntaxCheckerTest.java
    directory/shared/branches/shared-value/ldap/schema/data/src/test/java/org/apache/directory/api/ldap/schema/loader/SchemaManagerDelTest.java

Modified: directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/AccessPointSyntaxChecker.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/AccessPointSyntaxChecker.java?rev=1786491&r1=1786490&r2=1786491&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/AccessPointSyntaxChecker.java (original)
+++ directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/AccessPointSyntaxChecker.java Sat Mar 11 07:45:20 2017
@@ -36,7 +36,12 @@ public class AccessPointSyntaxChecker ex
 {
     /** A logger for this class */
     private static final Logger LOG = LoggerFactory.getLogger( AccessPointSyntaxChecker.class );
-
+    
+    /**
+     * A static instance of AccessPointSyntaxChecker
+     */
+    public static final AccessPointSyntaxChecker INSTANCE = new AccessPointSyntaxChecker();
+    
 
     /**
      * The AccessPoint SyntaxChecker constructor

Modified: directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/AttributeTypeDescriptionSyntaxChecker.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/AttributeTypeDescriptionSyntaxChecker.java?rev=1786491&r1=1786490&r2=1786491&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/AttributeTypeDescriptionSyntaxChecker.java (original)
+++ directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/AttributeTypeDescriptionSyntaxChecker.java Sat Mar 11 07:45:20 2017
@@ -22,6 +22,7 @@ package org.apache.directory.api.ldap.mo
 
 import java.text.ParseException;
 
+import org.apache.directory.api.i18n.I18n;
 import org.apache.directory.api.ldap.model.constants.SchemaConstants;
 import org.apache.directory.api.ldap.model.schema.SyntaxChecker;
 import org.apache.directory.api.ldap.model.schema.parsers.AttributeTypeDescriptionSchemaParser;
@@ -65,8 +66,6 @@ import org.slf4j.LoggerFactory;
  * COLLECTIVE requires usage userApplications.
  * 
  * NO-USER-MODIFICATION requires an operational usage.
- * 
- * 
  * </pre>
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
@@ -78,7 +77,12 @@ public class AttributeTypeDescriptionSyn
     private static final Logger LOG = LoggerFactory.getLogger( AttributeTypeDescriptionSyntaxChecker.class );
 
     /** The schema parser used to parse the AttributeTypeDescription Syntax */
-    private transient AttributeTypeDescriptionSchemaParser schemaParser = new AttributeTypeDescriptionSchemaParser();
+    private AttributeTypeDescriptionSchemaParser schemaParser = new AttributeTypeDescriptionSchemaParser();
+    
+    /**
+     * A static instance of AttributeTypeDescriptionSyntaxChecker
+     */
+    public static final AttributeTypeDescriptionSyntaxChecker INSTANCE = new AttributeTypeDescriptionSyntaxChecker();
 
 
     /**
@@ -102,7 +106,7 @@ public class AttributeTypeDescriptionSyn
 
         if ( value == null )
         {
-            LOG.debug( "Syntax invalid for 'null'" );
+            LOG.debug( I18n.err( I18n.ERR_04489_SYNTAX_INVALID, "null" ) );
             return false;
         }
 
@@ -122,12 +126,12 @@ public class AttributeTypeDescriptionSyn
         try
         {
             schemaParser.parseAttributeTypeDescription( strValue );
-            LOG.debug( "Syntax valid for '{}'", value );
+            LOG.debug( I18n.msg( I18n.MSG_04490_SYNTAX_VALID, value ) );
             return true;
         }
         catch ( ParseException pe )
         {
-            LOG.debug( INVALID_SYNTAX_FOR, value );
+            LOG.debug( I18n.err( I18n.ERR_04489_SYNTAX_INVALID, value ) );
             return false;
         }
     }

Modified: directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/AttributeTypeUsageSyntaxChecker.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/AttributeTypeUsageSyntaxChecker.java?rev=1786491&r1=1786490&r2=1786491&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/AttributeTypeUsageSyntaxChecker.java (original)
+++ directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/AttributeTypeUsageSyntaxChecker.java Sat Mar 11 07:45:20 2017
@@ -20,6 +20,7 @@
 package org.apache.directory.api.ldap.model.schema.syntaxCheckers;
 
 
+import org.apache.directory.api.i18n.I18n;
 import org.apache.directory.api.ldap.model.constants.SchemaConstants;
 import org.apache.directory.api.ldap.model.schema.SyntaxChecker;
 import org.apache.directory.api.util.Strings;
@@ -29,11 +30,14 @@ import org.slf4j.LoggerFactory;
 
 /**
  * A syntax checker which checks to see if an attributeType's type is either: 
- * userApplications
- * directoryOperation
- * distributedOperation
- * dSAOperation
-.*  The case is NOT ignored.
+ * <ul>
+ *   <li>userApplications</li>
+ *   <lidirectoryOperation</li>
+ *   <lidistributedOperation</li>
+ *   <lidSAOperation</li>
+ * </ul>
+.* 
+ * The case is NOT ignored.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
@@ -42,8 +46,13 @@ public class AttributeTypeUsageSyntaxChe
 {
     /** A logger for this class */
     private static final Logger LOG = LoggerFactory.getLogger( AttributeTypeUsageSyntaxChecker.class );
+    
+    /**
+     * A static instance of AttributeTypeUsageSyntaxChecker
+     */
+    public static final AttributeTypeUsageSyntaxChecker INSTANCE = new AttributeTypeUsageSyntaxChecker();
 
-
+    
     /**
      * 
      * Creates a new instance of AttributeTypeUsageSyntaxChecker.
@@ -65,7 +74,7 @@ public class AttributeTypeUsageSyntaxChe
 
         if ( value == null )
         {
-            LOG.debug( "Syntax invalid for 'null'" );
+            LOG.debug( I18n.err( I18n.ERR_04489_SYNTAX_INVALID, "null" ) );
             return false;
         }
 
@@ -82,46 +91,19 @@ public class AttributeTypeUsageSyntaxChe
             strValue = value.toString();
         }
 
-        if ( ( strValue.length() < "userApplications".length() )
-            || ( strValue.length() > "userApplications".length() ) )
-        {
-            LOG.debug( INVALID_SYNTAX_FOR, value );
-            return false;
-        }
-
-        char ch = strValue.charAt( 0 );
-
-        switch ( ch )
+        switch ( strValue )
         {
-            case 'd':
-                if ( "dSAOperation".equals( strValue )
-                    || "directoryOperation".equals( strValue )
-                    || "distributedOperation".equals( strValue ) )
-                {
-                    LOG.debug( "Syntax valid for '{}'", value );
-                    return true;
-                }
-
-                LOG.debug( INVALID_SYNTAX_FOR, value );
-                return false;
-
-            case 'u':
-                boolean comp = "userApplications".equals( strValue );
-
-                if ( comp )
-                {
-                    LOG.debug( "Syntax valid for '{}'", value );
-                }
-                else
-                {
-                    LOG.debug( INVALID_SYNTAX_FOR, value );
-
-                }
-
-                return comp;
-
-            default:
-                LOG.debug( INVALID_SYNTAX_FOR, value );
+            case "dSAOperation" :
+            case "directoryOperation" :
+            case "distributedOperation" :
+            case "userApplications" :
+                LOG.debug( I18n.msg( I18n.MSG_04490_SYNTAX_VALID, value ) );
+                
+                return true;
+
+            default :
+                LOG.debug( I18n.err( I18n.ERR_04489_SYNTAX_INVALID, value ) );
+                
                 return false;
         }
     }

Modified: directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/AudioSyntaxChecker.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/AudioSyntaxChecker.java?rev=1786491&r1=1786490&r2=1786491&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/AudioSyntaxChecker.java (original)
+++ directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/AudioSyntaxChecker.java Sat Mar 11 07:45:20 2017
@@ -20,6 +20,7 @@
 package org.apache.directory.api.ldap.model.schema.syntaxCheckers;
 
 
+import org.apache.directory.api.i18n.I18n;
 import org.apache.directory.api.ldap.model.constants.SchemaConstants;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -28,9 +29,11 @@ import org.slf4j.LoggerFactory;
 /**
  * A SyntaxChecker which verifies that a value is an Audio according to RFC 2252.
  * 
+ * <pre>
  * The encoding of a value with Audio syntax is the octets of the value
  * itself, an 8KHz uncompressed encoding compatible with the SunOS 
  * 4.1.3 'play' utility. We implement it as a binary element.
+ * </pre>
  * 
  * It has been removed in RFC 4517
  *  
@@ -41,15 +44,19 @@ public class AudioSyntaxChecker extends
 {
     /** A logger for this class */
     private static final Logger LOG = LoggerFactory.getLogger( AudioSyntaxChecker.class );
+    
+    /**
+     * A static instance of AudioSyntaxChecker
+     */
+    public static final AudioSyntaxChecker INSTANCE = new AudioSyntaxChecker();
 
-
+    
     /**
      * Creates a new instance of AudioSyntaxChecker
      */
     public AudioSyntaxChecker()
     {
-        super();
-        setOid( SchemaConstants.AUDIO_SYNTAX );
+        super( SchemaConstants.AUDIO_SYNTAX );
     }
 
 
@@ -59,7 +66,8 @@ public class AudioSyntaxChecker extends
     @Override
     public boolean isValidSyntax( Object value )
     {
-        LOG.debug( "Syntax valid for '{}'", value );
+        LOG.debug( I18n.msg( I18n.MSG_04490_SYNTAX_VALID, value ) );
+        
         return true;
     }
 }

Modified: directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/BinarySyntaxChecker.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/BinarySyntaxChecker.java?rev=1786491&r1=1786490&r2=1786491&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/BinarySyntaxChecker.java (original)
+++ directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/BinarySyntaxChecker.java Sat Mar 11 07:45:20 2017
@@ -20,6 +20,7 @@
 package org.apache.directory.api.ldap.model.schema.syntaxCheckers;
 
 
+import org.apache.directory.api.i18n.I18n;
 import org.apache.directory.api.ldap.model.constants.SchemaConstants;
 import org.apache.directory.api.ldap.model.schema.SyntaxChecker;
 import org.slf4j.Logger;
@@ -36,8 +37,13 @@ public class BinarySyntaxChecker extends
 {
     /** A logger for this class */
     private static final Logger LOG = LoggerFactory.getLogger( BinarySyntaxChecker.class );
+    
+    /**
+     * A static instance of BinarySyntaxChecker
+     */
+    public static final BinarySyntaxChecker INSTANCE = new BinarySyntaxChecker();
 
-
+    
     /**
      * Creates a new instance of BinarySyntaxChecker
      */
@@ -45,6 +51,16 @@ public class BinarySyntaxChecker extends
     {
         super( SchemaConstants.BINARY_SYNTAX );
     }
+    
+    
+    /**
+     * Creates a new instance of the child class
+     * @param oid The child's OID
+     */
+    protected BinarySyntaxChecker( String oid )
+    {
+        super( oid );
+    }
 
 
     /**
@@ -53,7 +69,7 @@ public class BinarySyntaxChecker extends
     @Override
     public boolean isValidSyntax( Object value )
     {
-        LOG.debug( "Syntax valid for '{}'", value );
+        LOG.debug( I18n.msg( I18n.MSG_04490_SYNTAX_VALID, value ) );
         return true;
     }
 }

Modified: directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/BitStringSyntaxChecker.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/BitStringSyntaxChecker.java?rev=1786491&r1=1786490&r2=1786491&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/BitStringSyntaxChecker.java (original)
+++ directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/BitStringSyntaxChecker.java Sat Mar 11 07:45:20 2017
@@ -20,6 +20,7 @@
 package org.apache.directory.api.ldap.model.schema.syntaxCheckers;
 
 
+import org.apache.directory.api.i18n.I18n;
 import org.apache.directory.api.ldap.model.constants.SchemaConstants;
 import org.apache.directory.api.ldap.model.schema.SyntaxChecker;
 import org.apache.directory.api.util.Chars;
@@ -45,8 +46,13 @@ public class BitStringSyntaxChecker exte
 {
     /** A logger for this class */
     private static final Logger LOG = LoggerFactory.getLogger( BitStringSyntaxChecker.class );
+    
+    /**
+     * A static instance of BitStringSyntaxChecker
+     */
+    public static final BitStringSyntaxChecker INSTANCE = new BitStringSyntaxChecker();
 
-
+    
     /**
      * 
      * Creates a new instance of BitStringSyntaxChecker.
@@ -71,7 +77,7 @@ public class BitStringSyntaxChecker exte
     {
         if ( strValue.length() == 0 )
         {
-            LOG.debug( INVALID_SYNTAX_FOR, strValue );
+            LOG.debug( I18n.err( I18n.ERR_04489_SYNTAX_INVALID, strValue ) );
             return false;
         }
 
@@ -80,14 +86,14 @@ public class BitStringSyntaxChecker exte
         // Check that the String respect the syntax : ' ([01]+) ' B
         if ( !Strings.isCharASCII( strValue, pos++, '\'' ) )
         {
-            LOG.debug( INVALID_SYNTAX_FOR, strValue );
+            LOG.debug( I18n.err( I18n.ERR_04489_SYNTAX_INVALID, strValue ) );
             return false;
         }
 
         // We must have at least one bit
         if ( !Chars.isBit( strValue, pos++ ) )
         {
-            LOG.debug( INVALID_SYNTAX_FOR, strValue );
+            LOG.debug( I18n.err( I18n.ERR_04489_SYNTAX_INVALID, strValue ) );
             return false;
         }
 
@@ -100,18 +106,18 @@ public class BitStringSyntaxChecker exte
         // Now, we must have a simple quote 
         if ( !Strings.isCharASCII( strValue, pos++, '\'' ) )
         {
-            LOG.debug( INVALID_SYNTAX_FOR, strValue );
+            LOG.debug( I18n.err( I18n.ERR_04489_SYNTAX_INVALID, strValue ) );
             return false;
         }
 
         // followed by a 'B'
         if ( !Strings.isCharASCII( strValue, pos, 'B' ) )
         {
-            LOG.debug( INVALID_SYNTAX_FOR, strValue );
+            LOG.debug( I18n.err( I18n.ERR_04489_SYNTAX_INVALID, strValue ) );
             return false;
         }
 
-        LOG.debug( "Syntax valid for '{}'", strValue );
+        LOG.debug( I18n.msg( I18n.MSG_04490_SYNTAX_VALID, strValue ) );
         return true;
     }
 
@@ -126,7 +132,7 @@ public class BitStringSyntaxChecker exte
 
         if ( value == null )
         {
-            LOG.debug( "Syntax invalid for 'null'" );
+            LOG.debug( I18n.err( I18n.ERR_04489_SYNTAX_INVALID, "null" ) );
             return false;
         }
 

Modified: directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/BooleanSyntaxChecker.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/BooleanSyntaxChecker.java?rev=1786491&r1=1786490&r2=1786491&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/BooleanSyntaxChecker.java (original)
+++ directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/BooleanSyntaxChecker.java Sat Mar 11 07:45:20 2017
@@ -20,6 +20,7 @@
 package org.apache.directory.api.ldap.model.schema.syntaxCheckers;
 
 
+import org.apache.directory.api.i18n.I18n;
 import org.apache.directory.api.ldap.model.constants.SchemaConstants;
 import org.apache.directory.api.ldap.model.schema.SyntaxChecker;
 import org.apache.directory.api.util.Strings;
@@ -29,8 +30,9 @@ import org.slf4j.LoggerFactory;
 
 /**
  * A SyntaxChecker which verifies that a value is a Boolean according to RFC 4517.
- * <br>
+ * 
  * From RFC 4517 :
+ * 
  * <pre>
  * Boolean = "TRUE" / "FALSE"
  * </pre>
@@ -42,8 +44,13 @@ public class BooleanSyntaxChecker extend
 {
     /** A logger for this class */
     private static final Logger LOG = LoggerFactory.getLogger( BooleanSyntaxChecker.class );
+    
+    /**
+     * A static instance of BooleanSyntaxChecker
+     */
+    public static final BooleanSyntaxChecker INSTANCE = new BooleanSyntaxChecker();
 
-
+    
     /**
      * Creates a new instance of BooleanSyntaxChecker.
      */
@@ -63,7 +70,7 @@ public class BooleanSyntaxChecker extend
 
         if ( value == null )
         {
-            LOG.debug( "Syntax invalid for 'null'" );
+            LOG.debug( I18n.err( I18n.ERR_04489_SYNTAX_INVALID, "null" ) );
             return false;
         }
 
@@ -82,7 +89,7 @@ public class BooleanSyntaxChecker extend
 
         if ( strValue.length() == 0 )
         {
-            LOG.debug( INVALID_SYNTAX_FOR, strValue );
+            LOG.debug( I18n.err( I18n.ERR_04489_SYNTAX_INVALID, strValue ) );
             return false;
         }
 
@@ -90,11 +97,11 @@ public class BooleanSyntaxChecker extend
 
         if ( valid )
         {
-            LOG.debug( "Syntax valid for '{}'", strValue );
+            LOG.debug( I18n.msg( I18n.MSG_04490_SYNTAX_VALID, strValue ) );
         }
         else
         {
-            LOG.debug( INVALID_SYNTAX_FOR, strValue );
+            LOG.debug( I18n.err( I18n.ERR_04489_SYNTAX_INVALID, strValue ) );
         }
 
         return valid;

Modified: directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/CertificateListSyntaxChecker.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/CertificateListSyntaxChecker.java?rev=1786491&r1=1786490&r2=1786491&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/CertificateListSyntaxChecker.java (original)
+++ directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/CertificateListSyntaxChecker.java Sat Mar 11 07:45:20 2017
@@ -20,6 +20,7 @@
 package org.apache.directory.api.ldap.model.schema.syntaxCheckers;
 
 
+import org.apache.directory.api.i18n.I18n;
 import org.apache.directory.api.ldap.model.constants.SchemaConstants;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -28,11 +29,13 @@ import org.slf4j.LoggerFactory;
 /**
  * A SyntaxChecker which verifies that a value is a certificateList according to RFC 4523 :
  * 
+ * <pre>
  * "Due to changes made to the definition of a CertificateList through time,
  *  no LDAP-specific encoding is defined for this syntax.  Values of this
  *  syntax SHOULD be encoded using Distinguished Encoding Rules (DER)
  *  [X.690] and MUST only be transferred using the ;binary transfer
  *  option"
+ * </pre>
  * 
  * It has been removed in RFC 4517
  *  
@@ -43,15 +46,19 @@ public class CertificateListSyntaxChecke
 {
     /** A logger for this class */
     private static final Logger LOG = LoggerFactory.getLogger( CertificateListSyntaxChecker.class );
+    
+    /**
+     * A static instance of CertificateListSyntaxChecker
+     */
+    public static final CertificateListSyntaxChecker INSTANCE = new CertificateListSyntaxChecker();
 
-
+    
     /**
      * Creates a new instance of CertificateListSyntaxChecker.
      */
     public CertificateListSyntaxChecker()
     {
-        super();
-        setOid( SchemaConstants.CERTIFICATE_LIST_SYNTAX );
+        super( SchemaConstants.CERTIFICATE_LIST_SYNTAX );
     }
 
 
@@ -61,7 +68,7 @@ public class CertificateListSyntaxChecke
     @Override
     public boolean isValidSyntax( Object value )
     {
-        LOG.debug( "Syntax valid for '{}'", value );
+        LOG.debug( I18n.msg( I18n.MSG_04490_SYNTAX_VALID, value ) );
         return true;
     }
 }

Modified: directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/CertificatePairSyntaxChecker.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/CertificatePairSyntaxChecker.java?rev=1786491&r1=1786490&r2=1786491&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/CertificatePairSyntaxChecker.java (original)
+++ directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/CertificatePairSyntaxChecker.java Sat Mar 11 07:45:20 2017
@@ -20,6 +20,7 @@
 package org.apache.directory.api.ldap.model.schema.syntaxCheckers;
 
 
+import org.apache.directory.api.i18n.I18n;
 import org.apache.directory.api.ldap.model.constants.SchemaConstants;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -28,11 +29,13 @@ import org.slf4j.LoggerFactory;
 /**
  * A SyntaxChecker which verifies that a value is a certificate pair according to RFC 4523 :
  * 
+ * <pre>
  * "Due to changes made to the definition of a CertificatePair through time,
  *  no LDAP-specific encoding is defined for this syntax.  Values of this
  *  syntax SHOULD be encoded using Distinguished Encoding Rules (DER)
  *  [X.690] and MUST only be transferred using the ;binary transfer
  *  option"
+ *  </pre>
  * 
  * It has been removed in RFC 4517
  *  
@@ -43,15 +46,19 @@ public class CertificatePairSyntaxChecke
 {
     /** A logger for this class */
     private static final Logger LOG = LoggerFactory.getLogger( CertificatePairSyntaxChecker.class );
+    
+    /**
+     * A static instance of CertificatePairSyntaxChecker
+     */
+    public static final CertificatePairSyntaxChecker INSTANCE = new CertificatePairSyntaxChecker();
 
-
+    
     /**
      * Creates a new instance of CertificatePairSyntaxChecker.
      */
     public CertificatePairSyntaxChecker()
     {
-        super();
-        setOid( SchemaConstants.CERTIFICATE_PAIR_SYNTAX );
+        super( SchemaConstants.CERTIFICATE_PAIR_SYNTAX );
     }
 
 
@@ -61,7 +68,7 @@ public class CertificatePairSyntaxChecke
     @Override
     public boolean isValidSyntax( Object value )
     {
-        LOG.debug( "Syntax valid for '{}'", value );
+        LOG.debug( I18n.msg( I18n.MSG_04490_SYNTAX_VALID, value ) );
         return true;
     }
 }

Modified: directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/CertificateSyntaxChecker.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/CertificateSyntaxChecker.java?rev=1786491&r1=1786490&r2=1786491&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/CertificateSyntaxChecker.java (original)
+++ directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/CertificateSyntaxChecker.java Sat Mar 11 07:45:20 2017
@@ -20,6 +20,7 @@
 package org.apache.directory.api.ldap.model.schema.syntaxCheckers;
 
 
+import org.apache.directory.api.i18n.I18n;
 import org.apache.directory.api.ldap.model.constants.SchemaConstants;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -28,11 +29,13 @@ import org.slf4j.LoggerFactory;
 /**
  * A SyntaxChecker which verifies that a value is a certificate according to RFC 4523 :
  * 
+ * <pre>
  * "Due to changes made to the definition of a Certificate through time,
  *  no LDAP-specific encoding is defined for this syntax.  Values of this
  *  syntax SHOULD be encoded using Distinguished Encoding Rules (DER)
  *  [X.690] and MUST only be transferred using the ;binary transfer
  *  option"
+ * </pre>
  * 
  * It has been removed in RFC 4517
  *  
@@ -43,15 +46,19 @@ public class CertificateSyntaxChecker ex
 {
     /** A logger for this class */
     private static final Logger LOG = LoggerFactory.getLogger( CertificateSyntaxChecker.class );
+    
+    /**
+     * A static instance of CertificateSyntaxChecker
+     */
+    public static final CertificateSyntaxChecker INSTANCE = new CertificateSyntaxChecker();
 
-
+    
     /**
      * Creates a new instance of CertificateSyntaxChecker.
      */
     public CertificateSyntaxChecker()
     {
-        super();
-        setOid( SchemaConstants.CERTIFICATE_SYNTAX );
+        super( SchemaConstants.CERTIFICATE_SYNTAX );
     }
 
 
@@ -61,7 +68,8 @@ public class CertificateSyntaxChecker ex
     @Override
     public boolean isValidSyntax( Object value )
     {
-        LOG.debug( "Syntax valid for '{}'", value );
+        LOG.debug( I18n.msg( I18n.MSG_04490_SYNTAX_VALID, value ) );
+        
         return true;
     }
 }

Modified: directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/ComparatorSyntaxChecker.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/ComparatorSyntaxChecker.java?rev=1786491&r1=1786490&r2=1786491&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/ComparatorSyntaxChecker.java (original)
+++ directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/ComparatorSyntaxChecker.java Sat Mar 11 07:45:20 2017
@@ -32,13 +32,18 @@ import org.apache.directory.api.ldap.mod
 public class ComparatorSyntaxChecker extends Ia5StringSyntaxChecker
 {
     /**
+     * A static instance of ComparatorSyntaxChecker
+     */
+    public static final ComparatorSyntaxChecker INSTANCE = new ComparatorSyntaxChecker();
+
+    
+    /**
      * 
      * Creates a new instance of ComparatorSyntaxChecker.
      *
      */
     public ComparatorSyntaxChecker()
     {
-        super();
-        setOid( SchemaConstants.COMPARATOR_SYNTAX );
+        super( SchemaConstants.COMPARATOR_SYNTAX );
     }
 }

Modified: directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/CountrySyntaxChecker.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/CountrySyntaxChecker.java?rev=1786491&r1=1786490&r2=1786491&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/CountrySyntaxChecker.java (original)
+++ directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/CountrySyntaxChecker.java Sat Mar 11 07:45:20 2017
@@ -23,6 +23,7 @@ package org.apache.directory.api.ldap.mo
 import java.util.HashSet;
 import java.util.Set;
 
+import org.apache.directory.api.i18n.I18n;
 import org.apache.directory.api.ldap.model.constants.SchemaConstants;
 import org.apache.directory.api.ldap.model.schema.SyntaxChecker;
 import org.apache.directory.api.util.Strings;
@@ -35,9 +36,10 @@ import org.slf4j.LoggerFactory;
  * 
  * From RFC 4517 :
  * 
+ * <pre>
  * A value of the Country String syntax is one of the two-character
  * codes from ISO 3166 [ISO3166] for representing a country.
- * 
+ * </pre>
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
@@ -307,8 +309,13 @@ public class CountrySyntaxChecker extend
             COUNTRIES.add( country );
         }
     }
+    
+    /**
+     * A static instance of CountrySyntaxChecker
+     */
+    public static final CountrySyntaxChecker INSTANCE = new CountrySyntaxChecker();
 
-
+    
     /**
      * 
      * Creates a new instance of CountrySyntaxChecker.
@@ -330,7 +337,7 @@ public class CountrySyntaxChecker extend
 
         if ( value == null )
         {
-            LOG.debug( "Syntax invalid for 'null'" );
+            LOG.debug( I18n.err( I18n.ERR_04489_SYNTAX_INVALID, "null" ) );
             return false;
         }
 
@@ -349,7 +356,7 @@ public class CountrySyntaxChecker extend
 
         if ( strValue.length() == 0 )
         {
-            LOG.debug( INVALID_SYNTAX_FOR, value );
+            LOG.debug( I18n.err( I18n.ERR_04489_SYNTAX_INVALID, value ) );
             return false;
         }
 
@@ -357,11 +364,11 @@ public class CountrySyntaxChecker extend
 
         if ( result )
         {
-            LOG.debug( "Syntax valid for '{}'", value );
+            LOG.debug( I18n.msg( I18n.MSG_04490_SYNTAX_VALID, value ) );
         }
         else
         {
-            LOG.debug( INVALID_SYNTAX_FOR, value );
+            LOG.debug( I18n.err( I18n.ERR_04489_SYNTAX_INVALID, value ) );
         }
 
         return result;

Modified: directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/CsnSidSyntaxChecker.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/CsnSidSyntaxChecker.java?rev=1786491&r1=1786490&r2=1786491&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/CsnSidSyntaxChecker.java (original)
+++ directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/CsnSidSyntaxChecker.java Sat Mar 11 07:45:20 2017
@@ -20,6 +20,7 @@
 package org.apache.directory.api.ldap.model.schema.syntaxCheckers;
 
 
+import org.apache.directory.api.i18n.I18n;
 import org.apache.directory.api.ldap.model.constants.SchemaConstants;
 import org.apache.directory.api.ldap.model.schema.SyntaxChecker;
 import org.slf4j.Logger;
@@ -36,8 +37,13 @@ public class CsnSidSyntaxChecker extends
 {
     /** A logger for this class */
     private static final Logger LOG = LoggerFactory.getLogger( CsnSidSyntaxChecker.class );
+    
+    /**
+     * A static instance of CsnSidSyntaxChecker
+     */
+    public static final CsnSidSyntaxChecker INSTANCE = new CsnSidSyntaxChecker();
 
-
+    
     /**
      * Creates a new instance of CsnSyntaxChecker.
      */
@@ -55,13 +61,13 @@ public class CsnSidSyntaxChecker extends
     {
         if ( value == null )
         {
-            LOG.debug( "Syntax invalid for 'null'" );
+            LOG.debug( I18n.err( I18n.ERR_04489_SYNTAX_INVALID, "null" ) );
             return false;
         }
 
         if ( !( value instanceof String ) )
         {
-            LOG.debug( INVALID_SYNTAX_FOR, value );
+            LOG.debug( I18n.err( I18n.ERR_04489_SYNTAX_INVALID, value ) );
             return false;
         }
 
@@ -69,7 +75,7 @@ public class CsnSidSyntaxChecker extends
 
         if ( sidStr.length() > 3 )
         {
-            LOG.debug( INVALID_SYNTAX_FOR, value );
+            LOG.debug( I18n.err( I18n.ERR_04489_SYNTAX_INVALID, value ) );
             return false;
         }
 
@@ -81,17 +87,17 @@ public class CsnSidSyntaxChecker extends
 
             if ( ( sid < 0 ) || ( sid > 0x0fff ) )
             {
-                LOG.debug( INVALID_SYNTAX_FOR, value );
+                LOG.debug( I18n.err( I18n.ERR_04489_SYNTAX_INVALID, value ) );
                 return false;
             }
         }
         catch ( NumberFormatException nfe )
         {
-            LOG.debug( INVALID_SYNTAX_FOR, value );
+            LOG.debug( I18n.err( I18n.ERR_04489_SYNTAX_INVALID, value ) );
             return false;
         }
 
-        LOG.debug( "Syntax valid for '{}'", value );
+        LOG.debug( I18n.msg( I18n.MSG_04490_SYNTAX_VALID, value ) );
         return true;
     }
 }

Modified: directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/CsnSyntaxChecker.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/CsnSyntaxChecker.java?rev=1786491&r1=1786490&r2=1786491&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/CsnSyntaxChecker.java (original)
+++ directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/CsnSyntaxChecker.java Sat Mar 11 07:45:20 2017
@@ -20,6 +20,7 @@
 package org.apache.directory.api.ldap.model.schema.syntaxCheckers;
 
 
+import org.apache.directory.api.i18n.I18n;
 import org.apache.directory.api.ldap.model.constants.SchemaConstants;
 import org.apache.directory.api.ldap.model.csn.Csn;
 import org.apache.directory.api.ldap.model.csn.InvalidCSNException;
@@ -38,8 +39,13 @@ public class CsnSyntaxChecker extends Sy
 {
     /** A logger for this class */
     private static final Logger LOG = LoggerFactory.getLogger( CsnSyntaxChecker.class );
+    
+    /**
+     * A static instance of CsnSyntaxChecker
+     */
+    public static final CsnSyntaxChecker INSTANCE = new CsnSyntaxChecker();
 
-
+    
     /**
      * Creates a new instance of CsnSyntaxChecker.
      */
@@ -57,13 +63,13 @@ public class CsnSyntaxChecker extends Sy
     {
         if ( value == null )
         {
-            LOG.debug( "Syntax invalid for 'null'" );
+            LOG.debug( I18n.err( I18n.ERR_04489_SYNTAX_INVALID, "null" ) );
             return false;
         }
 
         if ( !( value instanceof String ) )
         {
-            LOG.debug( INVALID_SYNTAX_FOR, value );
+            LOG.debug( I18n.err( I18n.ERR_04489_SYNTAX_INVALID, value ) );
             return false;
         }
 
@@ -76,18 +82,18 @@ public class CsnSyntaxChecker extends Sy
 
             if ( result )
             {
-                LOG.debug( "Syntax valid for '{}'", value );
+                LOG.debug( I18n.msg( I18n.MSG_04490_SYNTAX_VALID, value ) );
             }
             else
             {
-                LOG.debug( INVALID_SYNTAX_FOR, value );
+                LOG.debug( I18n.err( I18n.ERR_04489_SYNTAX_INVALID, value ) );
             }
 
             return result;
         }
         catch ( InvalidCSNException icsne )
         {
-            LOG.debug( INVALID_SYNTAX_FOR, value );
+            LOG.debug( I18n.err( I18n.ERR_04489_SYNTAX_INVALID, value ) );
             return false;
         }
     }

Modified: directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/DataQualitySyntaxSyntaxChecker.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/DataQualitySyntaxSyntaxChecker.java?rev=1786491&r1=1786490&r2=1786491&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/DataQualitySyntaxSyntaxChecker.java (original)
+++ directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/DataQualitySyntaxSyntaxChecker.java Sat Mar 11 07:45:20 2017
@@ -20,6 +20,7 @@
 package org.apache.directory.api.ldap.model.schema.syntaxCheckers;
 
 
+import org.apache.directory.api.i18n.I18n;
 import org.apache.directory.api.ldap.model.constants.SchemaConstants;
 import org.apache.directory.api.ldap.model.schema.SyntaxChecker;
 import org.slf4j.Logger;
@@ -36,8 +37,13 @@ public class DataQualitySyntaxSyntaxChec
 {
     /** A logger for this class */
     private static final Logger LOG = LoggerFactory.getLogger( DataQualitySyntaxSyntaxChecker.class );
+    
+    /**
+     * A static instance of DataQualitySyntaxSyntaxChecker
+     */
+    public static final DataQualitySyntaxSyntaxChecker INSTANCE = new DataQualitySyntaxSyntaxChecker();
 
-
+    
     /**
      * Creates a new instance of DataQualitySyntaxSyntaxChecker.
      */
@@ -46,14 +52,13 @@ public class DataQualitySyntaxSyntaxChec
         super( SchemaConstants.DATA_QUALITY_SYNTAX );
     }
 
-
     /**
      * {@inheritDoc}
      */
     @Override
     public boolean isValidSyntax( Object value )
     {
-        LOG.debug( "Syntax valid for '{}'", value );
+        LOG.debug( I18n.msg( I18n.MSG_04490_SYNTAX_VALID, value ) );
         return true;
     }
 }

Modified: directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/DeliveryMethodSyntaxChecker.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/DeliveryMethodSyntaxChecker.java?rev=1786491&r1=1786490&r2=1786491&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/DeliveryMethodSyntaxChecker.java (original)
+++ directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/DeliveryMethodSyntaxChecker.java Sat Mar 11 07:45:20 2017
@@ -23,6 +23,7 @@ package org.apache.directory.api.ldap.mo
 import java.util.HashSet;
 import java.util.Set;
 
+import org.apache.directory.api.i18n.I18n;
 import org.apache.directory.api.ldap.model.constants.SchemaConstants;
 import org.apache.directory.api.ldap.model.schema.SyntaxChecker;
 import org.apache.directory.api.util.Chars;
@@ -59,7 +60,7 @@ public class DeliveryMethodSyntaxChecker
         {
             "any", "mhs", "physical", "telex", "teletex",
             "g3fax", "g4fax", "ia5", "videotex", "telephone"
-    };
+        };
 
     /** The Set which contains the delivery methods */
     private static final Set<String> DELIVERY_METHODS = new HashSet<>();
@@ -72,6 +73,11 @@ public class DeliveryMethodSyntaxChecker
             DELIVERY_METHODS.add( country );
         }
     }
+    
+    /**
+     * A static instance of DeliveryMethodSyntaxChecker
+     */
+    public static final DeliveryMethodSyntaxChecker INSTANCE = new DeliveryMethodSyntaxChecker();
 
 
     /**
@@ -144,7 +150,7 @@ public class DeliveryMethodSyntaxChecker
 
         if ( value == null )
         {
-            LOG.debug( "Syntax invalid for 'null'" );
+            LOG.debug( I18n.err( I18n.ERR_04489_SYNTAX_INVALID, "null" ) );
             return false;
         }
 
@@ -163,7 +169,7 @@ public class DeliveryMethodSyntaxChecker
 
         if ( strValue.length() == 0 )
         {
-            LOG.debug( INVALID_SYNTAX_FOR, value );
+            LOG.debug( I18n.err( I18n.ERR_04489_SYNTAX_INVALID, value ) );
             return false;
         }
 
@@ -173,9 +179,10 @@ public class DeliveryMethodSyntaxChecker
         Set<String> pmds = new HashSet<>();
 
         pos = isPdm( strValue, pos, pmds );
+        
         if ( pos == -1 )
         {
-            LOG.debug( INVALID_SYNTAX_FOR, value );
+            LOG.debug( I18n.err( I18n.ERR_04489_SYNTAX_INVALID, value ) );
             return false;
         }
 
@@ -193,7 +200,7 @@ public class DeliveryMethodSyntaxChecker
             if ( !Strings.isCharASCII( strValue, pos, '$' ) )
             {
                 // A '$' was expected
-                LOG.debug( INVALID_SYNTAX_FOR, value );
+                LOG.debug( I18n.err( I18n.ERR_04489_SYNTAX_INVALID, value ) );
                 return false;
             }
             else
@@ -208,14 +215,15 @@ public class DeliveryMethodSyntaxChecker
             }
 
             pos = isPdm( strValue, pos, pmds );
+            
             if ( pos == -1 )
             {
-                LOG.debug( INVALID_SYNTAX_FOR, value );
+                LOG.debug( I18n.err( I18n.ERR_04489_SYNTAX_INVALID, value ) );
                 return false;
             }
         }
 
-        LOG.debug( "Syntax valid for '{}'", value );
+        LOG.debug( I18n.msg( I18n.MSG_04490_SYNTAX_VALID, value ) );
         return true;
     }
 }

Modified: directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/DerefAliasSyntaxChecker.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/DerefAliasSyntaxChecker.java?rev=1786491&r1=1786490&r2=1786491&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/DerefAliasSyntaxChecker.java (original)
+++ directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/DerefAliasSyntaxChecker.java Sat Mar 11 07:45:20 2017
@@ -20,6 +20,7 @@
 package org.apache.directory.api.ldap.model.schema.syntaxCheckers;
 
 
+import org.apache.directory.api.i18n.I18n;
 import org.apache.directory.api.ldap.model.constants.SchemaConstants;
 import org.apache.directory.api.ldap.model.schema.SyntaxChecker;
 import org.apache.directory.api.util.Strings;
@@ -45,7 +46,11 @@ public class DerefAliasSyntaxChecker ext
 {
     /** A logger for this class */
     private static final Logger LOG = LoggerFactory.getLogger( DerefAliasSyntaxChecker.class );
-
+    
+    /**
+     * A static instance of DerefAliasSyntaxChecker
+     */
+    public static final DerefAliasSyntaxChecker INSTANCE = new DerefAliasSyntaxChecker();
 
     /**
      * Creates a new instance of DerefAliasSyntaxChecker.
@@ -66,7 +71,7 @@ public class DerefAliasSyntaxChecker ext
 
         if ( value == null )
         {
-            LOG.debug( "Syntax invalid for 'null'" );
+            LOG.debug( I18n.err( I18n.ERR_04489_SYNTAX_INVALID, "null" ) );
             return false;
         }
 

Modified: directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/DirectoryStringSyntaxChecker.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/DirectoryStringSyntaxChecker.java?rev=1786491&r1=1786490&r2=1786491&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/DirectoryStringSyntaxChecker.java (original)
+++ directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/DirectoryStringSyntaxChecker.java Sat Mar 11 07:45:20 2017
@@ -20,6 +20,7 @@
 package org.apache.directory.api.ldap.model.schema.syntaxCheckers;
 
 
+import org.apache.directory.api.i18n.I18n;
 import org.apache.directory.api.ldap.model.constants.SchemaConstants;
 import org.apache.directory.api.ldap.model.schema.SyntaxChecker;
 import org.apache.directory.api.util.Strings;
@@ -31,7 +32,10 @@ import org.slf4j.LoggerFactory;
  * A SyntaxChecker which verifies that a value is a Directory String according to RFC 4517.
  * 
  * From RFC 4517 :
+ * 
+ * <pre>
  * DirectoryString = 1*UTF8
+ * </pre>
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
@@ -40,8 +44,13 @@ public class DirectoryStringSyntaxChecke
 {
     /** A logger for this class */
     private static final Logger LOG = LoggerFactory.getLogger( DirectoryStringSyntaxChecker.class );
+    
+    /**
+     * A static instance of DirectoryStringSyntaxChecker
+     */
+    public static final DirectoryStringSyntaxChecker INSTANCE = new DirectoryStringSyntaxChecker();
 
-
+    
     /**
      * Creates a new instance of DirectoryStringSyntaxChecker.
      */
@@ -61,7 +70,7 @@ public class DirectoryStringSyntaxChecke
 
         if ( value == null )
         {
-            LOG.debug( "Syntax invalid for 'null'" );
+            LOG.debug( I18n.err( I18n.ERR_04489_SYNTAX_INVALID, "null" ) );
             return false;
         }
 
@@ -83,7 +92,7 @@ public class DirectoryStringSyntaxChecke
         // return an empty string
         if ( strValue.length() == 0 )
         {
-            LOG.debug( INVALID_SYNTAX_FOR, value );
+            LOG.debug( I18n.err( I18n.ERR_04489_SYNTAX_INVALID, value ) );
             return false;
         }
 
@@ -93,12 +102,12 @@ public class DirectoryStringSyntaxChecke
         {
             if ( c == 0xFFFD )
             {
-                LOG.debug( INVALID_SYNTAX_FOR, value );
+                LOG.debug( I18n.err( I18n.ERR_04489_SYNTAX_INVALID, value ) );
                 return false;
             }
         }
 
-        LOG.debug( "Syntax valid for '{}'", value );
+        LOG.debug( I18n.msg( I18n.MSG_04490_SYNTAX_VALID, value ) );
         return true;
     }
 }

Modified: directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/DitContentRuleDescriptionSyntaxChecker.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/DitContentRuleDescriptionSyntaxChecker.java?rev=1786491&r1=1786490&r2=1786491&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/DitContentRuleDescriptionSyntaxChecker.java (original)
+++ directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/DitContentRuleDescriptionSyntaxChecker.java Sat Mar 11 07:45:20 2017
@@ -22,6 +22,7 @@ package org.apache.directory.api.ldap.mo
 
 import java.text.ParseException;
 
+import org.apache.directory.api.i18n.I18n;
 import org.apache.directory.api.ldap.model.constants.SchemaConstants;
 import org.apache.directory.api.ldap.model.schema.SyntaxChecker;
 import org.apache.directory.api.ldap.model.schema.parsers.DitContentRuleDescriptionSchemaParser;
@@ -56,9 +57,14 @@ public class DitContentRuleDescriptionSy
     private static final Logger LOG = LoggerFactory.getLogger( DitContentRuleDescriptionSyntaxChecker.class );
 
     /** The schema parser used to parse the DITContentRuleDescription Syntax */
-    private transient DitContentRuleDescriptionSchemaParser schemaParser = new DitContentRuleDescriptionSchemaParser();
-
+    private DitContentRuleDescriptionSchemaParser schemaParser = new DitContentRuleDescriptionSchemaParser();
+    
+    /**
+     * A static instance of DitContentRuleDescriptionSyntaxChecker
+     */
+    public static final DitContentRuleDescriptionSyntaxChecker INSTANCE = new DitContentRuleDescriptionSyntaxChecker();
 
+    
     /**
      * Creates a new instance of DITContentRuleDescriptionSyntaxChecker.
      */
@@ -78,7 +84,7 @@ public class DitContentRuleDescriptionSy
 
         if ( value == null )
         {
-            LOG.debug( "Syntax invalid for 'null'" );
+            LOG.debug( I18n.err( I18n.ERR_04489_SYNTAX_INVALID, "null" ) );
             return false;
         }
 
@@ -98,12 +104,12 @@ public class DitContentRuleDescriptionSy
         try
         {
             schemaParser.parseDITContentRuleDescription( strValue );
-            LOG.debug( "Syntax valid for '{}'", value );
+            LOG.debug( I18n.msg( I18n.MSG_04490_SYNTAX_VALID, value ) );
             return true;
         }
         catch ( ParseException pe )
         {
-            LOG.debug( INVALID_SYNTAX_FOR, value );
+            LOG.debug( I18n.err( I18n.ERR_04489_SYNTAX_INVALID, value ) );
             return false;
         }
     }

Modified: directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/DitStructureRuleDescriptionSyntaxChecker.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/DitStructureRuleDescriptionSyntaxChecker.java?rev=1786491&r1=1786490&r2=1786491&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/DitStructureRuleDescriptionSyntaxChecker.java (original)
+++ directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/DitStructureRuleDescriptionSyntaxChecker.java Sat Mar 11 07:45:20 2017
@@ -22,6 +22,7 @@ package org.apache.directory.api.ldap.mo
 
 import java.text.ParseException;
 
+import org.apache.directory.api.i18n.I18n;
 import org.apache.directory.api.ldap.model.constants.SchemaConstants;
 import org.apache.directory.api.ldap.model.schema.SyntaxChecker;
 import org.apache.directory.api.ldap.model.schema.parsers.DitStructureRuleDescriptionSchemaParser;
@@ -58,9 +59,14 @@ public class DitStructureRuleDescription
     private static final Logger LOG = LoggerFactory.getLogger( DitStructureRuleDescriptionSyntaxChecker.class );
 
     /** The schema parser used to parse the DITContentRuleDescription Syntax */
-    private transient DitStructureRuleDescriptionSchemaParser schemaParser = new DitStructureRuleDescriptionSchemaParser();
-
+    private DitStructureRuleDescriptionSchemaParser schemaParser = new DitStructureRuleDescriptionSchemaParser();
+    
+    /**
+     * A static instance of DitStructureRuleDescriptionSyntaxChecker
+     */
+    public static final DitStructureRuleDescriptionSyntaxChecker INSTANCE = new DitStructureRuleDescriptionSyntaxChecker();
 
+    
     /**
      * Creates a new instance of DITContentRuleDescriptionSyntaxChecker.
      */
@@ -74,13 +80,13 @@ public class DitStructureRuleDescription
      * {@inheritDoc}
      */
     @Override
-    public boolean isValidSyntax( Object value )
+public boolean isValidSyntax( Object value )
     {
         String strValue;
 
         if ( value == null )
         {
-            LOG.debug( "Syntax invalid for 'null'" );
+            LOG.debug( I18n.err( I18n.ERR_04489_SYNTAX_INVALID, "null" ) );
             return false;
         }
 
@@ -100,12 +106,12 @@ public class DitStructureRuleDescription
         try
         {
             schemaParser.parseDITStructureRuleDescription( strValue );
-            LOG.debug( "Syntax valid for '{}'", value );
+            LOG.debug( I18n.msg( I18n.MSG_04490_SYNTAX_VALID, value ) );
             return true;
         }
         catch ( ParseException pe )
         {
-            LOG.debug( INVALID_SYNTAX_FOR, value );
+            LOG.debug( I18n.err( I18n.ERR_04489_SYNTAX_INVALID, value ) );
             return false;
         }
     }

Modified: directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/DlSubmitPermissionSyntaxChecker.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/DlSubmitPermissionSyntaxChecker.java?rev=1786491&r1=1786490&r2=1786491&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/DlSubmitPermissionSyntaxChecker.java (original)
+++ directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/DlSubmitPermissionSyntaxChecker.java Sat Mar 11 07:45:20 2017
@@ -20,6 +20,7 @@
 package org.apache.directory.api.ldap.model.schema.syntaxCheckers;
 
 
+import org.apache.directory.api.i18n.I18n;
 import org.apache.directory.api.ldap.model.constants.SchemaConstants;
 import org.apache.directory.api.ldap.model.schema.SyntaxChecker;
 import org.slf4j.Logger;
@@ -36,8 +37,13 @@ public class DlSubmitPermissionSyntaxChe
 {
     /** A logger for this class */
     private static final Logger LOG = LoggerFactory.getLogger( DlSubmitPermissionSyntaxChecker.class );
+    
+    /**
+     * A static instance of DlSubmitPermissionSyntaxChecker
+     */
+    public static final DlSubmitPermissionSyntaxChecker INSTANCE = new DlSubmitPermissionSyntaxChecker();
 
-
+    
     /**
      * Creates a new instance of DLSubmitPermissionSyntaxChecker.
      */
@@ -53,7 +59,7 @@ public class DlSubmitPermissionSyntaxChe
     @Override
     public boolean isValidSyntax( Object value )
     {
-        LOG.debug( "Syntax valid for '{}'", value );
+        LOG.debug( I18n.msg( I18n.MSG_04490_SYNTAX_VALID, value ) );
         return true;
     }
 }

Modified: directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/DnSyntaxChecker.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/DnSyntaxChecker.java?rev=1786491&r1=1786490&r2=1786491&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/DnSyntaxChecker.java (original)
+++ directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/DnSyntaxChecker.java Sat Mar 11 07:45:20 2017
@@ -20,6 +20,7 @@
 package org.apache.directory.api.ldap.model.schema.syntaxCheckers;
 
 
+import org.apache.directory.api.i18n.I18n;
 import org.apache.directory.api.ldap.model.constants.SchemaConstants;
 import org.apache.directory.api.ldap.model.name.Dn;
 import org.apache.directory.api.ldap.model.schema.SyntaxChecker;
@@ -29,8 +30,8 @@ import org.slf4j.LoggerFactory;
 
 
 /**
- * A SyntaxChecker which verifies that a value is a valid Dn. We just check
- * that the Dn is valid, we don't need to verify each of the Rdn syntax.
+ * A SyntaxChecker which verifies that a value is a valid {@link Dn}. We just check
+ * that the {@link Dn} is valid, we don't need to verify each of the {@link Rdn} syntax.
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
@@ -39,8 +40,13 @@ public class DnSyntaxChecker extends Syn
 {
     /** A logger for this class */
     private static final Logger LOG = LoggerFactory.getLogger( DnSyntaxChecker.class );
+    
+    /**
+     * A static instance of DnSyntaxChecker
+     */
+    public static final DnSyntaxChecker INSTANCE = new DnSyntaxChecker();
 
-
+    
     /**
      * Creates a new instance of DNSyntaxChecker.
      */
@@ -60,7 +66,7 @@ public class DnSyntaxChecker extends Syn
 
         if ( value == null )
         {
-            LOG.debug( "Syntax invalid for 'null'" );
+            LOG.debug( I18n.err( I18n.ERR_04489_SYNTAX_INVALID, "null" ) );
             return false;
         }
 
@@ -82,7 +88,7 @@ public class DnSyntaxChecker extends Syn
             // TODO: this should be a false, but for 
             // some reason, the principal is empty in 
             // some cases.
-            LOG.debug( "Syntax valid for '{}'", value );
+            LOG.debug( I18n.msg( I18n.MSG_04490_SYNTAX_VALID, value ) );
             return true;
         }
 
@@ -91,11 +97,11 @@ public class DnSyntaxChecker extends Syn
 
         if ( result )
         {
-            LOG.debug( "Syntax valid for '{}'", value );
+            LOG.debug( I18n.msg( I18n.MSG_04490_SYNTAX_VALID, value ) );
         }
         else
         {
-            LOG.debug( INVALID_SYNTAX_FOR, value );
+            LOG.debug( I18n.err( I18n.ERR_04489_SYNTAX_INVALID, value ) );
         }
 
         return result;

Modified: directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/DsaQualitySyntaxSyntaxChecker.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/DsaQualitySyntaxSyntaxChecker.java?rev=1786491&r1=1786490&r2=1786491&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/DsaQualitySyntaxSyntaxChecker.java (original)
+++ directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/DsaQualitySyntaxSyntaxChecker.java Sat Mar 11 07:45:20 2017
@@ -20,6 +20,7 @@
 package org.apache.directory.api.ldap.model.schema.syntaxCheckers;
 
 
+import org.apache.directory.api.i18n.I18n;
 import org.apache.directory.api.ldap.model.constants.SchemaConstants;
 import org.apache.directory.api.ldap.model.schema.SyntaxChecker;
 import org.apache.directory.api.util.Strings;
@@ -46,8 +47,13 @@ public class DsaQualitySyntaxSyntaxCheck
 {
     /** A logger for this class */
     private static final Logger LOG = LoggerFactory.getLogger( DsaQualitySyntaxSyntaxChecker.class );
+    
+    /**
+     * A static instance of DsaQualitySyntaxSyntaxChecker
+     */
+    public static final DsaQualitySyntaxSyntaxChecker INSTANCE = new DsaQualitySyntaxSyntaxChecker();
 
-
+    
     /**
      * Creates a new instance of DSAQualitySyntaxSyntaxChecker.
      */
@@ -67,7 +73,7 @@ public class DsaQualitySyntaxSyntaxCheck
 
         if ( value == null )
         {
-            LOG.debug( "Syntax invalid for 'null'" );
+            LOG.debug( I18n.err( I18n.ERR_04489_SYNTAX_INVALID, "null" ) );
             return false;
         }
 
@@ -86,7 +92,7 @@ public class DsaQualitySyntaxSyntaxCheck
 
         if ( strValue.length() < 7 )
         {
-            LOG.debug( INVALID_SYNTAX_FOR, value );
+            LOG.debug( I18n.err( I18n.ERR_04489_SYNTAX_INVALID, value ) );
             return false;
         }
 
@@ -97,7 +103,7 @@ public class DsaQualitySyntaxSyntaxCheck
             case 'B':
                 if ( !strValue.startsWith( "BEST-EFFORT" ) )
                 {
-                    LOG.debug( INVALID_SYNTAX_FOR, value );
+                    LOG.debug( I18n.err( I18n.ERR_04489_SYNTAX_INVALID, value ) );
                     return false;
                 }
 
@@ -107,7 +113,7 @@ public class DsaQualitySyntaxSyntaxCheck
             case 'D':
                 if ( !strValue.startsWith( "DEFUNCT" ) )
                 {
-                    LOG.debug( INVALID_SYNTAX_FOR, value );
+                    LOG.debug( I18n.err( I18n.ERR_04489_SYNTAX_INVALID, value ) );
                     return false;
                 }
 
@@ -117,7 +123,7 @@ public class DsaQualitySyntaxSyntaxCheck
             case 'E':
                 if ( !strValue.startsWith( "EXPERIMENTAL" ) )
                 {
-                    LOG.debug( INVALID_SYNTAX_FOR, value );
+                    LOG.debug( I18n.err( I18n.ERR_04489_SYNTAX_INVALID, value ) );
                     return false;
                 }
 
@@ -127,7 +133,7 @@ public class DsaQualitySyntaxSyntaxCheck
             case 'F':
                 if ( !strValue.startsWith( "FULL-SERVICE" ) )
                 {
-                    LOG.debug( INVALID_SYNTAX_FOR, value );
+                    LOG.debug( I18n.err( I18n.ERR_04489_SYNTAX_INVALID, value ) );
                     return false;
                 }
 
@@ -137,7 +143,7 @@ public class DsaQualitySyntaxSyntaxCheck
             case 'P':
                 if ( !strValue.startsWith( "PILOT-SERVICE" ) )
                 {
-                    LOG.debug( INVALID_SYNTAX_FOR, value );
+                    LOG.debug( I18n.err( I18n.ERR_04489_SYNTAX_INVALID, value ) );
                     return false;
                 }
 
@@ -145,7 +151,7 @@ public class DsaQualitySyntaxSyntaxCheck
                 break;
 
             default:
-                LOG.debug( INVALID_SYNTAX_FOR, value );
+                LOG.debug( I18n.err( I18n.ERR_04489_SYNTAX_INVALID, value ) );
                 return false;
         }
 
@@ -153,14 +159,14 @@ public class DsaQualitySyntaxSyntaxCheck
         // but this is optional
         if ( remaining.length() == 0 )
         {
-            LOG.debug( "Syntax valid for '{}'", value );
+            LOG.debug( I18n.msg( I18n.MSG_04490_SYNTAX_VALID, value ) );
             return true;
         }
 
         if ( remaining.charAt( 0 ) != '#' )
         {
             // We were expecting a '#'
-            LOG.debug( INVALID_SYNTAX_FOR, value );
+            LOG.debug( I18n.err( I18n.ERR_04489_SYNTAX_INVALID, value ) );
             return false;
         }
 
@@ -169,11 +175,11 @@ public class DsaQualitySyntaxSyntaxCheck
 
         if ( result )
         {
-            LOG.debug( "Syntax valid for '{}'", value );
+            LOG.debug( I18n.msg( I18n.MSG_04490_SYNTAX_VALID, value ) );
         }
         else
         {
-            LOG.debug( INVALID_SYNTAX_FOR, value );
+            LOG.debug( I18n.err( I18n.ERR_04489_SYNTAX_INVALID, value ) );
         }
 
         return result;

Modified: directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/DseTypeSyntaxChecker.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/DseTypeSyntaxChecker.java?rev=1786491&r1=1786490&r2=1786491&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/DseTypeSyntaxChecker.java (original)
+++ directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/DseTypeSyntaxChecker.java Sat Mar 11 07:45:20 2017
@@ -23,6 +23,7 @@ package org.apache.directory.api.ldap.mo
 import java.util.HashSet;
 import java.util.Set;
 
+import org.apache.directory.api.i18n.I18n;
 import org.apache.directory.api.ldap.model.constants.SchemaConstants;
 import org.apache.directory.api.ldap.model.schema.SyntaxChecker;
 import org.apache.directory.api.util.Chars;
@@ -60,7 +61,13 @@ public class DseTypeSyntaxChecker extend
 
     /** The Set which contains the DESBits */
     private static final Set<String> DSE_BITS = new HashSet<>();
-
+    
+    /**
+     * A static instance of DseTypeSyntaxChecker
+     */
+    public static final DseTypeSyntaxChecker INSTANCE = new DseTypeSyntaxChecker();
+    
+    
     /** Initialization of the country set */
     static
     {
@@ -92,7 +99,7 @@ public class DseTypeSyntaxChecker extend
 
         if ( value == null )
         {
-            LOG.debug( "Syntax invalid for 'null'" );
+            LOG.debug( I18n.err( I18n.ERR_04489_SYNTAX_INVALID, "null" ) );
             return false;
         }
 
@@ -112,7 +119,7 @@ public class DseTypeSyntaxChecker extend
         // We must have at least '(cp)', '(xr)' or '(ca)'
         if ( strValue.length() < 4 )
         {
-            LOG.debug( INVALID_SYNTAX_FOR, value );
+            LOG.debug( I18n.err( I18n.ERR_04489_SYNTAX_INVALID, value ) );
             return false;
         }
 
@@ -120,7 +127,7 @@ public class DseTypeSyntaxChecker extend
         if ( ( strValue.charAt( 0 ) != '(' )
             || ( strValue.charAt( strValue.length() - 1 ) != ')' ) )
         {
-            LOG.debug( INVALID_SYNTAX_FOR, value );
+            LOG.debug( I18n.err( I18n.ERR_04489_SYNTAX_INVALID, value ) );
             return false;
         }
 
@@ -148,7 +155,7 @@ public class DseTypeSyntaxChecker extend
             if ( pos == i )
             {
                 // No keyword : error
-                LOG.debug( INVALID_SYNTAX_FOR, value );
+                LOG.debug( I18n.err( I18n.ERR_04489_SYNTAX_INVALID, value ) );
                 return false;
             }
 
@@ -158,14 +165,14 @@ public class DseTypeSyntaxChecker extend
             if ( !DSE_BITS.contains( keyword ) )
             {
                 // Unknown keyword
-                LOG.debug( INVALID_SYNTAX_FOR, value );
+                LOG.debug( I18n.err( I18n.ERR_04489_SYNTAX_INVALID, value ) );
                 return false;
             }
 
             // Check that the keyword has not been met
             if ( keywords.contains( keyword ) )
             {
-                LOG.debug( INVALID_SYNTAX_FOR, value );
+                LOG.debug( I18n.err( I18n.ERR_04489_SYNTAX_INVALID, value ) );
                 return false;
             }
 
@@ -191,11 +198,11 @@ public class DseTypeSyntaxChecker extend
         // We are done
         if ( needKeyword )
         {
-            LOG.debug( INVALID_SYNTAX_FOR, value );
+            LOG.debug( I18n.err( I18n.ERR_04489_SYNTAX_INVALID, value ) );
         }
         else
         {
-            LOG.debug( "Syntax valid for '{}'", value );
+            LOG.debug( I18n.msg( I18n.MSG_04490_SYNTAX_VALID, value ) );
         }
 
         return !needKeyword;

Modified: directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/EnhancedGuideSyntaxChecker.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/EnhancedGuideSyntaxChecker.java?rev=1786491&r1=1786490&r2=1786491&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/EnhancedGuideSyntaxChecker.java (original)
+++ directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/EnhancedGuideSyntaxChecker.java Sat Mar 11 07:45:20 2017
@@ -20,6 +20,7 @@
 package org.apache.directory.api.ldap.model.schema.syntaxCheckers;
 
 
+import org.apache.directory.api.i18n.I18n;
 import org.apache.directory.api.ldap.model.constants.SchemaConstants;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -38,15 +39,19 @@ public class EnhancedGuideSyntaxChecker
 {
     /** A logger for this class */
     private static final Logger LOG = LoggerFactory.getLogger( EnhancedGuideSyntaxChecker.class );
+    
+    /**
+     * A static instance of EnhancedGuideSyntaxChecker
+     */
+    public static final EnhancedGuideSyntaxChecker INSTANCE = new EnhancedGuideSyntaxChecker();
 
-
+    
     /**
      * Creates a new instance of EnhancedGuideSyntaxChecker.
      */
     public EnhancedGuideSyntaxChecker()
     {
-        super();
-        setOid( SchemaConstants.ENHANCED_GUIDE_SYNTAX );
+        super( SchemaConstants.ENHANCED_GUIDE_SYNTAX );
     }
 
 
@@ -56,7 +61,7 @@ public class EnhancedGuideSyntaxChecker
     @Override
     public boolean isValidSyntax( Object value )
     {
-        LOG.debug( "Syntax valid for '{}'", value );
+        LOG.debug( I18n.msg( I18n.MSG_04490_SYNTAX_VALID, value ) );
         return true;
     }
 }

Modified: directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/FacsimileTelephoneNumberSyntaxChecker.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/FacsimileTelephoneNumberSyntaxChecker.java?rev=1786491&r1=1786490&r2=1786491&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/FacsimileTelephoneNumberSyntaxChecker.java (original)
+++ directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/FacsimileTelephoneNumberSyntaxChecker.java Sat Mar 11 07:45:20 2017
@@ -23,6 +23,7 @@ package org.apache.directory.api.ldap.mo
 import java.util.HashSet;
 import java.util.Set;
 
+import org.apache.directory.api.i18n.I18n;
 import org.apache.directory.api.ldap.model.constants.SchemaConstants;
 import org.apache.directory.api.util.Strings;
 import org.slf4j.Logger;
@@ -34,6 +35,7 @@ import org.slf4j.LoggerFactory;
  * to ITU recommendation E.123 for the Telephone number part, and from RFC 4517, par. 
  * 3.3.11 :
  * 
+ * <pre>
  * fax-number       = telephone-number *( DOLLAR fax-parameter )
  * telephone-number = PrintableString
  * fax-parameter    = "twoDimensional" |
@@ -43,7 +45,7 @@ import org.slf4j.LoggerFactory;
  *                    "a3Width" |
  *                    "b4Width" |
  *                    "uncompressed"
- *
+ * </pre>
  * 
  * If needed, and to allow more syntaxes, a list of regexps has been added
  * which can be initialized to other values
@@ -79,15 +81,19 @@ public class FacsimileTelephoneNumberSyn
         faxParameters.add( Strings.toLowerCaseAscii( B4_WIDTH ) );
         faxParameters.add( Strings.toLowerCaseAscii( UNCOMPRESSED ) );
     }
+    
+    /**
+     * A static instance of FacsimileTelephoneNumberSyntaxChecker
+     */
+    public static final FacsimileTelephoneNumberSyntaxChecker INSTANCE = new FacsimileTelephoneNumberSyntaxChecker();
 
-
+    
     /**
      * Creates a new instance of TelephoneNumberSyntaxChecker.
      */
     public FacsimileTelephoneNumberSyntaxChecker()
     {
-        super();
-        setOid( SchemaConstants.FACSIMILE_TELEPHONE_NUMBER_SYNTAX );
+        super( SchemaConstants.FACSIMILE_TELEPHONE_NUMBER_SYNTAX );
     }
 
 
@@ -101,7 +107,7 @@ public class FacsimileTelephoneNumberSyn
 
         if ( value == null )
         {
-            LOG.debug( "Syntax invalid for 'null'" );
+            LOG.debug( I18n.err( I18n.ERR_04489_SYNTAX_INVALID, "null" ) );
             return false;
         }
 
@@ -120,7 +126,7 @@ public class FacsimileTelephoneNumberSyn
 
         if ( strValue.length() == 0 )
         {
-            LOG.debug( INVALID_SYNTAX_FOR, value );
+            LOG.debug( I18n.err( I18n.ERR_04489_SYNTAX_INVALID, value ) );
             return false;
         }
 
@@ -135,11 +141,11 @@ public class FacsimileTelephoneNumberSyn
 
             if ( result )
             {
-                LOG.debug( "Syntax valid for '{}'", value );
+                LOG.debug( I18n.msg( I18n.MSG_04490_SYNTAX_VALID, value ) );
             }
             else
             {
-                LOG.debug( INVALID_SYNTAX_FOR, value );
+                LOG.debug( I18n.err( I18n.ERR_04489_SYNTAX_INVALID, value ) );
             }
 
             return result;
@@ -150,7 +156,7 @@ public class FacsimileTelephoneNumberSyn
         {
             if ( !super.isValidSyntax( strValue.substring( 0, dollarPos - 1 ) ) )
             {
-                LOG.debug( INVALID_SYNTAX_FOR, value );
+                LOG.debug( I18n.err( I18n.ERR_04489_SYNTAX_INVALID, value ) );
                 return false;
             }
 
@@ -176,23 +182,17 @@ public class FacsimileTelephoneNumberSyn
                 if ( faxParam.length() == 0 )
                 {
                     // Not allowed
-                    LOG.debug( INVALID_SYNTAX_FOR, value );
+                    LOG.debug( I18n.err( I18n.ERR_04489_SYNTAX_INVALID, value ) );
                     return false;
                 }
 
                 // Relax a little bit the syntax by lowercasing the param
                 faxParam = Strings.toLowerCaseAscii( faxParam );
 
-                if ( !faxParameters.contains( faxParam ) )
+                if ( !faxParameters.contains( faxParam ) || paramsSeen.contains( faxParam ) )
                 {
                     // This parameter is not in the possible set
-                    LOG.debug( INVALID_SYNTAX_FOR, value );
-                    return false;
-                }
-                else if ( paramsSeen.contains( faxParam ) )
-                {
-                    // We have the same parameters twice...
-                    LOG.debug( INVALID_SYNTAX_FOR, value );
+                    LOG.debug( I18n.err( I18n.ERR_04489_SYNTAX_INVALID, value ) );
                     return false;
                 }
                 else
@@ -205,12 +205,12 @@ public class FacsimileTelephoneNumberSyn
                 dollarPos = newDollar;
             }
 
-            LOG.debug( "Syntax valid for '{}'", value );
+            LOG.debug( I18n.msg( I18n.MSG_04490_SYNTAX_VALID, value ) );
             return true;
         }
 
         // We must have a valid telephone number !
-        LOG.debug( INVALID_SYNTAX_FOR, value );
+        LOG.debug( I18n.err( I18n.ERR_04489_SYNTAX_INVALID, value ) );
         return false;
     }
 }



Mime
View raw message