01: package newprocess.validation;
02:
03: import newprocess.Expression;
04:
05: /**
06: * @author sh
07: *
08: */
09: public class ExpressionValidatorImpl implements ExpressionValidator {
10:
11: // singleton
12: public static final ExpressionValidatorImpl INSTANCE = new ExpressionValidatorImpl();
13:
14: /**
15: * validates the expression of the Expression
16: * @param value
17: * @return
18: */
19: public boolean validateExpression(Expression expr) {
20: String value = expr.getExpression();
21: if (value == null || value == "")
22: return false;
23: return true;
24: }
25: }
|