Class MasterTemplateBuilder

    • Field Summary

      Fields 
      Modifier and Type Field Description
      com.antiaction.common.templateengine.TemplatePlaceHolder contentPlace
      Hook into the template to insert main content.
      protected java.lang.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 java.lang.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.
      • Fields inherited from class com.antiaction.common.templateengine.TemplateBuilderBase

        placeHolders, templateParts
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.StringBuilder buildMenu​(java.lang.StringBuilder menuSb, javax.servlet.http.HttpServletRequest req, java.util.Locale locale, Heritrix3JobMonitor h3Job)
      Construct menu HTML based on the HTTP request, requested locale and optional h3 job monitor.
      MasterTemplateBuilder insertContent​(java.lang.String title, java.lang.String menu, java.lang.String languages, java.lang.String heading, java.lang.String content, java.lang.String refresh)
      Insert content into the different placeholders defined as template engine attributes above.
      • Methods inherited from class com.antiaction.common.templateengine.TemplateBuilderBase

        write
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • version

        protected final java.lang.String version
        Get and cache the versions string from the jar manifest file.
      • environment

        protected final java.lang.String environment
        Get and cache the environment name used for this installation.
      • titlePlace

        public com.antiaction.common.templateengine.TemplatePlaceHolder titlePlace
        Hook into the template to insert title content.
      • menuPlace

        public com.antiaction.common.templateengine.TemplatePlaceHolder menuPlace
        Hook into the template to insert menu content.
      • languagesPlace

        public com.antiaction.common.templateengine.TemplatePlaceHolder languagesPlace
        Hook into the template to insert language selection content.
      • headingPlace

        public com.antiaction.common.templateengine.TemplatePlaceHolder headingPlace
        Hook into the template to insert heading content.
      • contentPlace

        public com.antiaction.common.templateengine.TemplatePlaceHolder contentPlace
        Hook into the template to insert main content.
      • versionPlace

        public com.antiaction.common.templateengine.TemplatePlaceHolder versionPlace
        Hook into the template to insert version content.
      • environmentPlace

        public com.antiaction.common.templateengine.TemplatePlaceHolder environmentPlace
        Hook into the template to insert environment content.
      • refreshPlace

        public com.antiaction.common.templateengine.TemplatePlaceHolder refreshPlace
        Hook into the template to insert refresh content.
    • Method Detail

      • buildMenu

        public java.lang.StringBuilder buildMenu​(java.lang.StringBuilder menuSb,
                                                 javax.servlet.http.HttpServletRequest req,
                                                 java.util.Locale locale,
                                                 Heritrix3JobMonitor h3Job)
                                          throws java.io.IOException
        Construct menu HTML based on the HTTP request, requested locale and optional h3 job monitor.
        Parameters:
        menuSb - StringBuilder used to construct the menu HTML
        req - HTTP request object
        locale - Locale of the requested response language to use
        h3Job - H3 job monitor to use if the menu need to show a job sub sub menu item
        Returns:
        constructed menu HTML
        Throws:
        java.io.IOException - if an I/O exception occurs during construction
      • insertContent

        public MasterTemplateBuilder insertContent​(java.lang.String title,
                                                   java.lang.String menu,
                                                   java.lang.String languages,
                                                   java.lang.String heading,
                                                   java.lang.String content,
                                                   java.lang.String refresh)
        Insert content into the different placeholders defined as template engine attributes above.
        Parameters:
        title - title text
        menu - menu HTML
        languages - language selection HTML
        heading - heading HTML
        content - main content text
        refresh - refresh meta header text
        Returns:
        a reference to this object so more methods can be called on it immediately