com.sun.ws.management.client
Interface ResourceState

All Superinterfaces:
com.sun.ws.management.ResourceStateDocument
All Known Subinterfaces:
EnumerationResourceState

public interface ResourceState
extends com.sun.ws.management.ResourceStateDocument

Represents any response document. Provides access via XPath to an part of a returned document. Can be used to access action reponses or pull responses. A wrapper for any document.

Author:
wire

Method Summary
 org.w3c.dom.NodeList getValues(java.lang.String xPathExpression)
          Returns a list of nodes that match the provided XPath criteria.
 java.lang.String getValueText(javax.xml.namespace.QName name, org.w3c.dom.Node context)
           
 java.lang.String getValueText(java.lang.String xPathExpression)
          Returns the element text of the Element pointed to by the provided XPath.
 java.lang.String getWrappedValueText(javax.xml.namespace.QName name)
           
 void setFieldValue(javax.xml.namespace.QName name, java.lang.String value, org.w3c.dom.Node context)
          Sets the element text of the first element that matches QName relative to the provided dom node.
 void setFieldValues(java.lang.String xPathExpression, java.lang.String value)
          Sets all the text elements of the selected nodes to the value provided.
 void setWrappedFieldValue(javax.xml.namespace.QName name, java.lang.String value)
          Sets the element text of the specified QName to null.
 
Methods inherited from interface com.sun.ws.management.ResourceStateDocument
getDocument, getFieldNames, getFieldNames, getWrappedFieldNames
 

Method Detail

getValues

org.w3c.dom.NodeList getValues(java.lang.String xPathExpression)
                               throws javax.xml.xpath.XPathExpressionException,
                                      NoMatchFoundException
Returns a list of nodes that match the provided XPath criteria.

Specified by:
getValues in interface com.sun.ws.management.ResourceStateDocument
Parameters:
xPathExpression -
Returns:
A list of matching nodes.
Throws:
javax.xml.xpath.XPathExpressionException
NoMatchFoundException

getValueText

java.lang.String getValueText(java.lang.String xPathExpression)
                              throws javax.xml.xpath.XPathExpressionException,
                                     NoMatchFoundException
Returns the element text of the Element pointed to by the provided XPath.

Specified by:
getValueText in interface com.sun.ws.management.ResourceStateDocument
Parameters:
xPathExpression -
Returns:
A string containg the element text.
Throws:
javax.xml.xpath.XPathExpressionException
NoMatchFoundException

getWrappedValueText

java.lang.String getWrappedValueText(javax.xml.namespace.QName name)
                                     throws javax.xml.xpath.XPathExpressionException,
                                            NoMatchFoundException
Specified by:
getWrappedValueText in interface com.sun.ws.management.ResourceStateDocument
Throws:
javax.xml.xpath.XPathExpressionException
NoMatchFoundException

getValueText

java.lang.String getValueText(javax.xml.namespace.QName name,
                              org.w3c.dom.Node context)
                              throws javax.xml.xpath.XPathExpressionException,
                                     NoMatchFoundException
Specified by:
getValueText in interface com.sun.ws.management.ResourceStateDocument
Throws:
javax.xml.xpath.XPathExpressionException
NoMatchFoundException

setFieldValues

void setFieldValues(java.lang.String xPathExpression,
                    java.lang.String value)
                    throws javax.xml.xpath.XPathExpressionException,
                           NoMatchFoundException
Sets all the text elements of the selected nodes to the value provided. Warning: Make sure your xpath results in a unique node because if you select more than one, they all will get set to value.

Specified by:
setFieldValues in interface com.sun.ws.management.ResourceStateDocument
Parameters:
xPathExpression -
value -
Throws:
javax.xml.xpath.XPathExpressionException
NoMatchFoundException

setWrappedFieldValue

void setWrappedFieldValue(javax.xml.namespace.QName name,
                          java.lang.String value)
                          throws NoMatchFoundException
Sets the element text of the specified QName to null. Skips document node and first wrapper element as a conveniance.

Specified by:
setWrappedFieldValue in interface com.sun.ws.management.ResourceStateDocument
Parameters:
name -
value -
Throws:
NoMatchFoundException

setFieldValue

void setFieldValue(javax.xml.namespace.QName name,
                   java.lang.String value,
                   org.w3c.dom.Node context)
                   throws NoMatchFoundException
Sets the element text of the first element that matches QName relative to the provided dom node.

Specified by:
setFieldValue in interface com.sun.ws.management.ResourceStateDocument
Parameters:
name - A QName of an element which is a direct decendant of the context node.
value - Text to assign to the text element of the selected element
context - This value cannot be null.
Throws:
NoMatchFoundException