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 context
09: * attributes.
10: *
11: * @author Flavio Tordini
12: * @version $Id: SystemPropertiesDomain.java,v 1.1 2006/03/07 14:12:17 flaviotordini Exp $
13: */
14: public class SystemPropertiesDomain 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 System.getProperty(parameter.getName());
23: }
24:
25: /**
26: * @see org.gomba.ParameterDomain#getName()
27: */
28: public String getName() {
29: return "systemProperty";
30: }
31: }
|