org.mobicents.protocols.xcap.diff.component
Interface DocumentPatchComponentBuilder<C,D,E,N>

Type Parameters:
C - the component type, defines what is the concrete type of each patch component, to be aggregated in a XCAP DIFF patch
D - the document type, defines what is the concrete type of XML documents used
E - the element type, defines what is the concrete type of XML elements used
N - the xml patch ops node type, defines what is the concrete type of XML patch ops node params used by XmlPatchOperationsBuilder

public interface DocumentPatchComponentBuilder<C,D,E,N>

Builds patch components indicating changes in a document.

Author:
baranowb, martins

Method Summary
 C buildPatchComponent(java.lang.String sel, java.lang.String previousETag, java.lang.String newETag, C[] patchingInstructions)
          Builds a document patch component, from an array of patching instructions.
 C getBodyNotChangedPatchingInstruction()
          Retrieves the patching instruction which indicates that the document body did not change.
 XmlPatchOperationsBuilder<D,C,E,N> getXmlPatchOperationsBuilder()
          Retrieves the XML Patch Ops (RFC 5261) builder, used to build patching instructions.
 

Method Detail

buildPatchComponent

C buildPatchComponent(java.lang.String sel,
                      java.lang.String previousETag,
                      java.lang.String newETag,
                      C[] patchingInstructions)
                      throws BuildPatchException
Builds a document patch component, from an array of patching instructions.

Parameters:
sel - the document selector, relative to the xcap root of the final patch.
previousETag - the previous etag of the document.
newETag - the new etag of the document.
patchingInstructions - instructions to be used as body of patch component returned. Instruction can be add or remove for instance.
Returns:
Throws:
BuildPatchException - if an exception occurred while building the patch, the concrete exception is the exception's cause.

getBodyNotChangedPatchingInstruction

C getBodyNotChangedPatchingInstruction()
                                       throws BuildPatchException
Retrieves the patching instruction which indicates that the document body did not change.

Returns:
Throws:
BuildPatchException - if an exception occurred while building the patch, the concrete exception is the exception's cause.

getXmlPatchOperationsBuilder

XmlPatchOperationsBuilder<D,C,E,N> getXmlPatchOperationsBuilder()
Retrieves the XML Patch Ops (RFC 5261) builder, used to build patching instructions.

Returns:


Copyright © 2011. All Rights Reserved.