From e7f50afa31a82766681e6abd94523f847e46ada0 Mon Sep 17 00:00:00 2001
From: jcambon <jcambon@localhost>
Date: Tue, 12 Feb 2008 11:58:08 +0000
Subject: [PATCH] - Issue #2004 (cont'd) (automatically generate HTML configuration guide) minor fix - Fix for Issue #2928 (Generated doc: Base DN missing for some components)
---
opendj-sdk/opends/resource/admin/config-guide/maintop.html | 2 +-
opendj-sdk/opends/src/server/org/opends/server/admin/doc/ConfigGuideGeneration.java | 21 ++++++++++++++-------
2 files changed, 15 insertions(+), 8 deletions(-)
diff --git a/opendj-sdk/opends/resource/admin/config-guide/maintop.html b/opendj-sdk/opends/resource/admin/config-guide/maintop.html
index 53497ef..a4bbff6 100644
--- a/opendj-sdk/opends/resource/admin/config-guide/maintop.html
+++ b/opendj-sdk/opends/resource/admin/config-guide/maintop.html
@@ -5,7 +5,7 @@
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>OpenDS Configuration Reference</title>
<link rel="stylesheet" type="text/css" href="opends-config.css"></head><body>
-<div class="breadcrumb"><span class="pageactions"><a href="https://www.opends.org/wiki/" target="_parent"><span style="font-size: 12px;">« </span>Back to OpenDS Wiki</a></span> </div>
+<div class="breadcrumb"><span class="pageactions"><a href="https://www.opends.org/wiki/" target="_parent"><span style="font-size: 12px;">« </span>Back to OpenDS Wiki</a></span> </div>
<table class="titletable" cellspacing="0" width="100%">
<tbody><tr>
<td><h2>OpenDS Configuration Reference</h2></td>
diff --git a/opendj-sdk/opends/src/server/org/opends/server/admin/doc/ConfigGuideGeneration.java b/opendj-sdk/opends/src/server/org/opends/server/admin/doc/ConfigGuideGeneration.java
index 301a07d..a43c44f 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/admin/doc/ConfigGuideGeneration.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/admin/doc/ConfigGuideGeneration.java
@@ -823,8 +823,15 @@
private String getBaseDN(
AbstractManagedObjectDefinition mo, LDAPProfile ldapProfile) {
- if (relList.get(mo.getName()) != null) {
- return ldapProfile.getRelationRDNSequence(relList.get(mo.getName()));
+ RelationDefinition rel = relList.get(mo.getName());
+ if (rel != null) {
+ String baseDn = ldapProfile.getRelationRDNSequence(rel);
+ if (!baseDn.equals("")) {
+ return baseDn;
+ } else {
+ // Check the parent relation
+ return getBaseDN(rel.getParentDefinition(), ldapProfile);
+ }
} else if (moList.get(mo.getParent().getName()) != null) {
// check its superior
return getBaseDN(moList.get(mo.getParent().getName()), ldapProfile);
@@ -1118,7 +1125,7 @@
private void htmlHeader(String pageTitle) {
htmlBuff.append(getHtmlHeader(pageTitle) +
- "<body \">\n");
+ "<body>\n");
}
@@ -1140,22 +1147,22 @@
"<span><a " +
(activeTab.equals(INHERITANCE_TREE_FILE) ? "class=\"activetab\" " : "") +
- "href=" + INHERITANCE_TREE_FILE +
+ "href=\"" + INHERITANCE_TREE_FILE + "\"" +
" title=\"Inheritance View of Components\">Inheritance</a></span> " +
"<span><a " +
(activeTab.equals(RELATION_TREE_FILE) ? "class=\"activetab\" " : "") +
- "href=" + RELATION_TREE_FILE +
+ "href=\"" + RELATION_TREE_FILE + "\"" +
" title=\"Relational View of Components\">Structure</a></span> " +
"<span><a " +
(activeTab.equals(MO_LIST_FILE) ? "class=\"activetab\" " : "") +
- "href=" + MO_LIST_FILE +
+ "href=\"" + MO_LIST_FILE + "\"" +
" title=\"Alphabetical Index of Components\">Components</a></span> " +
"<span><a " +
(activeTab.equals(PROPERTIES_INDEX_FILE) ? "class=\"activetab\" " : "") +
- "href=" + PROPERTIES_INDEX_FILE +
+ "href=\"" + PROPERTIES_INDEX_FILE + "\"" +
" title=\"Alphabetical Index of Properties\" >Properties</a></span>" +
"</div>" +
--
Gitblit v1.10.0