KickJava   Java API By Example, From Geeks To Geeks.

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


1 package com.opensymphony.workflow.designer.spi;
2
3 import java.util.Map JavaDoc;
4
5 import com.opensymphony.workflow.loader.ConfigFunctionDescriptor;
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 BshFunctionPlugin implements FunctionPlugin
14 {
15     private ConfigFunctionDescriptor function;
16
17     public void setFunction(ConfigFunctionDescriptor descriptor)
18     {
19         this.function = descriptor;
20     }
21
22     public ConfigFunctionDescriptor getFunction()
23     {
24         return function;
25     }
26
27     public boolean editFunction(Map JavaDoc args)
28     {
29         String JavaDoc text = DialogUtils.getTextDialog((String JavaDoc)function.getArgs().get("script"));
30         if(text!=null)
31         {
32             function.getArgs().put("script", text);
33             return true;
34         }
35         return false;
36     }
37 }
38
Popular Tags