public class MasterTemplateBuilder extends com.antiaction.common.templateengine.TemplateBuilderBase
Modifier and Type | Field and Description |
---|---|
com.antiaction.common.templateengine.TemplatePlaceHolder |
contentPlace
Hook into the template to insert main content.
|
protected String |
environment
Get and cache the environment name used for this installation.
|
com.antiaction.common.templateengine.TemplatePlaceHolder |
environmentPlace
Hook into the template to insert environment content.
|
com.antiaction.common.templateengine.TemplatePlaceHolder |
headingPlace
Hook into the template to insert heading content.
|
com.antiaction.common.templateengine.TemplatePlaceHolder |
languagesPlace
Hook into the template to insert language selection content.
|
com.antiaction.common.templateengine.TemplatePlaceHolder |
menuPlace
Hook into the template to insert menu content.
|
com.antiaction.common.templateengine.TemplatePlaceHolder |
refreshPlace
Hook into the template to insert refresh content.
|
com.antiaction.common.templateengine.TemplatePlaceHolder |
titlePlace
Hook into the template to insert title content.
|
protected String |
version
Get and cache the versions string from the jar manifest file.
|
com.antiaction.common.templateengine.TemplatePlaceHolder |
versionPlace
Hook into the template to insert version content.
|
Constructor and Description |
---|
MasterTemplateBuilder() |
Modifier and Type | Method and Description |
---|---|
StringBuilder |
buildMenu(StringBuilder menuSb,
javax.servlet.http.HttpServletRequest req,
Locale locale,
Heritrix3JobMonitor h3Job)
Construct menu HTML based on the HTTP request, requested locale and optional h3 job monitor.
|
MasterTemplateBuilder |
insertContent(String title,
String menu,
String languages,
String heading,
String content,
String refresh)
Insert content into the different placeholders defined as template engine attributes above.
|
protected final String version
protected final String environment
public com.antiaction.common.templateengine.TemplatePlaceHolder titlePlace
public com.antiaction.common.templateengine.TemplatePlaceHolder menuPlace
public com.antiaction.common.templateengine.TemplatePlaceHolder languagesPlace
public com.antiaction.common.templateengine.TemplatePlaceHolder headingPlace
public com.antiaction.common.templateengine.TemplatePlaceHolder contentPlace
public com.antiaction.common.templateengine.TemplatePlaceHolder versionPlace
public com.antiaction.common.templateengine.TemplatePlaceHolder environmentPlace
public com.antiaction.common.templateengine.TemplatePlaceHolder refreshPlace
public MasterTemplateBuilder()
public StringBuilder buildMenu(StringBuilder menuSb, javax.servlet.http.HttpServletRequest req, Locale locale, Heritrix3JobMonitor h3Job) throws IOException
menuSb
- StringBuilder
used to construct the menu HTMLreq
- HTTP request objectlocale
- Locale
of the requested response language to useh3Job
- H3 job monitor to use if the menu need to show a job sub sub menu itemIOException
- if an I/O exception occurs during constructionpublic MasterTemplateBuilder insertContent(String title, String menu, String languages, String heading, String content, String refresh)
title
- title textmenu
- menu HTMLlanguages
- language selection HTMLheading
- heading HTMLcontent
- main content textrefresh
- refresh meta header textCopyright © 2005–2018 The Royal Danish Library, the National Library of France and the Austrian National Library.. All rights reserved.