chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r866588 [2/7] - in /websites/staging/chemistry/trunk/content: ./ dotnet/ internal/ java/0.6.0/maven/apidocs/ java/developing/ java/developing/repositories/ java/examples/ java/how-to/ php/
Date Thu, 20 Jun 2013 10:26:44 GMT
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 Thu Jun 20 10:26:44 2013
@@ -202,57 +202,57 @@ fine-grained control.</p>
 <h2 id="client-api">Client API</h2>
 <p><a href="http://hudson.zones.apache.org/hudson/job/Chemistry%20-%20OpenCMIS%20-%20site/javadoc/org/apache/opencmis/client/api/package-summary.html">Client API JavaDoc</a>.
 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">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="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>
-<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">Folder</span> <span class="n">rootFolder</span> <span class="o">=</span> <span class="n">session</span><span class="o">.</span><span class="n">getRootFolder</span><span class="p">();</span>
-<span class="n">String</span> <span class="n">path</span> <span class="o">=</span> <span class="n">rootFolder</span><span class="o">.</span><span class="n">getPath</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>
+<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="p">=</span> <span class="n">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="p">.</span><span class="n">put</span><span class="p">(</span><span class="n">SessionParameter</span><span class="p">.</span><span class="n">BINDING_TYPE</span><span class="p">,</span> <span class="n">BindingType</span><span class="p">.</span><span class="n">ATOMPUB</span><span class="p">.</span><span class="n">value</span><span class="p">());</span>
+<span class="n">parameters</span><span class="p">.</span><span class="n">put</span><span class="p">(</span><span class="n">SessionParameter</span><span class="p">.</span><span class="n">ATOMPUB_URL</span><span class="p">,</span> &quot;<span class="n">http</span><span class="p">:</span><span class="o">//</span><span class="n">localhost</span><span class="p">:</span>8080<span class="o">/</span><span class="n">opencmis</span><span class="o">/</span><span class="n">atom</span>&quot;<span class="p">);</span>
+<span class="n">parameters</span><span class="p">.</span><span class="n">put</span><span class="p">(</span><span class="n">SessionParameter</span><span class="p">.</span><span class="n">REPOSITORY_ID</span><span class="p">,</span> &quot;<span class="n">A1</span>&quot;<span class="p">);</span>
+<span class="n">parameters</span><span class="p">.</span><span class="n">put</span><span class="p">(</span><span class="n">SessionParameter</span><span class="p">.</span><span class="n">USER</span><span class="p">,</span> &quot;<span class="n">test</span>&quot;<span class="p">);</span>
+<span class="n">parameters</span><span class="p">.</span><span class="n">put</span><span class="p">(</span><span class="n">SessionParameter</span><span class="p">.</span><span class="n">PASSWORD</span><span class="p">,</span> &quot;<span class="n">test</span>&quot;<span class="p">);</span>
+
+<span class="o">//</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="p">=</span> <span class="n">SessionFactoryImpl</span><span class="p">.</span><span class="n">newInstance</span><span class="p">().</span><span class="n">createSession</span><span class="p">(</span><span class="n">parameters</span><span class="p">);</span>
+
+<span class="o">//</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="p">=</span> <span class="n">session</span><span class="p">.</span><span class="n">getRepositoryInfo</span><span class="p">();</span>
+<span class="n">System</span><span class="p">.</span><span class="n">out</span><span class="p">.</span><span class="n">println</span><span class="p">(</span>&quot;<span class="n">Repository</span> <span class="n">name</span><span class="p">:</span> &quot; <span class="o">+</span> <span class="n">repInfo</span><span class="p">.</span><span class="n">getName</span><span class="p">());</span>
+
+<span class="o">//</span> <span class="n">get</span> <span class="n">root</span> <span class="n">folder</span> <span class="n">and</span> <span class="n">its</span> <span class="n">path</span>
+<span class="n">Folder</span> <span class="n">rootFolder</span> <span class="p">=</span> <span class="n">session</span><span class="p">.</span><span class="n">getRootFolder</span><span class="p">();</span>
+<span class="n">String</span> <span class="n">path</span> <span class="p">=</span> <span class="n">rootFolder</span><span class="p">.</span><span class="n">getPath</span><span class="p">();</span>
+<span class="n">System</span><span class="p">.</span><span class="n">out</span><span class="p">.</span><span class="n">println</span><span class="p">(</span>&quot;<span class="n">Root</span> <span class="n">folder</span> <span class="n">path</span><span class="p">:</span> &quot; <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">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="o">//</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="o">&lt;</span><span class="n">CmisObject</span><span class="o">&gt;</span> <span class="n">children</span> <span class="p">=</span> <span class="n">rootFolder</span><span class="p">.</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="p">.</span><span class="n">out</span><span class="p">.</span><span class="n">println</span><span class="p">(</span>&quot;<span class="o">---------------------------------</span>&quot;<span class="p">);</span>
+    <span class="n">System</span><span class="p">.</span><span class="n">out</span><span class="p">.</span><span class="n">println</span><span class="p">(</span>&quot;    <span class="n">Id</span><span class="p">:</span>              &quot; <span class="o">+</span> <span class="n">object</span><span class="p">.</span><span class="n">getId</span><span class="p">());</span>
+    <span class="n">System</span><span class="p">.</span><span class="n">out</span><span class="p">.</span><span class="n">println</span><span class="p">(</span>&quot;    <span class="n">Name</span><span class="p">:</span>            &quot; <span class="o">+</span> <span class="n">object</span><span class="p">.</span><span class="n">getName</span><span class="p">());</span>
+    <span class="n">System</span><span class="p">.</span><span class="n">out</span><span class="p">.</span><span class="n">println</span><span class="p">(</span>&quot;    <span class="n">Base</span> <span class="n">Type</span><span class="p">:</span>       &quot; <span class="o">+</span> <span class="n">object</span><span class="p">.</span><span class="n">getBaseTypeId</span><span class="p">());</span>
+    <span class="n">System</span><span class="p">.</span><span class="n">out</span><span class="p">.</span><span class="n">println</span><span class="p">(</span>&quot;    <span class="n">Property</span> <span class="s">&#39;bla&#39;</span><span class="p">:</span>  &quot; <span class="o">+</span> <span class="n">object</span><span class="p">.</span><span class="n">getPropertyValue</span><span class="p">(</span>&quot;<span class="n">bla</span>&quot;<span class="p">));</span>
+
+    <span class="n">ObjectType</span> <span class="n">type</span> <span class="p">=</span> <span class="n">object</span><span class="p">.</span><span class="n">getType</span><span class="p">();</span>
+    <span class="n">System</span><span class="p">.</span><span class="n">out</span><span class="p">.</span><span class="n">println</span><span class="p">(</span>&quot;    <span class="n">Type</span> <span class="n">Id</span><span class="p">:</span>          &quot; <span class="o">+</span> <span class="n">type</span><span class="p">.</span><span class="n">getId</span><span class="p">());</span>
+    <span class="n">System</span><span class="p">.</span><span class="n">out</span><span class="p">.</span><span class="n">println</span><span class="p">(</span>&quot;    <span class="n">Type</span> <span class="n">Name</span><span class="p">:</span>        &quot; <span class="o">+</span> <span class="n">type</span><span class="p">.</span><span class="n">getDisplayName</span><span class="p">());</span>
+    <span class="n">System</span><span class="p">.</span><span class="n">out</span><span class="p">.</span><span class="n">println</span><span class="p">(</span>&quot;    <span class="n">Type</span> <span class="n">Query</span> <span class="n">Name</span><span class="p">:</span>  &quot; <span class="o">+</span> <span class="n">type</span><span class="p">.</span><span class="n">getQueryName</span><span class="p">());</span>
+
+    <span class="n">AllowableActions</span> <span class="n">actions</span> <span class="p">=</span> <span class="n">object</span><span class="p">.</span><span class="n">getAllowableActions</span><span class="p">();</span>
+    <span class="n">System</span><span class="p">.</span><span class="n">out</span><span class="p">.</span><span class="n">println</span><span class="p">(</span>&quot;    <span class="n">canGetProperties</span><span class="p">:</span> &quot; <span class="o">+</span> <span class="n">actions</span><span class="p">.</span><span class="n">getAllowableActions</span><span class="p">().</span><span class="n">contains</span><span class="p">(</span><span class="n">Action</span><span class="p">.</span><span class="n">CAN_GET_PROPERTIES</span><span class="p">));</span>
+    <span class="n">System</span><span class="p">.</span><span class="n">out</span><span class="p">.</span><span class="n">println</span><span class="p">(</span>&quot;    <span class="n">canDeleteObject</span><span class="p">:</span>  &quot; <span class="o">+</span> <span class="n">actions</span><span class="p">.</span><span class="n">getAllowableActions</span><span class="p">().</span><span class="n">contains</span><span class="p">(</span><span class="n">Action</span><span class="p">.</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">ObjectId</span> <span class="n">objectId</span> <span class="o">=</span> <span class="n">session</span><span class="o">.</span><span class="n">createObjectId</span><span class="p">(</span><span class="s">&quot;100&quot;</span><span class="p">);</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="n">getObject</span><span class="p">(</span><span class="n">objectId</span><span class="p">);</span>
+<span class="o">//</span> <span class="n">get</span> <span class="n">an</span> <span class="n">object</span>
+<span class="n">ObjectId</span> <span class="n">objectId</span> <span class="p">=</span> <span class="n">session</span><span class="p">.</span><span class="n">createObjectId</span><span class="p">(</span>&quot;100&quot;<span class="p">);</span>
+<span class="n">CmisObject</span> <span class="n">object</span> <span class="p">=</span> <span class="n">session</span><span class="p">.</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="p">=</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="p">.</span><span class="n">out</span><span class="p">.</span><span class="n">println</span><span class="p">(</span>&quot;<span class="n">Is</span> <span class="n">root</span> <span class="n">folder</span><span class="p">:</span> &quot; <span class="o">+</span> <span class="n">folder</span><span class="p">.</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="p">=</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="p">=</span> <span class="n">document</span><span class="p">.</span><span class="n">getContentStream</span><span class="p">();</span>
+    <span class="n">System</span><span class="p">.</span><span class="n">out</span><span class="p">.</span><span class="n">println</span><span class="p">(</span>&quot;<span class="n">Document</span> <span class="n">MIME</span> <span class="n">type</span><span class="p">:</span> &quot; <span class="o">+</span> <span class="n">content</span><span class="p">.</span><span class="n">getMimeType</span><span class="p">());</span>
 <span class="p">}</span>
 </pre></div>
 
@@ -260,68 +260,68 @@ See also <a href="client/dev-client-api.
 <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">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>
+<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="p">=</span> <span class="n">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="p">.</span><span class="n">put</span><span class="p">(</span><span class="n">SessionParameter</span><span class="p">.</span><span class="n">ATOMPUB_URL</span><span class="p">,</span> &quot;<span class="n">http</span><span class="p">:</span><span class="o">//</span><span class="n">localhost</span><span class="p">:</span>8080<span class="o">/</span><span class="n">opencmis</span><span class="o">/</span><span class="n">atom</span>&quot;<span class="p">);</span>
+ <span class="n">parameters</span><span class="p">.</span><span class="n">put</span><span class="p">(</span><span class="n">SessionParameter</span><span class="p">.</span><span class="n">USER</span><span class="p">,</span> &quot;<span class="n">test</span>&quot;<span class="p">);</span>
+ <span class="n">parameters</span><span class="p">.</span><span class="n">put</span><span class="p">(</span><span class="n">SessionParameter</span><span class="p">.</span><span class="n">PASSWORD</span><span class="p">,</span> &quot;<span class="n">test</span>&quot;<span class="p">);</span>
+
+ <span class="o">//</span> <span class="n">create</span> <span class="n">binding</span>
+ <span class="n">CmisBinding</span> <span class="n">binding</span> <span class="p">=</span> <span class="n">CmisBindingFactory</span><span class="p">.</span><span class="n">newInstance</span><span class="p">().</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="p">=</span> &quot;<span class="n">A1</span>&quot;<span class="p">;</span>
+
+ <span class="o">//</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="p">=</span> <span class="n">binding</span><span class="p">.</span><span class="n">getRepositoryService</span><span class="p">().</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="p">.</span><span class="n">out</span><span class="p">.</span><span class="n">println</span><span class="p">(</span>&quot;<span class="n">Repository</span> <span class="n">name</span><span class="p">:</span> &quot; <span class="o">+</span> <span class="n">repInfo</span><span class="p">.</span><span class="n">getName</span><span class="p">());</span>
+
+ <span class="o">//</span> <span class="n">get</span> <span class="n">root</span> <span class="n">folder</span> <span class="n">and</span> <span class="n">its</span> <span class="n">path</span>
+ <span class="n">ObjectData</span> <span class="n">rootFolder</span> <span class="p">=</span> <span class="n">binding</span><span class="p">.</span><span class="n">getObjectService</span><span class="p">().</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="p">.</span><span class="n">getRootFolderId</span><span class="p">(),</span> &quot;<span class="o">*</span>&quot;<span class="p">,</span> <span class="n">true</span><span class="p">,</span> <span class="n">IncludeRelationships</span><span class="p">.</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="p">=</span> <span class="p">(</span><span class="n">PropertyString</span><span class="p">)</span>
+ <span class="n">rootFolder</span><span class="p">.</span><span class="n">getProperties</span><span class="p">().</span><span class="n">getProperties</span><span class="p">().</span><span class="n">get</span><span class="p">(</span><span class="n">PropertyIds</span><span class="p">.</span><span class="n">PATH</span><span class="p">);</span>
+ <span class="n">String</span> <span class="n">path</span> <span class="p">=</span> <span class="n">pathProperty</span><span class="p">.</span><span class="n">getFirstValue</span><span class="p">();</span>
+ <span class="n">System</span><span class="p">.</span><span class="n">out</span><span class="p">.</span><span class="n">println</span><span class="p">(</span>&quot;<span class="n">Root</span> <span class="n">folder</span> <span class="n">path</span><span class="p">:</span> &quot; <span class="o">+</span> <span class="n">path</span><span class="p">);</span>
+
+ <span class="o">//</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="p">=</span> <span class="n">binding</span><span class="p">.</span><span class="n">getNavigationService</span><span class="p">().</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="p">.</span><span class="n">getRootFolderId</span><span class="p">(),</span> &quot;<span class="o">*</span>&quot;<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="p">.</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="p">.</span><span class="n">valueOf</span><span class="p">(</span>10000<span class="p">),</span> <span class="n">BigInteger</span><span class="p">.</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="p">.</span><span class="n">getObjects</span><span class="p">())</span> <span class="p">{</span>
+     <span class="n">System</span><span class="p">.</span><span class="n">out</span><span class="p">.</span><span class="n">println</span><span class="p">(</span>&quot;<span class="o">---------------------------------</span>&quot;<span class="p">);</span>
+
+     <span class="n">PropertyString</span> <span class="n">nameProperty</span> <span class="p">=</span> <span class="p">(</span><span class="n">PropertyString</span><span class="p">)</span> <span class="n">object</span><span class="p">.</span><span class="n">getObject</span><span class="p">().</span><span class="n">getProperties</span><span class="p">().</span><span class="n">getProperties</span><span class="p">().</span><span class="n">get</span><span class="p">(</span><span class="n">PropertyIds</span><span class="p">.</span><span class="n">NAME</span><span class="p">);</span>
+     <span class="n">PropertyString</span> <span class="n">blaProperty</span> <span class="p">=</span> <span class="p">(</span><span class="n">PropertyString</span><span class="p">)</span> <span class="n">object</span><span class="p">.</span><span class="n">getObject</span><span class="p">().</span><span class="n">getProperties</span><span class="p">().</span><span class="n">getProperties</span><span class="p">().</span><span class="n">get</span><span class="p">(</span>&quot;<span class="n">bla</span>&quot;<span class="p">);</span>
+     <span class="n">PropertyId</span> <span class="n">typeProperty</span> <span class="p">=</span> <span class="p">(</span><span class="n">PropertyId</span><span class="p">)</span> <span class="n">object</span><span class="p">.</span><span class="n">getObject</span><span class="p">().</span><span class="n">getProperties</span><span class="p">().</span><span class="n">getProperties</span><span class="p">().</span><span class="n">get</span><span class="p">(</span><span class="n">PropertyIds</span><span class="p">.</span><span class="n">OBJECT_TYPE_ID</span><span class="p">);</span>
+
+     <span class="n">System</span><span class="p">.</span><span class="n">out</span><span class="p">.</span><span class="n">println</span><span class="p">(</span>&quot;  <span class="n">Id</span><span class="p">:</span>             &quot; <span class="o">+</span> <span class="n">object</span><span class="p">.</span><span class="n">getObject</span><span class="p">().</span><span class="n">getId</span><span class="p">());</span>
+     <span class="n">System</span><span class="p">.</span><span class="n">out</span><span class="p">.</span><span class="n">println</span><span class="p">(</span>&quot;  <span class="n">Name</span><span class="p">:</span>             &quot; <span class="o">+</span> <span class="n">nameProperty</span><span class="p">.</span><span class="n">getFirstValue</span><span class="p">());</span>
+     <span class="n">System</span><span class="p">.</span><span class="n">out</span><span class="p">.</span><span class="n">println</span><span class="p">(</span>&quot;  <span class="n">Base</span> <span class="n">Type</span><span class="p">:</span>        &quot; <span class="o">+</span> <span class="n">object</span><span class="p">.</span><span class="n">getObject</span><span class="p">().</span><span class="n">getBaseTypeId</span><span class="p">());</span>
+     <span class="n">System</span><span class="p">.</span><span class="n">out</span><span class="p">.</span><span class="n">println</span><span class="p">(</span>&quot;  <span class="n">Property</span> <span class="s">&#39;bla&#39;</span><span class="p">:</span>   &quot; <span class="o">+</span> <span class="p">(</span><span class="n">blaProperty</span> <span class="o">==</span> <span class="n">null</span> ? <span class="n">null</span> <span class="p">:</span> <span class="n">blaProperty</span><span class="p">.</span><span class="n">getFirstValue</span><span class="p">()));</span>
+
+     <span class="n">TypeDefinition</span> <span class="n">type</span> <span class="p">=</span> <span class="n">binding</span><span class="p">.</span><span class="n">getRepositoryService</span><span class="p">().</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="p">.</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="p">.</span><span class="n">out</span><span class="p">.</span><span class="n">println</span><span class="p">(</span>&quot;  <span class="n">Type</span> <span class="n">Id</span><span class="p">:</span>          &quot; <span class="o">+</span> <span class="n">type</span><span class="p">.</span><span class="n">getId</span><span class="p">());</span>
+     <span class="n">System</span><span class="p">.</span><span class="n">out</span><span class="p">.</span><span class="n">println</span><span class="p">(</span>&quot;  <span class="n">Type</span> <span class="n">Name</span><span class="p">:</span>        &quot; <span class="o">+</span> <span class="n">type</span><span class="p">.</span><span class="n">getDisplayName</span><span class="p">());</span>
+     <span class="n">System</span><span class="p">.</span><span class="n">out</span><span class="p">.</span><span class="n">println</span><span class="p">(</span>&quot;  <span class="n">Type</span> <span class="n">Query</span> <span class="n">Name</span><span class="p">:</span>  &quot; <span class="o">+</span> <span class="n">type</span><span class="p">.</span><span class="n">getQueryName</span><span class="p">());</span>
+
+     <span class="n">AllowableActions</span> <span class="n">actions</span> <span class="p">=</span> <span class="n">object</span><span class="p">.</span><span class="n">getObject</span><span class="p">().</span><span class="n">getAllowableActions</span><span class="p">();</span>
+     <span class="n">System</span><span class="p">.</span><span class="n">out</span><span class="p">.</span><span class="n">println</span><span class="p">(</span>&quot;  <span class="n">canGetProperties</span><span class="p">:</span> &quot; <span class="o">+</span> <span class="n">actions</span><span class="p">.</span><span class="n">getAllowableActions</span><span class="p">().</span><span class="n">contains</span><span class="p">(</span><span class="n">Action</span><span class="p">.</span><span class="n">CAN_GET_PROPERTIES</span><span class="p">));</span>
+     <span class="n">System</span><span class="p">.</span><span class="n">out</span><span class="p">.</span><span class="n">println</span><span class="p">(</span>&quot;  <span class="n">canDeleteObject</span><span class="p">:</span>  &quot; <span class="o">+</span> <span class="n">actions</span><span class="p">.</span><span class="n">getAllowableActions</span><span class="p">().</span><span class="n">contains</span><span class="p">(</span><span class="n">Action</span><span class="p">.</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="o">//</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="p">=</span> &quot;100&quot;<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="n">ObjectData</span> <span class="n">object</span> <span class="p">=</span> <span class="n">binding</span><span class="p">.</span><span class="n">getObjectService</span><span class="p">().</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> &quot;<span class="o">*</span>&quot;<span class="p">,</span> <span class="n">false</span><span class="p">,</span>
+     <span class="n">IncludeRelationships</span><span class="p">.</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="k">if</span> <span class="p">(</span><span class="n">object</span><span class="p">.</span><span class="n">getBaseTypeId</span><span class="p">()</span> <span class="o">==</span> <span class="n">BaseTypeId</span><span class="p">.</span><span class="n">CMIS_FOLDER</span><span class="p">)</span> <span class="p">{</span>
+      <span class="n">System</span><span class="p">.</span><span class="n">out</span><span class="p">.</span><span class="n">println</span><span class="p">(</span>&quot;<span class="n">Is</span> <span class="n">root</span> <span class="n">folder</span><span class="p">:</span> &quot; <span class="o">+</span> <span class="p">(</span><span class="n">repInfo</span><span class="p">.</span><span class="n">getRootFolderId</span><span class="p">().</span><span class="n">equals</span><span class="p">(</span><span class="n">object</span><span class="p">.</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="k">if</span> <span class="p">(</span><span class="n">object</span><span class="p">.</span><span class="n">getBaseTypeId</span><span class="p">()</span> <span class="o">==</span> <span class="n">BaseTypeId</span><span class="p">.</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="p">=</span> <span class="n">binding</span><span class="p">.</span><span class="n">getObjectService</span><span class="p">().</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="p">.</span><span class="n">out</span><span class="p">.</span><span class="n">println</span><span class="p">(</span>&quot;<span class="n">Document</span> <span class="n">MIME</span> <span class="n">type</span><span class="p">:</span> &quot; <span class="o">+</span> <span class="n">content</span><span class="p">.</span><span class="n">getMimeType</span><span class="p">());</span>
  <span class="p">}</span>
 </pre></div></div>
              <!-- Content -->



Mime
View raw message