01: /*
02: * Created on 1 Dec 2006
03: */
04: package uk.org.ponder.rsf.state.guards.support;
05:
06: public class RequiredValueGuard {
07: private String code = "value.required";
08:
09: public void setCode(String code) {
10: this .code = code;
11: }
12:
13: public void setValue(Object obj) {
14: if (obj == null || obj.equals("")) {
15: throw new IllegalArgumentException(code);
16: }
17: }
18:
19: }
|