1 package com.opensymphony.workflow.designer.spi; 2 3 import java.util.Map ; 4 5 import com.opensymphony.workflow.loader.ConfigConditionDescriptor; 6 import com.opensymphony.workflow.designer.dialogs.DialogUtils; 7 8 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 args) 28 { 29 String text = DialogUtils.getTextDialog((String )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 |