01: package com.opensymphony.workflow.designer.spi;
02:
03: import java.awt.Component;
04: import java.util.Map;
05:
06: import com.opensymphony.workflow.loader.ConfigConditionDescriptor;
07: import com.opensymphony.workflow.designer.dialogs.DialogUtils;
08:
09: /**
10: * User: Hani Suleiman
11: * Date: Jan 6, 2004
12: * Time: 1:23:42 PM
13: */
14: public class BshConditionPlugin implements ConditionPlugin {
15: private ConfigConditionDescriptor condition;
16:
17: public void setCondition(ConfigConditionDescriptor descriptor) {
18: this .condition = descriptor;
19: }
20:
21: public ConfigConditionDescriptor getCondition() {
22: return condition;
23: }
24:
25: public boolean editCondition(Map args, Component parent) {
26: String text = DialogUtils.getTextDialog((String) condition
27: .getArgs().get("script"), parent);
28: if (text != null) {
29: condition.getArgs().put("script", text);
30: return true;
31: }
32: return false;
33: }
34: }
|