Examples of AddMsg


Examples of org.nasutekds.server.replication.protocol.AddMsg

    // Get the meat fro the ecl msg
    UpdateMsg msg = eclmsg.getUpdateMsg();

    if (msg instanceof AddMsg)
    {
      AddMsg addMsg = (AddMsg)msg;

      // Map the addMsg to an LDIF string for the 'changes' attribute
      String LDIFchanges = addMsgToLDIFString(addMsg);

      ArrayList<RawAttribute> eclAttributes = addMsg.getEclIncludes();

      clEntry = createChangelogEntry(
          eclmsg.getServiceId(),
          eclmsg.getCookie().toString(),
          DN.decode(addMsg.getDn()),
          addMsg.getChangeNumber(),
          LDIFchanges, // entry as created (in LDIF format)
          addMsg.getUniqueId(),
          null, // real time current entry
          eclAttributes, // entry attributes
          eclmsg.getDraftChangeNumber(),
      "add", null);
View Full Code Here

Examples of org.nasutekds.server.replication.protocol.AddMsg

        // was correctly generated :
        // - the dn should be dn1,
        // - the entry id and the parent id should match the ids from the entry
        FakeAddOperation addOp = (FakeAddOperation) op;
        assertTrue(addOp.getChangeNumber() != null);
        AddMsg addmsg = addOp.generateMessage();
        assertTrue(dn1.equals(DN.decode(addmsg.getDn())));
        assertTrue(addmsg.getUniqueId().equals(EntryHistorical.getEntryUuid(entry)));
        String parentId = LDAPReplicationDomain.findEntryId(dn1.getParent());
        assertTrue(addmsg.getParentUid().equals(parentId));
        addmsg.createOperation(InternalClientConnection.getRootConnection());
      } else
      {
        if (count == 1)
        {
          // The first operation should be an ADD operation.
View Full Code Here

Examples of org.nasutekds.server.replication.protocol.AddMsg

    {
      fail(e.getMessage());
    }

    // Create and publish an update message to add an entry.
    AddMsg addMsg = new AddMsg(cn,
        personWithUUIDEntry.getDN().toString(),
        user1entryUUID,
        baseUUID,
        personWithUUIDEntry.getObjectClassAttribute(),
        personWithUUIDEntry.getAttributes(), new ArrayList<Attribute>());
View Full Code Here

Examples of org.nasutekds.server.replication.protocol.AddMsg

      {
        fail(e.getMessage());
      }

      // Create an update message to add an entry.
      AddMsg addMsg = new AddMsg(gen.newChangeNumber(),
        entry.getDN().toString(),
        ENTRY_UUID,
        null,
        entry.getObjectClassAttribute(),
        entry.getAttributes(), new ArrayList<Attribute>());
View Full Code Here

Examples of org.nasutekds.server.replication.protocol.AddMsg

      {
        fail(e.getMessage());
      }

      // Create an update message to add an entry.
      AddMsg addMsg = new AddMsg(gen.newChangeNumber(),
        entry.getDN().toString(),
        ENTRY_UUID,
        null,
        entry.getObjectClassAttribute(),
        entry.getAttributes(), new ArrayList<Attribute>());

      replicationDomain.publish(addMsg);

      /*
       * check that entry has been created and has attribute values from RDN
       * only
       */

      Entry newEntry = null;
      try
      {
        newEntry = getEntry(entry.getDN(), TIMEOUT, true);
      } catch(Exception e)
      {
        fail("Entry has not been added: " + e.getMessage());
      }
      assertNotNull(newEntry);
      assertEquals(entry.getDN(), newEntry.getDN());
      ObjectClass objectClass = DirectoryServer.getObjectClass("inetOrgPerson".toLowerCase());
      assertTrue(newEntry.hasObjectClass(objectClass));
      checkEntryAttributeValue(newEntry, "displayName", "ValueToBeKept");

      /**
       * Now perform same test, but with 2 forbidden attributes in RDN, using '+'
       */

      /*
       * Perform add operation with fornbidden attribute in RDN
       */

      entryLdif = "dn: displayName=ValueToBeKept+description=ValueToBeKeptToo," +
        TEST_ROOT_DN_STRING + "\n" + "objectClass: top\n" +
        "objectClass: person\n" + "objectClass: organizationalPerson\n" +
        "objectClass: inetOrgPerson\n" + "entryUUID: " + ENTRY_UUID2 + "\n" +
        "sn: snValue\n" + "cn: cnValue\n" +
        "displayName: ValueToBeKept\ndisplayName: displayNameValue\n" +
        "description: descriptionValue\ndescription: ValueToBeKeptToo\n";

      try
      {
        entry = TestCaseUtils.entryFromLdifString(entryLdif);
      } catch (Exception e)
      {
        fail(e.getMessage());
      }

      // Create an update message to add an entry.
      addMsg = new AddMsg(gen.newChangeNumber(),
        entry.getDN().toString(),
        ENTRY_UUID2,
        null,
        entry.getObjectClassAttribute(),
        entry.getAttributes(), new ArrayList<Attribute>());
View Full Code Here

Examples of org.nasutekds.server.replication.protocol.AddMsg

      {
        fail(e.getMessage());
      }

      // Create an update message to add an entry.
      AddMsg addMsg = new AddMsg(gen.newChangeNumber(),
        entry.getDN().toString(),
        ENTRY_UUID,
        null,
        entry.getObjectClassAttribute(),
        entry.getAttributes(), new ArrayList<Attribute>());

      replicationDomain.publish(addMsg);

      /*
       * check that entry has been created and has attribute values from RDN
       * only
       */

      Entry newEntry = null;
      try
      {
        newEntry = getEntry(entry.getDN(), TIMEOUT, true);
      } catch(Exception e)
      {
        fail("Entry has not been added: " + e.getMessage());
      }
      assertNotNull(newEntry);
      assertEquals(entry.getDN(), newEntry.getDN());
      ObjectClass objectClass = DirectoryServer.getObjectClass("inetOrgPerson".toLowerCase());
      assertTrue(newEntry.hasObjectClass(objectClass));
      checkEntryAttributeValue(newEntry, "displayName", "ValueToBeKept");
      checkEntryAttributeValue(newEntry, "carLicense", "cirLicenseValue");

      /**
       * Now perform same test, but with 2 forbidden attributes in RDN, using '+'
       */

      /*
       * Perform add operation with fornbidden attribute in RDN
       */

      entryLdif = "dn: displayName=ValueToBeKept+description=ValueToBeKeptToo," +
        TEST_ROOT_DN_STRING + "\n" + "objectClass: top\n" +
        "objectClass: person\n" + "objectClass: organizationalPerson\n" +
        "objectClass: inetOrgPerson\n" + "sn: snValue\n" + "cn: cnValue\n" +
        "entryUUID: " + ENTRY_UUID2 + "\n" +
        "displayName: ValueToBeKept\ndisplayName: displayNameValue\n" +
        "description: descriptionValue\ndescription: ValueToBeKeptToo\n" +
        "carLicense: cirLicenseValue\n";

      try
      {
        entry = TestCaseUtils.entryFromLdifString(entryLdif);
      } catch (Exception e)
      {
        fail(e.getMessage());
      }

      // Create an update message to add an entry.
      addMsg = new AddMsg(gen.newChangeNumber(),
        entry.getDN().toString(),
        ENTRY_UUID2,
        null,
        entry.getObjectClassAttribute(),
        entry.getAttributes(), new ArrayList<Attribute>());
View Full Code Here

Examples of org.nasutekds.server.replication.protocol.AddMsg

      {
        fail(e.getMessage());
      }

      // Create an update message to add an entry.
      AddMsg addMsg = new AddMsg(gen.newChangeNumber(),
        entry.getDN().toString(),
        ENTRY_UUID,
        null,
        entry.getObjectClassAttribute(),
        entry.getAttributes(), new ArrayList<Attribute>());
View Full Code Here

Examples of org.nasutekds.server.replication.protocol.AddMsg

      {
        fail(e.getMessage());
      }

      // Create an update message to add an entry.
      AddMsg addMsg = new AddMsg(gen.newChangeNumber(),
        entry.getDN().toString(),
        ENTRY_UUID,
        null,
        entry.getObjectClassAttribute(),
        entry.getAttributes(), new ArrayList<Attribute>());
View Full Code Here

Examples of org.nasutekds.server.replication.protocol.AddMsg

            debugInfo("Broker " + serverId +
              " writer starting sending changes session at: " + startSessionTime);
            dbg1Written = true;
            dbg2Written = false;
          }
          AddMsg addMsg = createNextAddMsg();
          rb.publish(addMsg);
          // End session if amount of changes sent has been requested
          if (careAboutAmountOfChanges)
          {
            nChangesSent++;
View Full Code Here

Examples of org.nasutekds.server.replication.protocol.AddMsg

      {
        fail(e.getMessage());
      }

      // Create an update message to add an entry.
      AddMsg addMsg = new AddMsg(gen.newChangeNumber(),
        personWithUUIDEntry.getDN().toString(),
        userEntryUUID,
        null,
        personWithUUIDEntry.getObjectClassAttribute(),
        personWithUUIDEntry.getAttributes(), new ArrayList<Attribute>());
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.