directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1786463 [3/3] - in /directory/shared/trunk: i18n/src/main/java/org/apache/directory/api/i18n/ i18n/src/main/resources/org/apache/directory/api/i18n/ ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/
Date Fri, 10 Mar 2017 22:27:05 GMT
Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/OpenLdapObjectIdentifierMacro.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/OpenLdapObjectIdentifierMacro.java?rev=1786463&r1=1786462&r2=1786463&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/OpenLdapObjectIdentifierMacro.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/OpenLdapObjectIdentifierMacro.java Fri Mar 10 22:27:04 2017
@@ -36,8 +36,7 @@ public class OpenLdapObjectIdentifierMac
     private String rawOidOrNameSuffix;
 
     private String resolvedOid;
-
-
+    
     /**
      * Instantiates a new OpenLDAP object identifier macro.
      */

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/OtherMailboxSyntaxChecker.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/OtherMailboxSyntaxChecker.java?rev=1786463&r1=1786462&r2=1786463&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/OtherMailboxSyntaxChecker.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/OtherMailboxSyntaxChecker.java Fri Mar 10 22:27:04 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;
@@ -30,11 +31,11 @@ import org.slf4j.LoggerFactory;
 /**
  * A SyntaxChecker which verifies that a value is an OtherMailbox according to 
  * RFC 4517 :
- * 
+ * <pre>
  * OtherMailbox = mailbox-type DOLLAR mailbox
  * mailbox-type = PrintableString
  * mailbox      = IA5String
- * 
+ * </pre>
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
 @SuppressWarnings("serial")
@@ -42,8 +43,13 @@ public class OtherMailboxSyntaxChecker e
 {
     /** A logger for this class */
     private static final Logger LOG = LoggerFactory.getLogger( OtherMailboxSyntaxChecker.class );
+    
+    /**
+     * A static instance of OtherMailboxSyntaxChecker
+     */
+    public static final OtherMailboxSyntaxChecker INSTANCE = new OtherMailboxSyntaxChecker();
 
-
+    
     /**
      * Creates a new instance of OtherMailboxSyntaxChecker.
      */
@@ -63,7 +69,7 @@ public class OtherMailboxSyntaxChecker e
 
         if ( value == null )
         {
-            LOG.debug( "Syntax invalid for 'null'" );
+            LOG.debug( I18n.err( I18n.ERR_04488_SYNTAX_INVALID, "null" ) );
             return false;
         }
 
@@ -82,7 +88,7 @@ public class OtherMailboxSyntaxChecker e
 
         if ( strValue.length() == 0 )
         {
-            LOG.debug( "Syntax invalid for '{}'", value );
+            LOG.debug( I18n.err( I18n.ERR_04488_SYNTAX_INVALID, value ) );
             return false;
         }
 
@@ -92,7 +98,7 @@ public class OtherMailboxSyntaxChecker e
         if ( dollar == -1 )
         {
             // No '$' => error
-            LOG.debug( "Syntax invalid for '{}'", value );
+            LOG.debug( I18n.err( I18n.ERR_04488_SYNTAX_INVALID, value ) );
             return false;
         }
 
@@ -104,14 +110,14 @@ public class OtherMailboxSyntaxChecker e
         // The mailbox should not contains a '$'
         if ( mailbox.indexOf( '$' ) != -1 )
         {
-            LOG.debug( "Syntax invalid for '{}'", value );
+            LOG.debug( I18n.err( I18n.ERR_04488_SYNTAX_INVALID, value ) );
             return false;
         }
 
         // Check that the mailboxType is a PrintableString
         if ( !Strings.isPrintableString( mailboxType ) )
         {
-            LOG.debug( "Syntax invalid for '{}'", value );
+            LOG.debug( I18n.err( I18n.ERR_04488_SYNTAX_INVALID, value ) );
             return false;
         }
 
@@ -120,11 +126,11 @@ public class OtherMailboxSyntaxChecker e
 
         if ( result )
         {
-            LOG.debug( "Syntax valid for '{}'", value );
+            LOG.debug( I18n.msg( I18n.MSG_04489_SYNTAX_VALID, value ) );
         }
         else
         {
-            LOG.debug( "Syntax invalid for '{}'", value );
+            LOG.debug( I18n.err( I18n.ERR_04488_SYNTAX_INVALID, value ) );
         }
 
         return result;

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/PostalAddressSyntaxChecker.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/PostalAddressSyntaxChecker.java?rev=1786463&r1=1786462&r2=1786463&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/PostalAddressSyntaxChecker.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/PostalAddressSyntaxChecker.java Fri Mar 10 22:27:04 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;
@@ -42,8 +43,13 @@ public class PostalAddressSyntaxChecker
 {
     /** A logger for this class */
     private static final Logger LOG = LoggerFactory.getLogger( PostalAddressSyntaxChecker.class );
+    
+    /**
+     * A static instance of PostalAddressSyntaxChecker
+     */
+    public static final PostalAddressSyntaxChecker INSTANCE = new PostalAddressSyntaxChecker();
 
-
+    
     /**
      * Creates a new instance of PostalAddressSyntaxChecker.
      */
@@ -63,7 +69,7 @@ public class PostalAddressSyntaxChecker
 
         if ( value == null )
         {
-            LOG.debug( "Syntax invalid for 'null'" );
+            LOG.debug( I18n.err( I18n.ERR_04488_SYNTAX_INVALID, "null" ) );
             return false;
         }
 
@@ -82,7 +88,7 @@ public class PostalAddressSyntaxChecker
 
         if ( strValue.length() == 0 )
         {
-            LOG.debug( "Syntax invalid for '{}'", value );
+            LOG.debug( I18n.err( I18n.ERR_04488_SYNTAX_INVALID, value ) );
             return false;
         }
 
@@ -92,7 +98,7 @@ public class PostalAddressSyntaxChecker
         if ( dollar == -1 )
         {
             // No '$' => only a dstring
-            LOG.debug( "Syntax valid for '{}'", value );
+            LOG.debug( I18n.msg( I18n.MSG_04489_SYNTAX_VALID, value ) );
             return true;
         }
 
@@ -104,7 +110,7 @@ public class PostalAddressSyntaxChecker
 
             if ( Strings.isEmpty( address ) )
             {
-                LOG.debug( "Syntax invalid for '{}'", value );
+                LOG.debug( I18n.err( I18n.ERR_04488_SYNTAX_INVALID, value ) );
                 return false;
             }
 
@@ -113,7 +119,7 @@ public class PostalAddressSyntaxChecker
             if ( pos == strValue.length() )
             {
                 // we should not have a '$' at the end
-                LOG.debug( "Syntax invalid for '{}'", value );
+                LOG.debug( I18n.err( I18n.ERR_04488_SYNTAX_INVALID, value ) );
                 return false;
             }
 

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/PresentationAddressSyntaxChecker.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/PresentationAddressSyntaxChecker.java?rev=1786463&r1=1786462&r2=1786463&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/PresentationAddressSyntaxChecker.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/PresentationAddressSyntaxChecker.java Fri Mar 10 22:27:04 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;
@@ -27,7 +28,7 @@ import org.slf4j.LoggerFactory;
 
 /**
  * A SyntaxChecker which verifies that a value is a PresentationAddressSyntax.
- * 
+ * <p>
  * This syntax is defined in RFC 1278, but it has not been implemented.
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
@@ -37,15 +38,19 @@ public class PresentationAddressSyntaxCh
 {
     /** A logger for this class */
     private static final Logger LOG = LoggerFactory.getLogger( PresentationAddressSyntaxChecker.class );
+    
+    /**
+     * A static instance of PresentationAddressSyntaxChecker
+     */
+    public static final PresentationAddressSyntaxChecker INSTANCE = new PresentationAddressSyntaxChecker();
 
-
+    
     /**
      * Creates an instance of PresentationAddressSyntaxChecker
      */
     public PresentationAddressSyntaxChecker()
     {
-        super();
-        setOid( SchemaConstants.PRESENTATION_ADDRESS_SYNTAX );
+        super( SchemaConstants.PRESENTATION_ADDRESS_SYNTAX );
     }
 
 
@@ -55,7 +60,7 @@ public class PresentationAddressSyntaxCh
     @Override
     public boolean isValidSyntax( Object value )
     {
-        LOG.debug( "Syntax valid for '{}'", value );
+        LOG.debug( I18n.msg( I18n.MSG_04489_SYNTAX_VALID, value ) );
         return true;
     }
 }

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/PrintableStringSyntaxChecker.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/PrintableStringSyntaxChecker.java?rev=1786463&r1=1786462&r2=1786463&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/PrintableStringSyntaxChecker.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/PrintableStringSyntaxChecker.java Fri Mar 10 22:27:04 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,9 +30,9 @@ import org.slf4j.LoggerFactory;
 
 /**
  * A SyntaxChecker which verifies that a value is a Printable String according to RFC 4517.
- * 
+ * <p>
  * From RFC 4517 :
- * 
+ * <pre>
  * PrintableString    = 1*PrintableCharacter
  * PrintableCharacter = ALPHA | DIGIT | SQUOTE | LPAREN | RPAREN |
  *                          PLUS | COMMA | HYPHEN | DOT | EQUALS |
@@ -40,8 +41,9 @@ import org.slf4j.LoggerFactory;
  * SLASH   = %x2F                ; forward slash ("/")
  * COLON   = %x3A                ; colon (":")
  * QUESTION= %x3F                ; question mark ("?")
- * 
+ * </pre>
  * From RFC 4512 :
+ * <pre>
  * ALPHA   = %x41-5A | %x61-7A   ; "A"-"Z" / "a"-"z"
  * DIGIT   = %x30 | LDIGIT       ; "0"-"9"
  * LDIGIT  = %x31-39             ; "1"-"9"
@@ -54,6 +56,7 @@ import org.slf4j.LoggerFactory;
  * DOT     = %x2E                ; period (".")
  * EQUALS  = %x3D                ; equals sign ("=")
  * SPACE   = %x20                ; space (" ")
+ * </pre>
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
@@ -62,8 +65,13 @@ public class PrintableStringSyntaxChecke
 {
     /** A logger for this class */
     private static final Logger LOG = LoggerFactory.getLogger( PrintableStringSyntaxChecker.class );
+    
+    /**
+     * A static instance of PrintableStringSyntaxChecker
+     */
+    public static final PrintableStringSyntaxChecker INSTANCE = new PrintableStringSyntaxChecker();
 
-
+    
     /**
      * Creates a new instance of PrintableStringSyntaxChecker.
      */
@@ -83,7 +91,7 @@ public class PrintableStringSyntaxChecke
 
         if ( value == null )
         {
-            LOG.debug( "Syntax invalid for 'null'" );
+            LOG.debug( I18n.err( I18n.ERR_04488_SYNTAX_INVALID, "null" ) );
             return false;
         }
 
@@ -102,14 +110,14 @@ public class PrintableStringSyntaxChecke
 
         if ( strValue.length() == 0 )
         {
-            LOG.debug( "Syntax invalid for '{}'", value );
+            LOG.debug( I18n.err( I18n.ERR_04488_SYNTAX_INVALID, value ) );
             return false;
         }
 
         // We must have at least one char
         if ( strValue.length() == 0 )
         {
-            LOG.debug( "Syntax invalid for '{}'", value );
+            LOG.debug( I18n.err( I18n.ERR_04488_SYNTAX_INVALID, value ) );
             return false;
         }
 
@@ -117,11 +125,11 @@ public class PrintableStringSyntaxChecke
 
         if ( result )
         {
-            LOG.debug( "Syntax valid for '{}'", value );
+            LOG.debug( I18n.msg( I18n.MSG_04489_SYNTAX_VALID, value ) );
         }
         else
         {
-            LOG.debug( "Syntax invalid for '{}'", value );
+            LOG.debug( I18n.err( I18n.ERR_04488_SYNTAX_INVALID, value ) );
         }
 
         return result;

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/ProtocolInformationSyntaxChecker.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/ProtocolInformationSyntaxChecker.java?rev=1786463&r1=1786462&r2=1786463&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/ProtocolInformationSyntaxChecker.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/ProtocolInformationSyntaxChecker.java Fri Mar 10 22:27:04 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;
@@ -37,8 +38,13 @@ public class ProtocolInformationSyntaxCh
 {
     /** A logger for this class */
     private static final Logger LOG = LoggerFactory.getLogger( ProtocolInformationSyntaxChecker.class );
+    
+    /**
+     * A static instance of ProtocolInformationSyntaxChecker
+     */
+    public static final ProtocolInformationSyntaxChecker INSTANCE = new ProtocolInformationSyntaxChecker();
 
-
+    
     /**
      * Creates a new instance of ProtocolInformationSyntaxChecker.
      */
@@ -54,7 +60,7 @@ public class ProtocolInformationSyntaxCh
     @Override
     public boolean isValidSyntax( Object value )
     {
-        LOG.debug( "Syntax valid for '{}'", value );
+        LOG.debug( I18n.msg( I18n.MSG_04489_SYNTAX_VALID, value ) );
         return true;
     }
 }

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/RegexSyntaxChecker.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/RegexSyntaxChecker.java?rev=1786463&r1=1786462&r2=1786463&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/RegexSyntaxChecker.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/RegexSyntaxChecker.java Fri Mar 10 22:27:04 2017
@@ -23,6 +23,7 @@ package org.apache.directory.api.ldap.mo
 import java.util.ArrayList;
 import java.util.List;
 
+import org.apache.directory.api.i18n.I18n;
 import org.apache.directory.api.ldap.model.schema.SyntaxChecker;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -42,8 +43,8 @@ public class RegexSyntaxChecker extends
 
     /** the set of regular expressions */
     private List<String> expressions;
-
-
+    
+    
     /**
      * Creates a Syntax validator for a specific Syntax using Perl5 matching
      * rules for validation.
@@ -113,11 +114,11 @@ public class RegexSyntaxChecker extends
 
         if ( match )
         {
-            LOG.debug( "Syntax valid for '{}'", value );
+            LOG.debug( I18n.msg( I18n.MSG_04489_SYNTAX_VALID, value ) );
         }
         else
         {
-            LOG.debug( "Syntax invalid for '{}'", value );
+            LOG.debug( I18n.err( I18n.ERR_04488_SYNTAX_INVALID, value ) );
         }
 
         return match;

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/SearchScopeSyntaxChecker.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/SearchScopeSyntaxChecker.java?rev=1786463&r1=1786462&r2=1786463&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/SearchScopeSyntaxChecker.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/SearchScopeSyntaxChecker.java Fri Mar 10 22:27:04 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;
@@ -44,8 +45,13 @@ public class SearchScopeSyntaxChecker ex
 {
     /** A logger for this class */
     private static final Logger LOG = LoggerFactory.getLogger( SearchScopeSyntaxChecker.class );
+    
+    /**
+     * A static instance of SearchScopeSyntaxChecker
+     */
+    public static final SearchScopeSyntaxChecker INSTANCE = new SearchScopeSyntaxChecker();
 
-
+    
     /**
      * Creates a new instance of SearchScopeSyntaxChecker.
      */
@@ -65,7 +71,7 @@ public class SearchScopeSyntaxChecker ex
 
         if ( value == null )
         {
-            LOG.debug( "Syntax invalid for 'null'" );
+            LOG.debug( I18n.err( I18n.ERR_04488_SYNTAX_INVALID, "null" ) );
             return false;
         }
 

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/SubstringAssertionSyntaxChecker.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/SubstringAssertionSyntaxChecker.java?rev=1786463&r1=1786462&r2=1786463&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/SubstringAssertionSyntaxChecker.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/SubstringAssertionSyntaxChecker.java Fri Mar 10 22:27:04 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,7 +29,7 @@ import org.slf4j.LoggerFactory;
 /**
  * A SyntaxChecker which verifies that a value is a SubstringAssertion 
  * according to RFC 4517.
- * 
+ * <p>
  * Implemented as binary right now ...
  *  
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
@@ -38,15 +39,19 @@ public class SubstringAssertionSyntaxChe
 {
     /** A logger for this class */
     private static final Logger LOG = LoggerFactory.getLogger( SubstringAssertionSyntaxChecker.class );
+    
+    /**
+     * A static instance of SubstringAssertionSyntaxChecker
+     */
+    public static final SubstringAssertionSyntaxChecker INSTANCE = new SubstringAssertionSyntaxChecker();
 
-
+    
     /**
      * Creates an instance of SubstringAssertionSyntaxChecker
      */
     public SubstringAssertionSyntaxChecker()
     {
-        super();
-        setOid( SchemaConstants.SUBSTRING_ASSERTION_SYNTAX );
+        super( SchemaConstants.SUBSTRING_ASSERTION_SYNTAX );
     }
 
 
@@ -56,7 +61,7 @@ public class SubstringAssertionSyntaxChe
     @Override
     public boolean isValidSyntax( Object value )
     {
-        LOG.debug( "Syntax valid for '{}'", value );
+        LOG.debug( I18n.msg( I18n.MSG_04489_SYNTAX_VALID, value ) );
         return true;
     }
 }

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/SubtreeSpecificationSyntaxChecker.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/SubtreeSpecificationSyntaxChecker.java?rev=1786463&r1=1786462&r2=1786463&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/SubtreeSpecificationSyntaxChecker.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/SubtreeSpecificationSyntaxChecker.java Fri Mar 10 22:27:04 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.SchemaManager;
 import org.apache.directory.api.ldap.model.schema.SyntaxChecker;
@@ -33,7 +34,7 @@ import org.slf4j.LoggerFactory;
 
 /**
  * A SyntaxChecker which verifies that a value is a subtree specification.
- * 
+ * <p>
  * It has been removed in RFC 4517
  *  
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
@@ -46,8 +47,13 @@ public class SubtreeSpecificationSyntaxC
 
     /** The associated checker */
     private SubtreeSpecificationChecker subtreeSpecificationChecker;
+    
+    /**
+     * A static instance of SubtreeSpecificationSyntaxChecker
+     */
+    public static final SubtreeSpecificationSyntaxChecker INSTANCE = new SubtreeSpecificationSyntaxChecker();
 
-
+    
     /**
      * Creates an instance of SubtreeSpecificationSyntaxChecker
      */
@@ -67,7 +73,7 @@ public class SubtreeSpecificationSyntaxC
 
         if ( value == null )
         {
-            LOG.debug( "Syntax invalid for 'null'" );
+            LOG.debug( I18n.err( I18n.ERR_04488_SYNTAX_INVALID, "null" ) );
             return false;
         }
 
@@ -86,7 +92,7 @@ public class SubtreeSpecificationSyntaxC
 
         if ( strValue.length() == 0 )
         {
-            LOG.debug( "Syntax invalid for '{}'", value );
+            LOG.debug( I18n.err( I18n.ERR_04488_SYNTAX_INVALID, value ) );
             return false;
         }
 
@@ -97,12 +103,12 @@ public class SubtreeSpecificationSyntaxC
                 subtreeSpecificationChecker.parse( strValue );
             }
 
-            LOG.debug( "Syntax valid for '{}'", value );
+            LOG.debug( I18n.msg( I18n.MSG_04489_SYNTAX_VALID, value ) );
             return true;
         }
         catch ( ParseException pe )
         {
-            LOG.debug( "Syntax invalid for '{}'", value );
+            LOG.debug( I18n.err( I18n.ERR_04488_SYNTAX_INVALID, value ) );
             return false;
         }
     }

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/SupplierAndConsumerSyntaxChecker.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/SupplierAndConsumerSyntaxChecker.java?rev=1786463&r1=1786462&r2=1786463&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/SupplierAndConsumerSyntaxChecker.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/SupplierAndConsumerSyntaxChecker.java Fri Mar 10 22:27:04 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;
@@ -27,7 +28,7 @@ import org.slf4j.LoggerFactory;
 
 
 /**
- * A SyntaxChecker which verifies that a value is a supplier and consummer according to RFC 2252.
+ * A SyntaxChecker which verifies that a value is a supplier and consumer according to RFC 2252.
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
@@ -36,8 +37,13 @@ public class SupplierAndConsumerSyntaxCh
 {
     /** A logger for this class */
     private static final Logger LOG = LoggerFactory.getLogger( SupplierAndConsumerSyntaxChecker.class );
+    
+    /**
+     * A static instance of SupplierAndConsumerSyntaxChecker
+     */
+    public static final SupplierAndConsumerSyntaxChecker INSTANCE = new SupplierAndConsumerSyntaxChecker();
 
-
+    
     /**
      * Creates an instance of SupplierAndConsumerSyntaxChecker
      */
@@ -53,7 +59,7 @@ public class SupplierAndConsumerSyntaxCh
     @Override
     public boolean isValidSyntax( Object value )
     {
-        LOG.debug( "Syntax valid for '{}'", value );
+        LOG.debug( I18n.msg( I18n.MSG_04489_SYNTAX_VALID, value ) );
         return true;
     }
 }

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/SupplierInformationSyntaxChecker.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/SupplierInformationSyntaxChecker.java?rev=1786463&r1=1786462&r2=1786463&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/SupplierInformationSyntaxChecker.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/SupplierInformationSyntaxChecker.java Fri Mar 10 22:27:04 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 SupplierInformationSyntaxCh
 {
     /** A logger for this class */
     private static final Logger LOG = LoggerFactory.getLogger( SupplierInformationSyntaxChecker.class );
+    
+    /**
+     * A static instance of SupplierInformationSyntaxChecker
+     */
+    public static final SupplierInformationSyntaxChecker INSTANCE = new SupplierInformationSyntaxChecker();
 
-
+    
     /**
      * Creates an instance of SupplierInformationSyntaxChecker
      */
@@ -53,7 +59,7 @@ public class SupplierInformationSyntaxCh
     @Override
     public boolean isValidSyntax( Object value )
     {
-        LOG.debug( "Syntax valid for '{}'", value );
+        LOG.debug( I18n.msg( I18n.MSG_04489_SYNTAX_VALID, value ) );
         return true;
     }
 }

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/SupplierOrConsumerSyntaxChecker.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/SupplierOrConsumerSyntaxChecker.java?rev=1786463&r1=1786462&r2=1786463&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/SupplierOrConsumerSyntaxChecker.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/SupplierOrConsumerSyntaxChecker.java Fri Mar 10 22:27:04 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 SupplierOrConsumerSyntaxChe
 {
     /** A logger for this class */
     private static final Logger LOG = LoggerFactory.getLogger( SupplierOrConsumerSyntaxChecker.class );
+    
+    /**
+     * A static instance of SupplierOrConsumerSyntaxChecker
+     */
+    public static final SupplierOrConsumerSyntaxChecker INSTANCE = new SupplierOrConsumerSyntaxChecker();
 
-
+    
     /**
      * Creates a new instance of SupplierOrConsumerSyntaxChecker.
      */
@@ -53,7 +59,7 @@ public class SupplierOrConsumerSyntaxChe
     @Override
     public boolean isValidSyntax( Object value )
     {
-        LOG.debug( "Syntax valid for '{}'", value );
+        LOG.debug( I18n.msg( I18n.MSG_04489_SYNTAX_VALID, value ) );
         return true;
     }
 }

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/SupportedAlgorithmSyntaxChecker.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/SupportedAlgorithmSyntaxChecker.java?rev=1786463&r1=1786462&r2=1786463&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/SupportedAlgorithmSyntaxChecker.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/SupportedAlgorithmSyntaxChecker.java Fri Mar 10 22:27:04 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;
@@ -27,7 +28,7 @@ import org.slf4j.LoggerFactory;
 
 /**
  * A SyntaxChecker which verifies that a value is a SupportedAlgorithm according to RFC 2252.
- * 
+ * <p>
  * It has been removed in RFC 4517
  *  
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
@@ -37,15 +38,19 @@ public class SupportedAlgorithmSyntaxChe
 {
     /** A logger for this class */
     private static final Logger LOG = LoggerFactory.getLogger( SupportedAlgorithmSyntaxChecker.class );
+    
+    /**
+     * A static instance of SupportedAlgorithmSyntaxChecker
+     */
+    public static final SupportedAlgorithmSyntaxChecker INSTANCE = new SupportedAlgorithmSyntaxChecker();
 
-
+    
     /**
      * Creates a new instance of SupportedAlgorithmSyntaxChecker.
      */
     public SupportedAlgorithmSyntaxChecker()
     {
-        super();
-        setOid( SchemaConstants.SUPPORTED_ALGORITHM_SYNTAX );
+        super( SchemaConstants.SUPPORTED_ALGORITHM_SYNTAX );
     }
 
 
@@ -55,7 +60,7 @@ public class SupportedAlgorithmSyntaxChe
     @Override
     public boolean isValidSyntax( Object value )
     {
-        LOG.debug( "Syntax valid for '{}'", value );
+        LOG.debug( I18n.msg( I18n.MSG_04489_SYNTAX_VALID, value ) );
         return true;
     }
 }

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/SyntaxCheckerSyntaxChecker.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/SyntaxCheckerSyntaxChecker.java?rev=1786463&r1=1786462&r2=1786463&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/SyntaxCheckerSyntaxChecker.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/SyntaxCheckerSyntaxChecker.java Fri Mar 10 22:27:04 2017
@@ -32,11 +32,15 @@ import org.apache.directory.api.ldap.mod
 public class SyntaxCheckerSyntaxChecker extends Ia5StringSyntaxChecker
 {
     /**
+     * A static instance of SyntaxCheckerSyntaxChecker
+     */
+    public static final SyntaxCheckerSyntaxChecker INSTANCE = new SyntaxCheckerSyntaxChecker();
+
+    /**
      * Creates a new instance of SyntaxCheckerSyntaxChecker.
      */
     public SyntaxCheckerSyntaxChecker()
     {
-        super();
-        setOid( SchemaConstants.SYNTAX_CHECKER_SYNTAX );
+        super( SchemaConstants.SYNTAX_CHECKER_SYNTAX );
     }
 }

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/TelephoneNumberSyntaxChecker.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/TelephoneNumberSyntaxChecker.java?rev=1786463&r1=1786462&r2=1786463&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/TelephoneNumberSyntaxChecker.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/TelephoneNumberSyntaxChecker.java Fri Mar 10 22:27:04 2017
@@ -25,6 +25,7 @@ import java.util.List;
 import java.util.regex.Pattern;
 import java.util.regex.PatternSyntaxException;
 
+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,10 +36,12 @@ import org.slf4j.LoggerFactory;
 /**
  * A SyntaxChecker which verifies that a value is a TelephoneNumber according to ITU
  * recommendation E.123 (which is quite vague ...).
- * 
+ * <p>
  * A valid Telephone number respects more or less this syntax :
  * 
+ * <pre>
  * " *[+]? *((\([0-9- ,;/#*]+\))|[0-9- ,;/#*]+)+"
+ * </pre>
  * 
  * If needed, and to allow more syntaxes, a list of regexps has been added
  * which can be initialized to other values
@@ -65,8 +68,13 @@ public class TelephoneNumberSyntaxChecke
 
     /** A flag set when only the default regexp should be tested */
     protected boolean defaultMandatory = false;
+    
+    /**
+     * A static instance of TelephoneNumberSyntaxChecker
+     */
+    public static final TelephoneNumberSyntaxChecker INSTANCE = new TelephoneNumberSyntaxChecker();
 
-
+    
     /**
      * Creates a new instance of TelephoneNumberSyntaxChecker.
      */
@@ -75,6 +83,17 @@ public class TelephoneNumberSyntaxChecke
         super( SchemaConstants.TELEPHONE_NUMBER_SYNTAX );
     }
 
+    
+    /**
+     * Creates a new instance of a child of this class, with an OID.
+     * 
+     * @param oid the child's OID
+     */
+    protected TelephoneNumberSyntaxChecker( String oid )
+    {
+        super( oid );
+    }
+
 
     /**
      * Add a new valid regexp for a Telephone number
@@ -139,7 +158,7 @@ public class TelephoneNumberSyntaxChecke
 
         if ( value == null )
         {
-            LOG.debug( "Syntax invalid for 'null'" );
+            LOG.debug( I18n.err( I18n.ERR_04488_SYNTAX_INVALID, "null" ) );
             return false;
         }
 
@@ -158,7 +177,7 @@ public class TelephoneNumberSyntaxChecke
 
         if ( strValue.length() == 0 )
         {
-            LOG.debug( "Syntax invalid for '{}'", value );
+            LOG.debug( I18n.err( I18n.ERR_04488_SYNTAX_INVALID, value ) );
             return false;
         }
 
@@ -170,11 +189,11 @@ public class TelephoneNumberSyntaxChecke
 
             if ( result )
             {
-                LOG.debug( "Syntax valid for '{}'", value );
+                LOG.debug( I18n.msg( I18n.MSG_04489_SYNTAX_VALID, value ) );
             }
             else
             {
-                LOG.debug( "Syntax invalid for '{}'", value );
+                LOG.debug( I18n.err( I18n.ERR_04488_SYNTAX_INVALID, value ) );
             }
 
             return result;
@@ -183,14 +202,14 @@ public class TelephoneNumberSyntaxChecke
         {
             if ( defaultPattern.matcher( strValue ).matches() )
             {
-                LOG.debug( "Syntax valid for '{}'", value );
+                LOG.debug( I18n.msg( I18n.MSG_04489_SYNTAX_VALID, value ) );
                 return true;
             }
             else
             {
                 if ( compiledREs == null )
                 {
-                    LOG.debug( "Syntax invalid for '{}'", value );
+                    LOG.debug( I18n.err( I18n.ERR_04488_SYNTAX_INVALID, value ) );
                     return false;
                 }
 
@@ -200,12 +219,12 @@ public class TelephoneNumberSyntaxChecke
                 {
                     if ( pattern.matcher( strValue ).matches() )
                     {
-                        LOG.debug( "Syntax valid for '{}'", value );
+                        LOG.debug( I18n.msg( I18n.MSG_04489_SYNTAX_VALID, value ) );
                         return true;
                     }
                 }
 
-                LOG.debug( "Syntax invalid for '{}'", value );
+                LOG.debug( I18n.err( I18n.ERR_04488_SYNTAX_INVALID, value ) );
                 return false;
             }
         }

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/TeletexTerminalIdentifierSyntaxChecker.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/TeletexTerminalIdentifierSyntaxChecker.java?rev=1786463&r1=1786462&r2=1786463&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/TeletexTerminalIdentifierSyntaxChecker.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/TeletexTerminalIdentifierSyntaxChecker.java Fri Mar 10 22:27:04 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;
@@ -30,7 +31,7 @@ import org.slf4j.LoggerFactory;
 /**
  * A SyntaxChecker which verifies that a value is a TeletexTerminalIdentifier according to 
  * RFC 4517 :
- * 
+ * <pre>
  * teletex-id = ttx-term *(DOLLAR ttx-param)
  * ttx-term   = PrintableString          ; terminal identifier
  * ttx-param  = ttx-key COLON ttx-value  ; parameter
@@ -38,7 +39,7 @@ import org.slf4j.LoggerFactory;
  * ttx-value  = *ttx-value-octet
  *
  * ttx-value-octet = %x00-23 | (%x5C "24") | %x25-5B | (%x5C "5C") | %x5D-FF
- * 
+ * </pre>
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
 @SuppressWarnings("serial")
@@ -46,8 +47,13 @@ public class TeletexTerminalIdentifierSy
 {
     /** A logger for this class */
     private static final Logger LOG = LoggerFactory.getLogger( TeletexTerminalIdentifierSyntaxChecker.class );
+    
+    /**
+     * A static instance of TeletexTerminalIdentifierSyntaxChecker
+     */
+    public static final TeletexTerminalIdentifierSyntaxChecker INSTANCE = new TeletexTerminalIdentifierSyntaxChecker();
 
-
+    
     /**
      * Creates a new instance of TeletexTerminalIdentifier.
      */
@@ -67,7 +73,7 @@ public class TeletexTerminalIdentifierSy
 
         if ( value == null )
         {
-            LOG.debug( "Syntax invalid for 'null'" );
+            LOG.debug( I18n.err( I18n.ERR_04488_SYNTAX_INVALID, "null" ) );
             return false;
         }
 
@@ -86,7 +92,7 @@ public class TeletexTerminalIdentifierSy
 
         if ( strValue.length() == 0 )
         {
-            LOG.debug( "Syntax invalid for '{}'", value );
+            LOG.debug( I18n.err( I18n.ERR_04488_SYNTAX_INVALID, value ) );
             return false;
         }
 
@@ -98,21 +104,21 @@ public class TeletexTerminalIdentifierSy
         if ( terminalIdentifier.length() == 0 )
         {
             // It should not be null
-            LOG.debug( "Syntax invalid for '{}'", value );
+            LOG.debug( I18n.err( I18n.ERR_04488_SYNTAX_INVALID, value ) );
             return false;
         }
 
         if ( !Strings.isPrintableString( terminalIdentifier ) )
         {
             // It's not a valid PrintableString 
-            LOG.debug( "Syntax invalid for '{}'", value );
+            LOG.debug( I18n.err( I18n.ERR_04488_SYNTAX_INVALID, value ) );
             return false;
         }
 
         if ( dollar == -1 )
         {
             // No ttx-param : let's get out
-            LOG.debug( "Syntax valid for '{}'", value );
+            LOG.debug( I18n.msg( I18n.MSG_04489_SYNTAX_VALID, value ) );
             return true;
         }
 
@@ -121,7 +127,7 @@ public class TeletexTerminalIdentifierSy
 
         if ( ttxParams.length == 0 )
         {
-            LOG.debug( "Syntax invalid for '{}'", value );
+            LOG.debug( I18n.err( I18n.ERR_04488_SYNTAX_INVALID, value ) );
             return false;
         }
 
@@ -132,7 +138,7 @@ public class TeletexTerminalIdentifierSy
             if ( colon == -1 )
             {
                 // we must have a ':' separator
-                LOG.debug( "Syntax invalid for '{}'", value );
+                LOG.debug( I18n.err( I18n.ERR_04488_SYNTAX_INVALID, value ) );
                 return false;
             }
 
@@ -146,7 +152,7 @@ public class TeletexTerminalIdentifierSy
             {
                 if ( colon + 1 == ttxParam.length() )
                 {
-                    LOG.debug( "Syntax invalid for '{}'", value );
+                    LOG.debug( I18n.err( I18n.ERR_04488_SYNTAX_INVALID, value ) );
                     return false;
                 }
 
@@ -158,14 +164,14 @@ public class TeletexTerminalIdentifierSy
                     {
                         case 0x24:
                             // '$' is not accepted
-                            LOG.debug( "Syntax invalid for '{}'", value );
+                            LOG.debug( I18n.err( I18n.ERR_04488_SYNTAX_INVALID, value ) );
                             return false;
 
                         case 0x5c:
                             if ( hasEsc )
                             {
                                 // two following \ are not accepted
-                                LOG.debug( "Syntax invalid for '{}'", value );
+                                LOG.debug( I18n.err( I18n.ERR_04488_SYNTAX_INVALID, value ) );
                                 return false;
                             }
                             else
@@ -205,12 +211,12 @@ public class TeletexTerminalIdentifierSy
             }
             else
             {
-                LOG.debug( "Syntax invalid for '{}'", value );
+                LOG.debug( I18n.err( I18n.ERR_04488_SYNTAX_INVALID, value ) );
                 return false;
             }
         }
 
-        LOG.debug( "Syntax valid for '{}'", value );
+        LOG.debug( I18n.msg( I18n.MSG_04489_SYNTAX_VALID, value ) );
         return true;
     }
 }

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/TelexNumberSyntaxChecker.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/TelexNumberSyntaxChecker.java?rev=1786463&r1=1786462&r2=1786463&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/TelexNumberSyntaxChecker.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/TelexNumberSyntaxChecker.java Fri Mar 10 22:27:04 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;
@@ -30,12 +31,12 @@ import org.slf4j.LoggerFactory;
 /**
  * A SyntaxChecker which verifies that a value is a Telex Number according to 
  * RFC 4517 :
- * 
+ * <pre>
  * telex-number  = actual-number DOLLAR country-code DOLLAR answerback
  * actual-number = PrintableString
  * country-code  = PrintableString
  * answerback    = PrintableString
- * 
+ * </pre>
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
 @SuppressWarnings("serial")
@@ -43,8 +44,13 @@ public class TelexNumberSyntaxChecker ex
 {
     /** A logger for this class */
     private static final Logger LOG = LoggerFactory.getLogger( TelexNumberSyntaxChecker.class );
+    
+    /**
+     * A static instance of TelexNumberSyntaxChecker
+     */
+    public static final TelexNumberSyntaxChecker INSTANCE = new TelexNumberSyntaxChecker();
 
-
+    
     /**
      * Creates a new instance of TelexNumberSyntaxChecker.
      */
@@ -64,7 +70,7 @@ public class TelexNumberSyntaxChecker ex
 
         if ( value == null )
         {
-            LOG.debug( "Syntax invalid for 'null'" );
+            LOG.debug( I18n.err( I18n.ERR_04488_SYNTAX_INVALID, "null" ) );
             return false;
         }
 
@@ -83,7 +89,7 @@ public class TelexNumberSyntaxChecker ex
 
         if ( strValue.length() == 0 )
         {
-            LOG.debug( "Syntax invalid for '{}'", value );
+            LOG.debug( I18n.err( I18n.ERR_04488_SYNTAX_INVALID, value ) );
             return false;
         }
 
@@ -94,7 +100,7 @@ public class TelexNumberSyntaxChecker ex
         if ( dollar <= 0 )
         {
             // No '$' => error
-            LOG.debug( "Syntax invalid for '{}'", value );
+            LOG.debug( I18n.err( I18n.ERR_04488_SYNTAX_INVALID, value ) );
             return false;
         }
 
@@ -103,14 +109,14 @@ public class TelexNumberSyntaxChecker ex
         // The actualNumber must not be empty
         if ( actualNumber.length() == 0 )
         {
-            LOG.debug( "Syntax invalid for '{}'", value );
+            LOG.debug( I18n.err( I18n.ERR_04488_SYNTAX_INVALID, value ) );
             return false;
         }
 
         // The actual number should be a PrintableString 
         if ( !Strings.isPrintableString( actualNumber ) )
         {
-            LOG.debug( "Syntax invalid for '{}'", value );
+            LOG.debug( I18n.err( I18n.ERR_04488_SYNTAX_INVALID, value ) );
             return false;
         }
 
@@ -121,7 +127,7 @@ public class TelexNumberSyntaxChecker ex
         if ( dollar2 == -1 )
         {
             // No '$' => error
-            LOG.debug( "Syntax invalid for '{}'", value );
+            LOG.debug( I18n.err( I18n.ERR_04488_SYNTAX_INVALID, value ) );
             return false;
         }
 
@@ -130,14 +136,14 @@ public class TelexNumberSyntaxChecker ex
         // The countryCode must not be empty
         if ( countryCode.length() == 0 )
         {
-            LOG.debug( "Syntax invalid for '{}'", value );
+            LOG.debug( I18n.err( I18n.ERR_04488_SYNTAX_INVALID, value ) );
             return false;
         }
 
         // The country Code should be a PrintableString 
         if ( !Strings.isPrintableString( countryCode ) )
         {
-            LOG.debug( "Syntax invalid for '{}'", value );
+            LOG.debug( I18n.err( I18n.ERR_04488_SYNTAX_INVALID, value ) );
             return false;
         }
 
@@ -145,7 +151,7 @@ public class TelexNumberSyntaxChecker ex
         if ( dollar2 + 1 == strValue.length() )
         {
             // The last string should not be null
-            LOG.debug( "Syntax invalid for '{}'", value );
+            LOG.debug( I18n.err( I18n.ERR_04488_SYNTAX_INVALID, value ) );
             return false;
         }
 
@@ -154,7 +160,7 @@ public class TelexNumberSyntaxChecker ex
         // The answerBack should be a PrintableString 
         if ( !Strings.isPrintableString( answerBack ) )
         {
-            LOG.debug( "Syntax invalid for '{}'", value );
+            LOG.debug( I18n.err( I18n.ERR_04488_SYNTAX_INVALID, value ) );
             return false;
         }
 
@@ -163,11 +169,11 @@ public class TelexNumberSyntaxChecker ex
 
         if ( result )
         {
-            LOG.debug( "Syntax valid for '{}'", value );
+            LOG.debug( I18n.msg( I18n.MSG_04489_SYNTAX_VALID, value ) );
         }
         else
         {
-            LOG.debug( "Syntax invalid for '{}'", value );
+            LOG.debug( I18n.err( I18n.ERR_04488_SYNTAX_INVALID, value ) );
         }
 
         return result;

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/UtcTimeSyntaxChecker.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/UtcTimeSyntaxChecker.java?rev=1786463&r1=1786462&r2=1786463&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/UtcTimeSyntaxChecker.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/UtcTimeSyntaxChecker.java Fri Mar 10 22:27:04 2017
@@ -22,6 +22,7 @@ package org.apache.directory.api.ldap.mo
 
 import java.util.regex.Pattern;
 
+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;
@@ -32,8 +33,9 @@ import org.slf4j.LoggerFactory;
 /**
  * A SyntaxChecker which verifies that a value is a UTC time
  * according to RFC 4517.
- * 
+ * <p>
  * From RFC 4517 :
+ * <pre>
  * UTCTime         = year month day hour minute [ second ] [ u-time-zone ]
  * u-time-zone     = %x5A          ; "Z" | u-differential
  * u-differential  = ( MINUS | PLUS ) hour minute
@@ -57,7 +59,7 @@ import org.slf4j.LoggerFactory;
  * 
  * From RFC 4512 :
  * PLUS    = %x2B ; plus sign ("+")
- * 
+ * </pre>
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
@@ -88,8 +90,13 @@ public class UtcTimeSyntaxChecker extend
 
     // The regexp pattern, java.util.regex.Pattern is immutable so only one instance is needed.
     private static final Pattern DATE_PATTERN = Pattern.compile( UTC_TIME_PATTERN );
+    
+    /**
+     * A static instance of UtcTimeSyntaxChecker
+     */
+    public static final UtcTimeSyntaxChecker INSTANCE = new UtcTimeSyntaxChecker();
 
-
+    
     /**
      * 
      * Creates a new instance of UtcTimeSyntaxChecker.
@@ -111,7 +118,7 @@ public class UtcTimeSyntaxChecker extend
 
         if ( value == null )
         {
-            LOG.debug( "Syntax invalid for 'null'" );
+            LOG.debug( I18n.err( I18n.ERR_04488_SYNTAX_INVALID, "null" ) );
             return false;
         }
 
@@ -131,7 +138,7 @@ public class UtcTimeSyntaxChecker extend
         // A generalized time must have a minimal length of 11 
         if ( strValue.length() < 11 )
         {
-            LOG.debug( "Syntax invalid for '{}'", value );
+            LOG.debug( I18n.err( I18n.ERR_04488_SYNTAX_INVALID, value ) );
             return false;
         }
 
@@ -140,12 +147,13 @@ public class UtcTimeSyntaxChecker extend
 
         if ( result )
         {
-            LOG.debug( "Syntax valid for '{}'", value );
+            LOG.debug( I18n.msg( I18n.MSG_04489_SYNTAX_VALID, value ) );
         }
         else
         {
-            LOG.debug( "Syntax invalid for '{}'", value );
+            LOG.debug( I18n.err( I18n.ERR_04488_SYNTAX_INVALID, value ) );
         }
+        
         return result;
     }
 }

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/UuidSyntaxChecker.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/UuidSyntaxChecker.java?rev=1786463&r1=1786462&r2=1786463&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/UuidSyntaxChecker.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/UuidSyntaxChecker.java Fri Mar 10 22:27:04 2017
@@ -22,6 +22,7 @@ package org.apache.directory.api.ldap.mo
 
 import java.util.UUID;
 
+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,9 +32,9 @@ import org.slf4j.LoggerFactory;
 
 /**
  * An UUID syntax checker.
- * 
+ * <pre>
  * UUID ::= OCTET STRING (SIZE(16)) -- constrained to an UUID [RFC4122]
- * 
+ * </pre>
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
 @SuppressWarnings("serial")
@@ -41,8 +42,13 @@ public class UuidSyntaxChecker extends S
 {
     /** A logger for this class */
     private static final Logger LOG = LoggerFactory.getLogger( UuidSyntaxChecker.class );
+    
+    /**
+     * A static instance of UuidSyntaxChecker
+     */
+    public static final UuidSyntaxChecker INSTANCE = new UuidSyntaxChecker();
 
-
+    
     /**
      * Creates a new instance of UUIDSyntaxChecker.
      */
@@ -60,7 +66,7 @@ public class UuidSyntaxChecker extends S
     {
         if ( value == null )
         {
-            LOG.debug( "Syntax invalid for 'null'" );
+            LOG.debug( I18n.err( I18n.ERR_04488_SYNTAX_INVALID, "null" ) );
             return false;
         }
 
@@ -71,7 +77,7 @@ public class UuidSyntaxChecker extends S
 
         if ( !( value instanceof String ) )
         {
-            LOG.debug( "Syntax invalid for '{}'", value );
+            LOG.debug( I18n.err( I18n.ERR_04488_SYNTAX_INVALID, value ) );
             return false;
         }
 



Mime
View raw message