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

Ludovic Poitou
07.41.2011 b892b0038d7dc619ee4fac7058189736d2d73f0d
opends/src/server/org/opends/server/replication/common/ChangelogBaseDNVirtualAttributeProvider.java
@@ -23,11 +23,11 @@
 *
 *
 *      Copyright 2009 Sun Microsystems, Inc.
 *      Portions Copyright 2011 ForgeRock AS
 */
package org.opends.server.replication.common;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
@@ -57,6 +57,15 @@
       extends VirtualAttributeProvider<UserDefinedVirtualAttributeCfg>
       implements ConfigurationChangeListener<UserDefinedVirtualAttributeCfg>
{
  /*
   * The base DN of the changelog is a constant.
   * TODO: This shouldn't be a virtual attribute, but directly
   * registered in the RootDSE.
   */
  private final Set<AttributeValue> values;
  /**
   * Creates a new instance of this member virtual attribute provider.
   */
@@ -64,8 +73,11 @@
  {
    super();
    // All initialization should be performed in the
    // initializeVirtualAttributeProvider method.
    AttributeValue value =
    AttributeValues.create(
        ByteString.valueOf(ServerConstants.DN_EXTERNAL_CHANGELOG_ROOT),
        ByteString.valueOf(ServerConstants.DN_EXTERNAL_CHANGELOG_ROOT));
    values=Collections.singleton(value);
  }
@@ -111,12 +123,6 @@
  @Override()
  public Set<AttributeValue> getValues(Entry entry,VirtualAttributeRule rule)
  {
    Set<AttributeValue> values = new HashSet<AttributeValue>();
    AttributeValue value =
      AttributeValues.create(
          ByteString.valueOf(ServerConstants.DN_EXTERNAL_CHANGELOG_ROOT),
          ByteString.valueOf(ServerConstants.DN_EXTERNAL_CHANGELOG_ROOT));
    values=Collections.singleton(value);
    return values;
  }