|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springmodules.validation.util.condition.AbstractCondition org.springmodules.validation.util.cel.valang.ValangCondition
public class ValangCondition
A Condition
implementation that checks the given object based on a valang boolean expression.
Constructor Summary | |
---|---|
ValangCondition(String expression)
Constructor |
|
ValangCondition(String expression,
Map functionsByName,
Map parserByRegexp)
Constructor |
Method Summary | |
---|---|
void |
addCustomFunction(String functionName,
String functionClassName)
Adds the a new custom function to be used in the valang el. |
boolean |
doCheck(Object object)
Performs the actual checking of this condition on the checked object. |
void |
setCustomFunctions(Map functionByName)
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 org.springmodules.validation.util.condition.AbstractCondition |
---|
afterObjectChecked, and, beforeObjectChecked, check, or |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ValangCondition(String expression)
public ValangCondition(String expression, Map functionsByName, Map parserByRegexp)
Method Detail |
---|
public boolean doCheck(Object object)
AbstractCondition
doCheck
in class AbstractCondition
object
- The object to be checked.
true
if the given object adheres to this condition, false
otherwise.public void addCustomFunction(String functionName, String functionClassName)
ValangBased
addCustomFunction
in interface ValangBased
functionName
- The name of the function.functionClassName
- The fully qualified class name of the function.public void setCustomFunctions(Map functionByName)
ValangBased
ValangParser
.
setCustomFunctions
in interface ValangBased
functionByName
- the custom functions where the key is the function name and the value is the function
class FQN.public void setDateParsers(Map parserByRegexp)
ValangBased
ValangParser
.
setDateParsers
in interface ValangBased
parserByRegexp
- the date parsers where the key is the regexp associated with the parser and the value
is the parser class FQN.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |