Make it possible to pass in statusBarText from
pom or command line.
This commit is contained in:
@@ -195,6 +195,12 @@ public abstract class PDFMojo extends AbstractFoMojo {
|
||||
*/
|
||||
private String draftStatus;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @parameter expression="${generate-webhelp.draft.status}" default-value=""
|
||||
*/
|
||||
private String statusBarText;
|
||||
|
||||
protected void setImageDirectory (File imageDirectory) {
|
||||
this.imageDirectory = imageDirectory;
|
||||
@@ -373,6 +379,12 @@ public abstract class PDFMojo extends AbstractFoMojo {
|
||||
|
||||
transformer.setParameter("draft.status", draftStatus);
|
||||
|
||||
String sysStatusBarText=System.getProperty("statusBarText");
|
||||
if(null!=sysStatusBarText && !sysStatusBarText.isEmpty()){
|
||||
statusBarText=sysStatusBarText;
|
||||
}
|
||||
transformer.setParameter("statusBarText", statusBarText);
|
||||
|
||||
transformer.setParameter("project.build.directory", projectBuildDirectory);
|
||||
|
||||
String sysSecurity=System.getProperty("security");
|
||||
@@ -435,6 +447,13 @@ public abstract class PDFMojo extends AbstractFoMojo {
|
||||
if(null!=draftStatus){
|
||||
transformer.setParameter("draft.status", draftStatus);
|
||||
}
|
||||
|
||||
String sysStatusBarText=System.getProperty("statusBarText");
|
||||
if(null!=sysStatusBarText && !sysStatusBarText.isEmpty()){
|
||||
statusBarText=sysStatusBarText;
|
||||
}
|
||||
transformer.setParameter("status.bar.text", statusBarText);
|
||||
|
||||
transformer.setParameter("branding", branding);
|
||||
|
||||
//transformer.setParameter("docbook.infile",sourceDocBook.getAbsolutePath());
|
||||
@@ -476,7 +495,8 @@ public abstract class PDFMojo extends AbstractFoMojo {
|
||||
map.put("inputSrcFile", inputFilename);
|
||||
map.put("outputType", "pdf");
|
||||
map.put("strictImageValidation", String.valueOf(this.strictImageValidation));
|
||||
|
||||
map.put("status.bar.text", getProperty("statusBarText"));
|
||||
map.put("draft.status", getProperty("draftStatus"));
|
||||
|
||||
// Profiling attrs:
|
||||
map.put("profile.os", getProperty("profileOs"));
|
||||
|
||||
@@ -347,6 +347,13 @@ public abstract class WebHelpMojo extends AbstractWebhelpMojo {
|
||||
*/
|
||||
private String draftStatus;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @parameter expression="${generate-webhelp.draft.status}" default-value=""
|
||||
*/
|
||||
private String statusBarText;
|
||||
|
||||
|
||||
/**
|
||||
* DOCUMENT ME!
|
||||
@@ -436,6 +443,13 @@ public abstract class WebHelpMojo extends AbstractWebhelpMojo {
|
||||
}
|
||||
transformer.setParameter("draft.status", draftStatus);
|
||||
|
||||
String sysStatusBarText=System.getProperty("statusBarText");
|
||||
if(null!=sysStatusBarText && !sysStatusBarText.isEmpty()){
|
||||
statusBarText=sysStatusBarText;
|
||||
}
|
||||
transformer.setParameter("status.bar.text", statusBarText);
|
||||
|
||||
|
||||
if(canonicalUrlBase != null){
|
||||
transformer.setParameter("canonical.url.base",canonicalUrlBase);
|
||||
}
|
||||
@@ -655,6 +669,8 @@ public abstract class WebHelpMojo extends AbstractWebhelpMojo {
|
||||
map.put("inputSrcFile", inputFilename);
|
||||
map.put("strictImageValidation", String.valueOf(this.strictImageValidation));
|
||||
map.put("trim.wadl.uri.count", this.trimWadlUriCount);
|
||||
map.put("status.bar.text", getProperty("statusBarText"));
|
||||
map.put("draft.status", getProperty("draftStatus"));
|
||||
|
||||
// Profiling attrs:
|
||||
map.put("profile.os", getProperty("profileOs"));
|
||||
@@ -735,6 +751,7 @@ public abstract class WebHelpMojo extends AbstractWebhelpMojo {
|
||||
pdfBuilder.setBranding(branding);
|
||||
pdfBuilder.setSecurity(security);
|
||||
pdfBuilder.setDraftStatus(draftStatus);
|
||||
pdfBuilder.setStatusBarText(statusBarText);
|
||||
pdfBuilder.setTrimWadlUriCount(trimWadlUriCount);
|
||||
pdfBuilder.setComputeWadlPathFromDocbookPath(computeWadlPathFromDocbookPath);
|
||||
|
||||
|
||||
@@ -118,6 +118,7 @@ public class PDFBuilder {
|
||||
private String tocSectionDepth;
|
||||
|
||||
private String draftStatus;
|
||||
private String statusBarText;
|
||||
private String trimWadlUriCount;
|
||||
private String computeWadlPathFromDocbookPath;
|
||||
|
||||
@@ -384,6 +385,12 @@ public class PDFBuilder {
|
||||
}
|
||||
transformer.setParameter("draft.status", draftStatus);
|
||||
|
||||
String sysStatusBarText=System.getProperty("statusBarText");
|
||||
if(null!=sysStatusBarText && !sysStatusBarText.isEmpty()){
|
||||
statusBarText=sysStatusBarText;
|
||||
}
|
||||
transformer.setParameter("status.bar.text", statusBarText);
|
||||
|
||||
if(trimWadlUriCount != null){
|
||||
transformer.setParameter("trim.wadl.uri.count",trimWadlUriCount);
|
||||
}
|
||||
@@ -660,6 +667,15 @@ public class PDFBuilder {
|
||||
this.draftStatus = draftStatus;
|
||||
}
|
||||
|
||||
public String getStatusBarText() {
|
||||
return statusBarText;
|
||||
}
|
||||
|
||||
public void setStatusBarText(String statusBarText) {
|
||||
this.statusBarText = statusBarText;
|
||||
}
|
||||
|
||||
|
||||
public String getTrimWadlUriCount() {
|
||||
return trimWadlUriCount;
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
<xsl:variable name="docbook" select="document(concat('file:///',$docbook.infile))"/>
|
||||
|
||||
<xsl:variable name="rackspace.status.pi">
|
||||
<xsl:variable name="status.bar.text">
|
||||
<xsl:call-template name="pi-attribute">
|
||||
<xsl:with-param name="pis" select="$docbook/*/processing-instruction('rax')"/>
|
||||
<xsl:with-param name="attribute" select="'status.bar.text'"/>
|
||||
@@ -28,7 +28,7 @@
|
||||
</xsl:variable>
|
||||
|
||||
<xsl:variable name="rackspace.status.text">
|
||||
<xsl:if test="not(normalize-space($rackspace.status.pi) = '')"><xsl:value-of select="normalize-space($rackspace.status.pi)"/></xsl:if>
|
||||
<xsl:if test="not(normalize-space($status.bar.text) = '')"><xsl:value-of select="normalize-space($status.bar.text)"/></xsl:if>
|
||||
</xsl:variable>
|
||||
|
||||
<xsl:variable name="status.bar.text.font.size">
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
|
||||
<xsl:param name="insert.xref.page.number">yes</xsl:param>
|
||||
|
||||
<xsl:param name="rackspace.status.pi">
|
||||
<xsl:param name="status.bar.text">
|
||||
<xsl:call-template name="pi-attribute">
|
||||
<xsl:with-param name="pis" select="/*/processing-instruction('rax')"/>
|
||||
<xsl:with-param name="attribute" select="'status.bar.text'"/>
|
||||
@@ -85,7 +85,7 @@
|
||||
<xsl:when test="$security = 'reviewer'">REVIEW<xsl:text> - </xsl:text></xsl:when>
|
||||
<xsl:when test="$security = 'writeronly'">WRITERONLY<xsl:text> - </xsl:text></xsl:when>
|
||||
<xsl:when test="$security = 'external'"/>
|
||||
</xsl:choose><xsl:if test="not(normalize-space($rackspace.status.pi) = '')"><xsl:value-of select="normalize-space($rackspace.status.pi)"/><xsl:text> - </xsl:text></xsl:if>
|
||||
</xsl:choose><xsl:if test="not(normalize-space($status.bar.text) = '')"><xsl:value-of select="normalize-space($status.bar.text)"/><xsl:text> - </xsl:text></xsl:if>
|
||||
</xsl:param>
|
||||
|
||||
<xsl:attribute-set name="example.properties">
|
||||
|
||||
@@ -365,7 +365,7 @@ These problems go away when you add this IE=7 mode meta tag.
|
||||
</xsl:if-->
|
||||
</xsl:template>
|
||||
|
||||
<xsl:param name="rackspace.status.pi">
|
||||
<xsl:param name="status.bar.text">
|
||||
<xsl:call-template name="pi-attribute">
|
||||
<xsl:with-param name="pis" select="/*/processing-instruction('rax')"/>
|
||||
<xsl:with-param name="attribute" select="'status.bar.text'"/>
|
||||
@@ -378,7 +378,7 @@ These problems go away when you add this IE=7 mode meta tag.
|
||||
<xsl:when test="$security = 'reviewer'">REVIEW<xsl:text> - </xsl:text></xsl:when>
|
||||
<xsl:when test="$security = 'writeronly'">WRITERONLY<xsl:text> - </xsl:text></xsl:when>
|
||||
<xsl:when test="$security = 'external'"/>
|
||||
</xsl:choose><xsl:if test="not(normalize-space($rackspace.status.pi) = '')"><xsl:value-of select="normalize-space($rackspace.status.pi)"/> - </xsl:if>
|
||||
</xsl:choose><xsl:if test="not(normalize-space($status.bar.text) = '')"><xsl:value-of select="normalize-space($status.bar.text)"/> - </xsl:if>
|
||||
</xsl:param>
|
||||
|
||||
<xsl:template name="user.header.content">
|
||||
|
||||
Reference in New Issue
Block a user