com.google.api.client.googleapis.xml.atom
Class AtomPatchRelativeToOriginalContent

java.lang.Object
  extended by com.google.api.client.http.AbstractHttpContent
      extended by com.google.api.client.http.xml.AbstractXmlHttpContent
          extended by com.google.api.client.googleapis.xml.atom.AtomPatchRelativeToOriginalContent
All Implemented Interfaces:
HttpContent

public final class AtomPatchRelativeToOriginalContent
extends AbstractXmlHttpContent

Serializes an optimal Atom XML PATCH HTTP content based on the data key/value mapping object for an Atom entry, by comparing the original value to the patched value.

Sample usage:

 
  static void setContent(HttpRequest request, XmlNamespaceDictionary namespaceDictionary,
      Object originalEntry, Object patchedEntry) {
    request.setContent(
        new AtomPatchRelativeToOriginalContent(namespaceDictionary, originalEntry, patchedEntry));
  }
 
 

Since:
1.0
Author:
Yaniv Inbar

Constructor Summary
AtomPatchRelativeToOriginalContent(XmlNamespaceDictionary namespaceDictionary, Object originalEntry, Object patchedEntry)
           
 
Method Summary
 Object getOriginalEntry()
          Returns the data key name/value pairs for the original unmodified Atom entry.
 Object getPatchedEntry()
          Returns the data key name/value pairs for the updated/patched Atom entry.
protected  void writeTo(org.xmlpull.v1.XmlSerializer serializer)
           
 
Methods inherited from class com.google.api.client.http.xml.AbstractXmlHttpContent
getNamespaceDictionary, getType, setType, writeTo
 
Methods inherited from class com.google.api.client.http.AbstractHttpContent
computeLength, getEncoding, getLength, retrySupported
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AtomPatchRelativeToOriginalContent

public AtomPatchRelativeToOriginalContent(XmlNamespaceDictionary namespaceDictionary,
                                          Object originalEntry,
                                          Object patchedEntry)
Parameters:
namespaceDictionary - XML namespace dictionary
Since:
1.5
Method Detail

writeTo

protected void writeTo(org.xmlpull.v1.XmlSerializer serializer)
                throws IOException
Specified by:
writeTo in class AbstractXmlHttpContent
Throws:
IOException

getPatchedEntry

public final Object getPatchedEntry()
Returns the data key name/value pairs for the updated/patched Atom entry.

Since:
1.5

getOriginalEntry

public final Object getOriginalEntry()
Returns the data key name/value pairs for the original unmodified Atom entry.

Since:
1.5


Copyright © 2010-2012 Google. All Rights Reserved.