chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r787529 - in /websites/staging/chemistry/trunk/content/java/developing: client/dev-client-overview.html dev-compare-client-api-binding.html
Date Fri, 25 Mar 2011 17:24:48 GMT
Author: buildbot
Date: Fri Mar 25 17:24:48 2011
New Revision: 787529

Log:
Staging update by buildbot

Modified:
    websites/staging/chemistry/trunk/content/java/developing/client/dev-client-overview.html
    websites/staging/chemistry/trunk/content/java/developing/dev-compare-client-api-binding.html

Modified: websites/staging/chemistry/trunk/content/java/developing/client/dev-client-overview.html
==============================================================================
--- websites/staging/chemistry/trunk/content/java/developing/client/dev-client-overview.html (original)
+++ websites/staging/chemistry/trunk/content/java/developing/client/dev-client-overview.html Fri Mar 25 17:24:48 2011
@@ -203,10 +203,10 @@ Apache Chemistry - CMIS Client Overview
 <p>Make sure your repository speaks HTTPS. You probably don't want to expose your password and your documents to everyone on the network.</p>
 </li>
 <li>
-<p>Download the <a href="../download.html">OpenCMIS client library</a> and the <a href="../download.html">CMIS Workbench</a> .</p>
+<p>Download the <a href="../../download.html">OpenCMIS client library</a> and the <a href="../../download.html">CMIS Workbench</a>.</p>
 </li>
 <li>
-<p>Choose an API. OpenCMIS provides two CMIS client APIs that are called <a href="dev-client-api.html">Client API</a> and <a href="dev-client-bindings.html">Client Bindings API</a>. The Client API is a high-level, object orientated API and suitable for most use cases. It sits on top of the Client Bindings API. The Client Bindings API reflects the CMIS domain model. It allows fine-grained control, which makes the interfaces a bit clunky. This guide explains the Client API and <a href="dev-compare-client-api-binding.html">this page</a> compares both.</p>
+<p>Choose an API. OpenCMIS provides two CMIS client APIs that are called <a href="dev-client-api.html">Client API</a> and <a href="dev-client-bindings.html">Client Bindings API</a>. The Client API is a high-level, object orientated API and suitable for most use cases. It sits on top of the Client Bindings API. The Client Bindings API reflects the CMIS domain model. It allows fine-grained control, which makes the interfaces a bit clunky. This guide explains the Client API and <a href="../dev-compare-client-api-binding.html">this page</a> compares both.</p>
 </li>
 </ol>
 <h2 id="the_theory">The Theory</h2>
@@ -218,14 +218,14 @@ It scales well since each call can go to
 <h2 id="first_steps">First Steps</h2>
 <p>The OpenCMIS client package contains all jars you need to connect to a repository. Make sure they are all in your classpath.</p>
 <p>Before you start implementing have a look at the OpenCMIS JavaDoc. Start with the Session interface, the Document interface, and the Folder interface. Together with your CMIS domain model knowledge (you remember the second chapter of the CMIS specification) you should now have a picture of what is available. </p>
-<p>To connect to a repository you have to create a Session object. See <a href="../examples/example-create-session.html">this page</a> for code examples. There are a few required entries in the session parameters map. OpenCMIS has to know which binding you want to use and where to find the CMIS endpoint. Most repositories also need a username and a password to identify the user. (See the authentication section for more details.)</p>
+<p>To connect to a repository you have to create a Session object. See <a href="../../examples/example-create-session.html">this page</a> for code examples. There are a few required entries in the session parameters map. OpenCMIS has to know which binding you want to use and where to find the CMIS endpoint. Most repositories also need a username and a password to identify the user. (See the authentication section for more details.)</p>
 <p>The repository id parameter tells OpenCMIS which repository at this CMIS endpoint it should talk to. How do you get this repository id is repository specific. The SessionFactory can also fetch a list of all available repositories. </p>
-<p>There are also a number of optional <a href="dev-session-parameters.html">session parameters</a> that control the cache behavior, HTTP settings, etc. Leave them alone as long as you don't want or have to optimize your setup.</p>
-<p>The Session object gives you access to all CMIS features.  There are a few common and repeating patterns. Have a look at the <a href="../examples/index.html">examples sections</a>.</p>
-<p>When you feel comfortable with the API, familiarize yourself with the <a href="dev-client-cache.html">OpenCMIS caches</a> and the <a href="dev-operation-context.html">OperationContext</a>. They can improve the performance considerably.</p>
+<p>There are also a number of optional <a href="../dev-session-parameters.html">session parameters</a> that control the cache behavior, HTTP settings, etc. Leave them alone as long as you don't want or have to optimize your setup.</p>
+<p>The Session object gives you access to all CMIS features.  There are a few common and repeating patterns. Have a look at the <a href="../../examples/index.html">examples sections</a>.</p>
+<p>When you feel comfortable with the API, familiarize yourself with the <a href="../dev-client-cache.html">OpenCMIS caches</a> and the <a href="../dev-operation-context.html">OperationContext</a>. They can improve the performance considerably.</p>
 <h2 id="authentication">Authentication</h2>
 <p>The CMIS specification recommends HTTP basic authentication for AtomPub and WS-Security UsernameToken for Web Services. Most repositories support that. If can't find any information in the repository documentation, assume that those are enabled.</p>
-<p>OpenCMIS also supports <a href="dev-session-parameters.html">NTLM</a> but you should avoid it if you can. It generates some side effects in the JVM and has streaming issues. </p>
+<p>OpenCMIS also supports <a href="../dev-session-parameters.html">NTLM</a> but you should avoid it if you can. It generates some side effects in the JVM and has streaming issues. </p>
 <p>If the repository need requires a different authentication mechanism, you have to implement your own <a href="dev-client-bindings.html">authentication provider</a>.</p>
 <h2 id="cmis_workbench">CMIS Workbench</h2>
 <p>The CMIS Workbench is desktop client build on top of OpenCMIS. It lets you see the repository through the eyes of CMIS and OpenCMIS. That can be handy during development.</p>

Modified: websites/staging/chemistry/trunk/content/java/developing/dev-compare-client-api-binding.html
==============================================================================
--- websites/staging/chemistry/trunk/content/java/developing/dev-compare-client-api-binding.html (original)
+++ websites/staging/chemistry/trunk/content/java/developing/dev-compare-client-api-binding.html Fri Mar 25 17:24:48 2011
@@ -196,15 +196,13 @@ fine-grained control.</p>
 See also <a href="client/dev-client-api.html">OpenCMIS Client API</a>.</p>
 <div class="codehilite"><pre><span class="n">Map</span><span class="o">&lt;</span><span class="n">String</span><span class="p">,</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="p">,</span> <span class="n">String</span><span class="o">&gt;</span><span class="p">();</span>
 <span class="n">parameters</span><span class="o">.</span><span class="n">put</span><span class="p">(</span><span class="n">SessionParameter</span><span class="o">.</span><span class="n">BINDING_TYPE</span><span class="p">,</span> <span class="n">BindingType</span><span class="o">.</span><span class="n">ATOMPUB</span><span class="o">.</span><span class="n">value</span><span class="p">());</span>
-<span class="n">parameters</span><span class="o">.</span><span class="n">put</span><span class="p">(</span><span class="n">SessionParameter</span><span class="o">.</span><span class="n">ATOMPUB_URL</span><span class="p">,</span>
-    <span class="s">&quot;http://localhost:8080/opencmis/atom&quot;</span><span class="p">);</span>
+<span class="n">parameters</span><span class="o">.</span><span class="n">put</span><span class="p">(</span><span class="n">SessionParameter</span><span class="o">.</span><span class="n">ATOMPUB_URL</span><span class="p">,</span> <span class="s">&quot;http://localhost:8080/opencmis/atom&quot;</span><span class="p">);</span>
 <span class="n">parameters</span><span class="o">.</span><span class="n">put</span><span class="p">(</span><span class="n">SessionParameter</span><span class="o">.</span><span class="n">REPOSITORY_ID</span><span class="p">,</span> <span class="s">&quot;A1&quot;</span><span class="p">);</span>
 <span class="n">parameters</span><span class="o">.</span><span class="n">put</span><span class="p">(</span><span class="n">SessionParameter</span><span class="o">.</span><span class="n">USER</span><span class="p">,</span> <span class="s">&quot;test&quot;</span><span class="p">);</span>
 <span class="n">parameters</span><span class="o">.</span><span class="n">put</span><span class="p">(</span><span class="n">SessionParameter</span><span class="o">.</span><span class="n">PASSWORD</span><span class="p">,</span> <span class="s">&quot;test&quot;</span><span class="p">);</span>
 
 <span class="sr">//</span> <span class="n">create</span> <span class="n">the</span> <span class="n">session</span>
-<span class="n">Session</span> <span class="n">session</span> <span class="o">=</span>
-    <span class="n">SessionFactoryImpl</span><span class="o">.</span><span class="n">newInstance</span><span class="p">()</span><span class="o">.</span><span class="n">createSession</span><span class="p">(</span><span class="n">parameters</span><span class="p">);</span>
+<span class="n">Session</span> <span class="n">session</span> <span class="o">=</span> <span class="n">SessionFactoryImpl</span><span class="o">.</span><span class="n">newInstance</span><span class="p">()</span><span class="o">.</span><span class="n">createSession</span><span class="p">(</span><span class="n">parameters</span><span class="p">);</span>
 
 <span class="sr">//</span> <span class="n">get</span> <span class="n">repository</span> <span class="n">info</span>
 <span class="n">RepositoryInfo</span> <span class="n">repInfo</span> <span class="o">=</span> <span class="n">session</span><span class="o">.</span><span class="n">getRepositoryInfo</span><span class="p">();</span>
@@ -218,23 +216,20 @@ See also <a href="client/dev-client-api.
 <span class="sr">//</span> <span class="n">list</span> <span class="n">root</span> <span class="n">folder</span> <span class="n">children</span>
 <span class="n">ItemIterable</span><span class="sr">&lt;CmisObject&gt;</span> <span class="n">children</span> <span class="o">=</span> <span class="n">rootFolder</span><span class="o">.</span><span class="n">getChildren</span><span class="p">();</span>
 <span class="k">for</span> <span class="p">(</span><span class="n">CmisObject</span> <span class="n">object</span> <span class="p">:</span> <span class="n">children</span><span class="p">)</span> <span class="p">{</span>
-  <span class="n">System</span><span class="o">.</span><span class="n">out</span><span class="o">.</span><span class="n">println</span><span class="p">(</span><span class="s">&quot;---------------------------------&quot;</span><span class="p">);</span>
-  <span class="n">System</span><span class="o">.</span><span class="n">out</span><span class="o">.</span><span class="n">println</span><span class="p">(</span><span class="s">&quot;  Id:       &quot;</span> <span class="o">+</span> <span class="n">object</span><span class="o">.</span><span class="n">getId</span><span class="p">());</span>
-  <span class="n">System</span><span class="o">.</span><span class="n">out</span><span class="o">.</span><span class="n">println</span><span class="p">(</span><span class="s">&quot;  Name:         &quot;</span> <span class="o">+</span> <span class="n">object</span><span class="o">.</span><span class="n">getName</span><span class="p">());</span>
-  <span class="n">System</span><span class="o">.</span><span class="n">out</span><span class="o">.</span><span class="n">println</span><span class="p">(</span><span class="s">&quot;  Base Type:    &quot;</span> <span class="o">+</span> <span class="n">object</span><span class="o">.</span><span class="n">getBaseTypeId</span><span class="p">());</span>
-  <span class="n">System</span><span class="o">.</span><span class="n">out</span><span class="o">.</span><span class="n">println</span><span class="p">(</span><span class="s">&quot;  Property &#39;bla&#39;:   &quot;</span> <span class="o">+</span>
-<span class="n">object</span><span class="o">.</span><span class="n">getPropertyValue</span><span class="p">(</span><span class="s">&quot;bla&quot;</span><span class="p">));</span>
-
-  <span class="n">ObjectType</span> <span class="n">type</span> <span class="o">=</span> <span class="n">object</span><span class="o">.</span><span class="n">getType</span><span class="p">();</span>
-  <span class="n">System</span><span class="o">.</span><span class="n">out</span><span class="o">.</span><span class="n">println</span><span class="p">(</span><span class="s">&quot;  Type Id:      &quot;</span> <span class="o">+</span> <span class="n">type</span><span class="o">.</span><span class="n">getId</span><span class="p">());</span>
-  <span class="n">System</span><span class="o">.</span><span class="n">out</span><span class="o">.</span><span class="n">println</span><span class="p">(</span><span class="s">&quot;  Type Name:    &quot;</span> <span class="o">+</span> <span class="n">type</span><span class="o">.</span><span class="n">getDisplayName</span><span class="p">());</span>
-  <span class="n">System</span><span class="o">.</span><span class="n">out</span><span class="o">.</span><span class="n">println</span><span class="p">(</span><span class="s">&quot;  Type Query Name:  &quot;</span> <span class="o">+</span> <span class="n">type</span><span class="o">.</span><span class="n">getQueryName</span><span class="p">());</span>
-
-  <span class="n">AllowableActions</span> <span class="n">actions</span> <span class="o">=</span> <span class="n">object</span><span class="o">.</span><span class="n">getAllowableActions</span><span class="p">();</span>
-  <span class="n">System</span><span class="o">.</span><span class="n">out</span><span class="o">.</span><span class="n">println</span><span class="p">(</span><span class="s">&quot;  canGetProperties: &quot;</span> <span class="o">+</span>
-    <span class="n">actions</span><span class="o">.</span><span class="n">getAllowableActions</span><span class="p">()</span><span class="o">.</span><span class="n">contains</span><span class="p">(</span><span class="n">Action</span><span class="o">.</span><span class="n">CAN_GET_PROPERTIES</span><span class="p">));</span>
-  <span class="n">System</span><span class="o">.</span><span class="n">out</span><span class="o">.</span><span class="n">println</span><span class="p">(</span><span class="s">&quot;  canDeleteObject:  &quot;</span> <span class="o">+</span>
-    <span class="n">actions</span><span class="o">.</span><span class="n">getAllowableActions</span><span class="p">()</span><span class="o">.</span><span class="n">contains</span><span class="p">(</span><span class="n">Action</span><span class="o">.</span><span class="n">CAN_DELETE_OBJECT</span><span class="p">));</span>
+    <span class="n">System</span><span class="o">.</span><span class="n">out</span><span class="o">.</span><span class="n">println</span><span class="p">(</span><span class="s">&quot;---------------------------------&quot;</span><span class="p">);</span>
+    <span class="n">System</span><span class="o">.</span><span class="n">out</span><span class="o">.</span><span class="n">println</span><span class="p">(</span><span class="s">&quot;    Id:              &quot;</span> <span class="o">+</span> <span class="n">object</span><span class="o">.</span><span class="n">getId</span><span class="p">());</span>
+    <span class="n">System</span><span class="o">.</span><span class="n">out</span><span class="o">.</span><span class="n">println</span><span class="p">(</span><span class="s">&quot;    Name:            &quot;</span> <span class="o">+</span> <span class="n">object</span><span class="o">.</span><span class="n">getName</span><span class="p">());</span>
+    <span class="n">System</span><span class="o">.</span><span class="n">out</span><span class="o">.</span><span class="n">println</span><span class="p">(</span><span class="s">&quot;    Base Type:       &quot;</span> <span class="o">+</span> <span class="n">object</span><span class="o">.</span><span class="n">getBaseTypeId</span><span class="p">());</span>
+    <span class="n">System</span><span class="o">.</span><span class="n">out</span><span class="o">.</span><span class="n">println</span><span class="p">(</span><span class="s">&quot;    Property &#39;bla&#39;:  &quot;</span> <span class="o">+</span> <span class="n">object</span><span class="o">.</span><span class="n">getPropertyValue</span><span class="p">(</span><span class="s">&quot;bla&quot;</span><span class="p">));</span>
+
+    <span class="n">ObjectType</span> <span class="n">type</span> <span class="o">=</span> <span class="n">object</span><span class="o">.</span><span class="n">getType</span><span class="p">();</span>
+    <span class="n">System</span><span class="o">.</span><span class="n">out</span><span class="o">.</span><span class="n">println</span><span class="p">(</span><span class="s">&quot;    Type Id:          &quot;</span> <span class="o">+</span> <span class="n">type</span><span class="o">.</span><span class="n">getId</span><span class="p">());</span>
+    <span class="n">System</span><span class="o">.</span><span class="n">out</span><span class="o">.</span><span class="n">println</span><span class="p">(</span><span class="s">&quot;    Type Name:        &quot;</span> <span class="o">+</span> <span class="n">type</span><span class="o">.</span><span class="n">getDisplayName</span><span class="p">());</span>
+    <span class="n">System</span><span class="o">.</span><span class="n">out</span><span class="o">.</span><span class="n">println</span><span class="p">(</span><span class="s">&quot;    Type Query Name:  &quot;</span> <span class="o">+</span> <span class="n">type</span><span class="o">.</span><span class="n">getQueryName</span><span class="p">());</span>
+
+    <span class="n">AllowableActions</span> <span class="n">actions</span> <span class="o">=</span> <span class="n">object</span><span class="o">.</span><span class="n">getAllowableActions</span><span class="p">();</span>
+    <span class="n">System</span><span class="o">.</span><span class="n">out</span><span class="o">.</span><span class="n">println</span><span class="p">(</span><span class="s">&quot;    canGetProperties: &quot;</span> <span class="o">+</span> <span class="n">actions</span><span class="o">.</span><span class="n">getAllowableActions</span><span class="p">()</span><span class="o">.</span><span class="n">contains</span><span class="p">(</span><span class="n">Action</span><span class="o">.</span><span class="n">CAN_GET_PROPERTIES</span><span class="p">));</span>
+    <span class="n">System</span><span class="o">.</span><span class="n">out</span><span class="o">.</span><span class="n">println</span><span class="p">(</span><span class="s">&quot;    canDeleteObject:  &quot;</span> <span class="o">+</span> <span class="n">actions</span><span class="o">.</span><span class="n">getAllowableActions</span><span class="p">()</span><span class="o">.</span><span class="n">contains</span><span class="p">(</span><span class="n">Action</span><span class="o">.</span><span class="n">CAN_DELETE_OBJECT</span><span class="p">));</span>
 <span class="p">}</span>
 
 <span class="sr">//</span> <span class="n">get</span> <span class="n">an</span> <span class="n">object</span>
@@ -242,114 +237,84 @@ See also <a href="client/dev-client-api.
 <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="n">getObject</span><span class="p">(</span><span class="n">objectId</span><span class="p">);</span>
 
 <span class="k">if</span> <span class="p">(</span><span class="n">object</span> <span class="n">instanceof</span> <span class="n">Folder</span><span class="p">)</span> <span class="p">{</span>
-  <span class="n">Folder</span> <span class="n">folder</span> <span class="o">=</span> <span class="p">(</span><span class="n">Folder</span><span class="p">)</span> <span class="n">object</span><span class="p">;</span>
-  <span class="n">System</span><span class="o">.</span><span class="n">out</span><span class="o">.</span><span class="n">println</span><span class="p">(</span><span class="s">&quot;Is root folder: &quot;</span> <span class="o">+</span> <span class="n">folder</span><span class="o">.</span><span class="n">isRootFolder</span><span class="p">());</span>
+    <span class="n">Folder</span> <span class="n">folder</span> <span class="o">=</span> <span class="p">(</span><span class="n">Folder</span><span class="p">)</span> <span class="n">object</span><span class="p">;</span>
+    <span class="n">System</span><span class="o">.</span><span class="n">out</span><span class="o">.</span><span class="n">println</span><span class="p">(</span><span class="s">&quot;Is root folder: &quot;</span> <span class="o">+</span> <span class="n">folder</span><span class="o">.</span><span class="n">isRootFolder</span><span class="p">());</span>
 <span class="p">}</span>
 
 <span class="k">if</span> <span class="p">(</span><span class="n">object</span> <span class="n">instanceof</span> <span class="n">Document</span><span class="p">)</span> <span class="p">{</span>
-  <span class="n">Document</span> <span class="n">document</span> <span class="o">=</span> <span class="p">(</span><span class="n">Document</span><span class="p">)</span> <span class="n">object</span><span class="p">;</span>
-  <span class="n">ContentStream</span> <span class="n">content</span> <span class="o">=</span> <span class="n">document</span><span class="o">.</span><span class="n">getContentStream</span><span class="p">();</span>
-  <span class="n">System</span><span class="o">.</span><span class="n">out</span><span class="o">.</span><span class="n">println</span><span class="p">(</span><span class="s">&quot;Document MIME type: &quot;</span> <span class="o">+</span> <span class="n">content</span><span class="o">.</span><span class="n">getMimeType</span><span class="p">());</span>
+    <span class="n">Document</span> <span class="n">document</span> <span class="o">=</span> <span class="p">(</span><span class="n">Document</span><span class="p">)</span> <span class="n">object</span><span class="p">;</span>
+    <span class="n">ContentStream</span> <span class="n">content</span> <span class="o">=</span> <span class="n">document</span><span class="o">.</span><span class="n">getContentStream</span><span class="p">();</span>
+    <span class="n">System</span><span class="o">.</span><span class="n">out</span><span class="o">.</span><span class="n">println</span><span class="p">(</span><span class="s">&quot;Document MIME type: &quot;</span> <span class="o">+</span> <span class="n">content</span><span class="o">.</span><span class="n">getMimeType</span><span class="p">());</span>
 <span class="p">}</span>
 </pre></div>
 
 
 <p><a name="OpenCMISAPIExamples-ClientBindingAPI"></a></p>
 <h2 id="client_binding_api">Client Binding API</h2>
-<p><a href="http://hudson.zones.apache.org/hudson/job/Chemistry%20-%20OpenCMIS%20-%20site/javadoc/org/apache/opencmis/commons/provider/package-summary.html">Client Binding API JavaDoc</a>
-. See also <a href="client/dev-client-bindings.html">OpenCMIS Client Binding API</a>
-.</p>
-<div class="codehilite"><pre>    <span class="n">Map</span><span class="o">&lt;</span><span class="n">String</span><span class="p">,</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="p">,</span> <span class="n">String</span><span class="o">&gt;</span><span class="p">();</span>
-    <span class="n">parameters</span><span class="o">.</span><span class="n">put</span><span class="p">(</span><span class="n">SessionParameter</span><span class="o">.</span><span class="n">ATOMPUB_URL</span><span class="p">,</span>
-    <span class="s">&quot;http://localhost:8080/opencmis/atom&quot;</span><span class="p">);</span>
-    <span class="n">parameters</span><span class="o">.</span><span class="n">put</span><span class="p">(</span><span class="n">SessionParameter</span><span class="o">.</span><span class="n">USER</span><span class="p">,</span> <span class="s">&quot;test&quot;</span><span class="p">);</span>
-    <span class="n">parameters</span><span class="o">.</span><span class="n">put</span><span class="p">(</span><span class="n">SessionParameter</span><span class="o">.</span><span class="n">PASSWORD</span><span class="p">,</span> <span class="s">&quot;test&quot;</span><span class="p">);</span>
-
-    <span class="sr">//</span> <span class="n">create</span> <span class="n">provider</span>
-    <span class="n">CmisBinding</span> <span class="n">binding</span> <span class="o">=</span>
-    <span class="n">CmisBindingFactory</span><span class="o">.</span><span class="n">newInstance</span><span class="p">()</span><span class="o">.</span><span class="n">createCmisAtomPubBinding</span><span class="p">(</span><span class="n">parameters</span><span class="p">);</span>
-
-    <span class="n">String</span> <span class="n">repositoryId</span> <span class="o">=</span> <span class="s">&quot;A1&quot;</span><span class="p">;</span>
-
-    <span class="sr">//</span> <span class="n">get</span> <span class="n">repository</span> <span class="n">info</span>
-    <span class="n">RepositoryInfo</span> <span class="n">repInfo</span> <span class="o">=</span>
-    <span class="n">binding</span><span class="o">.</span><span class="n">getRepositoryService</span><span class="p">()</span><span class="o">.</span><span class="n">getRepositoryInfo</span><span class="p">(</span><span class="n">repositoryId</span><span class="p">,</span> <span class="n">null</span><span class="p">);</span>
-    <span class="n">System</span><span class="o">.</span><span class="n">out</span><span class="o">.</span><span class="n">println</span><span class="p">(</span><span class="s">&quot;Repository name: &quot;</span> <span class="o">+</span> <span class="n">repInfo</span><span class="o">.</span><span class="n">getName</span><span class="p">());</span>
-
-    <span class="sr">//</span> <span class="n">get</span> <span class="n">root</span> <span class="n">folder</span> <span class="ow">and</span> <span class="n">its</span> <span class="n">path</span>
-    <span class="n">ObjectData</span> <span class="n">rootFolder</span> <span class="o">=</span> <span class="n">binding</span><span class="o">.</span><span class="n">getObjectService</span><span class="p">()</span><span class="o">.</span><span class="n">getObject</span><span class="p">(</span><span class="n">repositoryId</span><span class="p">,</span>
-    <span class="n">repInfo</span><span class="o">.</span><span class="n">getRootFolderId</span><span class="p">(),</span> <span class="s">&quot;*&quot;</span><span class="p">,</span>
-          <span class="n">true</span><span class="p">,</span> <span class="n">IncludeRelationships</span><span class="o">.</span><span class="n">NONE</span><span class="p">,</span> <span class="n">null</span><span class="p">,</span> <span class="n">false</span><span class="p">,</span> <span class="n">false</span><span class="p">,</span> <span class="n">null</span><span class="p">);</span>
-
-    <span class="n">PropertyString</span> <span class="n">pathProperty</span> <span class="o">=</span> <span class="p">(</span><span class="n">PropertyString</span><span class="p">)</span>
-    <span class="n">rootFolder</span><span class="o">.</span><span class="n">getProperties</span><span class="p">()</span><span class="o">.</span><span class="n">getProperties</span><span class="p">()</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="n">PropertyIds</span><span class="o">.</span><span class="n">PATH</span><span class="p">);</span>
-    <span class="n">String</span> <span class="n">path</span> <span class="o">=</span> <span class="n">pathProperty</span><span class="o">.</span><span class="n">getFirstValue</span><span class="p">();</span>
-    <span class="n">System</span><span class="o">.</span><span class="n">out</span><span class="o">.</span><span class="n">println</span><span class="p">(</span><span class="s">&quot;Root folder path: &quot;</span> <span class="o">+</span> <span class="n">path</span><span class="p">);</span>
-
-    <span class="sr">//</span> <span class="n">list</span> <span class="n">root</span> <span class="n">folder</span> <span class="n">children</span>
-    <span class="n">ObjectInFolderList</span> <span class="n">childrenList</span> <span class="o">=</span>
-    <span class="n">binding</span><span class="o">.</span><span class="n">getNavigationService</span><span class="p">()</span><span class="o">.</span><span class="n">getChildren</span><span class="p">(</span><span class="n">repositoryId</span><span class="p">,</span>
-          <span class="n">repInfo</span><span class="o">.</span><span class="n">getRootFolderId</span><span class="p">(),</span> <span class="s">&quot;*&quot;</span><span class="p">,</span> <span class="n">null</span><span class="p">,</span> <span class="n">true</span><span class="p">,</span>
-    <span class="n">IncludeRelationships</span><span class="o">.</span><span class="n">NONE</span><span class="p">,</span> <span class="n">null</span><span class="p">,</span> <span class="n">false</span><span class="p">,</span>
-          <span class="n">BigInteger</span><span class="o">.</span><span class="n">valueOf</span><span class="p">(</span><span class="mi">10000</span><span class="p">),</span> <span class="n">BigInteger</span><span class="o">.</span><span class="n">ZERO</span><span class="p">,</span> <span class="n">null</span><span class="p">);</span>
-
-    <span class="k">for</span> <span class="p">(</span><span class="n">ObjectInFolderData</span> <span class="n">object</span> <span class="p">:</span> <span class="n">childrenList</span><span class="o">.</span><span class="n">getObjects</span><span class="p">())</span> <span class="p">{</span>
-       <span class="n">System</span><span class="o">.</span><span class="n">out</span><span class="o">.</span><span class="n">println</span><span class="p">(</span><span class="s">&quot;---------------------------------&quot;</span><span class="p">);</span>
-
-       <span class="n">PropertyString</span> <span class="n">nameProperty</span> <span class="o">=</span> <span class="p">(</span><span class="n">PropertyString</span><span class="p">)</span>
-    <span class="n">object</span><span class="o">.</span><span class="n">getObject</span><span class="p">()</span><span class="o">.</span><span class="n">getProperties</span><span class="p">()</span><span class="o">.</span><span class="n">getProperties</span><span class="p">()</span><span class="o">.</span><span class="n">get</span><span class="p">(</span>
-             <span class="n">PropertyIds</span><span class="o">.</span><span class="n">NAME</span><span class="p">);</span>
-       <span class="n">PropertyString</span> <span class="n">blaProperty</span> <span class="o">=</span> <span class="p">(</span><span class="n">PropertyString</span><span class="p">)</span>
-    <span class="n">object</span><span class="o">.</span><span class="n">getObject</span><span class="p">()</span><span class="o">.</span><span class="n">getProperties</span><span class="p">()</span><span class="o">.</span><span class="n">getProperties</span><span class="p">()</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s">&quot;bla&quot;</span><span class="p">);</span>
-       <span class="n">PropertyId</span> <span class="n">typeProperty</span> <span class="o">=</span> <span class="p">(</span><span class="n">PropertyId</span><span class="p">)</span>
-    <span class="n">object</span><span class="o">.</span><span class="n">getObject</span><span class="p">()</span><span class="o">.</span><span class="n">getProperties</span><span class="p">()</span><span class="o">.</span><span class="n">getProperties</span><span class="p">()</span><span class="o">.</span><span class="n">get</span><span class="p">(</span>
-             <span class="n">PropertyIds</span><span class="o">.</span><span class="n">OBJECT_TYPE_ID</span><span class="p">);</span>
-
-       <span class="n">System</span><span class="o">.</span><span class="n">out</span><span class="o">.</span><span class="n">println</span><span class="p">(</span><span class="s">&quot;  Id:        &quot;</span> <span class="o">+</span>
-    <span class="n">object</span><span class="o">.</span><span class="n">getObject</span><span class="p">()</span><span class="o">.</span><span class="n">getId</span><span class="p">());</span>
-       <span class="n">System</span><span class="o">.</span><span class="n">out</span><span class="o">.</span><span class="n">println</span><span class="p">(</span><span class="s">&quot;  Name:      &quot;</span> <span class="o">+</span>
-    <span class="n">nameProperty</span><span class="o">.</span><span class="n">getFirstValue</span><span class="p">());</span>
-       <span class="n">System</span><span class="o">.</span><span class="n">out</span><span class="o">.</span><span class="n">println</span><span class="p">(</span><span class="s">&quot;  Base Type: &quot;</span> <span class="o">+</span>
-    <span class="n">object</span><span class="o">.</span><span class="n">getObject</span><span class="p">()</span><span class="o">.</span><span class="n">getBaseTypeId</span><span class="p">());</span>
-       <span class="n">System</span><span class="o">.</span><span class="n">out</span><span class="o">.</span><span class="n">println</span><span class="p">(</span><span class="s">&quot;  Property &#39;bla&#39;:    &quot;</span> <span class="o">+</span> <span class="p">(</span><span class="n">blaProperty</span> <span class="o">==</span> <span class="n">null</span> <span class="p">?</span>
-    <span class="n">null</span> <span class="p">:</span> <span class="n">blaProperty</span><span class="o">.</span><span class="n">getFirstValue</span><span class="p">()));</span>
-
-       <span class="n">TypeDefinition</span> <span class="n">type</span> <span class="o">=</span>
-    <span class="n">binding</span><span class="o">.</span><span class="n">getRepositoryService</span><span class="p">()</span><span class="o">.</span><span class="n">getTypeDefinition</span><span class="p">(</span><span class="n">repositoryId</span><span class="p">,</span>
-             <span class="n">typeProperty</span><span class="o">.</span><span class="n">getFirstValue</span><span class="p">(),</span> <span class="n">null</span><span class="p">);</span>
-       <span class="n">System</span><span class="o">.</span><span class="n">out</span><span class="o">.</span><span class="n">println</span><span class="p">(</span><span class="s">&quot;  Type Id:       &quot;</span> <span class="o">+</span> <span class="n">type</span><span class="o">.</span><span class="n">getId</span><span class="p">());</span>
-       <span class="n">System</span><span class="o">.</span><span class="n">out</span><span class="o">.</span><span class="n">println</span><span class="p">(</span><span class="s">&quot;  Type Name: &quot;</span> <span class="o">+</span> <span class="n">type</span><span class="o">.</span><span class="n">getDisplayName</span><span class="p">());</span>
-       <span class="n">System</span><span class="o">.</span><span class="n">out</span><span class="o">.</span><span class="n">println</span><span class="p">(</span><span class="s">&quot;  Type Query Name:   &quot;</span> <span class="o">+</span> <span class="n">type</span><span class="o">.</span><span class="n">getQueryName</span><span class="p">());</span>
-
-       <span class="n">AllowableActions</span> <span class="n">actions</span> <span class="o">=</span>
-    <span class="n">object</span><span class="o">.</span><span class="n">getObject</span><span class="p">()</span><span class="o">.</span><span class="n">getAllowableActions</span><span class="p">();</span>
-       <span class="n">System</span><span class="o">.</span><span class="n">out</span><span class="o">.</span><span class="n">println</span><span class="p">(</span><span class="s">&quot;  canGetProperties: &quot;</span>
-             <span class="o">+</span>
-    <span class="n">actions</span><span class="o">.</span><span class="n">getAllowableActions</span><span class="p">()</span><span class="o">.</span><span class="n">contains</span><span class="p">(</span><span class="n">Action</span><span class="o">.</span><span class="n">CAN_GET_PROPERTIES</span><span class="p">));</span>
-       <span class="n">System</span><span class="o">.</span><span class="n">out</span><span class="o">.</span><span class="n">println</span><span class="p">(</span><span class="s">&quot;  canDeleteObject:   &quot;</span>
-             <span class="o">+</span>
-    <span class="n">actions</span><span class="o">.</span><span class="n">getAllowableActions</span><span class="p">()</span><span class="o">.</span><span class="n">contains</span><span class="p">(</span><span class="n">Action</span><span class="o">.</span><span class="n">CAN_DELETE_OBJECT</span><span class="p">));</span>
-    <span class="p">}</span>
-
-    <span class="sr">//</span> <span class="n">get</span> <span class="n">an</span> <span class="n">object</span>
-    <span class="n">String</span> <span class="n">objectId</span> <span class="o">=</span> <span class="s">&quot;100&quot;</span><span class="p">;</span>
-
-    <span class="n">ObjectData</span> <span class="n">object</span> <span class="o">=</span> <span class="n">binding</span><span class="o">.</span><span class="n">getObjectService</span><span class="p">()</span><span class="o">.</span><span class="n">getObject</span><span class="p">(</span><span class="n">repositoryId</span><span class="p">,</span>
-    <span class="n">objectId</span><span class="p">,</span> <span class="s">&quot;*&quot;</span><span class="p">,</span> <span class="n">false</span><span class="p">,</span>
-          <span class="n">IncludeRelationships</span><span class="o">.</span><span class="n">NONE</span><span class="p">,</span> <span class="n">null</span><span class="p">,</span> <span class="n">false</span><span class="p">,</span> <span class="n">false</span><span class="p">,</span> <span class="n">null</span><span class="p">);</span>
-
-    <span class="k">if</span> <span class="p">(</span><span class="n">object</span><span class="o">.</span><span class="n">getBaseTypeId</span><span class="p">()</span> <span class="o">==</span> <span class="n">BaseTypeId</span><span class="o">.</span><span class="n">CMIS_FOLDER</span><span class="p">)</span> <span class="p">{</span>
-       <span class="n">System</span><span class="o">.</span><span class="n">out</span><span class="o">.</span><span class="n">println</span><span class="p">(</span><span class="s">&quot;Is root folder: &quot;</span> <span class="o">+</span>
-    <span class="p">(</span><span class="n">repInfo</span><span class="o">.</span><span class="n">getRootFolderId</span><span class="p">()</span><span class="o">.</span><span class="n">equals</span><span class="p">(</span><span class="n">object</span><span class="o">.</span><span class="n">getId</span><span class="p">())));</span>
-    <span class="p">}</span>
-
-    <span class="k">if</span> <span class="p">(</span><span class="n">object</span><span class="o">.</span><span class="n">getBaseTypeId</span><span class="p">()</span> <span class="o">==</span> <span class="n">BaseTypeId</span><span class="o">.</span><span class="n">CMIS_DOCUMENT</span><span class="p">)</span> <span class="p">{</span>
-       <span class="n">ContentStream</span> <span class="n">content</span> <span class="o">=</span>
-    <span class="n">binding</span><span class="o">.</span><span class="n">getObjectService</span><span class="p">()</span><span class="o">.</span><span class="n">getContentStream</span><span class="p">(</span><span class="n">repositoryId</span><span class="p">,</span> <span class="n">objectId</span><span class="p">,</span> <span class="n">null</span><span class="p">,</span>
-    <span class="n">null</span><span class="p">,</span>
-             <span class="n">null</span><span class="p">,</span> <span class="n">null</span><span class="p">);</span>
-       <span class="n">System</span><span class="o">.</span><span class="n">out</span><span class="o">.</span><span class="n">println</span><span class="p">(</span><span class="s">&quot;Document MIME type: &quot;</span> <span class="o">+</span> <span class="n">content</span><span class="o">.</span><span class="n">getMimeType</span><span class="p">());</span>
-    <span class="p">}</span>
+<p><a href="http://hudson.zones.apache.org/hudson/job/Chemistry%20-%20OpenCMIS%20-%20site/javadoc/org/apache/opencmis/commons/provider/package-summary.html">Client Binding API JavaDoc</a>. See also <a href="client/dev-client-bindings.html">OpenCMIS Client Binding API</a>.</p>
+<div class="codehilite"><pre> <span class="n">Map</span><span class="o">&lt;</span><span class="n">String</span><span class="p">,</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="p">,</span> <span class="n">String</span><span class="o">&gt;</span><span class="p">();</span>
+ <span class="n">parameters</span><span class="o">.</span><span class="n">put</span><span class="p">(</span><span class="n">SessionParameter</span><span class="o">.</span><span class="n">ATOMPUB_URL</span><span class="p">,</span> <span class="s">&quot;http://localhost:8080/opencmis/atom&quot;</span><span class="p">);</span>
+ <span class="n">parameters</span><span class="o">.</span><span class="n">put</span><span class="p">(</span><span class="n">SessionParameter</span><span class="o">.</span><span class="n">USER</span><span class="p">,</span> <span class="s">&quot;test&quot;</span><span class="p">);</span>
+ <span class="n">parameters</span><span class="o">.</span><span class="n">put</span><span class="p">(</span><span class="n">SessionParameter</span><span class="o">.</span><span class="n">PASSWORD</span><span class="p">,</span> <span class="s">&quot;test&quot;</span><span class="p">);</span>
+
+ <span class="sr">//</span> <span class="n">create</span> <span class="n">binding</span>
+ <span class="n">CmisBinding</span> <span class="n">binding</span> <span class="o">=</span> <span class="n">CmisBindingFactory</span><span class="o">.</span><span class="n">newInstance</span><span class="p">()</span><span class="o">.</span><span class="n">createCmisAtomPubBinding</span><span class="p">(</span><span class="n">parameters</span><span class="p">);</span>
+
+ <span class="n">String</span> <span class="n">repositoryId</span> <span class="o">=</span> <span class="s">&quot;A1&quot;</span><span class="p">;</span>
+
+ <span class="sr">//</span> <span class="n">get</span> <span class="n">repository</span> <span class="n">info</span>
+ <span class="n">RepositoryInfo</span> <span class="n">repInfo</span> <span class="o">=</span> <span class="n">binding</span><span class="o">.</span><span class="n">getRepositoryService</span><span class="p">()</span><span class="o">.</span><span class="n">getRepositoryInfo</span><span class="p">(</span><span class="n">repositoryId</span><span class="p">,</span> <span class="n">null</span><span class="p">);</span>
+ <span class="n">System</span><span class="o">.</span><span class="n">out</span><span class="o">.</span><span class="n">println</span><span class="p">(</span><span class="s">&quot;Repository name: &quot;</span> <span class="o">+</span> <span class="n">repInfo</span><span class="o">.</span><span class="n">getName</span><span class="p">());</span>
+
+ <span class="sr">//</span> <span class="n">get</span> <span class="n">root</span> <span class="n">folder</span> <span class="ow">and</span> <span class="n">its</span> <span class="n">path</span>
+ <span class="n">ObjectData</span> <span class="n">rootFolder</span> <span class="o">=</span> <span class="n">binding</span><span class="o">.</span><span class="n">getObjectService</span><span class="p">()</span><span class="o">.</span><span class="n">getObject</span><span class="p">(</span><span class="n">repositoryId</span><span class="p">,</span>
+     <span class="n">repInfo</span><span class="o">.</span><span class="n">getRootFolderId</span><span class="p">(),</span> <span class="s">&quot;*&quot;</span><span class="p">,</span> <span class="n">true</span><span class="p">,</span> <span class="n">IncludeRelationships</span><span class="o">.</span><span class="n">NONE</span><span class="p">,</span> <span class="n">null</span><span class="p">,</span> <span class="n">false</span><span class="p">,</span> <span class="n">false</span><span class="p">,</span> <span class="n">null</span><span class="p">);</span>
+
+ <span class="n">PropertyString</span> <span class="n">pathProperty</span> <span class="o">=</span> <span class="p">(</span><span class="n">PropertyString</span><span class="p">)</span>
+ <span class="n">rootFolder</span><span class="o">.</span><span class="n">getProperties</span><span class="p">()</span><span class="o">.</span><span class="n">getProperties</span><span class="p">()</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="n">PropertyIds</span><span class="o">.</span><span class="n">PATH</span><span class="p">);</span>
+ <span class="n">String</span> <span class="n">path</span> <span class="o">=</span> <span class="n">pathProperty</span><span class="o">.</span><span class="n">getFirstValue</span><span class="p">();</span>
+ <span class="n">System</span><span class="o">.</span><span class="n">out</span><span class="o">.</span><span class="n">println</span><span class="p">(</span><span class="s">&quot;Root folder path: &quot;</span> <span class="o">+</span> <span class="n">path</span><span class="p">);</span>
+
+ <span class="sr">//</span> <span class="n">list</span> <span class="n">root</span> <span class="n">folder</span> <span class="n">children</span>
+ <span class="n">ObjectInFolderList</span> <span class="n">childrenList</span> <span class="o">=</span> <span class="n">binding</span><span class="o">.</span><span class="n">getNavigationService</span><span class="p">()</span><span class="o">.</span><span class="n">getChildren</span><span class="p">(</span><span class="n">repositoryId</span><span class="p">,</span> <span class="n">repInfo</span><span class="o">.</span><span class="n">getRootFolderId</span><span class="p">(),</span> <span class="s">&quot;*&quot;</span><span class="p">,</span> <span class="n">null</span><span class="p">,</span> <span class="n">true</span><span class="p">,</span>
+     <span class="n">IncludeRelationships</span><span class="o">.</span><span class="n">NONE</span><span class="p">,</span> <span class="n">null</span><span class="p">,</span> <span class="n">false</span><span class="p">,</span> <span class="n">BigInteger</span><span class="o">.</span><span class="n">valueOf</span><span class="p">(</span><span class="mi">10000</span><span class="p">),</span> <span class="n">BigInteger</span><span class="o">.</span><span class="n">ZERO</span><span class="p">,</span> <span class="n">null</span><span class="p">);</span>
+
+ <span class="k">for</span> <span class="p">(</span><span class="n">ObjectInFolderData</span> <span class="n">object</span> <span class="p">:</span> <span class="n">childrenList</span><span class="o">.</span><span class="n">getObjects</span><span class="p">())</span> <span class="p">{</span>
+     <span class="n">System</span><span class="o">.</span><span class="n">out</span><span class="o">.</span><span class="n">println</span><span class="p">(</span><span class="s">&quot;---------------------------------&quot;</span><span class="p">);</span>
+
+     <span class="n">PropertyString</span> <span class="n">nameProperty</span> <span class="o">=</span> <span class="p">(</span><span class="n">PropertyString</span><span class="p">)</span> <span class="n">object</span><span class="o">.</span><span class="n">getObject</span><span class="p">()</span><span class="o">.</span><span class="n">getProperties</span><span class="p">()</span><span class="o">.</span><span class="n">getProperties</span><span class="p">()</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="n">PropertyIds</span><span class="o">.</span><span class="n">NAME</span><span class="p">);</span>
+     <span class="n">PropertyString</span> <span class="n">blaProperty</span> <span class="o">=</span> <span class="p">(</span><span class="n">PropertyString</span><span class="p">)</span> <span class="n">object</span><span class="o">.</span><span class="n">getObject</span><span class="p">()</span><span class="o">.</span><span class="n">getProperties</span><span class="p">()</span><span class="o">.</span><span class="n">getProperties</span><span class="p">()</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s">&quot;bla&quot;</span><span class="p">);</span>
+     <span class="n">PropertyId</span> <span class="n">typeProperty</span> <span class="o">=</span> <span class="p">(</span><span class="n">PropertyId</span><span class="p">)</span> <span class="n">object</span><span class="o">.</span><span class="n">getObject</span><span class="p">()</span><span class="o">.</span><span class="n">getProperties</span><span class="p">()</span><span class="o">.</span><span class="n">getProperties</span><span class="p">()</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="n">PropertyIds</span><span class="o">.</span><span class="n">OBJECT_TYPE_ID</span><span class="p">);</span>
+
+     <span class="n">System</span><span class="o">.</span><span class="n">out</span><span class="o">.</span><span class="n">println</span><span class="p">(</span><span class="s">&quot;  Id:             &quot;</span> <span class="o">+</span> <span class="n">object</span><span class="o">.</span><span class="n">getObject</span><span class="p">()</span><span class="o">.</span><span class="n">getId</span><span class="p">());</span>
+     <span class="n">System</span><span class="o">.</span><span class="n">out</span><span class="o">.</span><span class="n">println</span><span class="p">(</span><span class="s">&quot;  Name:             &quot;</span> <span class="o">+</span> <span class="n">nameProperty</span><span class="o">.</span><span class="n">getFirstValue</span><span class="p">());</span>
+     <span class="n">System</span><span class="o">.</span><span class="n">out</span><span class="o">.</span><span class="n">println</span><span class="p">(</span><span class="s">&quot;  Base Type:        &quot;</span> <span class="o">+</span> <span class="n">object</span><span class="o">.</span><span class="n">getObject</span><span class="p">()</span><span class="o">.</span><span class="n">getBaseTypeId</span><span class="p">());</span>
+     <span class="n">System</span><span class="o">.</span><span class="n">out</span><span class="o">.</span><span class="n">println</span><span class="p">(</span><span class="s">&quot;  Property &#39;bla&#39;:   &quot;</span> <span class="o">+</span> <span class="p">(</span><span class="n">blaProperty</span> <span class="o">==</span> <span class="n">null</span> <span class="p">?</span> <span class="n">null</span> <span class="p">:</span> <span class="n">blaProperty</span><span class="o">.</span><span class="n">getFirstValue</span><span class="p">()));</span>
+
+     <span class="n">TypeDefinition</span> <span class="n">type</span> <span class="o">=</span> <span class="n">binding</span><span class="o">.</span><span class="n">getRepositoryService</span><span class="p">()</span><span class="o">.</span><span class="n">getTypeDefinition</span><span class="p">(</span><span class="n">repositoryId</span><span class="p">,</span> <span class="n">typeProperty</span><span class="o">.</span><span class="n">getFirstValue</span><span class="p">(),</span> <span class="n">null</span><span class="p">);</span>
+     <span class="n">System</span><span class="o">.</span><span class="n">out</span><span class="o">.</span><span class="n">println</span><span class="p">(</span><span class="s">&quot;  Type Id:          &quot;</span> <span class="o">+</span> <span class="n">type</span><span class="o">.</span><span class="n">getId</span><span class="p">());</span>
+     <span class="n">System</span><span class="o">.</span><span class="n">out</span><span class="o">.</span><span class="n">println</span><span class="p">(</span><span class="s">&quot;  Type Name:        &quot;</span> <span class="o">+</span> <span class="n">type</span><span class="o">.</span><span class="n">getDisplayName</span><span class="p">());</span>
+     <span class="n">System</span><span class="o">.</span><span class="n">out</span><span class="o">.</span><span class="n">println</span><span class="p">(</span><span class="s">&quot;  Type Query Name:  &quot;</span> <span class="o">+</span> <span class="n">type</span><span class="o">.</span><span class="n">getQueryName</span><span class="p">());</span>
+
+     <span class="n">AllowableActions</span> <span class="n">actions</span> <span class="o">=</span> <span class="n">object</span><span class="o">.</span><span class="n">getObject</span><span class="p">()</span><span class="o">.</span><span class="n">getAllowableActions</span><span class="p">();</span>
+     <span class="n">System</span><span class="o">.</span><span class="n">out</span><span class="o">.</span><span class="n">println</span><span class="p">(</span><span class="s">&quot;  canGetProperties: &quot;</span> <span class="o">+</span> <span class="n">actions</span><span class="o">.</span><span class="n">getAllowableActions</span><span class="p">()</span><span class="o">.</span><span class="n">contains</span><span class="p">(</span><span class="n">Action</span><span class="o">.</span><span class="n">CAN_GET_PROPERTIES</span><span class="p">));</span>
+     <span class="n">System</span><span class="o">.</span><span class="n">out</span><span class="o">.</span><span class="n">println</span><span class="p">(</span><span class="s">&quot;  canDeleteObject:  &quot;</span> <span class="o">+</span> <span class="n">actions</span><span class="o">.</span><span class="n">getAllowableActions</span><span class="p">()</span><span class="o">.</span><span class="n">contains</span><span class="p">(</span><span class="n">Action</span><span class="o">.</span><span class="n">CAN_DELETE_OBJECT</span><span class="p">));</span>
+ <span class="p">}</span>
+
+ <span class="sr">//</span> <span class="n">get</span> <span class="n">an</span> <span class="n">object</span>
+ <span class="n">String</span> <span class="n">objectId</span> <span class="o">=</span> <span class="s">&quot;100&quot;</span><span class="p">;</span>
+
+ <span class="n">ObjectData</span> <span class="n">object</span> <span class="o">=</span> <span class="n">binding</span><span class="o">.</span><span class="n">getObjectService</span><span class="p">()</span><span class="o">.</span><span class="n">getObject</span><span class="p">(</span><span class="n">repositoryId</span><span class="p">,</span> <span class="n">objectId</span><span class="p">,</span> <span class="s">&quot;*&quot;</span><span class="p">,</span> <span class="n">false</span><span class="p">,</span>
+     <span class="n">IncludeRelationships</span><span class="o">.</span><span class="n">NONE</span><span class="p">,</span> <span class="n">null</span><span class="p">,</span> <span class="n">false</span><span class="p">,</span> <span class="n">false</span><span class="p">,</span> <span class="n">null</span><span class="p">);</span>
+
+  <span class="k">if</span> <span class="p">(</span><span class="n">object</span><span class="o">.</span><span class="n">getBaseTypeId</span><span class="p">()</span> <span class="o">==</span> <span class="n">BaseTypeId</span><span class="o">.</span><span class="n">CMIS_FOLDER</span><span class="p">)</span> <span class="p">{</span>
+      <span class="n">System</span><span class="o">.</span><span class="n">out</span><span class="o">.</span><span class="n">println</span><span class="p">(</span><span class="s">&quot;Is root folder: &quot;</span> <span class="o">+</span> <span class="p">(</span><span class="n">repInfo</span><span class="o">.</span><span class="n">getRootFolderId</span><span class="p">()</span><span class="o">.</span><span class="n">equals</span><span class="p">(</span><span class="n">object</span><span class="o">.</span><span class="n">getId</span><span class="p">())));</span>
+  <span class="p">}</span>
+
+  <span class="k">if</span> <span class="p">(</span><span class="n">object</span><span class="o">.</span><span class="n">getBaseTypeId</span><span class="p">()</span> <span class="o">==</span> <span class="n">BaseTypeId</span><span class="o">.</span><span class="n">CMIS_DOCUMENT</span><span class="p">)</span> <span class="p">{</span>
+      <span class="n">ContentStream</span> <span class="n">content</span> <span class="o">=</span> <span class="n">binding</span><span class="o">.</span><span class="n">getObjectService</span><span class="p">()</span><span class="o">.</span><span class="n">getContentStream</span><span class="p">(</span><span class="n">repositoryId</span><span class="p">,</span> <span class="n">objectId</span><span class="p">,</span> <span class="n">null</span><span class="p">,</span> <span class="n">null</span><span class="p">,</span> <span class="n">null</span><span class="p">,</span> <span class="n">null</span><span class="p">);</span>
+      <span class="n">System</span><span class="o">.</span><span class="n">out</span><span class="o">.</span><span class="n">println</span><span class="p">(</span><span class="s">&quot;Document MIME type: &quot;</span> <span class="o">+</span> <span class="n">content</span><span class="o">.</span><span class="n">getMimeType</span><span class="p">());</span>
+ <span class="p">}</span>
 </pre></div></div>
              <!-- Content -->
            </td>



Mime
View raw message