KickJava   Java API By Example, From Geeks To Geeks.

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


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.ConfigConditionDescriptor;
7
8 /**
9  * @author Gulei
10  */

11 public class DefaultConditionPlugin implements ConditionPlugin
12 {
13   private ConfigConditionDescriptor condition;
14
15   public void setCondition(ConfigConditionDescriptor descriptor)
16   {
17     condition = descriptor;
18   }
19
20   public ConfigConditionDescriptor getCondition()
21   {
22     return condition;
23   }
24
25   public boolean editCondition(Map JavaDoc args)
26   {
27     Map JavaDoc newArg = DialogUtils.getMapDialog(condition, condition.getType(), null);
28     if(newArg == null)
29     {
30       return false;
31     }
32     condition.getArgs().putAll(newArg);
33     return true;
34   }
35 }
36
Popular Tags