org.liquidsite.app.template
Class RequestBean.RequestHeaderBean

java.lang.Object
  extended byorg.liquidsite.app.template.RequestBean.RequestHeaderBean
All Implemented Interfaces:
freemarker.template.TemplateHashModel, freemarker.template.TemplateModel
Enclosing class:
RequestBean

public class RequestBean.RequestHeaderBean
extends java.lang.Object
implements freemarker.template.TemplateHashModel

A request header bean. This bean exposes all the request headers as a template hash model with the header names as keys, and their values always returned as strings.


Field Summary
 
Fields inherited from interface freemarker.template.TemplateModel
NOTHING
 
Method Summary
 freemarker.template.TemplateModel get(java.lang.String name)
          Returns a header value.
 boolean isEmpty()
          Checks if the header hash model is empty.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

isEmpty

public boolean isEmpty()
Checks if the header hash model is empty.

Specified by:
isEmpty in interface freemarker.template.TemplateHashModel
Returns:
this method always returns false

get

public freemarker.template.TemplateModel get(java.lang.String name)
Returns a header value. If the header didn't exist, a null template model will be returned. Existing header values will be returned as scalar strings.

Specified by:
get in interface freemarker.template.TemplateHashModel
Parameters:
name - the header name
Returns:
the template model for the value, or null if the header didn't exist