01: /*
02: * This file is part of PFIXCORE.
03: *
04: * PFIXCORE is free software; you can redistribute it and/or modify
05: * it under the terms of the GNU Lesser General Public License as published by
06: * the Free Software Foundation; either version 2 of the License, or
07: * (at your option) any later version.
08: *
09: * PFIXCORE is distributed in the hope that it will be useful,
10: * but WITHOUT ANY WARRANTY; without even the implied warranty of
11: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12: * GNU Lesser General Public License for more details.
13: *
14: * You should have received a copy of the GNU Lesser General Public License
15: * along with PFIXCORE; if not, write to the Free Software
16: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17: *
18: */
19:
20: package de.schlund.pfixxml;
21:
22: /**
23: * SimpleRequestParam.java
24: *
25: *
26: * Created: Wed May 8 02:55:19 2002
27: *
28: * @author <a href="mailto:jtl@schlund.de">Jens Lautenbacher</a>
29: *
30: *
31: */
32:
33: public class SimpleRequestParam implements RequestParam {
34: private String value = null;
35: private RequestParamType type = RequestParamType.SIMPLE;
36: private boolean synthetic = false;
37:
38: public boolean isTrue() {
39: if (value != null) {
40: return (value.equals("true") || value.equals("1") || value
41: .equals("yes"));
42: }
43: return false;
44: }
45:
46: public boolean isSynthetic() {
47: return synthetic;
48: }
49:
50: public void setSynthetic(boolean synthetic) {
51: this .synthetic = synthetic;
52: }
53:
54: public SimpleRequestParam(String value) {
55: this .value = value;
56: }
57:
58: public void setValue(String value) {
59: this .value = value;
60: }
61:
62: public String getValue() {
63: return value;
64: }
65:
66: public String toString() {
67: return getValue();
68: }
69:
70: public RequestParamType getType() {
71: return type;
72: }
73:
74: }// SimpleRequestParam
|