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.ConfigRegisterDescriptor;
08:
09: /**
10: * @author Andrea Capitani (a.capitani@leonardomultimedia.it)
11: * Date: Nov 22, 2004
12: * Time: 10:36:07 AM
13: */
14: public class DefaultRegisterPlugin implements RegisterPlugin {
15:
16: ConfigRegisterDescriptor reg;
17:
18: public void setRegister(ConfigRegisterDescriptor descriptor) {
19: reg = descriptor;
20: }
21:
22: public ConfigRegisterDescriptor getRegister() {
23: return reg;
24: }
25:
26: public boolean editRegister(Map args, Component parent) {
27: Map newArg = DialogUtils.getMapDialog(reg, reg.getType(), null,
28: parent);
29: if (newArg == null) {
30: return false;
31: }
32:
33: reg.getArgs().putAll(newArg);
34: return true;
35: }
36: }
|