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 AbstractXPathExpressionEvaluator

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

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

Direct Known Subclasses:
  BeanPayloadExpressionEvaluator, XPathExpressionEvaluator

    public abstract class AbstractXPathExpressionEvaluator

extends Object
implements ExpressionEvaluator, Initialisable, Disposable, MuleContextAware

Provides a base class for XPath property extractors. The XPath engine used is jaxen (http://jaxen.org) which supports XPath queries on other object models such as JavaBeans as well as Xml

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
`AbstractXPathExpressionEvaluator()`

Method Summary
`protected void` | `addNamespaces(NamespaceManager manager, org.jaxen.XPath xpath)`
`protected abstract org.jaxen.XPath` | `createXPath(String expression, Object object)`
`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
`protected abstract Object` | `extractResultFromNode(Object result)`
`protected List<?>` | `extractResultsFromNodes(List<?> results)`
`MuleContext` | `getMuleContext()`
`NamespaceManager` | `getNamespaceManager()`
`protected org.jaxen.XPath` | `getXPath(String expression, Object object)`
`void` | `initialise()` Method used to perform any initialisation work.
`void` | `inject()`
`void` | `setMuleContext(MuleContext context)`
`void` | `setName(String name)` Sets the name of the object
`void` | `setNamespaceManager(NamespaceManager namespaceManager)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface org.mule.api.NamedObject
`getName`

Constructor Detail

### AbstractXPathExpressionEvaluator

    public AbstractXPathExpressionEvaluator()

Method Detail

### 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

### inject

    public void inject()
                throws Exception

  Throws:
    `Exception`

### 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

### addNamespaces

    protected void addNamespaces(NamespaceManager manager,
                                 org.jaxen.XPath xpath)

### 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 org.jaxen.XPath getXPath(String expression,
                                       Object object)
                                throws org.jaxen.JaxenException

  Throws:
    `org.jaxen.JaxenException`

### createXPath

    protected abstract org.jaxen.XPath createXPath(String expression,
                                                   Object object)
                                            throws org.jaxen.JaxenException

  Throws:
    `org.jaxen.JaxenException`

### extractResultsFromNodes

    protected List<?> extractResultsFromNodes(List<?> results)

### 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()

### extractResultFromNode

    protected abstract Object extractResultFromNode(Object result)

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.