KickJava   Java API By Example, From Geeks To Geeks.

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


1 package com.opensymphony.workflow.designer.spi;
2
3 import java.util.Map JavaDoc;
4
5 import com.opensymphony.workflow.designer.dialogs.DialogUtils;
6 import com.opensymphony.workflow.loader.ConfigFunctionDescriptor;
7
8 /**
9  * @author Gulei
10  */

11 public class DefaultFunctionPlugin implements FunctionPlugin
12 {
13
14   ConfigFunctionDescriptor func;
15
16   public void setFunction(ConfigFunctionDescriptor descriptor)
17   {
18     func = descriptor;
19
20   }
21
22   public ConfigFunctionDescriptor getFunction()
23   {
24     return func;
25   }
26
27   public boolean editFunction(Map JavaDoc args)
28   {
29     Map JavaDoc newArg = DialogUtils.getMapDialog(func, func.getType(), null);
30     if(newArg == null)
31     {
32       return false;
33     }
34
35     func.getArgs().putAll(newArg);
36     return true;
37   }
38
39 }
40
Popular Tags