01: package com.opensymphony.workflow.designer.spi;
02:
03: import java.awt.Component;
04: import java.util.Map;
05:
06: import com.opensymphony.workflow.designer.dialogs.DialogUtils;
07: import com.opensymphony.workflow.loader.ConfigFunctionDescriptor;
08:
09: /**
10: * @author Gulei
11: */
12: public class DefaultFunctionPlugin implements FunctionPlugin {
13:
14: ConfigFunctionDescriptor func;
15:
16: public void setFunction(ConfigFunctionDescriptor descriptor) {
17: func = descriptor;
18:
19: }
20:
21: public ConfigFunctionDescriptor getFunction() {
22: return func;
23: }
24:
25: public boolean editFunction(Map args, Component parent) {
26: Map newArg = DialogUtils.getMapDialog(func, func.getType(),
27: null, parent);
28: if (newArg == null) {
29: return false;
30: }
31:
32: func.getArgs().putAll(newArg);
33: return true;
34: }
35:
36: }
|