You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@chemistry.apache.org by bu...@apache.org on 2011/03/18 12:57:50 UTC

svn commit: r787165 [2/10] - in /websites/staging/chemistry/trunk/content: ./ dotnet/ internal/ java/ java/developing/ java/developing/client/ java/developing/repositories/ java/developing/tools/ java/examples/ java/how-to/ php/ project/ python/

Added: websites/staging/chemistry/trunk/content/java/developing/client/dev-client-bindings.html
==============================================================================
--- websites/staging/chemistry/trunk/content/java/developing/client/dev-client-bindings.html (added)
+++ websites/staging/chemistry/trunk/content/java/developing/client/dev-client-bindings.html Fri Mar 18 11:57:49 2011
@@ -0,0 +1,352 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+
+-->
+<html>
+  <head>
+    <link type="text/css" rel="stylesheet" href="/resources/site.css" />
+    <script src="/resources/space.js" type="text/javascript"></script>
+    <meta name="keywords" content="CMIS, Content Management Interoperability Service, ECM, Enterprise Content Management, OASIS, integration standards, Chemistry, OpenCMIS, cmislib, DotCMIS" />
+    <meta name="description" content="Apache Chemistry, CMIS Implementation" />
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+    <title>
+Apache Chemistry - OpenCMIS Client Bindings
+    </title>
+  </head>
+<body onload="init()">
+  <table width="100%" cellpadding="0" cellspacing="0">
+    <tr width="100%">
+      <td id="cell-0-0">&nbsp;</td>
+      <td id="cell-0-1">&nbsp;</td>
+      <td id="cell-0-2">&nbsp;</td>
+    </tr>
+    <tr width="100%">
+      <td id="cell-1-0">&nbsp;</td>
+      <td id="cell-1-1">
+        <div style="padding: 5px;">
+          <div id="banner">
+          <!-- Banner -->
+<TABLE border="0" cellpadding="0" cellspacing="0" width="100%">
+<TR>
+<TD align="left" class="topbardiv" nowrap="">
+  <A href="http://chemistry.apache.org/" title="Apache Chemistry">
+    <IMG border="0" src="/images/chemistry_tm_logo_small.png"/>
+  </A>
+</TD>
+<TD align="right" nowrap="">
+  <A href="http://www.apache.org/" title="The Apache Software Foundation">
+    <IMG border="0" src="/images/asf-logo.png"/>
+  </A>
+</TD>
+</TR>
+</TABLE>
+          <!-- Banner -->
+          </div>
+        </div>
+        <div id="top-menu">
+          <table border="0" cellpadding="1" cellspacing="0" width="100%">
+            <tr>
+              <td>
+                <div align="left">
+                <!-- Breadcrumbs -->
+<a href="/">Home</a>&nbsp;&raquo&nbsp;<a href="/java">Java</a>&nbsp;&raquo&nbsp;<a href="/java/developing">Developing</a>&nbsp;&raquo&nbsp;<a href="/java/developing/client">Client</a>&nbsp;&raquo&nbsp;<a href="/java/developing/client/dev-client-bindings.html">OpenCMIS Client Bindings</a>
+                <!-- Breadcrumbs -->
+                </div>
+              </td>
+              <td>
+                <div align="right">
+                <!-- Quicklinks -->
+<P>
+<A href="http://www.apache.org/" class="external-link" rel="nofollow">Apache</A>
+|
+<A href="http://www.apache.org/licenses/LICENSE-2.0.html" class="external-link" rel="nofollow">License</A>
+|
+<A href="sitemap.html" title="SiteMap">Site Map</A>
+</P>
+                <!-- Quicklinks -->
+                </div>
+              </td>
+            </tr>
+          </table>
+        </div>
+      </td>
+      <td id="cell-1-2">&nbsp;</td>
+    </tr>
+    <tr width="100%">
+      <td id="cell-2-0">&nbsp;</td>
+      <td id="cell-2-1">
+        <table>
+          <tr height="100%" valign="top">
+            <td height="100%">
+              <div id="wrapper-menu-page-right">
+                <div id="wrapper-menu-page-top">
+                  <div id="wrapper-menu-page-bottom">
+                    <div id="menu-page">
+                    <!-- NavigationBar -->
+                    <H3><A name="Navigation-Overview"></A>Overview</H3>
+
+<UL class="alternate" type="square">
+   <LI><A href="/project/cmis.html" title="What's CMIS">What is CMIS?</A></LI>
+   <LI><A href="http://www.apache.org/licenses/" class="external-link" rel="nofollow">License</A></LI>
+   <LI><A href="/project/community.html" title="Community">Community</A></LI>
+   <LI><A href="http://mail-archives.apache.org/mod_mbox/chemistry-dev/" class="external-link" rel="nofollow">Mailing List</A></LI>
+   <LI><A href="https://issues.apache.org/jira/browse/CMIS" class="external-link" rel="nofollow">Issue Tracking</A></LI>
+   <LI><A href="http://www.apache.org/security/" class="external-link" rel="nofollow">Security</A></LI>
+</UL>
+
+
+<H3><A name="Navigation-Search"></A>Search</H3>
+
+<DIV style="padding: 0px 0px 0px 20px;">
+<FORM action="http://www.google.com/search" method="get" style="font-size: 10px;">
+<INPUT name="ie" type="hidden" value="UTF-8"></INPUT>
+<INPUT name="oe" type="hidden" value="UTF-8"></INPUT>
+  <INPUT maxlength="255" name="q" size="12" type="text" value=""></INPUT>
+  <INPUT name="btnG" type="submit" value="Search"></INPUT>
+  <INPUT name="domains" type="hidden" value="incubator.apache.org/chemistry"></INPUT>
+  <INPUT name="sitesearch" type="hidden" value="incubator.apache.org/chemistry"></INPUT>
+</FORM>
+</DIV>
+
+
+<H3><A name="Navigation-CMISforJava"></A>CMIS for Java</H3>
+
+<UL class="alternate" type="square">
+  <LI><A href="/java/overview.html" title="OpenCMIS Overview and Index">Overview</A></LI>
+  <LI><A href="/java/download.html" title="Downloads">Downloads</A></LI>
+  <LI><A href="/java/develop/dev-index.html" title="">Developing with OpenCMIS</A></LI>
+  <LI><A href="/java/examples/example-index.html" title="Example Code">Example Code</A></LI>
+  <LI><A href="/java/howto/how-to-index.html" title="OpenCMIS HowTos">OpenCMIS HowTos</A></LI>
+  <LI><A href="http://incubator.apache.org/chemistry/javadoc/index.html" class="external-link" rel="nofollow">JavaDoc</A></LI>
+  <LI><A href="https://svn.apache.org/repos/asf/chemistry/opencmis/trunk/" class="external-link" rel="nofollow">Source Code</A></LI>
+</UL>
+
+
+<H3><A name="Navigation-CMISforPython"></A>CMIS for Python</H3>
+
+<UL class="alternate" type="square">
+  <LI><A href="/python/cmislib.html" title="cmislib">cmislib</A></LI>
+   <LI><A href="http://incubator.apache.org/chemistry/cmislib-doc/" class="external-link" rel="nofollow">cmislib Documentation</A></LI>
+  <LI><A href="https://svn.apache.org/repos/asf/chemistry/cmislib/trunk/" class="external-link" rel="nofollow">Source Code</A></LI>
+</UL>
+
+
+<H3><A name="Navigation-CMISforPHP"></A>CMIS for PHP</H3>
+
+<UL class="alternate" type="square">
+  <LI><A href="/php/phpclient.html" title="phpclient">CMIS PHP Client</A></LI>
+  <LI><A href="https://svn.apache.org/repos/asf/chemistry/phpclient/trunk/" class="external-link" rel="nofollow">Source Code</A></LI>
+</UL>
+
+
+<H3><A name="Navigation-CMISfor.NET"></A>CMIS for .NET</H3>
+
+<UL class="alternate" type="square">
+  <LI><A href="/dotnet/dotcmis.html" title="DotCMIS">DotCMIS</A></LI>
+  <LI><A href="https://svn.apache.org/repos/asf/chemistry/dotcmis/trunk/" class="external-link" rel="nofollow">Source Code</A></LI>
+</UL>
+
+
+<H3><A name="Navigation-Sponsorship"></A>Sponsorship</H3>
+
+<UL class="alternate" type="square">
+   <LI><A href="http://www.apache.org/foundation/thanks.html" class="external-link" rel="nofollow">Thanks</A></LI>
+   <LI><A href="http://www.apache.org/foundation/sponsorship.html" class="external-link" rel="nofollow">Sponsoring Apache</A></LI>
+</UL>
+
+
+<H3><A name="Navigation-Internal"></A>Internal Docs</H3>
+
+<UL class="alternate" type="square">
+   <LI><A href="http://chemistry.apache.org/internal/opencmis-maven-release-documentation.html" class="external-link" rel="nofollow">Release Process</A></LI>
+</UL>
+                    <!-- NavigationBar -->
+                    </div>
+                </div>
+              </div>
+            </div>
+           </td>
+           <td height="100%">
+             <!-- Content -->
+             <div class="wiki-content"><h1 id="opencmis_client_bindings">OpenCMIS Client Bindings</h1>
+<p><a name="OpenCMISClientBindings-OpenCMISClientBindings"></a></p>
+<p>The OpenCMIS client bindings layer hides the CMIS AtomPub and Web Services
+bindings and provides an interface that is very similar to the <a href="http://docs.oasis-open.org/cmis/CMIS/v1.0/cs01/cmis-spec-v1.0.html#_Toc243905381">CMIS domain model</a>
+. The services, operations, parameters, and structures are named after the
+CMIS domain model and behave as described in the CMIS specification.</p>
+<p>The primary objective of the client bindings layer is to be complete,
+covering all CMIS operations and extension points. The result is a somewhat
+clunky interface. The <a href="dev-client-api.html">OpenCMIS Client API</a>
+ sits on top of the provider layer and exposes a nicer and simpler to use
+interface. It is the better choice for most applications.</p>
+<p>A connection to a CMIS repository is represented by a <a href="http://incubator.apache.org/chemistry/javadoc/org/apache/chemistry/opencmis/commons/spi/CmisBinding.html"><code>CmisBinding</code></a>
+ object. Such an object can be created by the <a href="http://incubator.apache.org/chemistry/javadoc/org/apache/chemistry/opencmis/client/bindings/CmisBindingFactory.html"><code>CmisBindingFactory</code></a>.
+The factory provides three main methods, one for each binding and third
+one for a local connection (same JVM), that require binding specific
+connection information. The created <code>CmisBinding</code> object exposes a
+binding agnostic interface.</p>
+<p><code>CmisBinding</code> is the entry point to the CMIS services and a few utility
+operations. It contains a transparent cache for repository infos and type
+definitions. The object is serializable, although dehydrating can be
+expensive. <code>CmisBinding</code> is thread-safe.</p>
+<p>The get*Service() methods provide access to the CMIS services. Some
+service operations take provider layer specific objects. These objects
+should be created with the <a href="http://incubator.apache.org/chemistry/javadoc/org/apache/chemistry/opencmis/commons/spi/BindingsObjectFactory.html"><code>BindingsObjectFactory</code></a>.
+This factory can be obtained through the <code>getObjectFactory()</code> method of the <code>CmisBinding</code> object.</p>
+<p>Please refer to the OpenCMIS Commons <a href="http://incubator.apache.org/chemistry/javadoc/">JavaDoc</a>
+ and OpenCMIS Client Binding <a href="http://incubator.apache.org/chemistry/javadoc/">JavaDoc</a>
+ for more details on the interfaces.</p>
+<p><a name="OpenCMISClientBindings-SampleCode"></a></p>
+<h2 id="sample_code">Sample Code</h2>
+<p><a name="OpenCMISClientBindings-CreatinganAtomPubbindinginstance"></a></p>
+<h3 id="creating_an_atompub_binding_instance">Creating an AtomPub binding instance</h3>
+<p>The AtomPub binding requires the URL of the CMIS service document. HTTP
+basic authentication is enabled by default and a username and a password
+have to be provided.</p>
+<div class="codehilite"><pre><span class="n">Map</span><span class="o">&lt;</span><span class="n">String</span><span class="o">,</span> <span class="n">String</span><span class="o">&gt;</span> <span class="n">parameters</span> <span class="o">=</span> <span class="k">new</span> <span class="n">HashMap</span><span class="o">&lt;</span><span class="n">String</span><span class="o">,</span> <span class="n">String</span><span class="o">&gt;();</span>
+
+<span class="n">parameters</span><span class="o">.</span><span class="na">put</span><span class="o">(</span><span class="n">SessionParameter</span><span class="o">.</span><span class="na">USER</span><span class="o">,</span> <span class="n">user</span><span class="o">);</span>
+<span class="n">parameters</span><span class="o">.</span><span class="na">put</span><span class="o">(</span><span class="n">SessionParameter</span><span class="o">.</span><span class="na">PASSWORD</span><span class="o">,</span> <span class="n">password</span><span class="o">);</span>
+
+<span class="n">parameters</span><span class="o">.</span><span class="na">put</span><span class="o">(</span><span class="n">SessionParameter</span><span class="o">.</span><span class="na">ATOMPUB_URL</span><span class="o">,</span> <span class="n">url</span><span class="o">);</span> <span class="c1">// service document URL</span>
+
+<span class="n">CmisBindingFactory</span> <span class="n">factory</span> <span class="o">=</span> <span class="n">CmisBindingFactory</span><span class="o">.</span><span class="na">newInstance</span><span class="o">();</span>
+<span class="n">CmisBinding</span> <span class="n">binding</span> <span class="o">=</span> <span class="n">factory</span><span class="o">.</span><span class="na">createCmisAtomPubBinding</span><span class="o">(</span><span class="n">parameters</span><span class="o">);</span>
+</pre></div>
+
+
+<h3 id="creating_a_web_services_binding_instance">Creating a Web Services binding instance</h3>
+<p>The Web Services binding requires a WSDL URL for each CMIS service. This
+might the same the URL for all services. WS-Security (UsernameToken) is
+enabled by default and a username and a password have to be provided.</p>
+<div class="codehilite"><pre><span class="n">Map</span><span class="o">&lt;</span><span class="n">String</span><span class="o">,</span> <span class="n">String</span><span class="o">&gt;</span> <span class="n">parameters</span> <span class="o">=</span> <span class="k">new</span> <span class="n">HashMap</span><span class="o">&lt;</span><span class="n">String</span><span class="o">,</span> <span class="n">String</span><span class="o">&gt;();</span>
+
+<span class="n">parameters</span><span class="o">.</span><span class="na">put</span><span class="o">(</span><span class="n">SessionParameter</span><span class="o">.</span><span class="na">USER</span><span class="o">,</span> <span class="n">username</span><span class="o">);</span>
+<span class="n">parameters</span><span class="o">.</span><span class="na">put</span><span class="o">(</span><span class="n">SessionParameter</span><span class="o">.</span><span class="na">PASSWORD</span><span class="o">,</span> <span class="n">password</span><span class="o">);</span>
+
+<span class="n">parameters</span><span class="o">.</span><span class="na">put</span><span class="o">(</span><span class="n">SessionParameter</span><span class="o">.</span><span class="na">WEBSERVICES_REPOSITORY_SERVICE</span><span class="o">,</span> <span class="n">repositoryServiceWsdlUrl</span><span class="o">);</span>
+<span class="n">parameters</span><span class="o">.</span><span class="na">put</span><span class="o">(</span><span class="n">SessionParameter</span><span class="o">.</span><span class="na">WEBSERVICES_NAVIGATION_SERVICE</span><span class="o">,</span> <span class="n">navigationServiceWsdlUrl</span><span class="o">);</span>
+<span class="n">parameters</span><span class="o">.</span><span class="na">put</span><span class="o">(</span><span class="n">SessionParameter</span><span class="o">.</span><span class="na">WEBSERVICES_OBJECT_SERVICE</span><span class="o">,</span> <span class="n">objectServiceWsdlUrl</span><span class="o">);</span>
+<span class="n">parameters</span><span class="o">.</span><span class="na">put</span><span class="o">(</span><span class="n">SessionParameter</span><span class="o">.</span><span class="na">WEBSERVICES_VERSIONING_SERVICE</span><span class="o">,</span> <span class="n">versioningServiceWsdlUrl</span><span class="o">);</span>
+<span class="n">parameters</span><span class="o">.</span><span class="na">put</span><span class="o">(</span><span class="n">SessionParameter</span><span class="o">.</span><span class="na">WEBSERVICES_DISCOVERY_SERVICE</span><span class="o">,</span> <span class="n">discoveryServiceWsdlUrl</span><span class="o">);</span>
+<span class="n">parameters</span><span class="o">.</span><span class="na">put</span><span class="o">(</span><span class="n">SessionParameter</span><span class="o">.</span><span class="na">WEBSERVICES_RELATIONSHIP_SERVICE</span><span class="o">,</span> <span class="n">relationshipServiceWsdlUrl</span><span class="o">);</span>
+<span class="n">parameters</span><span class="o">.</span><span class="na">put</span><span class="o">(</span><span class="n">SessionParameter</span><span class="o">.</span><span class="na">WEBSERVICES_MULTIFILING_SERVICE</span><span class="o">,</span> <span class="n">multiFilingServiceWsdlUrl</span><span class="o">);</span>
+<span class="n">parameters</span><span class="o">.</span><span class="na">put</span><span class="o">(</span><span class="n">SessionParameter</span><span class="o">.</span><span class="na">WEBSERVICES_POLICY_SERVICE</span><span class="o">,</span> <span class="n">policyServiceWsdlUrl</span><span class="o">);</span>
+<span class="n">parameters</span><span class="o">.</span><span class="na">put</span><span class="o">(</span><span class="n">SessionParameter</span><span class="o">.</span><span class="na">WEBSERVICES_ACL_SERVICE</span><span class="o">,</span> <span class="n">aclServiceWsdlUrl</span><span class="o">);</span>
+
+<span class="n">CmisBindingFactory</span> <span class="n">factory</span> <span class="o">=</span> <span class="n">CmisBindingFactory</span><span class="o">.</span><span class="na">newInstance</span><span class="o">();</span>
+<span class="n">CmisBinding</span> <span class="n">binding</span> <span class="o">=</span> <span class="n">factory</span><span class="o">.</span><span class="na">createCmisWebServicesBinding</span><span class="o">(</span><span class="n">parameters</span><span class="o">);</span>
+</pre></div>
+
+
+<p><a name="OpenCMISClientBindings-CreatingaLocalbindinginstance"></a></p>
+<h3 id="creating_a_local_binding_instance">Creating a Local binding instance</h3>
+<p>The Local binding connects to an OpenCMIS server in the same JVM. The
+server factory class name has to be supplied.</p>
+<div class="codehilite"><pre><span class="n">Map</span><span class="o">&lt;</span><span class="n">String</span><span class="o">,</span> <span class="n">String</span><span class="o">&gt;</span> <span class="n">parameters</span> <span class="o">=</span> <span class="k">new</span> <span class="n">HashMap</span><span class="o">&lt;</span><span class="n">String</span><span class="o">,</span> <span class="n">String</span><span class="o">&gt;();</span>
+
+<span class="n">parameters</span><span class="o">.</span><span class="na">put</span><span class="o">(</span><span class="n">SessionParameter</span><span class="o">.</span><span class="na">USER</span><span class="o">,</span> <span class="n">user</span><span class="o">);</span>
+<span class="n">parameters</span><span class="o">.</span><span class="na">put</span><span class="o">(</span><span class="n">SessionParameter</span><span class="o">.</span><span class="na">PASSWORD</span><span class="o">,</span> <span class="n">password</span><span class="o">);</span>
+
+<span class="n">parameters</span><span class="o">.</span><span class="na">put</span><span class="o">(</span><span class="n">SessionParameter</span><span class="o">.</span><span class="na">LOCAL_FACTORY</span><span class="o">,</span> <span class="n">factoryClassName</span><span class="o">);</span>
+
+<span class="n">CmisBindingFactory</span> <span class="n">factory</span> <span class="o">=</span> <span class="n">CmisBindingFactory</span><span class="o">.</span><span class="na">newInstance</span><span class="o">();</span>
+<span class="n">CmisBinding</span> <span class="n">binding</span> <span class="o">=</span> <span class="n">factory</span><span class="o">.</span><span class="na">createCmisLocalBinding</span><span class="o">(</span><span class="n">parameters</span><span class="o">);</span>
+</pre></div>
+
+
+<h3 id="getting_an_object">Getting an Object</h3>
+<p>The following snippet gets the name of the object "myObject" in repository
+"myRepository". The parameters of <code>getObject()</code> can be found in the CMIS
+specification.</p>
+<div class="codehilite"><pre><span class="n">CmisBinding</span> <span class="n">binding</span> <span class="o">=</span> <span class="o">...</span>
+
+<span class="n">ObjectData</span> <span class="n">myObject</span> <span class="o">=</span> <span class="n">binding</span><span class="o">.</span><span class="na">getObjectService</span><span class="o">().</span><span class="na">getObject</span><span class="o">(</span><span class="s">&quot;myRepository&quot;</span><span class="o">,</span> <span class="s">&quot;myObject&quot;</span><span class="o">,</span>
+   <span class="s">&quot;*&quot;</span><span class="o">,</span> <span class="kc">true</span><span class="o">,</span> <span class="n">IncludeRelationships</span><span class="o">.</span><span class="na">BOTH</span><span class="o">,</span> <span class="s">&quot;cmis:none&quot;</span><span class="o">,</span> <span class="kc">true</span><span class="o">,</span> <span class="kc">true</span><span class="o">,</span> <span class="kc">null</span><span class="o">);</span>
+
+<span class="n">PropertiesData</span> <span class="n">properties</span> <span class="o">=</span> <span class="n">myObject</span><span class="o">.</span><span class="na">getProperties</span><span class="o">();</span>
+<span class="n">PropertyData</span><span class="o">&lt;</span><span class="n">String</span><span class="o">&gt;</span> <span class="n">nameProperty</span> <span class="o">=</span> <span class="n">properties</span><span class="o">.</span><span class="na">getProperties</span><span class="o">().</span><span class="na">get</span><span class="o">(</span><span class="n">PropertyIds</span><span class="o">.</span><span class="na">NAME</span><span class="o">);</span>
+<span class="n">String</span> <span class="n">name</span> <span class="o">=</span> <span class="n">nameProperty</span><span class="o">.</span><span class="na">getFirstValue</span><span class="o">();</span>
+</pre></div>
+
+
+<p><a name="OpenCMISClientBindings-CustomAuthenticationProvider"></a></p>
+<h2 id="custom_authentication_provider">Custom Authentication Provider</h2>
+<p>OpenCMIS supports HTTP basic authentication for the AtomPub binding and
+WS-Security (UsernameToken) for the Web Services binding out of the box.
+Other authentication methods can be added by implementing a custom
+authentication provider.</p>
+<p>Such a provider must extend
+<code>org.apache.chemistry.opencmis.client.provider.spi.AbstractAuthenticationProvider</code>
+and overwrite the methods <code>getHTTPHeaders</code> and <code>getSOAPHeaders</code>. See
+JavaDoc for details.</p>
+<p>The session parameter <code>SessionParameter.AUTHENTICATION_PROVIDER_CLASS</code>
+must be set to the fully qualified class name in order to active the
+authentication provider before the session is created.</p>
+<div class="codehilite"><pre><span class="n">Map</span><span class="o">&lt;</span><span class="n">String</span><span class="o">,</span> <span class="n">String</span><span class="o">&gt;</span> <span class="n">parameters</span> <span class="o">=</span> <span class="k">new</span> <span class="n">HashMap</span><span class="o">&lt;</span><span class="n">String</span><span class="o">,</span> <span class="n">String</span><span class="o">&gt;();</span>
+
+<span class="n">parameters</span><span class="o">.</span><span class="na">put</span><span class="o">(</span><span class="n">SessionParameter</span><span class="o">.</span><span class="na">AUTHENTICATION_PROVIDER_CLASS</span><span class="o">,</span> <span class="s">&quot;org.example.opencmis.MyAuthenticationProvider&quot;</span><span class="o">);</span>
+<span class="n">parameters</span><span class="o">.</span><span class="na">put</span><span class="o">(</span><span class="s">&quot;org.example.opencmis.user&quot;</span><span class="o">,</span> <span class="s">&quot;cmisuser&quot;</span><span class="o">);</span> <span class="c1">// MyAuthenticationProvider can get and evaluate this</span>
+<span class="n">parameters</span><span class="o">.</span><span class="na">put</span><span class="o">(</span><span class="s">&quot;org.example.opencmis.secret&quot;</span><span class="o">,</span> <span class="s">&quot;b3BlbmNtaXMgdXNlcg==&quot;</span><span class="o">);</span>
+
+<span class="n">parameters</span><span class="o">.</span><span class="na">put</span><span class="o">(</span><span class="n">SessionParameter</span><span class="o">.</span><span class="na">ATOMPUB_URL</span><span class="o">,</span> <span class="n">url</span><span class="o">);</span> <span class="c1">// service document URL</span>
+
+<span class="n">CmisBindingFactory</span> <span class="n">factory</span> <span class="o">=</span> <span class="n">CmisBindingFactory</span><span class="o">.</span><span class="na">newInstance</span><span class="o">();</span>
+<span class="n">CmisBinding</span> <span class="n">provider</span> <span class="o">=</span> <span class="n">factory</span><span class="o">.</span><span class="na">createCmisAtomPubBinding</span><span class="o">(</span><span class="n">parameters</span><span class="o">);</span>
+</pre></div></div>
+             <!-- Content -->
+           </td>
+          </tr>
+        </table>
+     </td>
+     <td id="cell-2-2">&nbsp;</td>
+    </tr>
+    <tr width="100%">
+      <td id="cell-3-0">&nbsp;</td>
+      <td id="cell-3-1">&nbsp;</td>
+      <td id="cell-3-2">&nbsp;</td>
+    </tr>
+    <tr width="100%">
+     <td id="cell-3-0">&nbsp;</td>
+     <td id="cell-3-1">
+       <div id="footer">
+       <!-- Footer -->
+       <div id="site-footer">
+          
+          Apache Chemistry, Apache, the Apache feather logo, and the Apache 
+          Chemistry project logo are trademarks of The Apache Software 
+          Foundation.
+          <BR />
+          Content Management Interoperability Services (CMIS) is an
+          <a href="http://www.oasis-open.org/committees/cmis/">OASIS</a>
+          specification.
+          
+       </div>
+       <!-- Footer -->
+       </div>
+     </td>
+     <td id="cell-3-2">&nbsp;</td>
+    </tr>
+    <tr width="100%">
+      <td id="cell-4-0">&nbsp;</td>
+      <td id="cell-4-1">&nbsp;</td>
+      <td id="cell-4-2">&nbsp;</td>
+    </tr>
+  </table>
+</body>
+</html>

Added: websites/staging/chemistry/trunk/content/java/developing/client/opencmis-client-api-class-diagram.png
==============================================================================
Binary file - no diff available.

Propchange: websites/staging/chemistry/trunk/content/java/developing/client/opencmis-client-api-class-diagram.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: websites/staging/chemistry/trunk/content/java/developing/dev-binding-differences.html
==============================================================================
--- websites/staging/chemistry/trunk/content/java/developing/dev-binding-differences.html (added)
+++ websites/staging/chemistry/trunk/content/java/developing/dev-binding-differences.html Fri Mar 18 11:57:49 2011
@@ -0,0 +1,289 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+
+-->
+<html>
+  <head>
+    <link type="text/css" rel="stylesheet" href="/resources/site.css" />
+    <script src="/resources/space.js" type="text/javascript"></script>
+    <meta name="keywords" content="CMIS, Content Management Interoperability Service, ECM, Enterprise Content Management, OASIS, integration standards, Chemistry, OpenCMIS, cmislib, DotCMIS" />
+    <meta name="description" content="Apache Chemistry, CMIS Implementation" />
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+    <title>
+Apache Chemistry - OpenCMIS Binding differences
+    </title>
+  </head>
+<body onload="init()">
+  <table width="100%" cellpadding="0" cellspacing="0">
+    <tr width="100%">
+      <td id="cell-0-0">&nbsp;</td>
+      <td id="cell-0-1">&nbsp;</td>
+      <td id="cell-0-2">&nbsp;</td>
+    </tr>
+    <tr width="100%">
+      <td id="cell-1-0">&nbsp;</td>
+      <td id="cell-1-1">
+        <div style="padding: 5px;">
+          <div id="banner">
+          <!-- Banner -->
+<TABLE border="0" cellpadding="0" cellspacing="0" width="100%">
+<TR>
+<TD align="left" class="topbardiv" nowrap="">
+  <A href="http://chemistry.apache.org/" title="Apache Chemistry">
+    <IMG border="0" src="/images/chemistry_tm_logo_small.png"/>
+  </A>
+</TD>
+<TD align="right" nowrap="">
+  <A href="http://www.apache.org/" title="The Apache Software Foundation">
+    <IMG border="0" src="/images/asf-logo.png"/>
+  </A>
+</TD>
+</TR>
+</TABLE>
+          <!-- Banner -->
+          </div>
+        </div>
+        <div id="top-menu">
+          <table border="0" cellpadding="1" cellspacing="0" width="100%">
+            <tr>
+              <td>
+                <div align="left">
+                <!-- Breadcrumbs -->
+<a href="/">Home</a>&nbsp;&raquo&nbsp;<a href="/java">Java</a>&nbsp;&raquo&nbsp;<a href="/java/developing">Developing</a>&nbsp;&raquo&nbsp;<a href="/java/developing/dev-binding-differences.html">OpenCMIS Binding differences</a>
+                <!-- Breadcrumbs -->
+                </div>
+              </td>
+              <td>
+                <div align="right">
+                <!-- Quicklinks -->
+<P>
+<A href="http://www.apache.org/" class="external-link" rel="nofollow">Apache</A>
+|
+<A href="http://www.apache.org/licenses/LICENSE-2.0.html" class="external-link" rel="nofollow">License</A>
+|
+<A href="sitemap.html" title="SiteMap">Site Map</A>
+</P>
+                <!-- Quicklinks -->
+                </div>
+              </td>
+            </tr>
+          </table>
+        </div>
+      </td>
+      <td id="cell-1-2">&nbsp;</td>
+    </tr>
+    <tr width="100%">
+      <td id="cell-2-0">&nbsp;</td>
+      <td id="cell-2-1">
+        <table>
+          <tr height="100%" valign="top">
+            <td height="100%">
+              <div id="wrapper-menu-page-right">
+                <div id="wrapper-menu-page-top">
+                  <div id="wrapper-menu-page-bottom">
+                    <div id="menu-page">
+                    <!-- NavigationBar -->
+                    <H3><A name="Navigation-Overview"></A>Overview</H3>
+
+<UL class="alternate" type="square">
+   <LI><A href="/project/cmis.html" title="What's CMIS">What is CMIS?</A></LI>
+   <LI><A href="http://www.apache.org/licenses/" class="external-link" rel="nofollow">License</A></LI>
+   <LI><A href="/project/community.html" title="Community">Community</A></LI>
+   <LI><A href="http://mail-archives.apache.org/mod_mbox/chemistry-dev/" class="external-link" rel="nofollow">Mailing List</A></LI>
+   <LI><A href="https://issues.apache.org/jira/browse/CMIS" class="external-link" rel="nofollow">Issue Tracking</A></LI>
+   <LI><A href="http://www.apache.org/security/" class="external-link" rel="nofollow">Security</A></LI>
+</UL>
+
+
+<H3><A name="Navigation-Search"></A>Search</H3>
+
+<DIV style="padding: 0px 0px 0px 20px;">
+<FORM action="http://www.google.com/search" method="get" style="font-size: 10px;">
+<INPUT name="ie" type="hidden" value="UTF-8"></INPUT>
+<INPUT name="oe" type="hidden" value="UTF-8"></INPUT>
+  <INPUT maxlength="255" name="q" size="12" type="text" value=""></INPUT>
+  <INPUT name="btnG" type="submit" value="Search"></INPUT>
+  <INPUT name="domains" type="hidden" value="incubator.apache.org/chemistry"></INPUT>
+  <INPUT name="sitesearch" type="hidden" value="incubator.apache.org/chemistry"></INPUT>
+</FORM>
+</DIV>
+
+
+<H3><A name="Navigation-CMISforJava"></A>CMIS for Java</H3>
+
+<UL class="alternate" type="square">
+  <LI><A href="/java/overview.html" title="OpenCMIS Overview and Index">Overview</A></LI>
+  <LI><A href="/java/download.html" title="Downloads">Downloads</A></LI>
+  <LI><A href="/java/develop/dev-index.html" title="">Developing with OpenCMIS</A></LI>
+  <LI><A href="/java/examples/example-index.html" title="Example Code">Example Code</A></LI>
+  <LI><A href="/java/howto/how-to-index.html" title="OpenCMIS HowTos">OpenCMIS HowTos</A></LI>
+  <LI><A href="http://incubator.apache.org/chemistry/javadoc/index.html" class="external-link" rel="nofollow">JavaDoc</A></LI>
+  <LI><A href="https://svn.apache.org/repos/asf/chemistry/opencmis/trunk/" class="external-link" rel="nofollow">Source Code</A></LI>
+</UL>
+
+
+<H3><A name="Navigation-CMISforPython"></A>CMIS for Python</H3>
+
+<UL class="alternate" type="square">
+  <LI><A href="/python/cmislib.html" title="cmislib">cmislib</A></LI>
+   <LI><A href="http://incubator.apache.org/chemistry/cmislib-doc/" class="external-link" rel="nofollow">cmislib Documentation</A></LI>
+  <LI><A href="https://svn.apache.org/repos/asf/chemistry/cmislib/trunk/" class="external-link" rel="nofollow">Source Code</A></LI>
+</UL>
+
+
+<H3><A name="Navigation-CMISforPHP"></A>CMIS for PHP</H3>
+
+<UL class="alternate" type="square">
+  <LI><A href="/php/phpclient.html" title="phpclient">CMIS PHP Client</A></LI>
+  <LI><A href="https://svn.apache.org/repos/asf/chemistry/phpclient/trunk/" class="external-link" rel="nofollow">Source Code</A></LI>
+</UL>
+
+
+<H3><A name="Navigation-CMISfor.NET"></A>CMIS for .NET</H3>
+
+<UL class="alternate" type="square">
+  <LI><A href="/dotnet/dotcmis.html" title="DotCMIS">DotCMIS</A></LI>
+  <LI><A href="https://svn.apache.org/repos/asf/chemistry/dotcmis/trunk/" class="external-link" rel="nofollow">Source Code</A></LI>
+</UL>
+
+
+<H3><A name="Navigation-Sponsorship"></A>Sponsorship</H3>
+
+<UL class="alternate" type="square">
+   <LI><A href="http://www.apache.org/foundation/thanks.html" class="external-link" rel="nofollow">Thanks</A></LI>
+   <LI><A href="http://www.apache.org/foundation/sponsorship.html" class="external-link" rel="nofollow">Sponsoring Apache</A></LI>
+</UL>
+
+
+<H3><A name="Navigation-Internal"></A>Internal Docs</H3>
+
+<UL class="alternate" type="square">
+   <LI><A href="http://chemistry.apache.org/internal/opencmis-maven-release-documentation.html" class="external-link" rel="nofollow">Release Process</A></LI>
+</UL>
+                    <!-- NavigationBar -->
+                    </div>
+                </div>
+              </div>
+            </div>
+           </td>
+           <td height="100%">
+             <!-- Content -->
+             <div class="wiki-content"><h1 id="differences_between_the_cmis_bindings">Differences between the CMIS bindings</h1>
+<p>OpenCMIS supports both the AtomPub and the web services binding interface.
+It hides all the details how to handle the protocol but there are some
+subtle differences that need to be reflected in the Java interfaces. This
+chapter explains where the differences are and why they are needed.</p>
+<p><a name="HowToBuildAServer-TheObjectInfointerface"></a></p>
+<h2 id="the_objectinfo_interface">The ObjectInfo interface</h2>
+<p>The methods in the interfaces <code>CmisService</code> are following the data model
+in the CMIS specification. The specification defines the following
+services:</p>
+<ul>
+<li>AclService</li>
+<li>DiscoveryService</li>
+<li>ObjectService</li>
+<li>MultifFlingService</li>
+<li>NavigationService</li>
+<li>PolicyService</li>
+<li>RelationshipService</li>
+<li>RepositoryService</li>
+<li>Versioning Service</li>
+</ul>
+<p>For each of these services exists a corresponding interface in opencmis.
+CmisService is an interface that unifies all interfaces in one interface.
+The methods in this interface correspond to the methods in the
+specification. For the web service binding this is a one-to-one mapping.
+For the AtomPub binding this information is not sufficient in all cases.
+Take the creation of a document as an example. The web service returns in
+this case a single string value containing the id of the created document.
+A response in the AtomPub binding however consists of an AtomPub entry
+element which is an XML fragment (for an example look at
+<code>DocumentEntry.xml</code> in the examples directory of the CMIS specification).
+You will notice that generating this XML requires much more information
+than the create...() methods in the specification provide as return value.
+Your implementation needs to provide all the information so that opencmis
+can generate the complete response. For this purpose the <code>ObjectInfo</code> was
+introduced. <code>getObjectInfo</code> is the method of the <code>CmisService</code> interface
+that provides this information. The <code>AbstractCmisService</code> contains a
+member <code>objectInfoMap</code> that you can fill with this information. If you
+ignore this the class <code>AbstractCmisService</code> contains a default
+implementation which works but is very ineffecient. You should use this
+only as a starting point. Beware that a service can be called from multiple
+threads, so have to take care to handle threading issues properly.</p>
+<p>If the method you are implementing returns a list of objects and not only a
+single value (for example methods like <code>getChildren()</code>, <code>getDescendants()</code>
+in the navigation service) you need to provide an <code>ObjectInfo</code> for each
+element in the collection. <code>getObjectInfo</code> therefore returns a map with
+the object id for each object as key and the corresponding <code>ObjectInfo</code>
+as value. You can use the method <code>addObjectInfo</code> to add an element to the
+map. </p>
+<p><a name="HowToBuildAServer-Thecreate()methods"></a></p>
+<h2 id="the_create_methods">The create() methods</h2>
+<p>The web service binding has separate calls for each object type to be
+created: policies, relationships, documents and folders:</p>
+<ul>
+<li>createDocument</li>
+<li>createFolder</li>
+<li>createRelationship</li>
+<li>createPolicy</li>
+</ul>
+<p>In the AtomPub binding there is one general <code>create()</code> method that is
+used for all object types. The CmisObjectService interface therefore
+contains 5 <code>create()</code> methods, the four specific ones are used for the
+web service bindings and the general one for the AtomPub binding.</p></div>
+             <!-- Content -->
+           </td>
+          </tr>
+        </table>
+     </td>
+     <td id="cell-2-2">&nbsp;</td>
+    </tr>
+    <tr width="100%">
+      <td id="cell-3-0">&nbsp;</td>
+      <td id="cell-3-1">&nbsp;</td>
+      <td id="cell-3-2">&nbsp;</td>
+    </tr>
+    <tr width="100%">
+     <td id="cell-3-0">&nbsp;</td>
+     <td id="cell-3-1">
+       <div id="footer">
+       <!-- Footer -->
+       <div id="site-footer">
+          
+          Apache Chemistry, Apache, the Apache feather logo, and the Apache 
+          Chemistry project logo are trademarks of The Apache Software 
+          Foundation.
+          <BR />
+          Content Management Interoperability Services (CMIS) is an
+          <a href="http://www.oasis-open.org/committees/cmis/">OASIS</a>
+          specification.
+          
+       </div>
+       <!-- Footer -->
+       </div>
+     </td>
+     <td id="cell-3-2">&nbsp;</td>
+    </tr>
+    <tr width="100%">
+      <td id="cell-4-0">&nbsp;</td>
+      <td id="cell-4-1">&nbsp;</td>
+      <td id="cell-4-2">&nbsp;</td>
+    </tr>
+  </table>
+</body>
+</html>

Added: websites/staging/chemistry/trunk/content/java/developing/dev-client-cache.html
==============================================================================
--- websites/staging/chemistry/trunk/content/java/developing/dev-client-cache.html (added)
+++ websites/staging/chemistry/trunk/content/java/developing/dev-client-cache.html Fri Mar 18 11:57:49 2011
@@ -0,0 +1,272 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+
+-->
+<html>
+  <head>
+    <link type="text/css" rel="stylesheet" href="/resources/site.css" />
+    <script src="/resources/space.js" type="text/javascript"></script>
+    <meta name="keywords" content="CMIS, Content Management Interoperability Service, ECM, Enterprise Content Management, OASIS, integration standards, Chemistry, OpenCMIS, cmislib, DotCMIS" />
+    <meta name="description" content="Apache Chemistry, CMIS Implementation" />
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+    <title>
+Apache Chemistry - Understanding the client side cache
+    </title>
+  </head>
+<body onload="init()">
+  <table width="100%" cellpadding="0" cellspacing="0">
+    <tr width="100%">
+      <td id="cell-0-0">&nbsp;</td>
+      <td id="cell-0-1">&nbsp;</td>
+      <td id="cell-0-2">&nbsp;</td>
+    </tr>
+    <tr width="100%">
+      <td id="cell-1-0">&nbsp;</td>
+      <td id="cell-1-1">
+        <div style="padding: 5px;">
+          <div id="banner">
+          <!-- Banner -->
+<TABLE border="0" cellpadding="0" cellspacing="0" width="100%">
+<TR>
+<TD align="left" class="topbardiv" nowrap="">
+  <A href="http://chemistry.apache.org/" title="Apache Chemistry">
+    <IMG border="0" src="/images/chemistry_tm_logo_small.png"/>
+  </A>
+</TD>
+<TD align="right" nowrap="">
+  <A href="http://www.apache.org/" title="The Apache Software Foundation">
+    <IMG border="0" src="/images/asf-logo.png"/>
+  </A>
+</TD>
+</TR>
+</TABLE>
+          <!-- Banner -->
+          </div>
+        </div>
+        <div id="top-menu">
+          <table border="0" cellpadding="1" cellspacing="0" width="100%">
+            <tr>
+              <td>
+                <div align="left">
+                <!-- Breadcrumbs -->
+<a href="/">Home</a>&nbsp;&raquo&nbsp;<a href="/java">Java</a>&nbsp;&raquo&nbsp;<a href="/java/developing">Developing</a>&nbsp;&raquo&nbsp;<a href="/java/developing/dev-client-cache.html">Understanding the client side cache</a>
+                <!-- Breadcrumbs -->
+                </div>
+              </td>
+              <td>
+                <div align="right">
+                <!-- Quicklinks -->
+<P>
+<A href="http://www.apache.org/" class="external-link" rel="nofollow">Apache</A>
+|
+<A href="http://www.apache.org/licenses/LICENSE-2.0.html" class="external-link" rel="nofollow">License</A>
+|
+<A href="sitemap.html" title="SiteMap">Site Map</A>
+</P>
+                <!-- Quicklinks -->
+                </div>
+              </td>
+            </tr>
+          </table>
+        </div>
+      </td>
+      <td id="cell-1-2">&nbsp;</td>
+    </tr>
+    <tr width="100%">
+      <td id="cell-2-0">&nbsp;</td>
+      <td id="cell-2-1">
+        <table>
+          <tr height="100%" valign="top">
+            <td height="100%">
+              <div id="wrapper-menu-page-right">
+                <div id="wrapper-menu-page-top">
+                  <div id="wrapper-menu-page-bottom">
+                    <div id="menu-page">
+                    <!-- NavigationBar -->
+                    <H3><A name="Navigation-Overview"></A>Overview</H3>
+
+<UL class="alternate" type="square">
+   <LI><A href="/project/cmis.html" title="What's CMIS">What is CMIS?</A></LI>
+   <LI><A href="http://www.apache.org/licenses/" class="external-link" rel="nofollow">License</A></LI>
+   <LI><A href="/project/community.html" title="Community">Community</A></LI>
+   <LI><A href="http://mail-archives.apache.org/mod_mbox/chemistry-dev/" class="external-link" rel="nofollow">Mailing List</A></LI>
+   <LI><A href="https://issues.apache.org/jira/browse/CMIS" class="external-link" rel="nofollow">Issue Tracking</A></LI>
+   <LI><A href="http://www.apache.org/security/" class="external-link" rel="nofollow">Security</A></LI>
+</UL>
+
+
+<H3><A name="Navigation-Search"></A>Search</H3>
+
+<DIV style="padding: 0px 0px 0px 20px;">
+<FORM action="http://www.google.com/search" method="get" style="font-size: 10px;">
+<INPUT name="ie" type="hidden" value="UTF-8"></INPUT>
+<INPUT name="oe" type="hidden" value="UTF-8"></INPUT>
+  <INPUT maxlength="255" name="q" size="12" type="text" value=""></INPUT>
+  <INPUT name="btnG" type="submit" value="Search"></INPUT>
+  <INPUT name="domains" type="hidden" value="incubator.apache.org/chemistry"></INPUT>
+  <INPUT name="sitesearch" type="hidden" value="incubator.apache.org/chemistry"></INPUT>
+</FORM>
+</DIV>
+
+
+<H3><A name="Navigation-CMISforJava"></A>CMIS for Java</H3>
+
+<UL class="alternate" type="square">
+  <LI><A href="/java/overview.html" title="OpenCMIS Overview and Index">Overview</A></LI>
+  <LI><A href="/java/download.html" title="Downloads">Downloads</A></LI>
+  <LI><A href="/java/develop/dev-index.html" title="">Developing with OpenCMIS</A></LI>
+  <LI><A href="/java/examples/example-index.html" title="Example Code">Example Code</A></LI>
+  <LI><A href="/java/howto/how-to-index.html" title="OpenCMIS HowTos">OpenCMIS HowTos</A></LI>
+  <LI><A href="http://incubator.apache.org/chemistry/javadoc/index.html" class="external-link" rel="nofollow">JavaDoc</A></LI>
+  <LI><A href="https://svn.apache.org/repos/asf/chemistry/opencmis/trunk/" class="external-link" rel="nofollow">Source Code</A></LI>
+</UL>
+
+
+<H3><A name="Navigation-CMISforPython"></A>CMIS for Python</H3>
+
+<UL class="alternate" type="square">
+  <LI><A href="/python/cmislib.html" title="cmislib">cmislib</A></LI>
+   <LI><A href="http://incubator.apache.org/chemistry/cmislib-doc/" class="external-link" rel="nofollow">cmislib Documentation</A></LI>
+  <LI><A href="https://svn.apache.org/repos/asf/chemistry/cmislib/trunk/" class="external-link" rel="nofollow">Source Code</A></LI>
+</UL>
+
+
+<H3><A name="Navigation-CMISforPHP"></A>CMIS for PHP</H3>
+
+<UL class="alternate" type="square">
+  <LI><A href="/php/phpclient.html" title="phpclient">CMIS PHP Client</A></LI>
+  <LI><A href="https://svn.apache.org/repos/asf/chemistry/phpclient/trunk/" class="external-link" rel="nofollow">Source Code</A></LI>
+</UL>
+
+
+<H3><A name="Navigation-CMISfor.NET"></A>CMIS for .NET</H3>
+
+<UL class="alternate" type="square">
+  <LI><A href="/dotnet/dotcmis.html" title="DotCMIS">DotCMIS</A></LI>
+  <LI><A href="https://svn.apache.org/repos/asf/chemistry/dotcmis/trunk/" class="external-link" rel="nofollow">Source Code</A></LI>
+</UL>
+
+
+<H3><A name="Navigation-Sponsorship"></A>Sponsorship</H3>
+
+<UL class="alternate" type="square">
+   <LI><A href="http://www.apache.org/foundation/thanks.html" class="external-link" rel="nofollow">Thanks</A></LI>
+   <LI><A href="http://www.apache.org/foundation/sponsorship.html" class="external-link" rel="nofollow">Sponsoring Apache</A></LI>
+</UL>
+
+
+<H3><A name="Navigation-Internal"></A>Internal Docs</H3>
+
+<UL class="alternate" type="square">
+   <LI><A href="http://chemistry.apache.org/internal/opencmis-maven-release-documentation.html" class="external-link" rel="nofollow">Release Process</A></LI>
+</UL>
+                    <!-- NavigationBar -->
+                    </div>
+                </div>
+              </div>
+            </div>
+           </td>
+           <td height="100%">
+             <!-- Content -->
+             <div class="wiki-content"><h1 id="understanding_the_client_side_cache">Understanding the client side cache</h1>
+<p>Client side caching is turned on by default. That is, <code>getObject()</code> will
+first look into the session cache if the object already exists there. If
+this is the case, it returns the object without talking to the repository.
+So it might return stale objects.<br />
+</p>
+<p>There are multiple ways to deal with that:</p>
+<ul>
+<li>Refresh the object data that is returned from <code>getObject()</code>.</li>
+</ul>
+&nbsp;
+
+<div class="codehilite"><pre><span class="n">CmisObject</span> <span class="n">object</span> <span class="o">=</span> <span class="n">session</span><span class="o">.</span><span class="na">getObject</span><span class="o">(</span><span class="n">id</span><span class="o">);</span>
+<span class="n">object</span><span class="o">.</span><span class="na">refresh</span><span class="o">();</span> <span class="c1">// contacts the repository and refreshes the object</span>
+<span class="n">object</span><span class="o">.</span><span class="na">refreshIfOld</span><span class="o">(</span><span class="mi">60</span> <span class="o">*</span> <span class="mi">1000</span><span class="o">);</span> <span class="c1">// ... or refreshes the object only if the data is older than a minute</span>
+</pre></div>
+
+
+<ul>
+<li>Turn off the session cache completely.</li>
+</ul>
+&nbsp;
+
+<div class="codehilite"><pre><span class="n">session</span><span class="o">.</span><span class="na">getDefaultContext</span><span class="o">().</span><span class="na">setCacheEnabled</span><span class="o">(</span><span class="kc">false</span><span class="o">);</span>
+</pre></div>
+
+
+<ul>
+<li>Turn off caching for this <code>getObject()</code> call.</li>
+</ul>
+&nbsp;
+
+<div class="codehilite"><pre><span class="n">OperationContext</span> <span class="n">oc</span> <span class="o">=</span> <span class="n">session</span><span class="o">.</span><span class="na">createOperationContext</span><span class="o">();</span>
+<span class="n">oc</span><span class="o">.</span><span class="na">setCacheEnabled</span><span class="o">(</span><span class="kc">false</span><span class="o">);</span>
+
+<span class="n">CmisObject</span> <span class="n">object</span> <span class="o">=</span> <span class="n">session</span><span class="o">.</span><span class="na">getObject</span><span class="o">(</span><span class="n">id</span><span class="o">,</span> <span class="n">oc</span><span class="o">);</span>
+</pre></div>
+
+
+<ul>
+<li>Clear the session cache (not recommended).</li>
+</ul>
+&nbsp;
+
+<div class="codehilite"><pre><span class="n">session</span><span class="o">.</span><span class="na">clear</span><span class="o">();</span>
+</pre></div></div>
+             <!-- Content -->
+           </td>
+          </tr>
+        </table>
+     </td>
+     <td id="cell-2-2">&nbsp;</td>
+    </tr>
+    <tr width="100%">
+      <td id="cell-3-0">&nbsp;</td>
+      <td id="cell-3-1">&nbsp;</td>
+      <td id="cell-3-2">&nbsp;</td>
+    </tr>
+    <tr width="100%">
+     <td id="cell-3-0">&nbsp;</td>
+     <td id="cell-3-1">
+       <div id="footer">
+       <!-- Footer -->
+       <div id="site-footer">
+          
+          Apache Chemistry, Apache, the Apache feather logo, and the Apache 
+          Chemistry project logo are trademarks of The Apache Software 
+          Foundation.
+          <BR />
+          Content Management Interoperability Services (CMIS) is an
+          <a href="http://www.oasis-open.org/committees/cmis/">OASIS</a>
+          specification.
+          
+       </div>
+       <!-- Footer -->
+       </div>
+     </td>
+     <td id="cell-3-2">&nbsp;</td>
+    </tr>
+    <tr width="100%">
+      <td id="cell-4-0">&nbsp;</td>
+      <td id="cell-4-1">&nbsp;</td>
+      <td id="cell-4-2">&nbsp;</td>
+    </tr>
+  </table>
+</body>
+</html>