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

Jean-Noël Rouvignac
02.39.2016 251f9586274ce5f121b0bb596fbb21e1ecd39442
opendj-server-legacy/src/main/java/org/opends/server/replication/plugin/AttrHistoricalSingle.java
@@ -24,9 +24,9 @@
import org.forgerock.opendj.ldap.ByteString;
import org.forgerock.opendj.ldap.ModificationType;
import org.forgerock.opendj.ldap.schema.AttributeType;
import org.opends.server.replication.common.CSN;
import org.opends.server.types.Attribute;
import org.forgerock.opendj.ldap.schema.AttributeType;
import org.opends.server.types.Entry;
import org.opends.server.types.Modification;
@@ -38,18 +38,31 @@
 */
public class AttrHistoricalSingle extends AttrHistorical
{
  /** Last time when the attribute was deleted. */
  private CSN deleteTime;
  /** Last time when a value was added. */
  private CSN addTime;
  /** Last added value. */
  private ByteString value;
  /** Attribute type for this historical value */
  private AttributeType attributeType;
  /** Last time when a value was added. */
  private CSN addTime;
  /** Last time when the attribute was deleted. */
  private CSN deleteTime;
  /**
   * Last operation applied. This is only used for multiple mods on the same
   * single valued attribute in the same modification.
   */
  private HistAttrModificationKey lastMod;
  /**
   * Builds an {@link AttrHistoricalSingle} object.
   *
   * @param attributeType
   *          the attribute type for this historical value
   */
  public AttrHistoricalSingle(AttributeType attributeType)
  {
    this.attributeType = attributeType;
  }
  @Override
  public CSN getDeleteTime()
  {
@@ -61,7 +74,7 @@
  {
    if (addTime != null)
    {
      return Collections.singleton(new AttrValueHistorical(value, addTime, null));
      return Collections.singleton(new AttrValueHistorical(value, attributeType, addTime, null));
    }
    return Collections.emptySet();
  }
@@ -262,7 +275,7 @@
  }
  @Override
  public void assign(HistAttrModificationKey histKey, ByteString value, CSN csn)
  public void assign(HistAttrModificationKey histKey, AttributeType attrType, ByteString value, CSN csn)
  {
    switch (histKey)
    {