1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.springmodules.validation.valang.parser;
18
19 import java.util.Map;
20
21 /**
22 * Objects that are based on the {@link ValangParser} should implement this interface.
23 *
24 * @author Uri Boness
25 */
26 public interface ValangBased {
27
28 /**
29 * Adds the a new custom function to be used in the valang el.
30 *
31 * @param functionName The name of the function.
32 * @param functionClassName The fully qualified class name of the function.
33 */
34 void addCustomFunction(String functionName, String functionClassName);
35
36 /**
37 * Sets custom functions that should be registered with the used {@link ValangParser}.
38 *
39 * @param functionByName the custom functions where the key is the function name and the value is the function
40 * class FQN.
41 */
42 void setCustomFunctions(Map<String, Object> functionByName);
43
44 /**
45 * Sets the date parser that should be registered with the used {@link ValangParser}.
46 *
47 * @param parserByRegexp the date parsers where the key is the regexp associated with the parser and the value
48 * is the parser class FQN.
49 */
50 void setDateParsers(Map parserByRegexp);
51
52 }