From d552c18f3cbbb0608c8649b8e7246111045634b3 Mon Sep 17 00:00:00 2001
From: Mark Craig <mark.craig@forgerock.com>
Date: Fri, 24 Jun 2011 07:51:24 +0000
Subject: [PATCH] Post config ref to OpenDJ site, part I
---
opends/resource/admin/config-guide/opends-config.css | 14 +++---
opends/resource/admin/config-guide/opends_logo_sm.png | 0
opends/pom.xml | 26 +++++++++++++
opends/src/server/org/opends/server/admin/doc/ConfigGuideGeneration.java | 50 +++++++++++++-----------
opends/src/site/site.xml | 4 +-
5 files changed, 62 insertions(+), 32 deletions(-)
diff --git a/opends/pom.xml b/opends/pom.xml
index 5f9256f..133e9c6 100644
--- a/opends/pom.xml
+++ b/opends/pom.xml
@@ -105,6 +105,32 @@
</target>
</configuration>
</execution>
+ <execution>
+ <id>docgen</id>
+ <phase>pre-site</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <target>
+ <ant target="configguide" />
+ </target>
+ </configuration>
+ </execution>
+ <execution>
+ <id>cp-docget</id>
+ <phase>post-site</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <target>
+ <copy todir="build/site/configref">
+ <fileset dir="build/docgen/configuration_guide/" />
+ </copy>
+ </target>
+ </configuration>
+ </execution>
</executions>
</plugin>
<plugin>
diff --git a/opends/resource/admin/config-guide/opends-config.css b/opends/resource/admin/config-guide/opends-config.css
index e495489..3f02bba 100644
--- a/opends/resource/admin/config-guide/opends-config.css
+++ b/opends/resource/admin/config-guide/opends-config.css
@@ -3,18 +3,18 @@
color: #333; background-color: #fff; margin:20px 15px }
/* +++ 210 Page titles, headings, and paragraphs +++ */
-.pagename { font-size: 1.7em; font-weight: normal;color:#5F6466;
+.pagename { font-size: 1.7em; font-weight: normal;color:#626D75;
margin: 0.5em 0.5em 0.5em 0; }
h1 { font-size: 2.0em; font-weight: normal;
- margin-top: 0em; margin-bottom: 0em; color:#000}
+ margin-top: 0em; margin-bottom: 0em; color:#626D75}
h2 { font-size: 1.6em; font-weight: normal;
margin: 0.5em 0em 1em 0em;
- border-bottom: 1px #D9D9D9 solid; padding-bottom:5px; color:#000}
+ border-bottom: 1px #D9D9D9 solid; padding-bottom:5px; color:#626D75}
h3 { font-size: 1.4em; font-weight: bold;
margin: 1.5em 0em .8em 0em;
- border-top: 1px #D9D9D9 solid; padding-top:10px;color:#000 }
-h4 { font-size: 1.2em; font-weight: bold;color:#000;
+ border-top: 1px #D9D9D9 solid; padding-top:10px;color:#626D75 }
+h4 { font-size: 1.2em; font-weight: bold;color:#626D75;
margin: 1.2em 0em .8em 0em; }
h5 { font-size: 1.0em; font-weight: bold;
margin: 1.2em 0em .8em 0em; }
@@ -23,8 +23,8 @@
p { margin: .75em 0 1em 0; }
strong, b { font-weight: bold; }
-a:link { color: #006699; }
-a:visited { color: #0099CC; }
+a:link { color: #47a; }
+a:visited { color: #68a; }
/*ol { margin: 0.8em 0 0.8em 0.8em }
diff --git a/opends/resource/admin/config-guide/opends_logo_sm.png b/opends/resource/admin/config-guide/opends_logo_sm.png
index 1b7aab5..c04f81b 100644
--- a/opends/resource/admin/config-guide/opends_logo_sm.png
+++ b/opends/resource/admin/config-guide/opends_logo_sm.png
Binary files differ
diff --git a/opends/src/server/org/opends/server/admin/doc/ConfigGuideGeneration.java b/opends/src/server/org/opends/server/admin/doc/ConfigGuideGeneration.java
index aa89c9e..2773e63 100644
--- a/opends/src/server/org/opends/server/admin/doc/ConfigGuideGeneration.java
+++ b/opends/src/server/org/opends/server/admin/doc/ConfigGuideGeneration.java
@@ -23,6 +23,7 @@
*
*
* Copyright 2007-2010 Sun Microsystems, Inc.
+ * Portions Copyright 2011 ForgeRock AS
*/
package org.opends.server.admin.doc;
@@ -79,9 +80,10 @@
// Note : still to be done :
// I18n support. Today all the strings are hardcoded in this file
- private final static String ACI_SYNTAX_REL_URL = "/page/ACISyntax";
+ private final static String ACI_SYNTAX_REL_URL =
+ "/doc/admin-guide/OpenDJ-Admin-Guide.html#chap-privileges-acis";
private final static String DURATION_SYNTAX_REL_URL =
- "/page/DefinitionDuration";
+ "/404.html";
private final String CSS_FILE = "opends-config.css";
private final String MAIN_FILE = "index.html";
@@ -94,7 +96,7 @@
private final String MAINTOP_FILE = "maintop.html";
private final String INDEX_FILE = "index.html";
- private static final String CONFIG_GUIDE_DIR = "opends_config_guide";
+ private static final String CONFIG_GUIDE_DIR = "opendj_config_guide";
private final String MAIN_FRAME = "mainFrame";
/**
@@ -105,10 +107,11 @@
* (default is /var/tmp/[CONFIG_GUIDE_DIR>])
* LdapMapping - Presence means that the LDAP mapping section is to be
* generated (default is no)
- * OpendsWiki - The URL of the OpenDS Wiki
- * (default is "https://www.opends.org/wiki")
- * OpendsHome - The URL of the OpenDS project Home page
- * (default is "http://www.opends.org")
+ * OpenDJWiki - The URL of the OpenDJ Wiki
+ * (default is
+ * "http://wikis.forgerock.org/confluence/display/OPENDJ")
+ * OpenDJHome - The URL of the OpenDJ project Home page
+ * (default is "http://opendj.forgerock.org")
*
* @param args none.
*/
@@ -133,18 +136,19 @@
ldapMapping = true;
}
- opendsWiki = properties.getProperty("OpendsWiki");
- if (opendsWiki == null) {
+ OpenDJWiki = properties.getProperty("OpenDJWiki");
+ if (OpenDJWiki == null) {
// Default is current wiki
- opendsWiki = "https://www.opends.org/wiki";
+ OpenDJWiki = "http://wikis.forgerock.org/confluence/display/OPENDJ";
}
- aciSyntaxPage = opendsWiki + ACI_SYNTAX_REL_URL;
- durationSyntaxPage = opendsWiki + DURATION_SYNTAX_REL_URL;
- opendsHome = properties.getProperty("OpendsHome");
- if (opendsHome == null) {
- // Default is current OpenDS project home
- opendsHome = "http://www.opends.org";
+ aciSyntaxPage = OpenDJHome + ACI_SYNTAX_REL_URL;
+ durationSyntaxPage = OpenDJHome + DURATION_SYNTAX_REL_URL; // TODO: missing
+
+ OpenDJHome = properties.getProperty("OpenDJHome");
+ if (OpenDJHome == null) {
+ // Default is current OpenDJ project home
+ OpenDJHome = "http://opendj.forgerock.org";
}
ConfigGuideGeneration myGen = new ConfigGuideGeneration();
@@ -1002,10 +1006,10 @@
htmlHeader(DynamicConstants.PRODUCT_NAME +
" Configuration Reference - Main Top");
htmlBuff.append("<div class=\"breadcrumb\"><span class=\"pageactions\">" +
- "<a href=\"" + opendsWiki + "\" target=\"_parent\">" +
+ "<a href=\"" + OpenDJHome + "\" target=\"_parent\">" +
"<span style=\"font-size: 12px;\">« </span>" +
"Back to " +
- DynamicConstants.PRODUCT_NAME + " Wiki</a></span> </div>\n");
+ DynamicConstants.PRODUCT_NAME + " Home</a></span> </div>\n");
htmlBuff.append("<table class=\"titletable\" cellspacing=\"0\" " +
"width=\"100%\">\n");
htmlBuff.append("<tbody><tr>\n");
@@ -1013,9 +1017,9 @@
DynamicConstants.PRODUCT_NAME +
" Configuration Reference</h2></td>\n");
htmlBuff.append(" <td valign=\"bottom\" width=\"10%\">" +
- "<a href=\"" + opendsHome + "\" target=\"_parent\">" +
- "<img src=\"opends_logo_sm.png\" alt=\"OpenDS Logo\" align=\"bottom\" " +
- "border=\"0\" height=\"33\" width=\"104\"></a></td>\n");
+ "<a href=\"" + OpenDJHome + "\" target=\"_parent\">" +
+ "<img src=\"opends_logo_sm.png\" alt=\"OpenDJ Logo\" align=\"bottom\" " +
+ "border=\"0\" height=\"33\" width=\"114\"></a></td>\n");
htmlBuff.append("</tr>\n");
htmlBuff.append("</tbody></table>\n");
@@ -1622,8 +1626,8 @@
private StringBuffer htmlBuff = new StringBuffer();
private static String generationDir;
private static boolean ldapMapping = false;
- private static String opendsWiki;
- private static String opendsHome;
+ private static String OpenDJWiki;
+ private static String OpenDJHome;
private static String aciSyntaxPage;
private static String durationSyntaxPage;
private boolean inList = false;
diff --git a/opends/src/site/site.xml b/opends/src/site/site.xml
index 508429e..9448754 100644
--- a/opends/src/site/site.xml
+++ b/opends/src/site/site.xml
@@ -68,8 +68,8 @@
<item name="Release Notes" href="../doc/release-notes/OpenDJ-Release-Notes.html" />
<item name="Installation Guide" href="../doc/install-guide/OpenDJ-Install-Guide.html" />
<item name="Administration Guide" href="../doc/admin-guide/OpenDJ-Admin-Guide.html" />
- <item name="Config Reference" href="404.html" alt="TODO" />
- <item name="Plugin Javadoc" href="404.html" alt="TODO" />
+ <item name="Config Reference" href="./configref/index.html" alt="TODO" />
+ <item name="Plugin Javadoc" href="../404.html" alt="TODO" />
</menu>
<menu name="OpenDJ Development">
--
Gitblit v1.10.0