Revision: 15079
Author: emmartins
Date: Sat Nov  6 01:07:28 2010
Log: Adding XDM Client SLEE Enabler Docs
http://code.google.com/p/mobicents/source/detail?r=15079

Added:
/trunk/servers/jain-slee/enablers/xdm-client/docs/sources/src/main/resources/en-US/Chapter-Integrating_The_Enabler.xml /trunk/servers/jain-slee/enablers/xdm-client/docs/sources/src/main/resources/en-US/Chapter-Introduction.xml /trunk/servers/jain-slee/enablers/xdm-client/docs/sources/src/main/resources/en-US/Chapter-Logging_Traces_and_Alarms.xml /trunk/servers/jain-slee/enablers/xdm-client/docs/sources/src/main/resources/en-US/Chapter-Setup.xml /trunk/servers/jain-slee/enablers/xdm-client/docs/sources/src/main/resources/en-US/Chapter-Using_The_Enabler.xml
Modified:
/trunk/servers/jain-slee/enablers/xdm-client/docs/sources/src/main/resources/en-US/JAIN_SLEE_Enabler_XDM_Client_User_Guide.xml
 /trunk/servers/jain-slee/enablers/xdm-client/docs/sources-mobicents/pom.xml
/trunk/servers/jain-slee/enablers/xdm-client/sbb/src/main/java/org/mobicents/slee/enabler/xdmc/XDMClientParent.java

=======================================
--- /dev/null
+++ /trunk/servers/jain-slee/enablers/xdm-client/docs/sources/src/main/resources/en-US/Chapter-Integrating_The_Enabler.xml Sat Nov 6 01:07:28 2010
@@ -0,0 +1,116 @@
+<?xml version='1.0'?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"; [ +<!ENTITY % BOOK_ENTITIES SYSTEM "JAIN_SLEE_Enabler_XDM_Client_User_Guide.ent">
+%BOOK_ENTITIES;
+]>
+
+<chapter id="integrating">
+
+ <title>Integrating the &THIS.PLATFORM; JAIN SLEE &THIS.ENABLER; Enabler</title>
+
+ <para>This chapter explains how to setup a JAIN SLEE Service Sbb to use the Enabler.</para>
+
+ <para>In short terms, a Service's Sbb will define the Enabler's Sbb as a child, and to achieve that it will need to setup the XML Descriptor, Abstract Class and SbbLocalObject interface.</para>
+
+ <important><para>The Service's Sbb will be referred as the Parent Sbb in the following sections.</para></important>
+
+       <section id="parent_sbb_local_object_interface">
+
+               <title>The Parent's SbbLocalObject Interface</title>
+
+ <para>The &THIS.PLATFORM; JAIN SLEE &THIS.ENABLER; Enabler Sbb provides asynchronous callbacks to the Parent's Sbb, and that can only be achieved if the Parent's SbbLocalObject extends a specific Java interface, deployed also by the Enabler, and provides it's SbbLocalObject to the Enabler's Sbb, through a specific method exposed by the latter interface. The Enabler stores the Parent's SbbLocalObject and uses it when a callback to the Parent's Sbb is needed.</para>
+
+ <para>The SbbLocalObject which must be used or extended by the Parent's Sbb is named <literal>org.mobicents.slee.enabler.xdmc.XDMClientParentSbbLocalObject</literal>, which extends the <literal>javax.slee.SbbLocalObject</literal> and <literal>org.mobicents.slee.enabler.xdmc.XDMClientParent</literal> interfaces, the latter declares the callbacks which must be implemented in the Parent's Sbb Abstract Class:</para>
+
+               <programlisting language="Java" role="JAVA"><![CDATA[
+package org.mobicents.slee.enabler.xdmc;
+
+import java.net.URI;
+
+public interface XDMClientParent {
+
+       public void getResponse(URI uri, int responseCode, String mimetype,
+                       String content, String eTag);
+
+       public void putResponse(URI uri, int responseCode, String 
responseContent,
+                       String eTag);
+
+       public void deleteResponse(URI uri, int responseCode,
+                       String responseContent, String eTag);
+}
+               ]]>
+               </programlisting>
+
+               <variablelist>
+
+                       <varlistentry>
+ <term>The <literal>getResponse(URI,int,String,String,String)</literal> method:</term>
+                               <listitem>
+ <para>Callback from the Enabler providing the response for an XML resource GET request.</para>
+                               </listitem>
+                       </varlistentry>
+
+                       <varlistentry>
+ <term>The <literal>putResponse(URI,int,String,String)</literal> method:</term>
+                               <listitem>
+ <para>Callback from the Enabler providing the response for an XML resource PUT request.</para>
+                               </listitem>
+                       </varlistentry>
+
+                       <varlistentry>
+ <term>The <literal>deleteResponse(URI,int,String,String)</literal> method:</term>
+                               <listitem>
+ <para>Callback from the Enabler providing the response for an XML resource DELETE request.</para>
+                               </listitem>
+                       </varlistentry>
+
+               </variablelist>
+
+       </section>
+
+       <section id="parent_sbb_abstract_class">
+               <title>The Parent's Sbb Abstract Class</title>
+ <para>The Parent Sbb Abstract Class must implement the callbacks on it's SbbLocalObject, that is, must implement the <literal>org.mobicents.slee.enabler.xdmc.XDMClientParent</literal> interface discussed in last section.</para> + <para>The Enabler's Sbb is a Child Sbb, and JAIN SLEE 1.1 Child Relations requires an abstract method in the Sbb Abstract Class, to retrieve the <literal>javax.slee.ChildRelation</literal> object, which is used to create or access specific Child Sbbs. This method should be:</para>
+               <programlisting language="Java" role="JAVA"><![CDATA[
+       public abstract ChildRelation getXDMClientChildRelation();
+               ]]>
+               </programlisting>
+       </section>
+
+       <section id="parent_sbb_xml_descriptor">
+               <title>The Parent's Sbb XML Descriptor</title>
+ <para>The Parent's Sbb must define a reference to the Enabler's Child Sbb, declare which is the method name to get the related ChildRelation object, and also ensure the SbbLocalObject interface is defined correctly.</para> + <para>A reference to the Enabler's Child Sbb is defined right after the Parent's Sbb Vendor ID element, using the following XML element:</para>
+               <programlisting language="XML" role="XML"><![CDATA[
+               <sbb-ref>
+               <sbb-name>XDMClientChildSbb</sbb-name>
+                       <sbb-vendor>org.mobicents</sbb-vendor>
+                       <sbb-version>1.0</sbb-version>
+               <sbb-alias>xdmClientChildSbb</sbb-alias>
+       </sbb-ref>
+               ]]>
+               </programlisting>
+ <para>The method name to get the Enabler's ChildRelation object must be defined after the CMP Fields (if any), this XML element links the sbb-alias previously defined with the abstract method declared in the Parent's Sbb Abstract Class:</para>
+               <programlisting language="XML" role="XML"><![CDATA[
+               <get-child-relation-method>
+               <sbb-alias-ref>xdmClientChildSbb</sbb-alias-ref>
+ <get-child-relation-method-name>getXDMClientChildRelation</get-child-relation-method-name>
+            <default-priority>0</default-priority>
+        </get-child-relation-method>
+               ]]>
+               </programlisting>
+ <para>Finally, after the <literal>sbb-abstract-class</literal> element the Parent's SbbLocalObject interface name is defined:</para>
+               <programlisting language="XML" role="XML"><![CDATA[
+               <sbb-local-interface>
+            <sbb-local-interface-name>...</sbb-local-interface-name>
+        </sbb-local-interface>
+               ]]>
+               </programlisting>
+
+       </section>
+
+
+
+</chapter>
+
=======================================
--- /dev/null
+++ /trunk/servers/jain-slee/enablers/xdm-client/docs/sources/src/main/resources/en-US/Chapter-Introduction.xml Sat Nov 6 01:07:28 2010
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"; [ +<!ENTITY % BOOK_ENTITIES SYSTEM "JAIN_SLEE_Enabler_XDM_Client_User_Guide.ent">
+%BOOK_ENTITIES;
+]>
+
+<chapter id="introduction">
+
+ <title>Introduction to &THIS.PLATFORM; JAIN SLEE &THIS.ENABLER; Enabler</title>
+
+ <para>The JAIN SLEE &THIS.ENABLER; Enabler allows JAIN SLEE Applications to interact with XDM Servers, hiding the network protocol complexity. The Enabler consists in an SBB which can be used in child relations, with a simple asynchronous interface.</para>
+
+ <para>The XDM Server is a functional element used in OMA and 3GPP SIP Presence networks, to manage public user documents, in the XML format. An example of such documents is the user's buddy list. Essentially the XDM Server is an XCAP Server with additional interfaces, such as SIP Event Package XCAP Diff, which allows SIP subscriptions on changes done to documents through XCAP.</para>
+
+</chapter>
=======================================
--- /dev/null
+++ /trunk/servers/jain-slee/enablers/xdm-client/docs/sources/src/main/resources/en-US/Chapter-Logging_Traces_and_Alarms.xml Sat Nov 6 01:07:28 2010
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"; [ +<!ENTITY % BOOK_ENTITIES SYSTEM "JAIN_SLEE_Enabler_XDM_Client_User_Guide.ent">
+%BOOK_ENTITIES;
+]>
+
+<chapter id="logging_traces_and_alarms">
+
+       <title>Traces and Alarms</title>
+
+       <section id="tracers">
+               <title>Tracers</title>
+               <important>
+ <para>Spaces where introduced in log4j category name to properly render page. Please remove them when using copy/paste.</para>
+               </important>
+ <para>The JAIN SLEE &THIS.ENABLER; Enabler uses a single JAIN SLEE 1.1 Tracer, named <literal>XDMClientChildSbb</literal>.
+               The related log4j category is
+               
<literal>javax.slee.SbbNotification[service=ServiceID[name=</literal>
+               <literal>ServiceX,vendor=VendorY,version=VersionZ],</literal>
+ <literal>sbb=SbbID[name=XDMClientChildSbb,vendor=org.mobicents,version=1.0]]</literal>. + Where <literal>ServiceX</literal>, <literal>VendorY</literal> and <literal>VersionZ</literal> need to be replaced by the identifiers of the Service using the Enabler.
+               </para>
+       </section>
+
+       <section id="alarms">
+               <title>Alarms</title>
+ <para>The JAIN SLEE &THIS.ENABLER; Enabler does not sets JAIN SLEE Alarms.</para>
+       </section>
+
+</chapter>
=======================================
--- /dev/null
+++ /trunk/servers/jain-slee/enablers/xdm-client/docs/sources/src/main/resources/en-US/Chapter-Setup.xml Sat Nov 6 01:07:28 2010
@@ -0,0 +1,89 @@
+<?xml version='1.0'?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"; [ +<!ENTITY % BOOK_ENTITIES SYSTEM "JAIN_SLEE_Enabler_XDM_Client_User_Guide.ent">
+%BOOK_ENTITIES;
+]>
+
+<chapter id="setup">
+
+       <title>Setup</title>
+
+       <section id="preinstall_requirements_and_prerequisites">
+               <title>Pre-Install Requirements and Prerequisites</title>
+ <para>Ensure that the following requirements have been met before continuing with the install.</para>
+               <section id="hardware_requirements">
+                       <title>Hardware Requirements</title>
+ <para>The Example doesn't change the &THIS.PLATFORM; JAIN SLEE Hardware Requirements, refer to &THIS.PLATFORM; JAIN SLEE documentation for more information.</para>
+               </section>
+               <section id="software_prerequisites">
+                       <title>Software Prerequisites</title>
+ <para>The Example requires &THIS.PLATFORM; JAIN SLEE properly set, with the XCAP Client Resource Adaptor deployed.</para>
+               </section>
+       </section>
+
+       <section id="source_code">
+ <title>&THIS.PLATFORM; JAIN SLEE &THIS.ENABLER; Enabler Source Code</title> + <para>This section provides instructions on how to obtain and build the &THIS.ENABLER; Enabler from source code.</para>
+
+               <section id="release_source_building">
+                       <title>Release Source Code Building</title>
+                       <procedure>
+                               <step>
+                                   <title>Downloading the source code</title>
+                                   <important>
+ <para>Subversion is used to manage its source code. Instructions for using Subversion, including install, can be found at <ulink url="http://svnbook.red-bean.com"; /></para>
+                                   </important>
+ <para>Use SVN to checkout a specific release source, the base URL is &THIS.RELEASE_SOURCE_CODE_URL;, then add the specific release version, lets consider &THIS.VERSION;.</para> + <programlisting>[usr]$ svn co &THIS.RELEASE_SOURCE_CODE_URL;/&THIS.VERSION; slee-enabler-&THIS.ENABLER.DIRNAME;-&THIS.VERSION;</programlisting>
+                               </step>
+                               <step>
+                                   <title>Building the source code</title>
+                                   <important>
+ <para>Maven 2.0.9 (or higher) is used to build the release. Instructions for using Maven2, including install, can be found at <ulink url="http://maven.apache.org"; /></para>
+                                   </important>
+                                   <para>Use Maven to build the deployable unit 
binary.</para>
+                                   <programlisting>
+                                   [usr]$ cd 
slee-enabler-&THIS.ENABLER.DIRNAME;-&THIS.VERSION;
+                                   [usr]$ mvn install
+                                   </programlisting>
+ <para>Once the process finishes you should have the <literal>deployable-unit</literal> jar file in the <filename>target</filename> directory, if &THIS.PLATFORM; JAIN SLEE is installed and environment variable JBOSS_HOME is pointing to its underlying &JEE.PLATFORM; directory, then the deployable unit jar will also be deployed in the container.</para>
+                                   <important>
+ <para>This procedure does not install the Enabler's dependencies</para>
+                                   </important>
+                               </step>
+                       </procedure>
+               </section>
+
+               <section id="trunk_source_building">
+                       <title>Development Trunk Source Building</title>
+ <para>Similar process as for <xref linkend="release_source_building"/>, the only change is the SVN source code URL, which is &THIS.TRUNK_SOURCE_CODE_URL;.</para>
+               </section>
+
+       </section>
+
+       <section id="install">
+ <title>Installing &THIS.PLATFORM; JAIN SLEE &THIS.ENABLER; Enabler</title> + <para>To install the Enabler simply execute provided ant script <filename>build.xml</filename> default target:</para>
+               <programlisting>
+               [usr]$ ant
+               </programlisting>
+ <para>The script will copy the Enabler's deployable unit jar to the <literal>default</literal> &THIS.PLATFORM; JAIN SLEE server profile deploy directory, to deploy to another server profile use the argument <literal>-Dnode=</literal>.</para>
+               <important>
+                       <para>This procedure also installs the Enabler's 
dependencies.</para>
+               </important>
+       </section>
+
+       <section id="uninstall">
+ <title>Uninstalling &THIS.PLATFORM; JAIN SLEE &THIS.ENABLER; Enabler</title> + <para>To uninstall the Enabler simply execute provided ant script <filename>build.xml</filename> <literal>undeploy</literal> target:</para>
+               <programlisting>
+               [usr]$ ant undeploy-all
+               </programlisting>
+ <para>The script will delete the Enabler's deployable unit jar from the <literal>default</literal> &THIS.PLATFORM; JAIN SLEE server profile deploy directory, to undeploy from another server profile use the argument <literal>-Dnode=</literal>.</para>
+               <important>
+                       <para>This procedure also uninstalls the Enabler's 
dependencies.</para>
+               </important>
+       </section>
+
+</chapter>
+
=======================================
--- /dev/null
+++ /trunk/servers/jain-slee/enablers/xdm-client/docs/sources/src/main/resources/en-US/Chapter-Using_The_Enabler.xml Sat Nov 6 01:07:28 2010
@@ -0,0 +1,229 @@
+<?xml version='1.0'?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"; [ +<!ENTITY % BOOK_ENTITIES SYSTEM "JAIN_SLEE_Enabler_XDM_Client_User_Guide.ent">
+%BOOK_ENTITIES;
+]>
+
+<chapter id="using_the_enabler">
+
+       <title>Using the &THIS.PLATFORM; JAIN SLEE &THIS.ENABLER; 
Enabler</title>
+
+ <para>In the last chapter we integrated the Enabler in the JAIN SLEE Service's Sbb, the Parent Sbb, in this chapter it is explained how to use the Enabler's Sbb, the Child Sbb.</para>
+
+       <section id="the_child_sbblocalobject_interface">
+
+               <title>The Child's SbbLocalObject Interface</title>
+
+ <para>The &THIS.PLATFORM; JAIN SLEE &THIS.ENABLER; Enabler Sbb, the Child Sbb, implements the <literal>org.mobicents.slee.enabler.xdmc.XDMClientChildSbbLocalObject</literal>, which extends the <literal>javax.slee.SbbLocalObject</literal> and <literal>org.mobicents.slee.enabler.xdmc.XDMClientChild</literal> interfaces, the latter declares the methods which can be used to interact with the XDM Server:</para>
+
+               <programlisting language="Java" role="JAVA"><![CDATA[
+package org.mobicents.slee.enabler.xdmc;
+
+import java.io.IOException;
+import java.net.URI;
+
+import org.mobicents.xcap.client.auth.Credentials;
+import org.mobicents.xcap.client.auth.CredentialsFactory;
+
+public interface XDMClientChild {
+
+       public void setParentSbb(XDMClientParentSbbLocalObject parentSbb);
+
+       public CredentialsFactory getCredentialsFactory();
+
+       public void get(URI uri, Credentials credentials) throws IOException;
+
+       public void get(URI uri, String assertedUserId) throws IOException;
+
+       public void put(URI uri, String mimetype, byte[] content,
+                       Credentials credentials) throws IOException;
+
+       public void put(URI uri, String mimetype, byte[] content,
+                       String assertedUserId) throws IOException;
+
+       public void putIfMatch(URI uri, String eTag, String mimetype,
+                       byte[] content, Credentials credentials) throws 
IOException;
+
+       public void putIfMatch(URI uri, String eTag, String mimetype,
+                       byte[] content, String assertedUserId) throws 
IOException;
+
+       public void putIfNoneMatch(URI uri, String eTag, String mimetype,
+                       byte[] content, Credentials credentials) throws 
IOException;
+
+       public void putIfNoneMatch(URI uri, String eTag, String mimetype,
+                       byte[] content, String assertedUserId) throws 
IOException;
+
+       public void delete(URI uri, Credentials credentials) throws IOException;
+
+       public void delete(URI uri, String assertedUserId) throws IOException;
+
+       public void deleteIfMatch(URI uri, String eTag, Credentials credentials)
+                       throws IOException;
+
+       public void deleteIfMatch(URI uri, String eTag, String assertedUserId)
+                       throws IOException;
+
+ public void deleteIfNoneMatch(URI uri, String eTag, Credentials credentials)
+                       throws IOException;
+
+       public void deleteIfNoneMatch(URI uri, String eTag, String 
assertedUserId)
+                       throws IOException;
+
+}
+               ]]>
+               </programlisting>
+
+               <variablelist>
+
+                       <varlistentry>
+ <term>The <literal>setParentSbb(XDMClientParentSbbLocalObject)</literal> method:</term>
+                               <listitem>
+ <para>Passes the Parent's SbbLocalObject, which will be used by the Child Sbb to provide async results. If not invoked after the child creation the Enabler won't be able to callback the Parent Sbb.</para>
+                               </listitem>
+                       </varlistentry>
+
+                       <varlistentry>
+                               <term>The <literal>getCredentialsFactory()</literal> 
method:</term>
+                               <listitem>
+ <para>Retrieves the factory to create HTTP Digest authentication credentials, to be used in requests sent to the XDM Server.</para>
+                               </listitem>
+                       </varlistentry>
+
+                       <varlistentry>
+                               <term>The <literal>get(URI,Credentials)</literal> 
method:</term>
+                               <listitem>
+ <para>Retrieves the XML resource from the XDM Server, for the specified URI, using the specified HTTP Digest Credentials. Response is provided through parent's callback getResponse(...).</para>
+                               </listitem>
+                       </varlistentry>
+
+                       <varlistentry>
+                               <term>The <literal>get(URI,String)</literal> 
method:</term>
+                               <listitem>
+ <para>Retrieves the XML resource from the XDM server, for the specified URI, asserting the user id. Response is provided through parent's callback getResponse(...).</para>
+                               </listitem>
+                       </varlistentry>
+
+                       <varlistentry>
+ <term>The <literal>put(URI,String,byte[],Credentials)</literal> method:</term>
+                               <listitem>
+ <para>Puts the specified content in the XDM Server, using the specified HTTP Digest Credentials. Response is provided through parent's callback putResponse(...).</para>
+                               </listitem>
+                       </varlistentry>
+
+                       <varlistentry>
+ <term>The <literal>put(URI,String,byte[],String)</literal> method:</term>
+                               <listitem>
+ <para>Puts the specified content in the XDM Server, asserting the user id. Response is provided through parent's callback putResponse(...).</para>
+                               </listitem>
+                       </varlistentry>
+
+                       <varlistentry>
+ <term>The <literal>putIfMatch(URI,String,String,byte[],Credentials)</literal> method:</term>
+                               <listitem>
+ <para>Puts the specified content in the XDM Server, using the specified HTTP Digest Credentials, if the ETag matches the document in the server. Response is provided through parent's callback putResponse(...).</para>
+                               </listitem>
+                       </varlistentry>
+
+                       <varlistentry>
+ <term>The <literal>putIfMatch(URI,String,String,byte[],String)</literal> method:</term>
+                               <listitem>
+ <para>Puts the specified content in the XDM Server, asserting the user id, if the ETag matches the document in the server. Response is provided through parent's callback putResponse(...).</para>
+                               </listitem>
+                       </varlistentry>
+
+                       <varlistentry>
+ <term>The <literal>putIfNoneMatch(URI,String,String,byte[],Credentials)</literal> method:</term>
+                               <listitem>
+ <para>Puts the specified content in the XDM Server, using the specified HTTP Digest Credentials, if the ETag does not matches the document in the server. Response is provided through parent's callback putResponse(...).</para>
+                               </listitem>
+                       </varlistentry>
+
+                       <varlistentry>
+ <term>The <literal>putIfNoneMatch(URI,String,String,byte[],String)</literal> method:</term>
+                               <listitem>
+ <para>Puts the specified content in the XDM Server, asserting the user id, if the ETag does not matches the document in the server. Response is provided through parent's callback putResponse(...).</para>
+                               </listitem>
+                       </varlistentry>
+
+                       <varlistentry>
+                               <term>The <literal>delete(URI,Credentials)</literal> 
method:</term>
+                               <listitem>
+ <para>Deletes the document in the XDM Server, using the specified HTTP Digest Credentials. Response is provided through parent's callback deleteResponse(...).</para>
+                               </listitem>
+                       </varlistentry>
+
+                       <varlistentry>
+                               <term>The <literal>delete(URI,String)</literal> 
method:</term>
+                               <listitem>
+ <para>Deletes the document in the XDM Server, asserting the user id. Response is provided through parent's callback deleteResponse(...).</para>
+                               </listitem>
+                       </varlistentry>
+
+                       <varlistentry>
+ <term>The <literal>deleteIfMatch(URI,String,Credentials)</literal> method:</term>
+                               <listitem>
+ <para>Deletes the document in the XDM Server, using the specified HTTP Digest Credentials, if the ETag matches the document in the server. Response is provided through parent's callback deleteResponse(...).</para>
+                               </listitem>
+                       </varlistentry>
+
+                       <varlistentry>
+ <term>The <literal>deleteIfMatch(URI,String,String)</literal> method:</term>
+                               <listitem>
+ <para>Deletes the document in the XDM Server, asserting the user id, if the ETag matches the document in the server. Response is provided through parent's callback deleteResponse(...).</para>
+                               </listitem>
+                       </varlistentry>
+
+                       <varlistentry>
+ <term>The <literal>deleteIfNoneMatch(URI,String,Credentials)</literal> method:</term>
+                               <listitem>
+ <para>Deletes the document in the XDM Server, using the specified HTTP Digest Credentials, if the ETag does not matches the document in the server. Response is provided through parent's callback deleteResponse(...).</para>
+                               </listitem>
+                       </varlistentry>
+
+                       <varlistentry>
+ <term>The <literal>deleteIfNoneMatch(URI,String,String)</literal> method:</term>
+                               <listitem>
+ <para>Deletes the document in the XDM Server, asserting the user id, if the ETag does not matches the document in the server. Response is provided through parent's callback deleteResponse(...).</para>
+                               </listitem>
+                       </varlistentry>
+
+               </variablelist>
+
+       </section>
+
+       <section id="creating_and_retrieving_the_child_sbb">
+               <title>Creating And Retrieving The Child Sbb</title>
+ <para>The Child Relation in the Parent Sbb Abstract Class is used to create and retrieve the Child Sbb, it is important to not forget to pass the Parent's SbbLocalObject to the Child after creation:</para>
+               <programlisting language="Java" role="JAVA"><![CDATA[
+       public XDMClientChildSbbLocalObject getXDMClientChildSbb() {
+               final ChildRelation childRelation = getXDMClientChildRelation();
+               if (childRelation.isEmpty()) {
+                       try {
+                               // creates new instance
+ XDMClientChildSbbLocalObject sbb = (XDMClientChildSbbLocalObject) childRelation.create();
+                               // passes the parent sbb local object to the 
child
+ sbb.setParentSbb((XDMClientParentSbbLocalObject) sbbContext.getSbbLocalObject());
+                               return sbb;
+                       } catch (Exception e) {
+                               tracer.severe("Failed to create child sbb", e);
+                               return null;
+                       }
+               }
+               else {
+                       // reuse the existent one
+                       return (XDMClientChildSbbLocalObject) 
childRelation.iterator().next();
+               }
+       }
+               ]]>
+               </programlisting>
+ <para>The SbbLocalObject of the Child could also be stored in a CMP Field for the simplest retreival, but unless you are going to reuse each instance several times it's better to have less state, specially in clustered environments.</para>
+       </section>
+
+       <section id="creating_uris">
+               <title>Creating URIs for XDM Server Resources</title>
+ <para>XCAP URIs are complex, but these can be easily created with the XCAP Client API, included with &THIS.PLATFORM; JAIN SLEE XCAP Client Resource Adaptor. Please refer to it's documentation on how to use such API.</para>
+       </section>
+
+
+</chapter>
+
=======================================
--- /trunk/servers/jain-slee/enablers/xdm-client/docs/sources/src/main/resources/en-US/JAIN_SLEE_Enabler_XDM_Client_User_Guide.xml Tue Oct 26 07:09:41 2010 +++ /trunk/servers/jain-slee/enablers/xdm-client/docs/sources/src/main/resources/en-US/JAIN_SLEE_Enabler_XDM_Client_User_Guide.xml Sat Nov 6 01:07:28 2010
@@ -10,8 +10,25 @@
                href="common/Preface.xml"
                xmlns:xi="http://www.w3.org/2001/XInclude"; />
        <xi:include
+               xmlns:xi="http://www.w3.org/2001/XInclude";
+               href="Chapter-Introduction.xml" />
+       <xi:include
+               xmlns:xi="http://www.w3.org/2001/XInclude";
+               href="Chapter-Setup.xml" />
+               <xi:include
+               xmlns:xi="http://www.w3.org/2001/XInclude";
+               href="Chapter-Integrating_The_Enabler.xml" />
+       <xi:include
+               xmlns:xi="http://www.w3.org/2001/XInclude";
+               href="Chapter-Using_The_Enabler.xml" />
+       <xi:include
+               xmlns:xi="http://www.w3.org/2001/XInclude";
+               href="Chapter-Logging_Traces_and_Alarms.xml" />
+       <xi:include
                href="Revision_History.xml"
                xmlns:xi="http://www.w3.org/2001/XInclude"; />
        <index />
+
+
 </book>

=======================================
--- /trunk/servers/jain-slee/enablers/xdm-client/docs/sources-mobicents/pom.xml Tue Oct 26 07:09:41 2010 +++ /trunk/servers/jain-slee/enablers/xdm-client/docs/sources-mobicents/pom.xml Sat Nov 6 01:07:28 2010
@@ -15,8 +15,8 @@
                <THIS.PLATFORM>Mobicents</THIS.PLATFORM>
                <JEE.PLATFORM>JBoss Application Server</JEE.PLATFORM>
<THIS.ISSUE_TRACKER_URL>http://code.google.com/p/mobicents/issues/list</THIS.ISSUE_TRACKER_URL> - <THIS.RELEASE_SOURCE_CODE_URL>http://mobicents.googlecode.com/svn/tags/servers/jain-slee/2.x.y/examples/${docs.example.dirname}</THIS.RELEASE_SOURCE_CODE_URL> - <THIS.TRUNK_SOURCE_CODE_URL>http://mobicents.googlecode.com/svn/trunk/servers/jain-slee/examples/${docs.example.dirname}</THIS.TRUNK_SOURCE_CODE_URL> + <THIS.RELEASE_SOURCE_CODE_URL>http://mobicents.googlecode.com/svn/tags/servers/jain-slee/2.x.y/enablers/${docs.enabler.dirname}</THIS.RELEASE_SOURCE_CODE_URL> + <THIS.TRUNK_SOURCE_CODE_URL>http://mobicents.googlecode.com/svn/trunk/servers/jain-slee/enablers/${docs.enabler.dirname}</THIS.TRUNK_SOURCE_CODE_URL>
                <author.email.eduardo>emmartins (at) 
gmail.com</author.email.eduardo>
        </properties>

=======================================
--- /trunk/servers/jain-slee/enablers/xdm-client/sbb/src/main/java/org/mobicents/slee/enabler/xdmc/XDMClientParent.java Tue Oct 26 07:09:41 2010 +++ /trunk/servers/jain-slee/enablers/xdm-client/sbb/src/main/java/org/mobicents/slee/enabler/xdmc/XDMClientParent.java Sat Nov 6 01:07:28 2010
@@ -7,12 +7,12 @@

 /**
  * @author martins
- *
+ *
  */
 public interface XDMClientParent {

        /**
-        * Provides response of a get request.
+        * Provides the response for an XML resource GET request.
         *
         * @param uri
         * @param responseCode
@@ -24,46 +24,48 @@
                        String content, String eTag);

        /**
-        * Provides response of a put request.
+        * Provides the response for an XML resource PUT request.
         *
         * @param uri
         * @param responseCode
         * @param eTag
-        * @param responseContent
+        * @param responseContent
         */
- public void putResponse(URI uri, int responseCode, String responseContent, String eTag);
+       public void putResponse(URI uri, int responseCode, String 
responseContent,
+                       String eTag);

        /**
-        * Provides response of a delete request.
+        * Provides the response for an XML resource DELETE request.
         *
         * @param uri
         * @param responseCode
         * @param eTag
-        * @param responseContent
+        * @param responseContent
         */
- public void deleteResponse(URI uri, int responseCode, String responseContent, String eTag);
+       public void deleteResponse(URI uri, int responseCode,
+                       String responseContent, String eTag);

        /**
         * Callback that indicates a document subscribed in the XDM client was
         * updated
         */
-       //public void documentUpdated(DocumentSelector documentSelector,
-       //              String oldETag, String newETag, String 
documentAsString);
+       // public void documentUpdated(DocumentSelector documentSelector,
+       // String oldETag, String newETag, String documentAsString);

        /**
         * Callback that indicates a element in a subscribed document was 
updated
         */
-       //public void elementUpdated(DocumentSelector documentSelector,
-       //              NodeSelector nodeSelector, Map<String, String> 
namespaces,
-       //              String oldETag, String newETag, String documentAsString,
-       //              String elementAsString);
+       // public void elementUpdated(DocumentSelector documentSelector,
+       // NodeSelector nodeSelector, Map<String, String> namespaces,
+       // String oldETag, String newETag, String documentAsString,
+       // String elementAsString);

        /**
* Callback that indicates a attribute in a subscribed document was updated
         */
-       //public void attributeUpdated(DocumentSelector documentSelector,
-       //              NodeSelector nodeSelector, AttributeSelector 
attributeSelector,
-       //              Map<String, String> namespaces, String oldETag, String 
newETag,
-       //              String documentAsString, String attributeValue);
-
-}
+       // public void attributeUpdated(DocumentSelector documentSelector,
+       // NodeSelector nodeSelector, AttributeSelector attributeSelector,
+       // Map<String, String> namespaces, String oldETag, String newETag,
+       // String documentAsString, String attributeValue);
+
+}

Reply via email to