01: package org.osbl.client.action;
02:
03: import java.util.Map;
04: import java.util.HashMap;
05:
06: /**
07: * Abstract base class, managing the map of values.
08: */
09: public abstract class AbstractObjectAction implements ObjectAction {
10: Map<String, Object> values = new HashMap<String, Object>();
11: boolean enabled = true;
12:
13: public Object getValue(String key) {
14: return values.get(key);
15: }
16:
17: public void putValue(String key, Object value) {
18: if (value == null)
19: values.remove(key);
20: else
21: values.put(key, value);
22: }
23:
24: public boolean isEnabled() {
25: return enabled;
26: }
27:
28: public void setEnabled(boolean enabled) {
29: this.enabled = enabled;
30: }
31: }
|