|
||||||||||
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 javax.xml.xpath.XPathExpression |
createXPath(java.lang.String expression)
|
void |
dispose()
A lifecycle method where implementor should free up any resources. |
java.lang.Object |
evaluate(java.lang.String expression,
MuleMessage message)
Extracts a single property from the message |
MuleContext |
getMuleContext()
|
java.lang.String |
getName()
Gets the name of the object |
NamespaceManager |
getNamespaceManager()
|
javax.xml.namespace.QName |
getReturnType()
|
protected javax.xml.xpath.XPathExpression |
getXPath(java.lang.String expression)
|
void |
initialise()
Method used to perform any initialisation work. |
void |
setMuleContext(MuleContext context)
|
void |
setName(java.lang.String name)
Sets the name of the object |
void |
setNamespaceManager(NamespaceManager namespaceManager)
|
void |
setReturnType(javax.xml.namespace.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 java.lang.String getName()
NamedObject
getName
in interface NamedObject
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 java.lang.Object evaluate(java.lang.String expression, MuleMessage message)
evaluate
in interface ExpressionEvaluator
expression
- the property expression or expressionmessage
- the message to extract from
public final void setName(java.lang.String name)
setName
in interface NamedObject
name
- the name of the objectprotected javax.xml.xpath.XPathExpression getXPath(java.lang.String expression) throws javax.xml.xpath.XPathExpressionException
javax.xml.xpath.XPathExpressionException
protected javax.xml.xpath.XPathExpression createXPath(java.lang.String expression) throws javax.xml.xpath.XPathExpressionException
javax.xml.xpath.XPathExpressionException
public void dispose()
dispose
in interface Disposable
public NamespaceManager getNamespaceManager()
public void setNamespaceManager(NamespaceManager namespaceManager)
public MuleContext getMuleContext()
public javax.xml.namespace.QName getReturnType()
public void setReturnType(javax.xml.namespace.QName returnType)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |