com.sun.ws.management.transfer
Class TransferExtensions

java.lang.Object
  extended by com.sun.ws.management.Message
      extended by com.sun.ws.management.soap.SOAP
          extended by com.sun.ws.management.addressing.Addressing
              extended by com.sun.ws.management.transfer.Transfer
                  extended by com.sun.ws.management.transfer.TransferExtensions

public class TransferExtensions
extends Transfer


Field Summary
static javax.xml.namespace.QName DIALECT
           
static ObjectFactory FACTORY
           
static javax.xml.namespace.QName FRAGMENT_TRANSFER
           
static javax.xml.namespace.QName XML_FRAGMENT
           
 
Fields inherited from class com.sun.ws.management.transfer.Transfer
CREATE_ACTION_URI, CREATE_RESPONSE_URI, DELETE_ACTION_URI, DELETE_RESPONSE_URI, FAULT_ACTION_URI, GET_ACTION_URI, GET_RESPONSE_URI, NS_PREFIX, NS_URI, PUT_ACTION_URI, PUT_RESPONSE_URI
 
Fields inherited from class com.sun.ws.management.addressing.Addressing
ACTION, ADDRESS, ANONYMOUS_ENDPOINT_URI, ENDPOINT_REFERENCE, FAULT_TO, FROM, MESSAGE_ID, RELATES_TO, REPLY_TO, RETRY_AFTER, TO, UNSPECIFIED_MESSAGE_ID
 
Fields inherited from class com.sun.ws.management.soap.SOAP
BODY, FALSE, FAULT, MUST_UNDERSTAND, RECEIVER, SENDER, TEXT, TRUE
 
Fields inherited from class com.sun.ws.management.Message
COLON
 
Constructor Summary
TransferExtensions()
           
TransferExtensions(Addressing addr)
           
TransferExtensions(java.io.InputStream is)
           
 
Method Summary
static EndpointReferenceType createEndpointReference(java.lang.String address, java.lang.String resource, java.util.Map<java.lang.String,java.lang.String> selectorMap)
          Utility method to create an EPR.
static Filter createFilter(Transfer request)
          Create a Filter from an Enumeration request
static javax.xml.bind.JAXBElement<MixedDataType> createXmlFragment(java.util.List<org.w3c.dom.Node> nodes)
          Create a JAXBElement object that is a wsman:XmlFragment from a list of XML Nodes.
static javax.xml.bind.JAXBElement<MixedDataType> createXmlFragment(org.w3c.dom.NodeList nodes)
          Create a JAXBElement object that is a wsman:XmlFragment from a NodeList
 java.lang.String getFragmentDialect()
          Returns the FragmentTransfer Dialect if FragmentTrasfer header exists
 javax.xml.soap.SOAPHeaderElement getFragmentHeader()
          Returns the FragmentTransfer SOAPElement if it exists
 java.lang.Object getResource(javax.xml.namespace.QName element)
           
 void setCreateResponse(EndpointReferenceType epr)
          Handles the Create operation response
 void setDeleteResponse()
          Handles the Delete operation response
 void setFragmentCreateResponse(javax.xml.soap.SOAPHeaderElement fragmentHeader, EndpointReferenceType epr)
          Handles the Fragment Create operation response
 void setFragmentCreateResponse(javax.xml.soap.SOAPHeaderElement fragmentHeader, java.util.List<java.lang.Object> requestContent, java.lang.String expression, java.util.List<org.w3c.dom.Node> nodes, EndpointReferenceType epr)
          Deprecated. use setFragmentCreateResponse(SOAPHeaderElement, EndpointReferenceType)
 void setFragmentDeleteResponse(javax.xml.soap.SOAPHeaderElement fragmentHeader)
          Handles the Fragment Delete operation response
 void setFragmentGetResponse(javax.xml.soap.SOAPHeaderElement fragmentTransferHeader, javax.xml.bind.JAXBElement<MixedDataType> fragment)
          Inserts the Fragment-level Get response into the body and adds the FragmentTransfer Header to the SOAP Headers.
 void setFragmentGetResponse(javax.xml.soap.SOAPHeaderElement fragmentTransferHeader, java.util.List<java.lang.Object> content)
          Handles the Fragment-level Get response by wrapping the content into an XmlFragment element and adding the FragmentTransfer Header to the SOAP Headers.
 void setFragmentGetResponse(javax.xml.soap.SOAPHeaderElement fragmentTransferHeader, java.lang.Object resource)
          Inserts the resource as a Fragment-level Get response into the body and adds the FragmentTransfer Header to the SOAP Headers.
 void setFragmentHeader(java.lang.Object expression, java.util.Map<java.lang.String,java.lang.String> namespaces, java.lang.String dialect)
          Sets the FragmentTransfer header in the message.
 void setFragmentHeader(java.lang.Object expression, java.lang.String dialect)
          Sets the FragmentTransfer header in the message.
 void setFragmentPutResponse(javax.xml.soap.SOAPHeaderElement fragmentHeader, java.util.List<java.lang.Object> content)
          Inserts the fragment content as a Fragment-level Put response into the body and adds the FragmentTransfer Header to the SOAP Headers.
 void setFragmentPutResponse(javax.xml.soap.SOAPHeaderElement fragmentHeader, java.util.List<java.lang.Object> requestContent, java.lang.String expression, java.util.List<org.w3c.dom.Node> nodes)
          Deprecated. Use setFragmentPutResponse(SOAPHeaderElement, List)
 void setFragmentPutResponse(javax.xml.soap.SOAPHeaderElement fragmentHeader, java.lang.Object resource)
          Inserts the resource as a Fragment-level Put response into the body and adds the FragmentTransfer Header to the SOAP Headers.
 void setGetResponse(java.lang.Object resource)
          Inserts the resource into the body of the response.
 void setPutResponse()
          Handles the Put operation response
 void setPutResponse(java.lang.Object content)
          Handles the Put operation response
 
Methods inherited from class com.sun.ws.management.transfer.Transfer
getResource
 
Methods inherited from class com.sun.ws.management.addressing.Addressing
addHeaders, addHeaders, addRelatesTo, addRelatesTo, createEndpointReference, createReferenceParametersType, createReferencePropertyType, getAction, getEndpointReference, getFaultTo, getFrom, getHeaders, getMessageId, getRelatesTo, getReplyTo, getTo, setAction, setFaultTo, setFaultTo, setFrom, setFrom, setMessageId, setReplyTo, setReplyTo, setTo, unwrapEndpointReference, validate
 
Methods inherited from class com.sun.ws.management.soap.SOAP
createFaultDetail, getAllMustUnderstand, getChildren, getFault, getXmlBinding, setFault, setXmlBinding
 
Methods inherited from class com.sun.ws.management.Message
addNamespaceDeclarations, createElement, getBody, getContentType, getDocumentBuilder, getEnvelope, getHeader, getMessage, newDocument, prettyPrint, setAttribute, setContentType, toString, writeTo
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

FRAGMENT_TRANSFER

public static final javax.xml.namespace.QName FRAGMENT_TRANSFER

XML_FRAGMENT

public static final javax.xml.namespace.QName XML_FRAGMENT

DIALECT

public static final javax.xml.namespace.QName DIALECT

FACTORY

public static final ObjectFactory FACTORY
Constructor Detail

TransferExtensions

public TransferExtensions()
                   throws javax.xml.soap.SOAPException
Throws:
javax.xml.soap.SOAPException

TransferExtensions

public TransferExtensions(Addressing addr)
                   throws javax.xml.soap.SOAPException
Throws:
javax.xml.soap.SOAPException

TransferExtensions

public TransferExtensions(java.io.InputStream is)
                   throws javax.xml.soap.SOAPException,
                          java.io.IOException
Throws:
javax.xml.soap.SOAPException
java.io.IOException
Method Detail

createEndpointReference

public static EndpointReferenceType createEndpointReference(java.lang.String address,
                                                            java.lang.String resource,
                                                            java.util.Map<java.lang.String,java.lang.String> selectorMap)
Utility method to create an EPR.

Parameters:
address - The transport address of the service.
resource - The resource being addressed.
selectorMap - Selectors used to identify the resource.

getFragmentHeader

public javax.xml.soap.SOAPHeaderElement getFragmentHeader()
                                                   throws javax.xml.soap.SOAPException
Returns the FragmentTransfer SOAPElement if it exists

Returns:
FragmentTransfer SOAPElement if it exists else null
Throws:
javax.xml.soap.SOAPException

getFragmentDialect

public java.lang.String getFragmentDialect()
                                    throws javax.xml.soap.SOAPException
Returns the FragmentTransfer Dialect if FragmentTrasfer header exists

Returns:
FragmentTransfer Dialect if FragmentTrasfer header exists else null
Throws:
javax.xml.soap.SOAPException

setFragmentHeader

public void setFragmentHeader(java.lang.Object expression,
                              java.lang.String dialect)
                       throws javax.xml.soap.SOAPException,
                              javax.xml.bind.JAXBException
Sets the FragmentTransfer header in the message.

Parameters:
expression - a filter expression to be applied against the resource. For the XPath dialect this should be a string containing the XPath expression. For other dialects this must be an object recognized by the marshaller.
dialect - the dialect to be used in filter expressions. The XPath dialect can be used for XPath expressions.
Throws:
javax.xml.soap.SOAPException
javax.xml.bind.JAXBException

setFragmentHeader

public void setFragmentHeader(java.lang.Object expression,
                              java.util.Map<java.lang.String,java.lang.String> namespaces,
                              java.lang.String dialect)
                       throws javax.xml.soap.SOAPException,
                              javax.xml.bind.JAXBException
Sets the FragmentTransfer header in the message.

Parameters:
expression - a filter expression to be applied against the resource. For the XPath dialect this should be a string containing the XPath expression. For other dialects this must be an object recognized by the marshaller.
namespaces - prefix and namespace map for namespaces used in the filter expression.
dialect - the dialect to be used in filter expressions. The XPath dialect can be used for XPath expressions.
Throws:
javax.xml.soap.SOAPException
javax.xml.bind.JAXBException

setGetResponse

public void setGetResponse(java.lang.Object resource)
                    throws javax.xml.bind.JAXBException,
                           javax.xml.soap.SOAPException
Inserts the resource into the body of the response.

Parameters:
resource - Resource to be returned for this Get. The binding must be able to marshall this object.
Throws:
javax.xml.bind.JAXBException
javax.xml.xpath.XPathExpressionException
javax.xml.soap.SOAPException

setFragmentGetResponse

public void setFragmentGetResponse(javax.xml.soap.SOAPHeaderElement fragmentTransferHeader,
                                   java.lang.Object resource)
                            throws javax.xml.bind.JAXBException,
                                   javax.xml.soap.SOAPException
Inserts the resource as a Fragment-level Get response into the body and adds the FragmentTransfer Header to the SOAP Headers. Fragment-level filtering is done on the resource using filter dialect in fragmentTransferHeader, if fragmentTransferHeader is not null, otherwise the compete resource is added to the response.

Parameters:
fragmentTransferHeader - The Fragement Transfer Header to be returned in the headers, if any
resource - Resource to be returned for this Get. The binding must be able to marshall this object.
Throws:
javax.xml.bind.JAXBException
javax.xml.xpath.XPathExpressionException
javax.xml.soap.SOAPException

setFragmentGetResponse

public void setFragmentGetResponse(javax.xml.soap.SOAPHeaderElement fragmentTransferHeader,
                                   javax.xml.bind.JAXBElement<MixedDataType> fragment)
                            throws javax.xml.bind.JAXBException,
                                   javax.xml.soap.SOAPException
Inserts the Fragment-level Get response into the body and adds the FragmentTransfer Header to the SOAP Headers.

Parameters:
fragmentTransferHeader - The Fragement Transfer Header to be returned in the headers
fragment - Fragment object for the response
Throws:
javax.xml.bind.JAXBException
javax.xml.soap.SOAPException

setFragmentGetResponse

public void setFragmentGetResponse(javax.xml.soap.SOAPHeaderElement fragmentTransferHeader,
                                   java.util.List<java.lang.Object> content)
                            throws javax.xml.bind.JAXBException,
                                   javax.xml.soap.SOAPException
Handles the Fragment-level Get response by wrapping the content into an XmlFragment element and adding the FragmentTransfer Header to the SOAP Headers.

Parameters:
fragmentTransferHeader - The Fragement Transfer Header to be returned in the headers
content - A Collection of Objects
Throws:
javax.xml.bind.JAXBException
javax.xml.soap.SOAPException

setDeleteResponse

public void setDeleteResponse()
                       throws javax.xml.soap.SOAPException
Handles the Delete operation response

Throws:
javax.xml.soap.SOAPException

setFragmentDeleteResponse

public void setFragmentDeleteResponse(javax.xml.soap.SOAPHeaderElement fragmentHeader)
                               throws javax.xml.soap.SOAPException
Handles the Fragment Delete operation response

Parameters:
fragmentHeader -
Throws:
javax.xml.soap.SOAPException

setPutResponse

public void setPutResponse(java.lang.Object content)
                    throws javax.xml.soap.SOAPException,
                           javax.xml.bind.JAXBException
Handles the Put operation response

Throws:
javax.xml.soap.SOAPException
javax.xml.bind.JAXBException

setPutResponse

public void setPutResponse()
                    throws javax.xml.soap.SOAPException
Handles the Put operation response

Throws:
javax.xml.soap.SOAPException

setFragmentPutResponse

public void setFragmentPutResponse(javax.xml.soap.SOAPHeaderElement fragmentHeader,
                                   java.lang.Object resource)
                            throws javax.xml.soap.SOAPException,
                                   javax.xml.bind.JAXBException
Inserts the resource as a Fragment-level Put response into the body and adds the FragmentTransfer Header to the SOAP Headers. Fragment-level filtering is done on the resource using filter dialect in fragmentTransferHeader, if fragmentTransferHeader is not null, otherwise a standard put response is done.

Parameters:
fragmentHeader - the Fragement Transfer Header to be returned in the headers, if any
resource - Resource to be returned for this Get. The binding must be able to marshall this object.
Throws:
javax.xml.bind.JAXBException
javax.xml.xpath.XPathExpressionException
javax.xml.soap.SOAPException

setFragmentPutResponse

public void setFragmentPutResponse(javax.xml.soap.SOAPHeaderElement fragmentHeader,
                                   java.util.List<java.lang.Object> content)
                            throws javax.xml.soap.SOAPException,
                                   javax.xml.bind.JAXBException
Inserts the fragment content as a Fragment-level Put response into the body and adds the FragmentTransfer Header to the SOAP Headers.

Parameters:
fragmentHeader - the Fragement Transfer Header to be returned in the headers
content - content to be inserted into the XmlFragment
Throws:
javax.xml.soap.SOAPException
javax.xml.bind.JAXBException

setFragmentPutResponse

public void setFragmentPutResponse(javax.xml.soap.SOAPHeaderElement fragmentHeader,
                                   java.util.List<java.lang.Object> requestContent,
                                   java.lang.String expression,
                                   java.util.List<org.w3c.dom.Node> nodes)
                            throws javax.xml.soap.SOAPException,
                                   javax.xml.bind.JAXBException
Deprecated. Use setFragmentPutResponse(SOAPHeaderElement, List)

Throws:
javax.xml.soap.SOAPException
javax.xml.bind.JAXBException

setCreateResponse

public void setCreateResponse(EndpointReferenceType epr)
                       throws javax.xml.soap.SOAPException,
                              javax.xml.bind.JAXBException
Handles the Create operation response

Parameters:
epr - the EndpointReference of the newly created object
Throws:
javax.xml.soap.SOAPException
javax.xml.bind.JAXBException

setFragmentCreateResponse

public void setFragmentCreateResponse(javax.xml.soap.SOAPHeaderElement fragmentHeader,
                                      EndpointReferenceType epr)
                               throws javax.xml.soap.SOAPException,
                                      javax.xml.bind.JAXBException
Handles the Fragment Create operation response

Parameters:
epr - the EndpointReference of the newly created object
Throws:
javax.xml.soap.SOAPException
javax.xml.bind.JAXBException

setFragmentCreateResponse

public void setFragmentCreateResponse(javax.xml.soap.SOAPHeaderElement fragmentHeader,
                                      java.util.List<java.lang.Object> requestContent,
                                      java.lang.String expression,
                                      java.util.List<org.w3c.dom.Node> nodes,
                                      EndpointReferenceType epr)
                               throws javax.xml.soap.SOAPException,
                                      javax.xml.bind.JAXBException
Deprecated. use setFragmentCreateResponse(SOAPHeaderElement, EndpointReferenceType)

Parameters:
fragmentHeader -
requestContent -
expression -
nodes -
epr -
Throws:
javax.xml.soap.SOAPException
javax.xml.bind.JAXBException

getResource

public java.lang.Object getResource(javax.xml.namespace.QName element)
                             throws javax.xml.bind.JAXBException,
                                    javax.xml.soap.SOAPException
Overrides:
getResource in class Transfer
Throws:
javax.xml.bind.JAXBException
javax.xml.soap.SOAPException

createFilter

public static Filter createFilter(Transfer request)
                           throws CannotProcessFilterFault,
                                  FilteringRequestedUnavailableFault
Create a Filter from an Enumeration request

Returns:
Returns a Filter object if a filter exists in the request, otherwise null.
Throws:
CannotProcessFilterFault, - FilteringRequestedUnavailableFault, InternalErrorFault
CannotProcessFilterFault
FilteringRequestedUnavailableFault

createXmlFragment

public static javax.xml.bind.JAXBElement<MixedDataType> createXmlFragment(java.util.List<org.w3c.dom.Node> nodes)
Create a JAXBElement object that is a wsman:XmlFragment from a list of XML Nodes.

Parameters:
nodes - Nodes to be inserted into the XmlFragment element.
Returns:
XmlFragment JAXBElement object.

createXmlFragment

public static javax.xml.bind.JAXBElement<MixedDataType> createXmlFragment(org.w3c.dom.NodeList nodes)
Create a JAXBElement object that is a wsman:XmlFragment from a NodeList

Parameters:
nodes - Nodes to be inserted into the XmlFragment element.
Returns:
XmlFragment JAXBElement object.