com.ibm.broker.plugin

Class MbXPathVariables

  • java.lang.Object
    • com.ibm.broker.plugin.MbXPathVariables


  • public class MbXPathVariables
    extends java.lang.Object
    MbXPathVariables is a container for a set of variable bindings to be used when evaluating XPath expressions. Variable bindings are applied to the expression when it is evaluated using evaluateXPath() or evaluateXPath().
    • Constructor Summary

      Constructors 
      Constructor and Description
      MbXPathVariables() 
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void assign(java.lang.String variable, boolean value)
      Assigns a new value to the named external variable binding in the current object.
      void assign(java.lang.String variable, double value)
      Assigns a new value to the named external variable binding in the current object.
      void assign(java.lang.String variable, java.lang.Object value)
      Assigns a new value to the named external variable binding in the current object.
      void remove(java.lang.String variable)
      Removes the currently assigned value of the named external variable binding.
      void removeAll()
      Removes the currently assigned values of all the named external variable bindings.
      void setRootElement(MbElement rootElement)
      By default the XPath 'root node' is set as the last child of the MbMessage root.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MbXPathVariables

        public MbXPathVariables()
    • Method Detail

      • assign

        public void assign(java.lang.String variable,
                           boolean value)
        Assigns a new value to the named external variable binding in the current object.
        Parameters:
        variable - The name of the variable reference. This can be referred to in the XPath 1.0 expression by inserting a dollar ($) symbol before the variable name.
        value - The value to be assigned to the variable. The value represents an XPath 1.0 boolean type.
      • assign

        public void assign(java.lang.String variable,
                           double value)
        Assigns a new value to the named external variable binding in the current object.
        Parameters:
        variable - The name of the variable reference. This can be referred to in the XPath 1.0 expression by inserting a dollar ($) symbol before the variable name.
        value - The value to be assigned to the variable. The value represents an XPath 1.0 numeric type.
      • assign

        public void assign(java.lang.String variable,
                           java.lang.Object value)
        Assigns a new value to the named external variable binding in the current object.
        Parameters:
        variable - The name of the variable reference. This can be referred to in the XPath 1.0 expression by inserting a dollar ($) symbol before the variable name.
        value - The value to be assigned to the variable. Must be one of:
        • Boolean - representing an XPath 1.0 boolean.
        • Double - representing an XPath 1.0 number.
        • String - representing an XPath 1.0 string.
        • MbElement - representing an XPath 1.0 nodeset (single node).
        • MbElement[] - an array of MbElement objects, representing an XPath 1.0 nodeset.
        • java.util.List - a list of MbElement objects, such as a nodeset returned by MbElement.evaluateXPath().
        Throws:
        java.lang.ArrayStoreException - - A List was passed in which contains one or more objects which are not of type MbElement.
      • removeAll

        public void removeAll()
        Removes the currently assigned values of all the named external variable bindings.
      • remove

        public void remove(java.lang.String variable)
        Removes the currently assigned value of the named external variable binding.
        Parameters:
        variable - The name of the variable to remove.
      • setRootElement

        public void setRootElement(MbElement rootElement)
        By default the XPath 'root node' is set as the last child of the MbMessage root. This is an attempt to locate the message 'Body' and might not be suitable if the XPath is being evaluated on the Environment, LocalEnvironment, or ExceptionList, or on a detached MbElement tree.

        This method allows an alternative root node to be defined. Absolute path locations start at this root node.

        Care must be taken over terminology differences between IIB and XPath. In XPath, the 'root node' is not an 'element node' and will not get matched by an expression step matching a named element or element wildcard. See http://www.w3.org/TR/xpath/#root-node.

        Parameters:
        rootElement - The element to be used as XPath 'root node'
IBM Integration BusTM
JavaTM Plugin Node API