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

jvergara
22.49.2007 b5707b7224c2f682ad50d7d8484c961ca58b6a67
Fix for issue 2405.

The new naming format for the domains is of type:
dc=example,dc=com (domain 27785)
2 files modified
10 ■■■■■ changed files
opends/src/guitools/org/opends/guitools/replicationcli/ReplicationCliMain.java 2 ●●● patch | view | raw | blame | history
opends/src/quicksetup/org/opends/quicksetup/installer/InstallerHelper.java 8 ●●●●● patch | view | raw | blame | history
opends/src/guitools/org/opends/guitools/replicationcli/ReplicationCliMain.java
@@ -5053,7 +5053,7 @@
    {
      int domainId = InstallerHelper.getReplicationId(usedReplicationDomainIds);
      usedReplicationDomainIds.add(domainId);
      domainName = InstallerHelper.getDomainName(domainNames, domainId);
      domainName = InstallerHelper.getDomainName(domainNames, domainId, baseDN);
      domain = sync.createReplicationDomain(
          ReplicationDomainCfgDefn.getInstance(), domainName,
          new ArrayList<DefaultBehaviorException>());
opends/src/quicksetup/org/opends/quicksetup/installer/InstallerHelper.java
@@ -383,7 +383,7 @@
        {
          int domainId = getReplicationId(usedServerIds);
          usedServerIds.add(domainId);
          domainName = getDomainName(domainNames, domainId);
          domainName = getDomainName(domainNames, domainId, dn);
          domain = sync.createReplicationDomain(
              ReplicationDomainCfgDefn.getInstance(), domainName,
              new ArrayList<DefaultBehaviorException>());
@@ -625,11 +625,13 @@
   * Returns the name to be used for a new replication domain.
   * @param existingDomains the existing domains names.
   * @param newDomainId the new domain replication id.
   * @param baseDN the base DN of the domain.
   * @return the name to be used for a new replication domain.
   */
  public static String getDomainName(String[] existingDomains, int newDomainId)
  public static String getDomainName(String[] existingDomains, int newDomainId,
      String baseDN)
  {
    String domainName = DOMAIN_BASE_NAME+newDomainId;
    String domainName = baseDN + " ("+DOMAIN_BASE_NAME+newDomainId+")";
    boolean nameExists = true;
    int j = 0;
    while (nameExists)