org.mobicents.protocols.xcap.diff.component
Interface AttributePatchComponentBuilder<C>

Type Parameters:
C - the component type, defines what is the concrete type of each patch component, to be aggregated in a XCAP DIFF patch

public interface AttributePatchComponentBuilder<C>

Builds attribute patch components. Generated content is valid for xcap-diff document, ie, xcap-diff document could look like follows(bold content is generated by instance of this interface):

 <?xml version="1.0" encoding="UTF-8"?>
    <xcap-diff xmlns="urn:ietf:params:xml:ns:xcap-diff"
               xcap-root="http://xcap.example.com/">
 
     <attribute sel="tests/users/sip:joe@example.com/index/~~/doc/@id">bar</attribute>
 
    </xcap-diff>
 

Author:
baranowb, martins

Method Summary
 C buildPatchComponent(java.lang.String sel, java.util.Map<java.lang.String,java.lang.String> namespaceBindings)
          Builds a patch component which indicates the non existence of an attribute.
 C buildPatchComponent(java.lang.String sel, java.lang.String attributeValue, java.util.Map<java.lang.String,java.lang.String> namespaceBindings)
          Builds a patch component which indicates an update of an attribute value.
 

Method Detail

buildPatchComponent

C buildPatchComponent(java.lang.String sel,
                      java.lang.String attributeValue,
                      java.util.Map<java.lang.String,java.lang.String> namespaceBindings)
                      throws BuildPatchException
Builds a patch component which indicates an update of an attribute value.

Parameters:
sel - the selector which points to the attribute in the owner document, relative to the final patch xcap root.
attributeValue - the updated value of the attribute
namespaceBindings - namespace bindings for undeclared namespaces in sel
Returns:
Throws:
BuildPatchException - if an exception occurred while building the patch, the concrete exception is the exception's cause.

buildPatchComponent

C buildPatchComponent(java.lang.String sel,
                      java.util.Map<java.lang.String,java.lang.String> namespaceBindings)
                      throws BuildPatchException
Builds a patch component which indicates the non existence of an attribute.

Parameters:
sel - the selector which points to the attribute in the owner document, relative to the final patch xcap root.
namespaceBindings - namespace bindings for undeclared namespaces in sel
Returns:
Throws:
BuildPatchException - if an exception occurred while building the patch, the concrete exception is the exception's cause.


Copyright © 2011. All Rights Reserved.