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 import org.springmodules.validation.util.context.ContextAware;
22
23 /**
24 * Objects that are based on the {@link ValangParser} should implement this interface.
25 *
26 * @author Uri Boness
27 */
28 public interface ValangBased extends ContextAware {
29
30 /**
31 * Adds the a new custom function to be used in the valang el.
32 *
33 * @param functionName The name of the function.
34 * @param functionClassName The fully qualified class name of the function.
35 */
36 void addCustomFunction(String functionName, String functionClassName);
37
38 /**
39 * Sets custom functions that should be registered with the used {@link ValangParser}.
40 *
41 * @param functionByName the custom functions where the key is the function name and the value is the function
42 * class FQN.
43 */
44 void setCustomFunctions(Map functionByName);
45
46 /**
47 * Sets the date parser that should be registered with the used {@link ValangParser}.
48 *
49 * @param parserByRegexp the date parsers where the key is the regexp associated with the parser and the value
50 * is the parser class FQN.
51 */
52 void setDateParsers(Map parserByRegexp);
53
54 }