Revision 45798
Added by Michele Artini about 7 years ago
ProtocolParameter.java | ||
---|---|---|
8 | 8 |
private boolean optional = false; |
9 | 9 |
private ProtocolParameterType type = ProtocolParameterType.TEXT; |
10 | 10 |
private String regex = null; |
11 |
private Class<? extends ParamValuesFunction> populateFunction = NullFunction.class; |
|
12 |
private boolean functionPopulated = false; |
|
13 | 11 |
|
14 | 12 |
public ProtocolParameter() {} |
15 | 13 |
|
16 | 14 |
public ProtocolParameter(final String name, final boolean optional, final ProtocolParameterType type, final String regex) { |
17 |
this(name, optional, type, regex, null); |
|
18 |
} |
|
19 |
|
|
20 |
public ProtocolParameter(final String name, final boolean optional, final ProtocolParameterType type, final String regex, |
|
21 |
final Class<? extends ParamValuesFunction> populateFunction) { |
|
22 | 15 |
this.name = name; |
23 | 16 |
this.optional = optional; |
24 | 17 |
this.type = type; |
25 | 18 |
this.regex = regex; |
26 |
this.populateFunction = populateFunction; |
|
27 |
functionPopulated = this.populateFunction != null; |
|
28 | 19 |
} |
29 | 20 |
|
30 | 21 |
public String getName() { |
... | ... | |
60 | 51 |
this.regex = regex; |
61 | 52 |
} |
62 | 53 |
|
63 |
public Class<? extends ParamValuesFunction> getPopulateFunction() { |
|
64 |
return populateFunction; |
|
65 |
} |
|
66 |
|
|
67 |
public void setPopulateFunction(final Class<? extends ParamValuesFunction> populateFunction) { |
|
68 |
this.populateFunction = populateFunction; |
|
69 |
functionPopulated = this.populateFunction != null; |
|
70 |
} |
|
71 |
|
|
72 |
public boolean isFunctionPopulated() { |
|
73 |
return functionPopulated; |
|
74 |
} |
|
75 |
|
|
76 |
public void setFunctionPopulated(final boolean functionPopulated) { |
|
77 |
this.functionPopulated = functionPopulated; |
|
78 |
} |
|
79 |
|
|
80 | 54 |
} |
Also available in: Unified diff