org.jasig.cas.client.util
Class ThreadLocalXPathExpression

java.lang.Object
  extended by java.lang.ThreadLocal<XPathExpression>
      extended by org.jasig.cas.client.util.ThreadLocalXPathExpression
All Implemented Interfaces:
XPathExpression

public class ThreadLocalXPathExpression
extends ThreadLocal<XPathExpression>
implements XPathExpression

Thread local XPath expression.

Since:
3.4
Author:
Marvin S. Addison

Constructor Summary
ThreadLocalXPathExpression(String xPath, NamespaceContext context)
          Creates a new instance from an XPath expression and namespace context.
 
Method Summary
 String evaluate(InputSource inputSource)
           
 Object evaluate(InputSource inputSource, QName qName)
           
 String evaluate(Object o)
           
 Object evaluate(Object o, QName qName)
           
 NodeList evaluateAsNodeList(Object o)
          Evaluates the XPath expression and returns the result coerced to a node list.
 String evaluateAsString(Object o)
          Evaluates the XPath expression and returns the result coerced to a string.
protected  XPathExpression initialValue()
           
 
Methods inherited from class java.lang.ThreadLocal
get, remove, set
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ThreadLocalXPathExpression

public ThreadLocalXPathExpression(String xPath,
                                  NamespaceContext context)
Creates a new instance from an XPath expression and namespace context.

Parameters:
xPath - XPath expression.
context - Namespace context for handling namespace prefix to URI mappings.
Method Detail

evaluate

public Object evaluate(Object o,
                       QName qName)
                throws XPathExpressionException
Specified by:
evaluate in interface XPathExpression
Throws:
XPathExpressionException

evaluate

public String evaluate(Object o)
                throws XPathExpressionException
Specified by:
evaluate in interface XPathExpression
Throws:
XPathExpressionException

evaluate

public Object evaluate(InputSource inputSource,
                       QName qName)
                throws XPathExpressionException
Specified by:
evaluate in interface XPathExpression
Throws:
XPathExpressionException

evaluate

public String evaluate(InputSource inputSource)
                throws XPathExpressionException
Specified by:
evaluate in interface XPathExpression
Throws:
XPathExpressionException

evaluateAsString

public String evaluateAsString(Object o)
                        throws XPathExpressionException
Evaluates the XPath expression and returns the result coerced to a string.

Parameters:
o - Object on which to evaluate the expression; typically a DOM node.
Returns:
Evaluation result as a string.
Throws:
XPathExpressionException - On XPath evaluation errors.

evaluateAsNodeList

public NodeList evaluateAsNodeList(Object o)
                            throws XPathExpressionException
Evaluates the XPath expression and returns the result coerced to a node list.

Parameters:
o - Object on which to evaluate the expression; typically a DOM node.
Returns:
Evaluation result as a node list.
Throws:
XPathExpressionException - On XPath evaluation errors.

initialValue

protected XPathExpression initialValue()
Overrides:
initialValue in class ThreadLocal<XPathExpression>


Copyright © 2006-2015 Jasig. All Rights Reserved.