01: package org.xdev.base.xssl.bpm.compare;
02:
03: import java.util.HashMap;
04:
05: import org.xdev.base.xssl.XSSLReturn;
06: import org.xdev.base.xssl.XSSLAction;
07:
08: /**
09: * @author HNeiper
10: *
11: * To change the template for this generated type comment go to
12: * Window - Preferences - Java - Code Generation - Code and Comments
13: */
14: public class NullTest extends XSSLReturn {
15: private Object returnValue = null;
16:
17: /**
18: * @param id
19: */
20: public NullTest(String id) {
21: super (id);
22: }
23:
24: /**
25: * @param id
26: * @param properties
27: */
28: public NullTest(String id, HashMap properties) {
29: super (id, properties);
30: }
31:
32: /* (non-Javadoc)
33: * @see org.xdev.base.core.object.Configuration#getValue()
34: */
35: public Object getObjectValue() {
36: return this .returnValue;
37: }
38:
39: /* (non-Javadoc)
40: * @see org.xdev.base.xssl.XSSLAction#set()
41: */
42: protected void set() throws Exception {
43:
44: Object obj = null;
45:
46: int count = 0;
47:
48: if (this .hasReference()) {
49:
50: obj = this .getEvaluatedReference();
51: } else {
52: XSSLReturn r = (XSSLReturn) this .getElement(count++);
53:
54: if (r.execute(this )) {
55: obj = r.getObjectValue();
56: }
57: }
58:
59: if (((!this .hasProperty("not") || this
60: .getBooleanProperty("not"))
61: && obj != null && !"".equals(obj))
62: || (this .hasProperty("not")
63: && !this .getBooleanProperty("not") && (obj == null || ""
64: .equals(obj)))) {
65:
66: this .log("not null: " + obj);
67:
68: XSSLAction action = (XSSLAction) this .getElement(count);
69:
70: if (action.execute(this ) && action instanceof XSSLReturn) {
71: this .returnValue = ((XSSLReturn) action)
72: .getObjectValue();
73: }
74: }
75: }
76: }
|