org.weborganic.bastille.xml
Class GetXMLFromBerliozPath

java.lang.Object
  extended by org.weborganic.bastille.xml.GetXMLFromBerliozPath
All Implemented Interfaces:
Cacheable, ContentGenerator

public final class GetXMLFromBerliozPath
extends Object
implements ContentGenerator, Cacheable

This generator returns the content of an XML file using the Berlioz path.

For example, if the Berlioz servlet is mapped to '/html/*', 'html/Ping/pong' will try to look for XML file 'Ping/pong.xml' in the XML folder.

For example, if the Berlioz servlet is mapped to '*.html', 'Ping/pong.html' will try to look for XML file 'Ping/pong.xml' in the XML folder.

Configuration

The root XML folder can be configured globally using the Berlioz configuration:

For example:

<node name="bastille">
   <map/>
   <node name="xml">
     <map>
       <entry key="folder"     value="xml/content"/>
     </map>
   </node>
 </node>
 

To define the location of the XML folder, use the Berlioz config property: bastille.xml.root.

Since:
0.6.0

Constructor Summary
GetXMLFromBerliozPath()
           
 
Method Summary
 String getETag(ContentRequest req)
           
 void process(ContentRequest req, XMLWriter xml)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GetXMLFromBerliozPath

public GetXMLFromBerliozPath()
Method Detail

getETag

public String getETag(ContentRequest req)
Specified by:
getETag in interface Cacheable

process

public void process(ContentRequest req,
                    XMLWriter xml)
             throws BerliozException,
                    IOException
Specified by:
process in interface ContentGenerator
Throws:
BerliozException
IOException