Package org.nasutekds.server.util

Examples of org.nasutekds.server.util.LDIFReader.readEntry()


        continue;
      }

      LDIFImportConfig importConfig = new LDIFImportConfig(f.getAbsolutePath());
      LDIFReader reader = new LDIFReader(importConfig);
      Entry e = reader.readEntry();
      reader.close();

      if (e == null)
      {
        // An empty schema file.  This is OK.
View Full Code Here


        throw new LDIFException(ERR_LDIF_REPRESENTATION_REQUIRED.get());
      }

      ldifImportConfig = new LDIFImportConfig(new StringReader(ldif));
      LDIFReader reader = new LDIFReader(ldifImportConfig);
      entry = reader.readEntry(checkSchema());
      if (entry == null)
      {
        throw new LDIFException(ERR_LDIF_REPRESENTATION_REQUIRED.get());
      }
      else
View Full Code Here

    {
      String ldif = getLDIF();

      ldifImportConfig = new LDIFImportConfig(new StringReader(ldif));
      LDIFReader reader = new LDIFReader(ldifImportConfig);
      entry = reader.readEntry(checkSchema());
      addValuesInRDN(entry);
    }
    catch (IOException ioe)
    {
      throw new OnlineUpdateException(
View Full Code Here

          "ds-cfg-backend-id: " + backendId);

      LDIFImportConfig ldifImportConfig = new LDIFImportConfig(
          new StringReader(ldif));
      LDIFReader reader = new LDIFReader(ldifImportConfig);
      Entry backendConfigEntry = reader.readEntry();
      if (!DirectoryServer.getConfigHandler().entryExists(backendConfigEntryDN))
      {
        // Add the replication backend
        DirectoryServer.getConfigHandler().addEntry(backendConfigEntry, null);
      }
View Full Code Here

          {
            Writer writer = new Writer();
            LDIFWriter ldifWriter2 = writer.getLDIFWriter();
            ldifWriter2.writeChangeRecord(changeRecord);
            LDIFReader reader = writer.getLDIFReader();
            entry = reader.readEntry();
          }
        }
        else if (msg instanceof ModifyMsg)
        {
          ModifyOperation op = (ModifyOperation)msg.createOperation(conn);
View Full Code Here

          {
            Writer writer = new Writer();
            LDIFWriter ldifWriter2 = writer.getLDIFWriter();
            ldifWriter2.writeChangeRecord(changeRecord);
            LDIFReader reader = writer.getLDIFReader();
            entry = reader.readEntry();
          }
        }
        else if (msg instanceof ModifyDNMsg)
        {
          ModifyDNOperation op = (ModifyDNOperation)msg.createOperation(conn);
View Full Code Here

          {
            Writer writer = new Writer();
            LDIFWriter ldifWriter2 = writer.getLDIFWriter();
            ldifWriter2.writeChangeRecord(changeRecord);
            LDIFReader reader = writer.getLDIFReader();
            Entry modDNEntry = reader.readEntry();
            entry = modDNEntry;
          }
        }

        if (exportConfig != null)
View Full Code Here

    // Read the LDIF entry from the file and close the file.
    Entry entry;
    try
    {
      entry = reader.readEntry(false);

      if (entry == null)
      {
        // The file was empty -- skip it.
        reader.close();
View Full Code Here

    }

    // If there are any more entries in the file, then print a warning message.
    try
    {
      Entry e = reader.readEntry(false);
      if (e != null)
      {
        Message message = WARN_CONFIG_SCHEMA_MULTIPLE_ENTRIES_IN_FILE.get(
            schemaFile, schemaDirPath);
        logError(message);
View Full Code Here

    boolean schemaDefined = false;
    LDIFReader reader = null;
    try
    {
      reader = new LDIFReader(new LDIFImportConfig(schemaFile));
      Entry entry = reader.readEntry();
      if (entry != null)
      {
        schemaDefined = true;
      }
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.