Class AtomPatchRelativeToOriginalContent (1.35.2)

public final class AtomPatchRelativeToOriginalContent extends AbstractXmlHttpContent

Beta
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));
 }
 

Inheritance

Object > AbstractHttpContent > com.google.api.client.http.xml.AbstractXmlHttpContent > AtomPatchRelativeToOriginalContent

Constructors

AtomPatchRelativeToOriginalContent(XmlNamespaceDictionary namespaceDictionary, Object originalEntry, Object patchedEntry)

public AtomPatchRelativeToOriginalContent(XmlNamespaceDictionary namespaceDictionary, Object originalEntry, Object patchedEntry)
Parameters
NameDescription
namespaceDictionarycom.google.api.client.xml.XmlNamespaceDictionary

XML namespace dictionary

originalEntryObject
patchedEntryObject

Methods

getOriginalEntry()

public final Object getOriginalEntry()

Returns the data key name/value pairs for the original unmodified Atom entry.

Returns
TypeDescription
Object

getPatchedEntry()

public final Object getPatchedEntry()

Returns the data key name/value pairs for the updated/patched Atom entry.

Returns
TypeDescription
Object

setMediaType(HttpMediaType mediaType)

public AtomPatchRelativeToOriginalContent setMediaType(HttpMediaType mediaType)
Parameter
NameDescription
mediaTypecom.google.api.client.http.HttpMediaType
Returns
TypeDescription
AtomPatchRelativeToOriginalContent
Overrides
com.google.api.client.http.xml.AbstractXmlHttpContent.setMediaType(com.google.api.client.http.HttpMediaType)

writeTo(XmlSerializer serializer)

protected void writeTo(XmlSerializer serializer)
Parameter
NameDescription
serializerorg.xmlpull.v1.XmlSerializer
Overrides
com.google.api.client.http.xml.AbstractXmlHttpContent.writeTo(org.xmlpull.v1.XmlSerializer)
Exceptions
TypeDescription
IOException