Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.mule.module.xml.expression
Class JaxpXPathExpressionEvaluator

    java.lang.Object
      org.mule.module.xml.expression.JaxpXPathExpressionEvaluator

All Implemented Interfaces:
  MuleContextAware, ExpressionEvaluator, Disposable, Initialisable, NamedObject

    public class JaxpXPathExpressionEvaluator

extends Object
implements ExpressionEvaluator, Initialisable, Disposable, MuleContextAware

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

### JaxpXPathExpressionEvaluator

    public JaxpXPathExpressionEvaluator()

Method Detail

### getName

    public String getName()

  Description copied from interface: `NamedObject`
  Gets the name of the object

  Specified by:
    `getName` in interface `NamedObject`
  Returns:
    the name of the object

### setMuleContext

    public void setMuleContext(MuleContext context)

  Specified by:
    `setMuleContext` in interface `MuleContextAware`

### initialise

    public void initialise()
                    throws InitialisationException

  Description copied from interface: `Initialisable`
  Method used to perform any initialisation work. If a fatal error occurs during initialisation an `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.

  Specified by:
    `initialise` in interface `Initialisable`
  Throws:
    `InitialisationException` - if a fatal error occurs causing the Mule instance to shutdown
    `RecoverableException` - if an error occurs that can be recovered from

### evaluate

    public Object evaluate(String expression,
                           MuleMessage message)

  Extracts a single property from the message

  Specified by:
    `evaluate` in interface `ExpressionEvaluator`
  Parameters:
    `expression` - the property expression or expression
    `message` - the message to extract from
  Returns:
    the result of the extraction or null if the property was not found

### setName

    public final void setName(String name)

  Sets the name of the object

  Specified by:
    `setName` in interface `NamedObject`
  Parameters:
    `name` - the name of the object

### getXPath

    protected XPathExpression getXPath(String expression)
                                throws XPathExpressionException

  Throws:
    `XPathExpressionException`

### createXPath

    protected XPathExpression createXPath(String expression)
                                   throws XPathExpressionException

  Throws:
    `XPathExpressionException`

### dispose

    public void dispose()

  A lifecycle method where implementor should free up any resources. If an exception is thrown it should just be logged and processing should continue. This method should not throw Runtime exceptions.

  Specified by:
    `dispose` in interface `Disposable`

### getNamespaceManager

    public NamespaceManager getNamespaceManager()

### setNamespaceManager

    public void setNamespaceManager(NamespaceManager namespaceManager)

### getMuleContext

    public MuleContext getMuleContext()

### getReturnType

    public QName getReturnType()

### setReturnType

    public void setReturnType(QName returnType)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003-2010 MuleSoft, Inc.. All Rights Reserved.