|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springmodules.validation.valang.parser.SimpleValangBased
public class SimpleValangBased
A simple implementation of ValangBased.
| Constructor Summary | |
|---|---|
SimpleValangBased()
|
|
| Method Summary | |
|---|---|
void |
addCustomFunction(String functionName,
String functionClassName)
Adds the a new custom function to be used in the valang el. |
ValangParser |
createValangParser(String expression)
Creates a new ValangParser that is already configured with the proper custom functions and date
parsers. |
ValangParser |
createValangParser(String expression,
String className)
Creates a new ValangParser that is already configured with the proper custom functions and date
parsers and uses the class name to perform bytecode generation to avoid reflection. |
protected Map<String,Object> |
findAllCustomFunctionsInApplicationContext()
Finds all FunctionDefinition and FunctionWrapper beans
in the Spring context. |
Map<String,Object> |
getAllCustomFunctions()
Returns all the custom functions that can be found. |
Map<String,Object> |
getCustomFunctions()
|
Map |
getDateParsers()
|
void |
initValang(Object object)
|
void |
setApplicationContext(ApplicationContext applicationContext)
Implementation of ApplicationContextAware. |
void |
setCustomFunctions(Map<String,Object> hCustomFunctions)
Sets custom functions that should be registered with the used ValangParser. |
void |
setDateParsers(Map parserByRegexp)
Sets the date parser that should be registered with the used ValangParser. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SimpleValangBased()
| Method Detail |
|---|
public void setApplicationContext(ApplicationContext applicationContext)
throws BeansException
ApplicationContextAware.
setApplicationContext in interface ApplicationContextAwareBeansExceptionpublic void setCustomFunctions(Map<String,Object> hCustomFunctions)
ValangBasedValangParser.
setCustomFunctions in interface ValangBasedhCustomFunctions - the custom functions where the key is the function name and the value is the function
class FQN.ValangBased.setCustomFunctions(java.util.Map)
public void addCustomFunction(String functionName,
String functionClassName)
ValangBased
addCustomFunction in interface ValangBasedfunctionName - The name of the function.functionClassName - The fully qualified class name of the function.ValangBased.addCustomFunction(String, String)public void setDateParsers(Map parserByRegexp)
ValangBasedValangParser.
setDateParsers in interface ValangBasedparserByRegexp - the date parsers where the key is the regexp associated with the parser and the value
is the parser class FQN.ValangBased.setDateParsers(java.util.Map)public Map<String,Object> getCustomFunctions()
public Map getDateParsers()
public ValangParser createValangParser(String expression)
ValangParser that is already configured with the proper custom functions and date
parsers.
expression - Valang language validation expression.
ValangParser.
public ValangParser createValangParser(String expression,
String className)
ValangParser that is already configured with the proper custom functions and date
parsers and uses the class name to perform bytecode generation to avoid reflection.
expression - Valang language validation expression.className - Name of the Class to generated
a Function to retrieve a property.
ValangParser.public void initValang(Object object)
public Map<String,Object> getAllCustomFunctions()
FunctionDefinition
beans.
protected Map<String,Object> findAllCustomFunctionsInApplicationContext()
FunctionDefinition and FunctionWrapper beans
in the Spring context.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||