From 4bed4a99e8e37c7e1cbcbcb1eec5ecb8e6360809 Mon Sep 17 00:00:00 2001
From: Jean-Noël Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Wed, 01 Jun 2016 10:14:34 +0000
Subject: [PATCH] OPENDJ-3037 Remove DirectoryServer.getDefault*Syntax() methods

---
 opendj-server-legacy/src/main/java/org/opends/server/tools/ConfigureDS.java |   35 ++++++++++++++++++-----------------
 1 files changed, 18 insertions(+), 17 deletions(-)

diff --git a/opendj-server-legacy/src/main/java/org/opends/server/tools/ConfigureDS.java b/opendj-server-legacy/src/main/java/org/opends/server/tools/ConfigureDS.java
index 0a3690c..9aeb6a4 100644
--- a/opendj-server-legacy/src/main/java/org/opends/server/tools/ConfigureDS.java
+++ b/opendj-server-legacy/src/main/java/org/opends/server/tools/ConfigureDS.java
@@ -56,6 +56,7 @@
 import org.forgerock.opendj.ldap.LinkedAttribute;
 import org.forgerock.opendj.ldap.LinkedHashMapEntry;
 import org.forgerock.opendj.ldap.schema.AttributeType;
+import org.forgerock.opendj.ldap.schema.CoreSchema;
 import org.forgerock.opendj.ldap.schema.Syntax;
 import org.forgerock.opendj.server.config.client.BackendCfgClient;
 import org.forgerock.opendj.server.config.meta.CryptoManagerCfgDefn;
@@ -756,7 +757,7 @@
       {
         updateConfigEntryWithAttribute(
             DN_LDAP_CONNECTION_HANDLER, ATTR_LISTEN_PORT,
-            DirectoryServer.getDefaultIntegerSyntax(),
+            CoreSchema.getIntegerSyntax(),
             ldapPort.getIntValue());
       }
       catch (final Exception e)
@@ -775,7 +776,7 @@
         updateConfigEntryWithAttribute(
             DN_ADMIN_CONNECTOR,
             ATTR_LISTEN_PORT,
-            DirectoryServer.getDefaultIntegerSyntax(),
+            CoreSchema.getIntegerSyntax(),
             adminConnectorPort.getIntValue());
       }
       catch (final Exception e)
@@ -794,13 +795,13 @@
         updateConfigEntryWithAttribute(
             DN_LDAPS_CONNECTION_HANDLER,
             ATTR_LISTEN_PORT,
-            DirectoryServer.getDefaultIntegerSyntax(),
+            CoreSchema.getIntegerSyntax(),
             ldapsPort.getIntValue());
 
         updateConfigEntryWithAttribute(
             DN_LDAPS_CONNECTION_HANDLER,
             ATTR_CONNECTION_HANDLER_ENABLED,
-            DirectoryServer.getDefaultBooleanSyntax(),
+            CoreSchema.getBooleanSyntax(),
             ServerConstants.TRUE_VALUE);
       }
       catch (final Exception e)
@@ -819,13 +820,13 @@
         updateConfigEntryWithAttribute(
             DN_JMX_CONNECTION_HANDLER,
             ATTR_LISTEN_PORT,
-            DirectoryServer.getDefaultIntegerSyntax(),
+            CoreSchema.getIntegerSyntax(),
             jmxPort.getIntValue());
 
         updateConfigEntryWithAttribute(
             DN_JMX_CONNECTION_HANDLER,
             ATTR_CONNECTION_HANDLER_ENABLED,
-            DirectoryServer.getDefaultBooleanSyntax(),
+            CoreSchema.getBooleanSyntax(),
             ServerConstants.TRUE_VALUE);
       }
       catch (final Exception e)
@@ -844,7 +845,7 @@
         updateConfigEntryWithAttribute(
             DN_LDAP_CONNECTION_HANDLER,
             ATTR_ALLOW_STARTTLS,
-            DirectoryServer.getDefaultBooleanSyntax(),
+            CoreSchema.getBooleanSyntax(),
             ServerConstants.TRUE_VALUE);
       }
       catch (final Exception e)
@@ -866,7 +867,7 @@
           updateConfigEntryWithAttribute(
               keyManagerProviderDN.getValue(),
               ATTR_KEYMANAGER_ENABLED,
-              DirectoryServer.getDefaultBooleanSyntax(),
+              CoreSchema.getBooleanSyntax(),
               ServerConstants.TRUE_VALUE);
         }
         catch (final Exception e)
@@ -886,7 +887,7 @@
           updateConfigEntryWithAttribute(
               keyManagerProviderDN.getValue(),
               ATTR_KEYSTORE_FILE,
-              DirectoryServer.getDefaultStringSyntax(),
+              CoreSchema.getDirectoryStringSyntax(),
               keyManagerPath.getValue());
         }
         catch (final Exception e)
@@ -907,7 +908,7 @@
         updateConfigEntryWithAttribute(
             attributeDN,
             ATTR_KEYMANAGER_DN,
-            DirectoryServer.getDefaultStringSyntax(),
+            CoreSchema.getDirectoryStringSyntax(),
             keyManagerProviderDN.getValue());
       }
       catch (final Exception e)
@@ -928,7 +929,7 @@
           updateConfigEntryWithAttribute(
               trustManagerProviderDN.getValue(),
               ATTR_TRUSTMANAGER_ENABLED,
-              DirectoryServer.getDefaultBooleanSyntax(),
+              CoreSchema.getBooleanSyntax(),
               ServerConstants.TRUE_VALUE);
         }
         catch (final Exception e)
@@ -968,7 +969,7 @@
         updateConfigEntryWithAttribute(
             attributeDN,
             ATTR_TRUSTMANAGER_DN,
-            DirectoryServer.getDefaultStringSyntax(),
+            CoreSchema.getDirectoryStringSyntax(),
             trustManagerProviderDN.getValue());
       }
       catch (final Exception e)
@@ -988,7 +989,7 @@
         updateConfigEntryWithAttribute(
             attributeDN,
             attrName,
-            DirectoryServer.getDefaultStringSyntax(),
+            CoreSchema.getDirectoryStringSyntax(),
             attrValues.toArray(new Object[attrValues.size()]));
       }
       else
@@ -1023,13 +1024,13 @@
         updateConfigEntryWithAttribute(
             DN_ROOT_USER,
             ATTR_ROOTDN_ALTERNATE_BIND_DN,
-            DirectoryServer.getDefaultStringSyntax(),
+            CoreSchema.getDirectoryStringSyntax(),
             rootDN);
         final String encodedPassword = SaltedSHA512PasswordStorageScheme.encodeOffline(getBytes(rootPW));
         updateConfigEntryWithAttribute(
             DN_ROOT_USER,
             ATTR_USER_PASSWORD,
-            DirectoryServer.getDefaultStringSyntax(),
+            CoreSchema.getDirectoryStringSyntax(),
             encodedPassword);
       }
       catch (final Exception e)
@@ -1047,7 +1048,7 @@
       updateConfigEntryWithAttribute(
           DN_DIGEST_MD5_SASL_MECHANISM,
           "ds-cfg-server-fqdn",
-          DirectoryServer.getDefaultStringSyntax(),
+          CoreSchema.getDirectoryStringSyntax(),
           hostName.getValue());
     }
     catch (final Exception e)
@@ -1097,7 +1098,7 @@
             updateConfigEntryWithAttribute(
                 DN_CRYPTO_MANAGER,
                 ATTR_CRYPTO_CIPHER_KEY_WRAPPING_TRANSFORMATION,
-                DirectoryServer.getDefaultStringSyntax(),
+                CoreSchema.getDirectoryStringSyntax(),
                 alternativeCipher);
           }
           catch (final Exception e)

--
Gitblit v1.10.0