01: package com.jat.presentation.parameter;
02:
03: /**
04: * <p>Title: JAT</p>
05: * <p>Description: </p>
06: * <p>Copyright: Copyright (c) 2004 -2005 Stefano Fratini (stefano.fratini@gmail.com)</p>
07: * <p>Distributed under the terms of the GNU Lesser General Public License, v2.1 or later</p>
08: * @author stf
09: * @version 1.0
10: * @since 1.2
11: */
12:
13: public class DefaultCheckParameter implements CheckParameterPlugin {
14:
15: public Object check(String name, String value, Object obj)
16: throws CheckParameterException {
17: if (value == null || value.trim().equals(""))
18: throw new CheckParameterException(
19: "Please, insert the field '" + name + "'");
20: return value;
21: }
22: }
|