Package org.nasutekds.server.backends

Examples of org.nasutekds.server.backends.SchemaTestMatchingRule


    long beforeModifyTimestamp =
              DirectoryServer.getSchema().getYoungestModificationTime();
    Thread.sleep(2);


    SchemaTestMatchingRule matchingRule =
         new SchemaTestMatchingRule("testAddValidSchemaFileMatch",
                                    "1.3.6.1.4.1.26027.1.999.23");
    DirectoryServer.registerMatchingRule(matchingRule, false);


    String schemaDirectory = SchemaConfigManager.getSchemaDirectoryPath(true);
View Full Code Here



    String schemaDirectory = SchemaConfigManager.getSchemaDirectoryPath(true);


    SchemaTestMatchingRule matchingRule1 =
         new SchemaTestMatchingRule("testAddMultipleValidSchemaFiles1Match",
                                    "1.3.6.1.4.1.26027.1.999.24");
    DirectoryServer.registerMatchingRule(matchingRule1, false);

    String[] fileLines1 =
    {
      "dn: cn=schema",
      "objectClass: top",
      "objectClass: ldapSubentry",
      "objectClass: subschema",
      "attributeTypes: ( testaddmultiplevalidschemafiles1at-oid " +
           "NAME 'testAddMultipleValidSchemaFiles1AT' )",
      "objectClasses: ( testaddmultiplevalidschemafiles1oc-oid " +
           "NAME 'testAddMultipleValidSchemaFiles1OC' STRUCTURAL " +
           "MUST testAddMultipleValidSchemaFiles1AT )",
      "nameForms: ( testaddmultiplevalidschemafiles1nf-oid " +
           "NAME 'testAddMultipleValidSchemaFiles1NF' " +
           "OC testAddMultipleValidSchemaFiles1OC " +
           "MUST testAddMultipleValidSchemaFiles1AT )",
      "dITContentRules: ( testaddmultiplevalidschemafiles1oc-oid " +
           "NAME 'testAddMultipleValidSchemaFiles1DCR' MAY description )",
      "dITStructureRules: ( 999017 " +
           "NAME 'testAddMultipleValidSchemaFiles1DSR' " +
           "FORM testAddMultipleValidSchemaFiles1NF )",
      "matchingRuleUse: ( 1.3.6.1.4.1.26027.1.999.24 " +
           "NAME 'testAddMultipleValidSchemaFiles1MRU' " +
           "APPLIES testAddMultipleValidSchemaFiles1AT )"
    };

    File validFile1 = new File(schemaDirectory, "05-multiple-valid-1.ldif");
    BufferedWriter writer1 = new BufferedWriter(new FileWriter(validFile1));
    for (String line : fileLines1)
    {
      writer1.write(line);
      writer1.newLine();
    }
    writer1.close();


    SchemaTestMatchingRule matchingRule2 =
         new SchemaTestMatchingRule("testAddMultipleValidSchemaFiles2Match",
                                    "1.3.6.1.4.1.26027.1.999.25");
    DirectoryServer.registerMatchingRule(matchingRule2, false);

    String[] fileLines2 =
    {
View Full Code Here

TOP

Related Classes of org.nasutekds.server.backends.SchemaTestMatchingRule

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.