mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Nicolas Capponi
19.44.2016 5f9ccac52b25265d38c85c0d23be6f8f91dc74d6
OPENDJ-3089 Remove syntaxes, matching rules factories, associated tests

- remove unused syntaxes classes
- remove unused codes from other syntaxes classes
- remove matching rule factories classes
- remove related unit tests
- remove configuration files for syntaxes
- remove syntaxes and matching rules from root configuration
67 files deleted
1 files renamed
12 files modified
7147 ■■■■■ changed files
opendj-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/AttributeSyntaxConfiguration.xml 72 ●●●●● patch | view | raw | blame | history
opendj-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/AttributeTypeDescriptionAttributeSyntaxConfiguration.xml 74 ●●●●● patch | view | raw | blame | history
opendj-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/CertificateAttributeSyntaxConfiguration.xml 64 ●●●●● patch | view | raw | blame | history
opendj-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/CollationMatchingRuleConfiguration.xml 115 ●●●●● patch | view | raw | blame | history
opendj-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/CountryStringAttributeSyntaxConfiguration.xml 65 ●●●●● patch | view | raw | blame | history
opendj-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/DirectoryStringAttributeSyntaxConfiguration.xml 67 ●●●●● patch | view | raw | blame | history
opendj-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/JPEGAttributeSyntaxConfiguration.xml 60 ●●●●● patch | view | raw | blame | history
opendj-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/MatchingRuleConfiguration.xml 75 ●●●●● patch | view | raw | blame | history
opendj-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/RootConfiguration.xml 22 ●●●●● patch | view | raw | blame | history
opendj-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/TelephoneNumberAttributeSyntaxConfiguration.xml 60 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/api/AttributeSyntax.java 344 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/api/MatchingRuleFactory.java 116 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/backends/BackupBackend.java 4 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/replication/plugin/HistoricalCsnOrderingMatchingRuleFactory.java 60 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/replication/plugin/HistoricalCsnOrderingMatchingRuleImpl.java 17 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/schema/AciSyntax.java 102 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/schema/AuthPasswordEqualityMatchingRule.java 19 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/schema/AuthPasswordEqualityMatchingRuleFactory.java 57 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/schema/AuthPasswordSyntax.java 56 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/schema/BinarySyntax.java 86 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/schema/BitStringSyntax.java 87 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/schema/BooleanSyntax.java 103 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/schema/CertificateExactAssertionSyntax.java 75 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/schema/CertificateListSyntax.java 88 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/schema/CertificatePairSyntax.java 88 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/schema/CollationMatchingRuleFactory.java 394 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/schema/DITContentRuleSyntax.java 68 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/schema/DITStructureRuleSyntax.java 66 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/schema/DeliveryMethodSyntax.java 100 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/schema/DistinguishedNameSyntax.java 86 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/schema/EnhancedGuideSyntax.java 86 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/schema/FaxNumberSyntax.java 96 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/schema/FaxSyntax.java 87 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/schema/GeneralizedTimeSyntax.java 59 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/schema/GuideSyntax.java 377 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/schema/IA5StringSyntax.java 87 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/schema/IntegerSyntax.java 87 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/schema/LDAPSyntaxDescriptionSyntax.java 67 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/schema/MatchingRuleSyntax.java 84 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/schema/MatchingRuleUseSyntax.java 71 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/schema/NameAndOptionalUIDSyntax.java 85 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/schema/NameFormSyntax.java 73 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/schema/NumericStringSyntax.java 86 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/schema/OIDSyntax.java 86 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/schema/ObjectClassSyntax.java 66 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/schema/OctetStringSyntax.java 87 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/schema/OtherMailboxSyntax.java 88 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/schema/PostalAddressSyntax.java 89 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/schema/PresentationAddressSyntax.java 86 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/schema/PrintableStringSyntax.java 89 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/schema/ProtocolInformationSyntax.java 87 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/schema/SchemaFilesWriter.java 4 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/schema/SchemaHandler.java 4 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/schema/SubstringAssertionSyntax.java 88 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/schema/SubtreeSpecificationSyntax.java 135 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/schema/SupportedAlgorithmSyntax.java 88 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/schema/TeletexTerminalIdentifierSyntax.java 97 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/schema/TelexNumberSyntax.java 87 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/schema/UTCTimeSyntax.java 89 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/schema/UUIDSyntax.java 91 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/schema/UserPasswordEqualityMatchingRule.java 20 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/schema/UserPasswordEqualityMatchingRuleFactory.java 59 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/schema/UserPasswordSyntax.java 66 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/util/SchemaUtils.java 15 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/src/test/java/org/opends/server/schema/AttributeSyntaxTest.java 74 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/src/test/java/org/opends/server/schema/AuthPasswordEqualityMatchingRuleTest.java 125 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/src/test/java/org/opends/server/schema/BinaryAttributeSyntaxTest.java 74 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/src/test/java/org/opends/server/schema/BitStringSyntaxTest.java 74 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/src/test/java/org/opends/server/schema/DITContentRuleSyntaxTest.java 96 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/src/test/java/org/opends/server/schema/GeneralizedTimeSyntaxTest.java 54 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/src/test/java/org/opends/server/schema/GuideSyntaxTest.java 64 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/src/test/java/org/opends/server/schema/IA5StringSyntaxTest.java 48 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/src/test/java/org/opends/server/schema/IntegerSyntaxTest.java 54 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/src/test/java/org/opends/server/schema/LDAPSyntaxTest.java 647 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/src/test/java/org/opends/server/schema/MatchingRuleSyntaxTest.java 54 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/src/test/java/org/opends/server/schema/MatchingRuleUseSyntaxTest.java 55 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/src/test/java/org/opends/server/schema/OtherMailboxSyntaxTest.java 48 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/src/test/java/org/opends/server/schema/TelexSyntaxTest.java 49 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/src/test/java/org/opends/server/schema/UUIDSyntaxTest.java 58 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/src/test/java/org/opends/server/schema/UserPasswordEqualityMatchingRuleTest.java 17 ●●●●● patch | view | raw | blame | history
opendj-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/AttributeSyntaxConfiguration.xml
File was deleted
opendj-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/AttributeTypeDescriptionAttributeSyntaxConfiguration.xml
File was deleted
opendj-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/CertificateAttributeSyntaxConfiguration.xml
File was deleted
opendj-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/CollationMatchingRuleConfiguration.xml
File was deleted
opendj-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/CountryStringAttributeSyntaxConfiguration.xml
File was deleted
opendj-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/DirectoryStringAttributeSyntaxConfiguration.xml
File was deleted
opendj-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/JPEGAttributeSyntaxConfiguration.xml
File was deleted
opendj-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/MatchingRuleConfiguration.xml
File was deleted
opendj-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/RootConfiguration.xml
@@ -346,28 +346,6 @@
      </cli:relation>
    </adm:profile>
  </adm:relation>
  <adm:relation name="matching-rule">
    <adm:one-to-many />
    <adm:profile name="ldap">
      <ldap:rdn-sequence>cn=Matching Rules,cn=config</ldap:rdn-sequence>
    </adm:profile>
    <adm:profile name="cli">
      <cli:relation>
        <cli:default-property name="enabled" />
      </cli:relation>
    </adm:profile>
  </adm:relation>
  <adm:relation name="attribute-syntax">
    <adm:one-to-many />
    <adm:profile name="ldap">
      <ldap:rdn-sequence>cn=Syntaxes,cn=config</ldap:rdn-sequence>
    </adm:profile>
    <adm:profile name="cli">
      <cli:relation>
        <cli:default-property name="enabled" />
      </cli:relation>
    </adm:profile>
  </adm:relation>
  <adm:relation name="monitor-provider">
    <adm:one-to-many />
    <adm:profile name="ldap">
opendj-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/TelephoneNumberAttributeSyntaxConfiguration.xml
File was deleted
opendj-server-legacy/src/main/java/org/opends/server/api/AttributeSyntax.java
File was deleted
opendj-server-legacy/src/main/java/org/opends/server/api/MatchingRuleFactory.java
File was deleted
opendj-server-legacy/src/main/java/org/opends/server/backends/BackupBackend.java
@@ -20,7 +20,6 @@
import static org.opends.messages.BackendMessages.*;
import static org.opends.server.config.ConfigConstants.*;
import static org.opends.server.core.DirectoryServer.*;
import static org.opends.server.schema.BooleanSyntax.*;
import static org.opends.server.util.ServerConstants.*;
import static org.opends.server.util.StaticUtils.*;
@@ -74,6 +73,7 @@
import org.opends.server.types.LDIFImportResult;
import org.opends.server.types.RestoreConfig;
import org.opends.server.types.SearchFilter;
import org.opends.server.util.SchemaUtils;
/**
 * This class defines a backend used to present information about Directory
@@ -640,7 +640,7 @@
  private void putBoolean(LinkedHashMap<AttributeType, List<Attribute>> attrsMap, String attrName, boolean value)
  {
    AttributeType t = getSchema().getAttributeType(attrName);
    attrsMap.put(t, asList(t, createBooleanValue(value)));
    attrsMap.put(t, asList(t, SchemaUtils.createBooleanValue(value)));
  }
  private List<Attribute> asList(AttributeType attrType, ByteString value)
opendj-server-legacy/src/main/java/org/opends/server/replication/plugin/HistoricalCsnOrderingMatchingRuleFactory.java
File was deleted
opendj-server-legacy/src/main/java/org/opends/server/replication/plugin/HistoricalCsnOrderingMatchingRuleImpl.java
@@ -28,7 +28,6 @@
import org.forgerock.opendj.ldap.DecodeException;
import org.forgerock.opendj.ldap.schema.MatchingRuleImpl;
import org.forgerock.opendj.ldap.schema.Schema;
import org.forgerock.opendj.ldap.schema.SchemaBuilder;
import org.forgerock.opendj.ldap.spi.IndexQueryFactory;
import org.forgerock.opendj.ldap.spi.Indexer;
import org.forgerock.opendj.ldap.spi.IndexingOptions;
@@ -178,20 +177,4 @@
    return indexers;
  }
  /**
   * Adds the historical csn ordering matching rule to the provided schema builder.
   *
   * @param builder
   *          where to add the historical csn ordering matching rule
   * @return the provided builder
   */
  public static SchemaBuilder addHistoricalCsnOrderingMatchingRule(SchemaBuilder builder)
  {
    return builder
        .buildMatchingRule("1.3.6.1.4.1.26027.1.4.4")
        .names("historicalCsnOrderingMatch")
        .syntaxOID("1.3.6.1.4.1.1466.115.121.1.40")
        .implementation(new HistoricalCsnOrderingMatchingRuleImpl())
        .addToSchema();
  }
}
opendj-server-legacy/src/main/java/org/opends/server/schema/AciSyntax.java
File was deleted
opendj-server-legacy/src/main/java/org/opends/server/schema/AuthPasswordEqualityMatchingRule.java
@@ -16,18 +16,15 @@
 */
package org.opends.server.schema;
import static org.opends.server.schema.SchemaConstants.*;
import static org.opends.server.core.DirectoryServer.*;
import org.forgerock.i18n.slf4j.LocalizedLogger;
import org.forgerock.opendj.ldap.ByteSequence;
import org.forgerock.opendj.ldap.ConditionResult;
import org.forgerock.opendj.ldap.schema.SchemaBuilder;
import org.opends.server.api.PasswordStorageScheme;
/** This class implements the authPasswordMatch matching rule defined in RFC 3112. */
public class AuthPasswordEqualityMatchingRule extends AbstractPasswordEqualityMatchingRuleImpl
final class AuthPasswordEqualityMatchingRule extends AbstractPasswordEqualityMatchingRuleImpl
{
  private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass();
@@ -59,18 +56,4 @@
        assertionValue, authPWComponents[1], authPWComponents[2]));
  }
  /**
   * Adds the auth password equality matching rule to the provided schema builder.
   *
   * @param builder
   *          where to add the matching rule
   */
  public static void addAuthPasswordEqualityMatchingRule(SchemaBuilder builder)
  {
    builder.buildMatchingRule(EMR_AUTH_PASSWORD_OID)
        .names(EMR_AUTH_PASSWORD_NAME)
        .syntaxOID(SYNTAX_AUTH_PASSWORD_OID).description(EMR_AUTH_PASSWORD_DESCRIPTION)
        .implementation(new AuthPasswordEqualityMatchingRule())
        .addToSchema();
  }
}
opendj-server-legacy/src/main/java/org/opends/server/schema/AuthPasswordEqualityMatchingRuleFactory.java
File was deleted
opendj-server-legacy/src/main/java/org/opends/server/schema/AuthPasswordSyntax.java
@@ -16,15 +16,10 @@
 */
package org.opends.server.schema;
import static org.opends.messages.SchemaMessages.*;
import static org.opends.server.schema.SchemaConstants.*;
import org.forgerock.i18n.LocalizableMessage;
import org.forgerock.opendj.ldap.ByteSequence;
import org.forgerock.opendj.ldap.ResultCode;
import org.forgerock.opendj.ldap.schema.Schema;
import org.forgerock.opendj.ldap.schema.Syntax;
import org.forgerock.opendj.server.config.server.AttributeSyntaxCfg;
import org.opends.server.api.AttributeSyntax;
import org.opends.server.types.DirectoryException;
/**
@@ -33,60 +28,9 @@
 * matching will be allowed by default.
 */
public class AuthPasswordSyntax
       extends AttributeSyntax<AttributeSyntaxCfg>
{
  /**
   * Creates a new instance of this syntax.  Note that the only thing that
   * should be done here is to invoke the default constructor for the
   * superclass.  All initialization should be performed in the
   * <CODE>initializeSyntax</CODE> method.
   */
  public AuthPasswordSyntax()
  {
    super();
  }
  @Override
  public Syntax getSDKSyntax(Schema schema)
  {
    return schema.getSyntax(SchemaConstants.SYNTAX_AUTH_PASSWORD_OID);
  }
  /**
   * Retrieves the common name for this attribute syntax.
   *
   * @return  The common name for this attribute syntax.
   */
  @Override
  public String getName()
  {
    return SYNTAX_AUTH_PASSWORD_NAME;
  }
  /**
   * Retrieves the OID for this attribute syntax.
   *
   * @return  The OID for this attribute syntax.
   */
  @Override
  public String getOID()
  {
    return SYNTAX_AUTH_PASSWORD_OID;
  }
  /**
   * Retrieves a description for this attribute syntax.
   *
   * @return  A description for this attribute syntax.
   */
  @Override
  public String getDescription()
  {
    return SYNTAX_AUTH_PASSWORD_DESCRIPTION;
  }
  /**
   * Decodes the provided authentication password value into its component parts.
   * <p>
   * FIXME this is a duplicate of {@link org.forgerock.opendj.ldap.schema.AuthPasswordSyntaxImpl}
opendj-server-legacy/src/main/java/org/opends/server/schema/BinarySyntax.java
File was deleted
opendj-server-legacy/src/main/java/org/opends/server/schema/BitStringSyntax.java
File was deleted
opendj-server-legacy/src/main/java/org/opends/server/schema/BooleanSyntax.java
File was deleted
opendj-server-legacy/src/main/java/org/opends/server/schema/CertificateExactAssertionSyntax.java
File was deleted
opendj-server-legacy/src/main/java/org/opends/server/schema/CertificateListSyntax.java
File was deleted
opendj-server-legacy/src/main/java/org/opends/server/schema/CertificatePairSyntax.java
File was deleted
opendj-server-legacy/src/main/java/org/opends/server/schema/CollationMatchingRuleFactory.java
File was deleted
opendj-server-legacy/src/main/java/org/opends/server/schema/DITContentRuleSyntax.java
File was deleted
opendj-server-legacy/src/main/java/org/opends/server/schema/DITStructureRuleSyntax.java
File was deleted
opendj-server-legacy/src/main/java/org/opends/server/schema/DeliveryMethodSyntax.java
File was deleted
opendj-server-legacy/src/main/java/org/opends/server/schema/DistinguishedNameSyntax.java
File was deleted
opendj-server-legacy/src/main/java/org/opends/server/schema/EnhancedGuideSyntax.java
File was deleted
opendj-server-legacy/src/main/java/org/opends/server/schema/FaxNumberSyntax.java
File was deleted
opendj-server-legacy/src/main/java/org/opends/server/schema/FaxSyntax.java
File was deleted
opendj-server-legacy/src/main/java/org/opends/server/schema/GeneralizedTimeSyntax.java
@@ -18,8 +18,7 @@
package org.opends.server.schema;
import static org.opends.messages.SchemaMessages.*;
import static org.opends.server.schema.SchemaConstants.*;
import static org.opends.server.util.ServerConstants.*;
import static org.opends.server.util.ServerConstants.TIME_ZONE_UTC;
import java.util.Calendar;
import java.util.Date;
@@ -31,10 +30,6 @@
import org.forgerock.opendj.ldap.ByteSequence;
import org.forgerock.opendj.ldap.ByteString;
import org.forgerock.opendj.ldap.ResultCode;
import org.forgerock.opendj.ldap.schema.Schema;
import org.forgerock.opendj.ldap.schema.Syntax;
import org.forgerock.opendj.server.config.server.AttributeSyntaxCfg;
import org.opends.server.api.AttributeSyntax;
import org.opends.server.types.DirectoryException;
/**
@@ -45,7 +40,6 @@
 * offset like "-0500" for representing values that are not in UTC.
 */
public class GeneralizedTimeSyntax
       extends AttributeSyntax<AttributeSyntaxCfg>
{
  private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass();
@@ -54,57 +48,6 @@
      TimeZone.getTimeZone(TIME_ZONE_UTC);
  /**
   * Creates a new instance of this syntax.  Note that the only thing that
   * should be done here is to invoke the default constructor for the
   * superclass.  All initialization should be performed in the
   * <CODE>initializeSyntax</CODE> method.
   */
  public GeneralizedTimeSyntax()
  {
    super();
  }
  /** {@inheritDoc} */
  @Override
  public Syntax getSDKSyntax(Schema schema)
  {
    return schema.getSyntax(SchemaConstants.SYNTAX_GENERALIZED_TIME_OID);
  }
  /**
   * Retrieves the common name for this attribute syntax.
   *
   * @return  The common name for this attribute syntax.
   */
  @Override
  public String getName()
  {
    return SYNTAX_GENERALIZED_TIME_NAME;
  }
  /**
   * Retrieves the OID for this attribute syntax.
   *
   * @return  The OID for this attribute syntax.
   */
  @Override
  public String getOID()
  {
    return SYNTAX_GENERALIZED_TIME_OID;
  }
  /**
   * Retrieves a description for this attribute syntax.
   *
   * @return  A description for this attribute syntax.
   */
  @Override
  public String getDescription()
  {
    return SYNTAX_GENERALIZED_TIME_DESCRIPTION;
  }
  /**
   * Retrieves the generalized time representation of the provided date.
   *
   * @param  d  The date to retrieve in generalized time form.
opendj-server-legacy/src/main/java/org/opends/server/schema/GuideSyntax.java
File was deleted
opendj-server-legacy/src/main/java/org/opends/server/schema/IA5StringSyntax.java
File was deleted
opendj-server-legacy/src/main/java/org/opends/server/schema/IntegerSyntax.java
File was deleted
opendj-server-legacy/src/main/java/org/opends/server/schema/LDAPSyntaxDescriptionSyntax.java
File was deleted
opendj-server-legacy/src/main/java/org/opends/server/schema/MatchingRuleSyntax.java
File was deleted
opendj-server-legacy/src/main/java/org/opends/server/schema/MatchingRuleUseSyntax.java
File was deleted
opendj-server-legacy/src/main/java/org/opends/server/schema/NameAndOptionalUIDSyntax.java
File was deleted
opendj-server-legacy/src/main/java/org/opends/server/schema/NameFormSyntax.java
File was deleted
opendj-server-legacy/src/main/java/org/opends/server/schema/NumericStringSyntax.java
File was deleted
opendj-server-legacy/src/main/java/org/opends/server/schema/OIDSyntax.java
File was deleted
opendj-server-legacy/src/main/java/org/opends/server/schema/ObjectClassSyntax.java
File was deleted
opendj-server-legacy/src/main/java/org/opends/server/schema/OctetStringSyntax.java
File was deleted
opendj-server-legacy/src/main/java/org/opends/server/schema/OtherMailboxSyntax.java
File was deleted
opendj-server-legacy/src/main/java/org/opends/server/schema/PostalAddressSyntax.java
File was deleted
opendj-server-legacy/src/main/java/org/opends/server/schema/PresentationAddressSyntax.java
File was deleted
opendj-server-legacy/src/main/java/org/opends/server/schema/PrintableStringSyntax.java
File was deleted
opendj-server-legacy/src/main/java/org/opends/server/schema/ProtocolInformationSyntax.java
File was deleted
opendj-server-legacy/src/main/java/org/opends/server/schema/SchemaFilesWriter.java
File was renamed from opendj-server-legacy/src/main/java/org/opends/server/schema/SchemaWriter.java
@@ -86,7 +86,7 @@
/**
 * Provides support to write schema files to disk.
 */
class SchemaWriter
class SchemaFilesWriter
{
  private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass();
@@ -106,7 +106,7 @@
   * @param serverContext
   *            The server context.
   */
  public SchemaWriter(ServerContext serverContext)
  public SchemaFilesWriter(ServerContext serverContext)
  {
    this.serverContext = serverContext;
  }
opendj-server-legacy/src/main/java/org/opends/server/schema/SchemaHandler.java
@@ -134,7 +134,7 @@
  private volatile Schema schema;
  /** Writer which persists schema to disk. */
  private SchemaWriter schemaWriter;
  private SchemaFilesWriter schemaWriter;
  /**
   * The list of offline modifications made to the schema.
@@ -207,7 +207,7 @@
  public void initialize(final ServerContext serverContext) throws InitializationException, ConfigException
  {
    this.serverContext = serverContext;
    this.schemaWriter = new SchemaWriter(serverContext);
    this.schemaWriter = new SchemaFilesWriter(serverContext);
    exclusiveLock.lock();
    try
opendj-server-legacy/src/main/java/org/opends/server/schema/SubstringAssertionSyntax.java
File was deleted
opendj-server-legacy/src/main/java/org/opends/server/schema/SubtreeSpecificationSyntax.java
File was deleted
opendj-server-legacy/src/main/java/org/opends/server/schema/SupportedAlgorithmSyntax.java
File was deleted
opendj-server-legacy/src/main/java/org/opends/server/schema/TeletexTerminalIdentifierSyntax.java
File was deleted
opendj-server-legacy/src/main/java/org/opends/server/schema/TelexNumberSyntax.java
File was deleted
opendj-server-legacy/src/main/java/org/opends/server/schema/UTCTimeSyntax.java
File was deleted
opendj-server-legacy/src/main/java/org/opends/server/schema/UUIDSyntax.java
File was deleted
opendj-server-legacy/src/main/java/org/opends/server/schema/UserPasswordEqualityMatchingRule.java
@@ -16,13 +16,10 @@
 */
package org.opends.server.schema;
import static org.opends.server.schema.SchemaConstants.*;
import org.forgerock.i18n.slf4j.LocalizedLogger;
import org.forgerock.opendj.ldap.ByteSequence;
import org.forgerock.opendj.ldap.ByteString;
import org.forgerock.opendj.ldap.ConditionResult;
import org.forgerock.opendj.ldap.schema.SchemaBuilder;
import org.opends.server.api.PasswordStorageScheme;
import static org.opends.server.core.DirectoryServer.*;
@@ -34,7 +31,7 @@
 * This matching rule serves a similar purpose to the equivalent
 * AuthPasswordEqualityMatchingRule defined in RFC 3112 (http://tools.ietf.org/html/rfc3112).
 */
public class UserPasswordEqualityMatchingRule extends AbstractPasswordEqualityMatchingRuleImpl
final class UserPasswordEqualityMatchingRule extends AbstractPasswordEqualityMatchingRuleImpl
{
  private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass();
@@ -69,19 +66,4 @@
        storageScheme.passwordMatches(assertionValue, ByteString.valueOfUtf8(userPWComponents[1])));
  }
  /**
   * Adds the user password equality matching rule to the provided schema builder.
   *
   * @param builder
   *          where to add the matching rule
   */
  public static void addUserPasswordEqualityMatchingRule(SchemaBuilder builder)
  {
    builder.buildMatchingRule(EMR_USER_PASSWORD_OID)
      .names(EMR_USER_PASSWORD_NAME)
      .syntaxOID(SYNTAX_OCTET_STRING_OID).description(EMR_USER_PASSWORD_DESCRIPTION)
      .implementation(new UserPasswordEqualityMatchingRule())
      .addToSchema();
  }
}
opendj-server-legacy/src/main/java/org/opends/server/schema/UserPasswordEqualityMatchingRuleFactory.java
File was deleted
opendj-server-legacy/src/main/java/org/opends/server/schema/UserPasswordSyntax.java
@@ -15,18 +15,13 @@
 * Portions Copyright 2012-2016 ForgeRock AS.
 */
package org.opends.server.schema;
import static org.opends.messages.SchemaMessages.*;
import static org.opends.server.schema.SchemaConstants.*;
import static org.opends.server.util.StaticUtils.*;
import static org.opends.server.util.StaticUtils.toLowerCase;
import org.forgerock.i18n.LocalizableMessage;
import org.forgerock.i18n.slf4j.LocalizedLogger;
import org.forgerock.opendj.ldap.ByteSequence;
import org.forgerock.opendj.ldap.ResultCode;
import org.forgerock.opendj.ldap.schema.Schema;
import org.forgerock.opendj.ldap.schema.Syntax;
import org.forgerock.opendj.server.config.server.AttributeSyntaxCfg;
import org.opends.server.api.AttributeSyntax;
import org.opends.server.types.DirectoryException;
@@ -47,64 +42,9 @@
 * </UL>
 */
public class UserPasswordSyntax
       extends AttributeSyntax<AttributeSyntaxCfg>
{
  private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass();
  /**
   * Creates a new instance of this syntax.  Note that the only thing that
   * should be done here is to invoke the default constructor for the
   * superclass.  All initialization should be performed in the
   * <CODE>initializeSyntax</CODE> method.
   */
  public UserPasswordSyntax()
  {
    super();
  }
  /** {@inheritDoc} */
  @Override
  public Syntax getSDKSyntax(Schema schema)
  {
    return schema.getSyntax(SchemaConstants.SYNTAX_USER_PASSWORD_OID);
  }
  /**
   * Retrieves the common name for this attribute syntax.
   *
   * @return  The common name for this attribute syntax.
   */
  @Override
  public String getName()
  {
    return SYNTAX_USER_PASSWORD_NAME;
  }
  /**
   * Retrieves the OID for this attribute syntax.
   *
   * @return  The OID for this attribute syntax.
   */
  @Override
  public String getOID()
  {
    return SYNTAX_USER_PASSWORD_OID;
  }
  /**
   * Retrieves a description for this attribute syntax.
   *
   * @return  A description for this attribute syntax.
   */
  @Override
  public String getDescription()
  {
    return SYNTAX_USER_PASSWORD_DESCRIPTION;
  }
  /**
   * Decodes the provided user password value into its component parts.
   *
opendj-server-legacy/src/main/java/org/opends/server/util/SchemaUtils.java
@@ -16,7 +16,6 @@
package org.opends.server.util;
import static org.opends.messages.SchemaMessages.*;
import static org.opends.server.util.ServerConstants.SCHEMA_PROPERTY_FILENAME;
import static org.opends.server.schema.SchemaConstants.SYNTAX_AUTH_PASSWORD_OID;
import static org.opends.server.schema.SchemaConstants.SYNTAX_USER_PASSWORD_OID;
@@ -28,6 +27,7 @@
import org.forgerock.i18n.LocalizableMessage;
import org.forgerock.i18n.LocalizableMessageDescriptor.Arg1;
import org.forgerock.opendj.ldap.ByteString;
import org.forgerock.opendj.ldap.ResultCode;
import org.forgerock.opendj.ldap.schema.AttributeType;
import org.forgerock.opendj.ldap.schema.ObjectClass;
@@ -81,6 +81,19 @@
  }
  /**
   * Retrieves an attribute value containing a representation of the provided
   * boolean value.
   *
   * @param  b  The boolean value for which to retrieve the attribute value.
   *
   * @return  The attribute value created from the provided boolean value.
   */
  public static ByteString createBooleanValue(boolean b)
  {
    return b ? ServerConstants.TRUE_VALUE : ServerConstants.FALSE_VALUE;
  }
  /**
   * Retrieves the definition string used to create the provided schema element and including the
   * X-SCHEMA-FILE extension.
   *
opendj-server-legacy/src/test/java/org/opends/server/schema/AttributeSyntaxTest.java
File was deleted
opendj-server-legacy/src/test/java/org/opends/server/schema/AuthPasswordEqualityMatchingRuleTest.java
File was deleted
opendj-server-legacy/src/test/java/org/opends/server/schema/BinaryAttributeSyntaxTest.java
File was deleted
opendj-server-legacy/src/test/java/org/opends/server/schema/BitStringSyntaxTest.java
File was deleted
opendj-server-legacy/src/test/java/org/opends/server/schema/DITContentRuleSyntaxTest.java
File was deleted
opendj-server-legacy/src/test/java/org/opends/server/schema/GeneralizedTimeSyntaxTest.java
@@ -12,18 +12,18 @@
 * information: "Portions Copyright [year] [name of copyright owner]".
 *
 * Copyright 2006-2009 Sun Microsystems, Inc.
 * Portions Copyright 2015 ForgeRock AS.
 * Portions Copyright 2015-2016 ForgeRock AS.
 */
package org.opends.server.schema;
import static org.opends.server.util.ServerConstants.*;
import static org.opends.server.util.ServerConstants.TIME_ZONE_UTC;
import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;
import java.util.TimeZone;
import org.opends.server.api.AttributeSyntax;
import org.opends.server.DirectoryServerTestCase;
import org.opends.server.util.RemoveOnceSDKSchemaIsUsed;
import org.testng.Assert;
import org.testng.annotations.DataProvider;
@@ -33,54 +33,8 @@
 * Test the GeneralizedTimeSyntax.
 */
@RemoveOnceSDKSchemaIsUsed
public class GeneralizedTimeSyntaxTest extends AttributeSyntaxTest
public class GeneralizedTimeSyntaxTest extends DirectoryServerTestCase
{
  /** {@inheritDoc} */
  @Override
  protected AttributeSyntax getRule()
  {
    return new GeneralizedTimeSyntax();
  }
  @Override
  @DataProvider(name="acceptableValues")
  public Object[][] createAcceptableValues()
  {
    return new Object [][] {
        {"2006090613Z", true},
        {"20060906135030+01", true},
        {"200609061350Z", true},
        {"20060906135030Z", true},
        {"20061116135030Z", true},
        {"20061126135030Z", true},
        {"20061231235959Z", true},
        {"20060906135030+0101", true},
        {"20060906135030+2359", true},
        {"20060906135030+3359", false},
        {"20060906135030+2389", false},
        {"20060906135030+2361", false},
        {"20060906135030+", false},
        {"20060906135030+0", false},
        {"20060906135030+010", false},
        {"20061200235959Z", false},
        {"2006121a235959Z", false},
        {"2006122a235959Z", false},
        {"20060031235959Z", false},
        {"20061331235959Z", false},
        {"20062231235959Z", false},
        {"20061232235959Z", false},
        {"2006123123595aZ", false},
        {"200a1231235959Z", false},
        {"2006j231235959Z", false},
        {"200612-1235959Z", false},
        {"20061231#35959Z", false},
        {"2006", false},
    };
  }
  /**
   * Create data for format(...) tests.
   *
opendj-server-legacy/src/test/java/org/opends/server/schema/GuideSyntaxTest.java
File was deleted
opendj-server-legacy/src/test/java/org/opends/server/schema/IA5StringSyntaxTest.java
File was deleted
opendj-server-legacy/src/test/java/org/opends/server/schema/IntegerSyntaxTest.java
File was deleted
opendj-server-legacy/src/test/java/org/opends/server/schema/LDAPSyntaxTest.java
File was deleted
opendj-server-legacy/src/test/java/org/opends/server/schema/MatchingRuleSyntaxTest.java
File was deleted
opendj-server-legacy/src/test/java/org/opends/server/schema/MatchingRuleUseSyntaxTest.java
File was deleted
opendj-server-legacy/src/test/java/org/opends/server/schema/OtherMailboxSyntaxTest.java
File was deleted
opendj-server-legacy/src/test/java/org/opends/server/schema/TelexSyntaxTest.java
File was deleted
opendj-server-legacy/src/test/java/org/opends/server/schema/UUIDSyntaxTest.java
File was deleted
opendj-server-legacy/src/test/java/org/opends/server/schema/UserPasswordEqualityMatchingRuleTest.java
@@ -21,11 +21,14 @@
import org.opends.server.core.DirectoryServer;
import org.opends.server.extensions.InitializationUtils;
import org.opends.server.extensions.SaltedMD5PasswordStorageScheme;
import org.forgerock.opendj.config.server.ConfigException;
import org.forgerock.opendj.ldap.Assertion;
import org.forgerock.opendj.ldap.ByteString;
import org.forgerock.opendj.ldap.ConditionResult;
import org.forgerock.opendj.ldap.DecodeException;
import org.forgerock.opendj.ldap.schema.MatchingRule;
import org.forgerock.opendj.ldap.schema.Schema;
import org.forgerock.opendj.ldap.schema.SchemaBuilder;
import org.forgerock.opendj.ldap.DN;
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
@@ -105,17 +108,11 @@
    assertEquals(liveResult, ConditionResult.valueOf(result));
  }
  private MatchingRule getRule()
  private MatchingRule getRule() throws ConfigException
  {
    UserPasswordEqualityMatchingRuleFactory factory = new UserPasswordEqualityMatchingRuleFactory();
    try
    {
      factory.initializeMatchingRule(null);
    }
    catch (Exception ex) {
      throw new RuntimeException(ex);
    }
    return factory.getMatchingRules().iterator().next();
    SchemaBuilder schemaBuilder = new SchemaBuilder(Schema.getCoreSchema());
    SchemaHandler.addServerSyntaxesAndMatchingRules(schemaBuilder);
    return schemaBuilder.toSchema().getMatchingRule(SchemaConstants.EMR_USER_PASSWORD_OID);
  }
}