org.weborganic.bastille.web
Class GetHeader

java.lang.Object
  extended by org.weborganic.bastille.web.GetTemplateFile
      extended by org.weborganic.bastille.web.GetHeader
All Implemented Interfaces:
Cacheable, ContentGenerator

Deprecated. Use GetConfigFile instead.

@Deprecated
public final class GetHeader
extends GetTemplateFile
implements ContentGenerator, Cacheable

This generator returns the XML for the Header.

Configuration

The header is defined at the PageSeeder level using the website properties. When the website is published the path to the file to use for the header is stored in /WEB-INF/conf/template-config.prp as the header property.

There is no reason to modify this file directly as it could be overriden when the Website is published again.

Parameters

This generator does not require any parameter.

The following optional parameter can be used:

reload-conf-propertiesReloads the properties where the path to the Website header, header and navigation is stored in case the Website has been re-published by PageSeeder.

Returned XML

This generator return the content of the header file.

The content is wrapped in:

<template-file name="[header-filename]" status="ok">

   <!-- Content of the template file -->

 </template-file >

Generally, the header is a PageSeeder standard document, and would follow the format below:

<root>

   <!-- metadata for the document -->
   <ps:documentInfo edit="true"> ... </ps:documentInfo>

   <!-- for each document section -->
   <section id="[id]"> ... </section>
   ...

 </root>

Refer to the PageSeeder developer Website for more information about the PageSeeder standard format.

Error handling

If the file could not be found, the status will be not-found.

Usage

To use this generator in Berlioz (in /WEB-INF/config/services.xml):

<generator class="org.weborganic.bastille.web.Getheader"
            name="[name]" target="[target]"/>

ETag

The etag for this generator is a weak etag based on the XML file loaded as well as that of the Website properties configuration file template-config.prp.

Since:
0.6.0

Constructor Summary
GetHeader()
          Deprecated. Creates a new header template file generator.
 
Method Summary
 
Methods inherited from class org.weborganic.bastille.web.GetTemplateFile
getETag, process
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.weborganic.berlioz.content.ContentGenerator
process
 
Methods inherited from interface org.weborganic.berlioz.content.Cacheable
getETag
 

Constructor Detail

GetHeader

public GetHeader()
Deprecated. 
Creates a new header template file generator.

It extends the GetTemplateFile class as below:

 public GetHeader() {
   super("header");
 }