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