01: package org.gomba.domains;
02:
03: import org.gomba.ParameterDefinition;
04: import org.gomba.ParameterDomain;
05: import org.gomba.ParameterResolver;
06:
07: /**
08: * This domain contains properties extracted from the servlet request HTTP
09: * headers.
10: *
11: * @author Flavio Tordini
12: * @version $Id: HeaderDomain.java,v 1.1.1.1 2004/06/16 13:15:12 flaviotordini Exp $
13: */
14: public class HeaderDomain implements ParameterDomain {
15:
16: /**
17: * @see org.gomba.ParameterDomain#getParameterValue(org.gomba.ParameterResolver,
18: * org.gomba.ParameterDefinition)
19: */
20: public Object getParameterValue(ParameterResolver context,
21: ParameterDefinition parameter) {
22: return context.getRequest().getHeader(parameter.getName());
23: }
24:
25: /**
26: * @see org.gomba.ParameterDomain#getName()
27: */
28: public String getName() {
29: return "header";
30: }
31: }
|