|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mule.module.xml.expression.JaxpXPathExpressionEvaluator
public class JaxpXPathExpressionEvaluator
Uses JAXP XPath processing to evaluate xpath expressions against Xml fragments and documents
Note that the Jaxp Expression evaluator differs from the Mule XPATH evaluator slightly since you cna set the JaxP return type as a prefix to the expression i.e.
xpath2:[node]/foo/bar
Where the type can either be boolean, string, number, node or nodeset. iBeans will automatically convert numbers based on the
return type as well as convert node to Document if required.
| Field Summary |
|---|
| Fields inherited from interface org.mule.api.lifecycle.Initialisable |
|---|
PHASE_NAME |
| Fields inherited from interface org.mule.api.lifecycle.Disposable |
|---|
PHASE_NAME |
| Constructor Summary | |
|---|---|
JaxpXPathExpressionEvaluator()
|
|
| Method Summary | |
|---|---|
protected XPathExpression |
createXPath(String expression)
|
void |
dispose()
A lifecycle method where implementor should free up any resources. |
Object |
evaluate(String expression,
MuleMessage message)
Extracts a single property from the message |
MuleContext |
getMuleContext()
|
String |
getName()
Gets the name of the object |
NamespaceManager |
getNamespaceManager()
|
QName |
getReturnType()
|
protected XPathExpression |
getXPath(String expression)
|
void |
initialise()
Method used to perform any initialisation work. |
void |
setMuleContext(MuleContext context)
|
void |
setName(String name)
Sets the name of the object |
void |
setNamespaceManager(NamespaceManager namespaceManager)
|
void |
setReturnType(QName returnType)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JaxpXPathExpressionEvaluator()
| Method Detail |
|---|
public String getName()
NamedObject
getName in interface NamedObjectpublic void setMuleContext(MuleContext context)
setMuleContext in interface MuleContextAware
public void initialise()
throws InitialisationException
InitialisableInitialisationException 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 InitialisableInitialisationException - if a fatal error occurs causing the Mule instance to shutdown
RecoverableException - if an error occurs that can be recovered from
public Object evaluate(String expression,
MuleMessage message)
evaluate in interface ExpressionEvaluatorexpression - the property expression or expressionmessage - the message to extract from
public final void setName(String name)
setName in interface NamedObjectname - the name of the object
protected XPathExpression getXPath(String expression)
throws XPathExpressionException
XPathExpressionException
protected XPathExpression createXPath(String expression)
throws XPathExpressionException
XPathExpressionExceptionpublic void dispose()
dispose in interface Disposablepublic NamespaceManager getNamespaceManager()
public void setNamespaceManager(NamespaceManager namespaceManager)
public MuleContext getMuleContext()
public QName getReturnType()
public void setReturnType(QName returnType)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||