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/21 16:51:23 UTC

svn commit: r787326 - in /websites/staging/chemistry/trunk/content/java: developing/dev-known-repo-issues.html developing/dev-use-with-maven.html download.html how-to/how-to-connect.html how-to/how-to-tune-perfomance.html

Author: buildbot
Date: Mon Mar 21 15:51:22 2011
New Revision: 787326

Log:
Staging update by buildbot

Modified:
    websites/staging/chemistry/trunk/content/java/developing/dev-known-repo-issues.html
    websites/staging/chemistry/trunk/content/java/developing/dev-use-with-maven.html
    websites/staging/chemistry/trunk/content/java/download.html
    websites/staging/chemistry/trunk/content/java/how-to/how-to-connect.html
    websites/staging/chemistry/trunk/content/java/how-to/how-to-tune-perfomance.html

Modified: websites/staging/chemistry/trunk/content/java/developing/dev-known-repo-issues.html
==============================================================================
--- websites/staging/chemistry/trunk/content/java/developing/dev-known-repo-issues.html (original)
+++ websites/staging/chemistry/trunk/content/java/developing/dev-known-repo-issues.html Mon Mar 21 15:51:22 2011
@@ -186,7 +186,24 @@ Apache Chemistry - Known repository issu
              <div class="wiki-content"><h1 id="known_repository_issues">Known repository issues</h1>
 <p>This is a loose collection of current known issues, bugs, limitations and unusual behaviors 
 of existing CMIS repositories.</p>
-<p>TODO</p></div>
+<p>TODO</p>
+<h2 id="connecting_to_sharepoint_2010">Connecting to SharePoint 2010</h2>
+<p>While connecting via AtomPub is straight forward, connecting via Web Services is a bit tricky.</p>
+<h3 id="atompub">AtomPub</h3>
+<p>The service document URL is <code>http://&lt;host&gt;/_vti_bin/cmis/rest/&lt;SPList&gt;?getrepositoryinfo</code>.
+Since this sends the password as plain text, HTTPS is strongly recommended.</p>
+<h3 id="web_services">Web Services</h3>
+<ol>
+<li>Download the WSDL with a web browser and store it on your local disk. The WSDL URL is <code>http://&lt;host&gt;/_vti_bin/cmissoapwsdl.aspx?wsdl</code>.</li>
+<li>Provide <code>file://</code>... URLs to the downloaded WSDL for all OpenCMIS WSDL session parameters.</li>
+<li>
+<p>Activate the OpenCMIS NTLM authentication provider.</p>
+<p>:::java
+parameters.put(SessionParameter.AUTHENTICATION_PROVIDER_CLASS, CmisBindingFactory.NTLM_AUTHENTICATION_PROVIDER);</p>
+</li>
+</ol>
+<p>(The NTLM authentication provider uses <a href="http://download-llnw.oracle.com/javase/6/docs/api/java/net/Authenticator.html">java.net.Authenticator</a>
+ under the hood. If this interferes with your environment, you are on your own.)</p></div>
              <!-- Content -->
            </td>
           </tr>

Modified: websites/staging/chemistry/trunk/content/java/developing/dev-use-with-maven.html
==============================================================================
--- websites/staging/chemistry/trunk/content/java/developing/dev-use-with-maven.html (original)
+++ websites/staging/chemistry/trunk/content/java/developing/dev-use-with-maven.html Mon Mar 21 15:51:22 2011
@@ -184,7 +184,6 @@ Apache Chemistry - Using Maven
            <td height="100%">
              <!-- Content -->
              <div class="wiki-content"><h1 id="using_maven">Using Maven</h1>
-<h2 id="use_opencmis_with_maven">Use OpenCMIS with Maven</h2>
 <p>You can use OpenCMIS with <a href="http://maven.apache.org/">Maven</a>.
 Check the latest version available by <a href="https://repository.apache.org/index.html#nexus-search;quick~opencmis">searching the Apache repository</a>.</p>
 <h2 id="client">Client</h2>

Modified: websites/staging/chemistry/trunk/content/java/download.html
==============================================================================
--- websites/staging/chemistry/trunk/content/java/download.html (original)
+++ websites/staging/chemistry/trunk/content/java/download.html Mon Mar 21 15:51:22 2011
@@ -187,7 +187,7 @@ Apache Chemistry - OpenCMIS Downloads
 <a name="OpenCMIS-0.2.0FullDownloadpage">
 
 <h2 id="incubation_release_020_2011-01-21">Incubation Release 0.2.0 (2011-01-21)</h2>
-<p><a href="http://www.apache.org/dyn/closer.cgi/incubator/chemistry/opencmis/0.2.0-incubating/">Full Download page</a> and <a href="https://issues.apache.org/jira/secure/IssueNavigator.jspa?reset=true&amp;&amp;pid=12310936&amp;fixfor=12315134&amp;sorter/field=priority&amp;sorter/order=DESC">Release Notes</a></p>
+<p><a href="http://www.apache.org/dyn/closer.cgi/incubator/chemistry/opencmis/0.2.0-incubating/">Full Download page</a> and <a href="https://issues.apache.org/jira/secure/IssueNavigator.jspa?reset=true&amp;&amp;pid=12310936&amp;fixfor=12315134&amp;sorter/field=priority&amp;sorter/order=DESC">Release Notes</a>. OpenCMIS is also available <a href="developing/dev-use-with-maven.html">via Maven</a>.</p>
 <table>
 <thead>
 <tr>
@@ -236,7 +236,6 @@ Apache Chemistry - OpenCMIS Downloads
 </tr>
 </tbody>
 </table>
-<p>OpenCMIS is also available <a href="developing/dev-use-with-maven.html">via Maven</a>.</p>
 <a name="OpenCMIS-0.1.0FullDownloadpage">
 
 <h2 id="incubation_release_010_2010-09-17">Incubation Release 0.1.0 (2010-09-17)</h2>

Modified: websites/staging/chemistry/trunk/content/java/how-to/how-to-connect.html
==============================================================================
--- websites/staging/chemistry/trunk/content/java/how-to/how-to-connect.html (original)
+++ websites/staging/chemistry/trunk/content/java/how-to/how-to-connect.html Mon Mar 21 15:51:22 2011
@@ -183,68 +183,13 @@ Apache Chemistry - Connecting to a repos
            </td>
            <td height="100%">
              <!-- Content -->
-             <div class="wiki-content"><h1 id="connecting_to_a_repository_client">Connecting to a repository (Client)</h1>
-<p>This section explains how to use the client API to connect to a repository using the
-different bindings. Authentication, cookie handling and special considerations for 
-MS Sharepoint are considered.</p>
-<p><a name="OpenCMISCookbook-ConnectingtoaCMISrepositorybyAtomPub"></a></p>
-<h2 id="connecting_to_a_cmis_repository_by_atompub">Connecting to a CMIS repository by AtomPub</h2>
-<div class="codehilite"><pre><span class="c1">// Default factory implementation of client runtime.</span>
-<span class="n">SessionFactory</span> <span class="n">sessionFactory</span> <span class="o">=</span> <span class="n">SessionFactoryImpl</span><span class="o">.</span><span class="na">newInstance</span><span class="o">();</span>
-<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">parameter</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="c1">// User credentials.</span>
-<span class="n">parameter</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="s">&quot;user&quot;</span><span class="o">);</span>
-<span class="n">parameter</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="s">&quot;password&quot;</span><span class="o">);</span>
-
-<span class="c1">// Connection settings.</span>
-<span class="n">parameter</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="s">&quot;http://localhost:8080/alfresco/service/cmis&quot;</span><span class="o">);</span> <span class="c1">// URL to your CMIS server.</span>
-<span class="c1">// parameter.put(SessionParameter.REPOSITORY_ID, &quot;myRepository&quot;); // Only necessary if there is more than one repository.</span>
-<span class="n">parameter</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">BINDING_TYPE</span><span class="o">,</span> <span class="n">BindingType</span><span class="o">.</span><span class="na">ATOMPUB</span><span class="o">.</span><span class="na">value</span><span class="o">());</span>
-
-<span class="c1">// Create session.</span>
-<span class="n">Session</span> <span class="n">session</span> <span class="o">=</span> <span class="kc">null</span><span class="o">;</span>
-<span class="k">try</span> <span class="o">{</span>
-    <span class="c1">// This supposes only one repository is available at the URL.</span>
-    <span class="n">Repository</span> <span class="n">soleRepository</span> <span class="o">=</span> <span class="n">sessionFactory</span><span class="o">.</span><span class="na">getRepositories</span><span class="o">(</span><span class="n">parameter</span><span class="o">).</span><span class="na">get</span><span class="o">(</span><span class="mi">0</span><span class="o">);</span>
-    <span class="n">session</span> <span class="o">=</span> <span class="n">soleRepository</span><span class="o">.</span><span class="na">createSession</span><span class="o">();</span>
-<span class="o">}</span>
-<span class="k">catch</span><span class="o">(</span><span class="n">CmisConnectionException</span> <span class="n">e</span><span class="o">)</span> <span class="o">{</span> 
-    <span class="c1">// The server is unreachable</span>
-<span class="o">}</span>
-<span class="k">catch</span><span class="o">(</span><span class="n">CmisRuntimeException</span> <span class="n">e</span><span class="o">)</span> <span class="o">{</span>
-    <span class="c1">// The user/password have probably been rejected by the server.</span>
-<span class="o">}</span>
-</pre></div>
-
-
-<h2 id="connecting_to_sharepoint_2010">Connecting to SharePoint 2010</h2>
-<p>While connecting via AtomPub is straight forward, connecting via Web
-Services is a bit tricky.</p>
-<h3 id="atompub">AtomPub</h3>
-<p>The service document URL is <code>http://&lt;host&gt;/_vti_bin/cmis/rest/&lt;SPList&gt;?getrepositoryinfo</code>.
-Since this sends the password as plain text, HTTPS is strongly recommended.</p>
-<h3 id="web_services">Web Services</h3>
-<ol>
-<li>Download the WSDL with a web browser and store it on your local disk. The WSDL URL is <code>http://&lt;host&gt;/_vti_bin/cmissoapwsdl.aspx?wsdl</code>.</li>
-<li>Provide <code>file://</code>... URLs to the downloaded WSDL for all OpenCMIS WSDL session parameters.</li>
-<li>Activate the OpenCMIS NTLM authentication provider.</li>
-</ol>
-&nbsp;
-
-<div class="codehilite"><pre><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="n">CmisBindingFactory</span><span class="o">.</span><span class="na">NTLM_AUTHENTICATION_PROVIDER</span><span class="o">);</span>
-</pre></div>
-
-
-<p>(The NTLM authentication provider uses <a href="http://download-llnw.oracle.com/javase/6/docs/api/java/net/Authenticator.html">java.net.Authenticator</a>
- under the hood. If this interferes with your environment, you are on your own.)</p>
+             <div class="wiki-content"><h1 id="connecting_to_a_repository">Connecting to a repository</h1>
+<p>In order to connect to a CMIS repository you have to <a href="../examples/example-create-session.html">create a session</a>.</p>
+<p>A few repositories need <a href="../developing/dev-known-repo-issues.html">special treatment</a>.</p>
 <h2 id="using_cookies">Using Cookies</h2>
-<p>Some repositories are sending HTTP cookies to maintain state (although CMIS
-is stateless) or accelerate authentication for subsequent calls. OpenCMIS
-ignores these cookies by default. The following code snippet activates
-cookies for your application and OpenCMIS.
-See <a href="http://java.sun.com/docs/books/tutorial/networking/cookies/cookiemanager.html">this page</a>
- for details.</p>
+<p>Some repositories are sending HTTP cookies to maintain state (although CMIS is stateless) or accelerate authentication for subsequent calls. OpenCMIS
+ignores these cookies by default. The following code snippet activates cookies for your application and OpenCMIS.
+See <a href="http://java.sun.com/docs/books/tutorial/networking/cookies/cookiemanager.html">this page</a> for details.</p>
 <div class="codehilite"><pre><span class="n">CookieManager</span> <span class="n">cm</span> <span class="o">=</span> <span class="k">new</span> <span class="n">CookieManager</span><span class="o">(</span><span class="kc">null</span><span class="o">,</span> <span class="n">CookiePolicy</span><span class="o">.</span><span class="na">ACCEPT_ALL</span><span class="o">);</span>
 <span class="n">CookieHandler</span><span class="o">.</span><span class="na">setDefault</span><span class="o">(</span><span class="n">cm</span><span class="o">);</span>
 </pre></div></div>

Modified: websites/staging/chemistry/trunk/content/java/how-to/how-to-tune-perfomance.html
==============================================================================
--- websites/staging/chemistry/trunk/content/java/how-to/how-to-tune-perfomance.html (original)
+++ websites/staging/chemistry/trunk/content/java/how-to/how-to-tune-perfomance.html Mon Mar 21 15:51:22 2011
@@ -189,7 +189,7 @@ Apache Chemistry - Tuning the performanc
 possible. In order to be effective, you have to reuse the Session object whenever possible. Creating a new Session
 object for each call decreases the performance drastically. Session objects and CMIS objects are thread-safe and
 can/should be reused across threads.</p>
-<p>OperationContext objects control which data (properties, renditions, relationships, allowable actions, ACLs,
+<p><a href="../developing/dev-operation-context.html">OperationContext</a> objects control which data (properties, renditions, relationships, allowable actions, ACLs,
 policies, etc.) is requested from the repository. The more data is requested, the longer it takes to transmit and
 process it. By default, OpenCMIS fetches more data than most applications need. Tuning the OperationContext,
 and especially the property filter, can result in a significant performance improvement.</p>
@@ -199,44 +199,31 @@ If this is the case, it returns the obje
 </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>
+<li>
+<p>Refresh the object data that is returned from <code>getObject()</code>:</p>
+<p>:::java
+CmisObject object = session.getObject(id);
+object.refresh(); // contacts the repository and refreshes the object
+object.refreshIfOld(60 * 1000); // ... or refreshes the object only if the data is older than a minute</p>
+</li>
+<li>
+<p>Turn off the session cache completely:</p>
+<p>:::java
+session.getDefaultContext().setCacheEnabled(false);</p>
+</li>
+<li>
+<p>Turn off caching for this <code>getObject()</code> call:</p>
+<p>:::java
+OperationContext oc = session.createOperationContext();
+oc.setCacheEnabled(false);</p>
+<p>CmisObject object = session.getObject(id, oc);</p>
+</li>
+<li>
+<p>Clear the session cache (not recommended!):</p>
+<p>:::java
+session.clear();</p>
+</li>
+</ul></div>
              <!-- Content -->
            </td>
           </tr>