Pass in tocMaxDepth and sectionMaxDepth to PdfBuilder.

This commit is contained in:
dcramer
2012-11-08 22:39:59 -06:00
parent c8980b4c7b
commit ca72b6d57c
2 changed files with 40 additions and 8 deletions

View File

@@ -735,6 +735,8 @@ public abstract class WebHelpMojo extends AbstractWebhelpMojo {
pdfBuilder.setSectionAutolabel(getProperty("sectionAutolabel"));
pdfBuilder.setFormalProcedures(getProperty("formalProcedures"));
pdfBuilder.setGenerateToc(getProperty("generateToc"));
pdfBuilder.setTocMaxDepth(getProperty("tocMaxDepth"));
pdfBuilder.setTocSectionDepth(getProperty("tocSectionDepth"));
String srcFilename = this.projectBuildDirectory+"/docbkx/"+sourceFile.getName();
File tempHandle = new File(srcFilename);

View File

@@ -113,7 +113,9 @@ public class PDFBuilder {
private String sectionAutolabel;
private String formalProcedures;
private String generateToc;
private String tocMaxDepth;
private String tocSectionDepth;
private String draftStatus;
private String trimWadlUriCount;
private String computeWadlPathFromDocbookPath;
@@ -342,13 +344,25 @@ public class PDFBuilder {
transformer.setParameter("coverUrl", coverUrl);
transformer.setParameter("coverColor", coverColor);
transformer.setParameter("section.autolabel", sectionAutolabel);
transformer.setParameter("chapter.autolabel", chapterAutolabel);
transformer.setParameter("generate.toc", generateToc);
transformer.setParameter("formal.procedures", formalProcedures);
if(null != sectionAutolabel){
transformer.setParameter("section.autolabel", sectionAutolabel);
}
if(null != chapterAutolabel){
transformer.setParameter("chapter.autolabel", chapterAutolabel);
}
if(null != generateToc){
transformer.setParameter("generate.toc", generateToc);
}
if(null != tocMaxDepth){
transformer.setParameter("toc.max.depth", tocMaxDepth);
}
if(null != tocSectionDepth){
transformer.setParameter("toc.section.depth", tocSectionDepth);
}
if(null != formalProcedures){
transformer.setParameter("formal.procedures", formalProcedures);
}
transformer.setParameter("project.build.directory", projectBuildDirectory);
String sysSecurity=System.getProperty("security");
@@ -607,6 +621,22 @@ public class PDFBuilder {
this.generateToc = generateToc;
}
public String getTocMaxDepth() {
return tocMaxDepth;
}
public void setTocSectionDepth(String tocSectionDepth) {
this.tocSectionDepth = tocSectionDepth;
}
public String getTocSectionDepth() {
return tocSectionDepth;
}
public void setTocMaxDepth(String tocMaxDepth) {
this.tocMaxDepth = tocMaxDepth;
}
public String getDraftStatus() {
return draftStatus;