|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.mule.module.xml.filters.JXPathFilter
public class JXPathFilter
JXPathFilter
evaluates an XPath expression against a W3C Document,
XML string, or Java bean and returns true if the result is as expected.
Field Summary | |
---|---|
protected Log |
logger
|
Fields inherited from interface org.mule.api.lifecycle.Initialisable |
---|
PHASE_NAME |
Constructor Summary | |
---|---|
JXPathFilter()
|
|
JXPathFilter(String pattern)
|
|
JXPathFilter(String pattern,
String expectedValue)
|
Method Summary | |
---|---|
boolean |
accept(MuleMessage obj)
Check a given message against this filter. |
boolean |
equals(Object obj)
|
Map |
getContextProperties()
|
String |
getExpectedValue()
|
org.apache.commons.jxpath.AbstractFactory |
getFactory()
|
Map<String,String> |
getNamespaces()
|
String |
getPattern()
|
String |
getValue()
Deprecated. Use getExpectedValue() . |
int |
hashCode()
|
void |
initialise()
Method used to perform any initialisation work. |
protected void |
initialise(org.apache.commons.jxpath.JXPathContext context)
Initializes the JXPathContext based on any relevant properties set for the filter. |
boolean |
isLenient()
|
void |
setContextProperties(Map contextProperties)
|
void |
setExpectedValue(String expectedValue)
Sets the expected result value of the XPath expression |
void |
setFactory(org.apache.commons.jxpath.AbstractFactory factory)
|
void |
setLenient(boolean lenient)
|
void |
setMuleContext(MuleContext context)
|
void |
setNamespaces(Map<String,String> namespaces)
|
void |
setPattern(String pattern)
|
void |
setValue(String value)
Deprecated. Use setExpectedValue(String expectedValue) . |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected transient Log logger
Constructor Detail |
---|
public JXPathFilter()
public JXPathFilter(String pattern)
public JXPathFilter(String pattern, String expectedValue)
Method Detail |
---|
public void setMuleContext(MuleContext context)
setMuleContext
in interface MuleContextAware
public void initialise() throws InitialisationException
Initialisable
InitialisationException
should be thrown,
causing the Mule instance to shutdown. If the error is recoverable, say by
retrying to connect, a RecoverableException
should be thrown.
There is no guarantee that by throwing a Recoverable exception that the Mule
instance will not shut down.
initialise
in interface Initialisable
InitialisationException
- if a fatal error occurs causing the Mule instance to shutdown
RecoverableException
- if an error occurs that can be recovered frompublic boolean accept(MuleMessage obj)
Filter
accept
in interface Filter
obj
- a non null message to filter.
true
if the message matches the filterprotected void initialise(org.apache.commons.jxpath.JXPathContext context)
context
- the JXPathContext to initializepublic String getPattern()
public void setPattern(String pattern)
pattern
- The XPath expressionpublic String getExpectedValue()
public void setExpectedValue(String expectedValue)
@Deprecated public String getValue()
getExpectedValue()
.
@Deprecated public void setValue(String value)
setExpectedValue(String expectedValue)
.
public Map<String,String> getNamespaces()
public void setNamespaces(Map<String,String> namespaces)
public Map getContextProperties()
public void setContextProperties(Map contextProperties)
public org.apache.commons.jxpath.AbstractFactory getFactory()
public void setFactory(org.apache.commons.jxpath.AbstractFactory factory)
public boolean isLenient()
public void setLenient(boolean lenient)
public boolean equals(Object obj)
equals
in class Object
public int hashCode()
hashCode
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |