public final class Validator extends Object implements SAXVisitBefore, SAXVisitAfter, DOMVisitAfter
<rules:ruleBases>
<rules:ruleBase name="addressing" src="usa_address.properties" provider="org.milyn.smooks.validation.RegexProvider" />
</rules:ruleBases>
<validation:field on="order/header/email" rule="addressing.email" onFail="WARN" />
Options:
Constructor and Description |
---|
Validator()
No-args constructor required by Smooks.
|
Validator(String compositRuleName,
OnFail onFail)
Public constructor.
|
Modifier and Type | Method and Description |
---|---|
String |
getCompositRuleName() |
OnFail |
getOnFail() |
void |
initialize()
Initialize the visitor instance.
|
Validator |
setAppContext(ApplicationContext appContext) |
void |
setCompositRuleName(String compositRuleName) |
void |
setOnFail(OnFail onFail) |
String |
toString() |
void |
visitAfter(Element element,
ExecutionContext executionContext)
Visit the supplied element after visiting its child elements.
|
void |
visitAfter(SAXElement element,
ExecutionContext executionContext)
Visit the supplied element after visiting its child elements.
|
void |
visitBefore(SAXElement element,
ExecutionContext executionContext)
Visit the supplied element before visiting its child elements.
|
@Initialize public void initialize()
public void visitBefore(SAXElement element, ExecutionContext executionContext) throws SmooksException
SAXVisitBefore
visitBefore
in interface SAXVisitBefore
element
- The SAX element being visited.executionContext
- Execution context.SmooksException
- Event processing failure.public void visitAfter(SAXElement element, ExecutionContext executionContext) throws SmooksException
SAXVisitAfter
visitAfter
in interface SAXVisitAfter
element
- The SAX element being visited.executionContext
- Execution context.SmooksException
- Event processing failure.public void visitAfter(Element element, ExecutionContext executionContext) throws SmooksException
DOMVisitAfter
visitAfter
in interface DOMVisitAfter
element
- The DOM element being visited.executionContext
- Request relative instance.SmooksException
- Element processing failure.@ConfigParam(name="name") public void setCompositRuleName(String compositRuleName)
public String getCompositRuleName()
@ConfigParam(defaultVal="ERROR") public void setOnFail(OnFail onFail)
public OnFail getOnFail()
public Validator setAppContext(ApplicationContext appContext)
Copyright © 2020. All rights reserved.