1 package com.opensymphony.workflow.designer.spi; 2 3 import java.util.Map ; 4 5 import com.opensymphony.workflow.designer.dialogs.DialogUtils; 6 import com.opensymphony.workflow.loader.ConfigConditionDescriptor; 7 8 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 args) 26 { 27 Map 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 |