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.ConfigValidatorDescriptor;
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 DefaultValidatorPlugin implements ValidatorPlugin {
15:
16: ConfigValidatorDescriptor val;
17:
18: public void setValidator(ConfigValidatorDescriptor descriptor) {
19: val = descriptor;
20: }
21:
22: public ConfigValidatorDescriptor getValidator() {
23: return val;
24: }
25:
26: public boolean editValidator(Map args, Component parent) {
27: Map newArg = DialogUtils.getMapDialog(val, val.getType(), null,
28: parent);
29: if (newArg == null) {
30: return false;
31: }
32:
33: val.getArgs().putAll(newArg);
34: return true;
35: }
36: }
|