01: package com.opensymphony.workflow.designer.spi;
02:
03: import java.awt.Component;
04: import java.util.Map;
05:
06: import com.opensymphony.workflow.designer.dialogs.DialogUtils;
07: import com.opensymphony.workflow.loader.ConfigConditionDescriptor;
08:
09: /**
10: * @author Gulei
11: */
12: public class DefaultConditionPlugin implements ConditionPlugin {
13: private ConfigConditionDescriptor condition;
14:
15: public void setCondition(ConfigConditionDescriptor descriptor) {
16: condition = descriptor;
17: }
18:
19: public ConfigConditionDescriptor getCondition() {
20: return condition;
21: }
22:
23: public boolean editCondition(Map args, Component parent) {
24: Map newArg = DialogUtils.getMapDialog(condition, condition
25: .getType(), null, parent);
26: if (newArg == null) {
27: return false;
28: }
29: condition.getArgs().putAll(newArg);
30: return true;
31: }
32: }
|