KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > opensymphony > workflow > designer > spi > BshConditionPlugin


1 package com.opensymphony.workflow.designer.spi;
2
3 import java.util.Map JavaDoc;
4
5 import com.opensymphony.workflow.loader.ConfigConditionDescriptor;
6 import com.opensymphony.workflow.designer.dialogs.DialogUtils;
7
8 /**
9  * User: Hani Suleiman
10  * Date: Jan 6, 2004
11  * Time: 1:23:42 PM
12  */

13 public class BshConditionPlugin implements ConditionPlugin
14 {
15     private ConfigConditionDescriptor condition;
16
17     public void setCondition(ConfigConditionDescriptor descriptor)
18     {
19         this.condition = descriptor;
20     }
21
22     public ConfigConditionDescriptor getCondition()
23     {
24         return condition;
25     }
26
27     public boolean editCondition(Map JavaDoc args)
28     {
29         String JavaDoc text = DialogUtils.getTextDialog((String JavaDoc)condition.getArgs().get("script"));
30         if(text!=null)
31         {
32             condition.getArgs().put("script", text);
33             return true;
34         }
35         return false;
36     }
37 }
38
Popular Tags