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.filters
Class XPathFilter

    java.lang.Object
      org.mule.module.xml.filters.AbstractJaxpFilter
          org.mule.module.xml.filters.XPathFilter

All Implemented Interfaces:
  MuleContextAware, Initialisable, Filter

    public class XPathFilter

extends AbstractJaxpFilter
implements Filter, Initialisable, MuleContextAware

Field Summary
`protected Log` | `logger`

Fields inherited from interface org.mule.api.lifecycle.Initialisable
`PHASE_NAME`

Constructor Summary
`XPathFilter()`
`XPathFilter(String pattern)`
`XPathFilter(String pattern, String expectedValue)`

Method Summary
`boolean` | `accept(MuleMessage message)` Check a given message against this filter.
`protected boolean` | `accept(Node node)`
`boolean` | `equals(Object obj)`
`String` | `getExpectedValue()`
`Map<String,String>` | `getNamespaces()` The prefix-to-namespace map for the namespace context to be applied to the XPath evaluation.
`String` | `getPattern()`
`XPath` | `getXpath()` The xpath object to use to evaluate the expression.
`int` | `hashCode()`
`void` | `initialise()` Method used to perform any initialisation work.
`void` | `setExpectedValue(String expectedValue)` Sets the expected result value of the XPath expression
`void` | `setMuleContext(MuleContext context)`
`void` | `setNamespaces(Map<String,String> prefixToNamespaceMap)` The prefix-to-namespace map for the namespace context to be applied to the XPath evaluation.
`void` | `setPattern(String pattern)`
`void` | `setXpath(XPath xpath)` The xpath object to use to evaluate the expression.

Methods inherited from class org.mule.module.xml.filters.AbstractJaxpFilter
`getDocumentBuilderFactory, setDocumentBuilderFactory, toDOMNode`

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

Field Detail

### logger

    protected transient Log logger

Constructor Detail

### XPathFilter

    public XPathFilter()

### XPathFilter

    public XPathFilter(String pattern)

### XPathFilter

    public XPathFilter(String pattern,
                       String expectedValue)

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`
  Overrides:
    `initialise` in class `AbstractJaxpFilter`
  Throws:
    `InitialisationException` - if a fatal error occurs causing the Mule instance to shutdown
    `RecoverableException` - if an error occurs that can be recovered from

### accept

    public boolean accept(MuleMessage message)

  Description copied from interface: `Filter`
  Check a given message against this filter.

  Specified by:
    `accept` in interface `Filter`
  Parameters:
    `message` - a non null message to filter.
  Returns:
    `true` if the message matches the filter

### accept

    protected boolean accept(Node node)

### getPattern

    public String getPattern()

  Returns:
    XPath expression

### setPattern

    public void setPattern(String pattern)

  Parameters:
    `pattern` - The XPath expression

### getExpectedValue

    public String getExpectedValue()

  Returns:
    The expected result value of the XPath expression

### setExpectedValue

    public void setExpectedValue(String expectedValue)

  Sets the expected result value of the XPath expression

  Parameters:
    `expectedValue` - The expected value.

### getXpath

    public XPath getXpath()

  The xpath object to use to evaluate the expression.

  Returns:
    The xpath object to use to evaluate the expression.

### setXpath

    public void setXpath(XPath xpath)

  The xpath object to use to evaluate the expression.

  Parameters:
    `xpath` - The xpath object to use to evaluate the expression.

### getNamespaces

    public Map<String,String> getNamespaces()

  The prefix-to-namespace map for the namespace context to be applied to the XPath evaluation.

  Returns:
    The prefix-to-namespace map for the namespace context to be applied to the XPath evaluation.

### setNamespaces

    public void setNamespaces(Map<String,String> prefixToNamespaceMap)

  The prefix-to-namespace map for the namespace context to be applied to the XPath evaluation.

  Parameters:
    `prefixToNamespaceMap` - The prefix-to-namespace map for the namespace context to be applied to the XPath evaluation.

### equals

    public boolean equals(Object obj)

  Overrides:
    `equals` in class `Object`

### hashCode

    public int hashCode()

  Overrides:
    `hashCode` in class `Object`

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.