| | |
| | | Map<AttributeType, List<Attribute>> operationalAttributes = entry |
| | | .getOperationalAttributes(); |
| | | operationalAttributes.put(Historical.entryuuidAttrType, uuidList); |
| | | |
| | | |
| | | // Create the att values list of historicalAttr |
| | | String stringVal = |
| | | "ds-sync-hist:00000108b3a6cbb800000001:repl:00000108b3a6cbb800000002"; |
| | |
| | | |
| | | //Add the historical att in the entry |
| | | operationalAttributes.put(Historical.historicalAttrType,histList) ; |
| | | |
| | | |
| | | // load historical from the entry |
| | | Historical hist = Historical.load(entry); |
| | | |
| | |
| | | |
| | | // Get the historical uuid associated to the entry |
| | | // (the one that needs to be tested) |
| | | String uuid = hist.getEntryUuid(entry); |
| | | String uuid = Historical.getEntryUuid(entry); |
| | | |
| | | // Get the Entry uuid in String format |
| | | List<Attribute> uuidAttrs = entry |
| | |
| | | assertTrue(retrievedUuid.equals(uuid)); |
| | | } |
| | | } |
| | | |
| | | try |
| | | { |
| | | Historical dup = hist.duplicate(); |
| | | // TODO Check values |
| | | } |
| | | catch (RuntimeException e) |
| | | { |
| | | assertTrue(false) ; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | // Test FakeOperation |
| | | try |
| | | { |
| | |
| | | { |
| | | UpdateMessage new_name = (UpdateMessage) generatedMsg; |
| | | assertEquals(new_name.getUniqueId(),uuid); |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | } |
| | | catch (RuntimeException e) |
| | | { |
| | |
| | | |
| | | // Get the historical uuid associated to the entry |
| | | // (the one that needs to be tested) |
| | | String uuid = hist.getEntryUuid(addOp); |
| | | String uuid = Historical.getEntryUuid(addOp); |
| | | |
| | | // Get the op uuid in String format |
| | | List<Attribute> uuidAttrs = addOp.getOperationalAttributes().get( |
| | |
| | | .getOperationalAttributes(); |
| | | |
| | | operationalAttributes.put(Historical.entryuuidAttrType, uuidList); |
| | | |
| | | |
| | | // Create the att values list of historicalAttr |
| | | String stringVal = |
| | | "ds-sync-hist:00000108b3a6cbb800000001:del:00000108b3a6cbb800000002"; |
| | |
| | | ArrayList<Attribute> histList = new ArrayList<Attribute>(1); |
| | | Attribute histAttr = new Attribute(Historical.historicalAttrType, |
| | | "ds-sync-hist", valuesHist); |
| | | histList.add(0, histAttr); |
| | | |
| | | //Add the historical att in the entry |
| | | entry.putAttribute(Historical.historicalAttrType,histList) ; |
| | | |
| | | |
| | | // load historical from the entry |
| | | |
| | | Historical hist = Historical.load(entry); |
| | |
| | | |
| | | //Add the historycal att in the entry |
| | | entry.putAttribute(Historical.historicalAttrType,histList) ; |
| | | |
| | | |
| | | // load historical from the entry |
| | | |
| | | |
| | | Historical hist = Historical.load(entry); |
| | | |
| | | /* |
| | |
| | | List<Modification> mods = new ArrayList<Modification>(); |
| | | Modification mod = new Modification(modType, attr); |
| | | mods.add(mod); |
| | | |
| | | |
| | | ModifyOperation modOp = new ModifyOperation(connection, 1, 1, null, |
| | | entry.getDN(), mods); |
| | | ModifyContext ctx = new ModifyContext(t, "uniqueId"); |