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

svn commit: r785890 - /websites/staging/chemistry/trunk/content/java/how-to-build-a-server.html

Author: buildbot
Date: Mon Feb 21 16:50:21 2011
New Revision: 785890

Log:
Staging update by buildbot

Modified:
    websites/staging/chemistry/trunk/content/java/how-to-build-a-server.html

Modified: websites/staging/chemistry/trunk/content/java/how-to-build-a-server.html
==============================================================================
--- websites/staging/chemistry/trunk/content/java/how-to-build-a-server.html (original)
+++ websites/staging/chemistry/trunk/content/java/how-to-build-a-server.html Mon Feb 21 16:50:21 2011
@@ -214,162 +214,150 @@ version number and so on according to yo
 </pre></div>
 
 
-<p>Then select option 18 <em>maven-archetype-webapp</em> and confirm settings.</p>
+<p>Then select option 18 <code>maven-archetype-webapp</code> and confirm settings.</p>
 <p>You will find a project setup then consisting of a directory <em>mycmissvr</em>
 and subdirectories for source code and test code and the Java packages. We
-need to adapt the .pom file so that maven creates a web application file
+need to adapt the <code>.pom</code> file so that maven creates a web application file
 that can be deployed in a servlet container (like Apache Tomcat or Jetty).
 We also need to setup the dependencies to opencmis and we need to instruct
 maven generating an overlay with the existing server code in opencmis.
-Please remove therefore the entire generated src/webapp directory and all
-included files (<em>.jsp, web.xml).
-The final </em>pom.xml* will look like this:</p>
-<p>{code:xml|title=pom.xml|borderStyle=solid}
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
-http://maven.apache.org/maven-v4_0_0.xsd">
-  <modelVersion>4.0.0</modelVersion>
-  <groupId>org.mycmis</groupId>
-  <artifactId>mycmissrv</artifactId>
-  <packaging>war</packaging>
-  <version>0.1</version>
-  <name>mycmissrv Maven Webapp</name>
-  <url>http://maven.apache.org</url></p>
-<p><properties>
-    <opencmisVersion>0.1.0-incubating-SNAPSHOT</opencmisVersion>
-    <opencmisGroupId>org.apache.chemistry.opencmis</opencmisGroupId>
-  </properties></p>
-<p><build>
-    <finalName>mycmissrv</finalName>
-    <plugins>
-      <plugin>
-    <groupId>org.apache.maven.plugins</groupId>
-    <artifactId>maven-war-plugin</artifactId>
-    <configuration>
-      <overlays>
-        <overlay>
-        </overlay>
-        <overlay>
-          <groupId>${opencmisGroupId}</groupId>
-          <artifactId>chemistry-opencmis-server-bindings</artifactId>
-        </overlay>
-      </overlays>
-    </configuration>
-      </plugin>
-      <plugin>
-    <artifactId>maven-compiler-plugin</artifactId>
-    <configuration>
-       <target>1.5</target>
-       <source>1.5</source>
-       <encoding>UTF-8</encoding>
-    </configuration>
-      </plugin>
-    </plugins>
-  </build></p>
-<p><dependencies>
-    <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <version>3.8.1</version>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>${opencmisGroupId}</groupId>
-      <artifactId>chemistry-opencmis-commons-api</artifactId>
-      <version>${opencmisVersion}</version>
-    </dependency>
-    <dependency>
-      <groupId>${opencmisGroupId}</groupId>
-      <artifactId>chemistry-opencmis-commons-impl</artifactId>
-      <version>${opencmisVersion}</version>
-    </dependency>
-    <dependency>
-      <groupId>${opencmisGroupId}</groupId>
-      <artifactId>chemistry-opencmis-test-util</artifactId>
-      <version>${opencmisVersion}</version>
-    </dependency>
-    <dependency>
-      <groupId>${opencmisGroupId}</groupId>
-      <artifactId>chemistry-opencmis-server-bindings</artifactId>
-      <version>${opencmisVersion}</version>
-      <type>war</type>
-   </dependency>
-    <dependency>
-      <groupId>${opencmisGroupId}</groupId>
-      <artifactId>chemistry-opencmis-server-support</artifactId>
-      <version>${opencmisVersion}</version>
-    </dependency>
-    <dependency>
-      <groupId>org.antlr</groupId>
-      <artifactId>antlr-runtime</artifactId>
-      <version>3.1.3</version>
-    </dependency><br />
-  </dependencies>
-</project></p>
-<div class="codehilite"><pre><span class="n">You</span> <span class="n">will</span> <span class="n">get</span> <span class="n">your</span> <span class="sb">`web.xml`</span> <span class="ow">and</span> <span class="n">other</span> <span class="n">required</span> <span class="n">files</span> <span class="k">for</span> <span class="n">your</span> <span class="n">web</span>
+Please remove therefore the entire generated <code>src/webapp</code> directory and all
+included files (<code>*.jsp</code>, <code>web.xml</code>).
+The final <code>pom.xml</code> will look like this:</p>
+<div class="codehilite"><pre><span class="nt">&lt;project</span> <span class="na">xmlns=</span><span class="s">&quot;http://maven.apache.org/POM/4.0.0&quot;</span>
+  <span class="na">xmlns:xsi=</span><span class="s">&quot;http://www.w3.org/2001/XMLSchema-instance&quot;</span>
+  <span class="na">xsi:schemaLocation=</span><span class="s">&quot;http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd&quot;</span><span class="nt">&gt;</span>
+  <span class="nt">&lt;modelVersion&gt;</span>4.0.0<span class="nt">&lt;/modelVersion&gt;</span>
+  <span class="nt">&lt;groupId&gt;</span>org.mycmis<span class="nt">&lt;/groupId&gt;</span>
+  <span class="nt">&lt;artifactId&gt;</span>mycmissrv<span class="nt">&lt;/artifactId&gt;</span>
+  <span class="nt">&lt;packaging&gt;</span>war<span class="nt">&lt;/packaging&gt;</span>
+  <span class="nt">&lt;version&gt;</span>0.1<span class="nt">&lt;/version&gt;</span>
+  <span class="nt">&lt;name&gt;</span>mycmissrv Maven Webapp<span class="nt">&lt;/name&gt;</span>
+  <span class="nt">&lt;url&gt;</span>http://maven.apache.org<span class="nt">&lt;/url&gt;</span>
+
+  <span class="nt">&lt;properties&gt;</span>
+    <span class="nt">&lt;opencmisVersion&gt;</span>0.1.0-incubating-SNAPSHOT<span class="nt">&lt;/opencmisVersion&gt;</span>
+    <span class="nt">&lt;opencmisGroupId&gt;</span>org.apache.chemistry.opencmis<span class="nt">&lt;/opencmisGroupId&gt;</span>
+  <span class="nt">&lt;/properties&gt;</span>
+
+  <span class="nt">&lt;build&gt;</span>
+    <span class="nt">&lt;finalName&gt;</span>mycmissrv<span class="nt">&lt;/finalName&gt;</span>
+    <span class="nt">&lt;plugins&gt;</span>
+      <span class="nt">&lt;plugin&gt;</span>
+        <span class="nt">&lt;groupId&gt;</span>org.apache.maven.plugins<span class="nt">&lt;/groupId&gt;</span>
+        <span class="nt">&lt;artifactId&gt;</span>maven-war-plugin<span class="nt">&lt;/artifactId&gt;</span>
+        <span class="nt">&lt;configuration&gt;</span>
+          <span class="nt">&lt;overlays&gt;</span>
+            <span class="nt">&lt;overlay&gt;</span>
+            <span class="nt">&lt;/overlay&gt;</span>
+            <span class="nt">&lt;overlay&gt;</span>
+              <span class="nt">&lt;groupId&gt;</span>${opencmisGroupId}<span class="nt">&lt;/groupId&gt;</span>
+              <span class="nt">&lt;artifactId&gt;</span>chemistry-opencmis-server-bindings<span class="nt">&lt;/artifactId&gt;</span>
+            <span class="nt">&lt;/overlay&gt;</span>
+          <span class="nt">&lt;/overlays&gt;</span>
+        <span class="nt">&lt;/configuration&gt;</span>
+      <span class="nt">&lt;/plugin&gt;</span>
+      <span class="nt">&lt;plugin&gt;</span>
+        <span class="nt">&lt;artifactId&gt;</span>maven-compiler-plugin<span class="nt">&lt;/artifactId&gt;</span>
+        <span class="nt">&lt;configuration&gt;</span>
+          <span class="nt">&lt;target&gt;</span>1.5<span class="nt">&lt;/target&gt;</span>
+          <span class="nt">&lt;source&gt;</span>1.5<span class="nt">&lt;/source&gt;</span>
+          <span class="nt">&lt;encoding&gt;</span>UTF-8<span class="nt">&lt;/encoding&gt;</span>
+        <span class="nt">&lt;/configuration&gt;</span>
+      <span class="nt">&lt;/plugin&gt;</span>
+    <span class="nt">&lt;/plugins&gt;</span>
+  <span class="nt">&lt;/build&gt;</span>
+
+  <span class="nt">&lt;dependencies&gt;</span>
+    <span class="nt">&lt;dependency&gt;</span>
+      <span class="nt">&lt;groupId&gt;</span>junit<span class="nt">&lt;/groupId&gt;</span>
+      <span class="nt">&lt;artifactId&gt;</span>junit<span class="nt">&lt;/artifactId&gt;</span>
+      <span class="nt">&lt;version&gt;</span>3.8.1<span class="nt">&lt;/version&gt;</span>
+      <span class="nt">&lt;scope&gt;</span>test<span class="nt">&lt;/scope&gt;</span>
+    <span class="nt">&lt;/dependency&gt;</span>
+    <span class="nt">&lt;dependency&gt;</span>
+      <span class="nt">&lt;groupId&gt;</span>${opencmisGroupId}<span class="nt">&lt;/groupId&gt;</span>
+      <span class="nt">&lt;artifactId&gt;</span>chemistry-opencmis-commons-api<span class="nt">&lt;/artifactId&gt;</span>
+      <span class="nt">&lt;version&gt;</span>${opencmisVersion}<span class="nt">&lt;/version&gt;</span>
+    <span class="nt">&lt;/dependency&gt;</span>
+    <span class="nt">&lt;dependency&gt;</span>
+      <span class="nt">&lt;groupId&gt;</span>${opencmisGroupId}<span class="nt">&lt;/groupId&gt;</span>
+      <span class="nt">&lt;artifactId&gt;</span>chemistry-opencmis-commons-impl<span class="nt">&lt;/artifactId&gt;</span>
+      <span class="nt">&lt;version&gt;</span>${opencmisVersion}<span class="nt">&lt;/version&gt;</span>
+    <span class="nt">&lt;/dependency&gt;</span>
+    <span class="nt">&lt;dependency&gt;</span>
+      <span class="nt">&lt;groupId&gt;</span>${opencmisGroupId}<span class="nt">&lt;/groupId&gt;</span>
+      <span class="nt">&lt;artifactId&gt;</span>chemistry-opencmis-test-util<span class="nt">&lt;/artifactId&gt;</span>
+      <span class="nt">&lt;version&gt;</span>${opencmisVersion}<span class="nt">&lt;/version&gt;</span>
+    <span class="nt">&lt;/dependency&gt;</span>
+    <span class="nt">&lt;dependency&gt;</span>
+      <span class="nt">&lt;groupId&gt;</span>${opencmisGroupId}<span class="nt">&lt;/groupId&gt;</span>
+      <span class="nt">&lt;artifactId&gt;</span>chemistry-opencmis-server-bindings<span class="nt">&lt;/artifactId&gt;</span>
+      <span class="nt">&lt;version&gt;</span>${opencmisVersion}<span class="nt">&lt;/version&gt;</span>
+      <span class="nt">&lt;type&gt;</span>war<span class="nt">&lt;/type&gt;</span>
+   <span class="nt">&lt;/dependency&gt;</span>
+    <span class="nt">&lt;dependency&gt;</span>
+      <span class="nt">&lt;groupId&gt;</span>${opencmisGroupId}<span class="nt">&lt;/groupId&gt;</span>
+      <span class="nt">&lt;artifactId&gt;</span>chemistry-opencmis-server-support<span class="nt">&lt;/artifactId&gt;</span>
+      <span class="nt">&lt;version&gt;</span>${opencmisVersion}<span class="nt">&lt;/version&gt;</span>
+    <span class="nt">&lt;/dependency&gt;</span>
+    <span class="nt">&lt;dependency&gt;</span>
+      <span class="nt">&lt;groupId&gt;</span>org.antlr<span class="nt">&lt;/groupId&gt;</span>
+      <span class="nt">&lt;artifactId&gt;</span>antlr-runtime<span class="nt">&lt;/artifactId&gt;</span>
+      <span class="nt">&lt;version&gt;</span>3.1.3<span class="nt">&lt;/version&gt;</span>
+    <span class="nt">&lt;/dependency&gt;</span>  
+  <span class="nt">&lt;/dependencies&gt;</span>
+<span class="nt">&lt;/project&gt;</span>
 </pre></div>
 
 
-<p>application from opencmis which you may adjust according to your needs. You
+<p>You will get your <code>web.xml</code> and other required files for your web
+application from opencmis which you may adjust according to your needs. You
 may run <code>mvn eclipse:eclipse</code> to generate the required <code>.projects</code> and
 <code>.classpath</code> files for Eclipse that you just need to import in your
 Eclipse workspace.</p>
 <h3 id="without_maven">Without maven</h3>
-<div class="codehilite"><pre><span class="n">If</span> <span class="n">you</span> <span class="k">do</span> <span class="ow">not</span> <span class="n">want</span> <span class="n">to</span> <span class="k">use</span> <span class="n">maven</span> <span class="n">to</span> <span class="n">build</span> <span class="n">your</span> <span class="n">project</span> <span class="n">you</span> <span class="n">currently</span> <span class="n">have</span> <span class="n">to</span>
-</pre></div>
-
-
-<p>use maven to produce the binaries from the source code. Download the source
+<p>If you do not want to use maven to build your project you currently have to
+use maven to produce the binaries from the source code. Download the source
 code and run</p>
 <div class="codehilite"><pre><span class="n">mvn</span> <span class="nb">package</span>
-
-<span class="n">to</span> <span class="n">produce</span> <span class="n">a</span> <span class="n">binary</span> <span class="n">version</span> <span class="n">of</span> <span class="n">all</span> <span class="n">packaged</span> <span class="n">files</span><span class="o">.</span> <span class="n">To</span> <span class="n">reuse</span> <span class="n">the</span> <span class="n">relevant</span>
 </pre></div>
 
 
-<p>files from the server implementation in opencmis type:</p>
+<p>to produce a binary version of all packaged files. To reuse the relevant
+files from the server implementation in opencmis type:</p>
 <div class="codehilite"><pre><span class="n">cd</span> <span class="n">chemistry</span><span class="o">-</span><span class="n">opencmis</span><span class="o">-</span><span class="n">server</span>
 <span class="n">cd</span> <span class="n">chemistry</span><span class="o">-</span><span class="n">opencmis</span><span class="o">-</span><span class="n">server</span><span class="o">-</span><span class="n">bindings</span>
-
-<span class="n">Unzip</span> <span class="n">the</span> <span class="n">file</span>
 </pre></div>
 
 
-<p><code>chemistry-opencmis-server-bindings-0.1-incubating-SNAPSHOT.jar</code> and copy
+<p>Unzip the file
+<code>chemistry-opencmis-server-bindings-0.1-incubating-SNAPSHOT.jar</code> and copy
 the contents to your project. It includes all required jars, web.xml and
 other supporting files. In case you prefer an empty classes directory and
 use a jar instead you can use:</p>
 <div class="codehilite"><pre><span class="n">mvn</span> <span class="n">jar:jar</span>
-
-<span class="n">Then</span> <span class="n">copy</span> <span class="n">the</span> <span class="n">file</span> <span class="n">named</span> <span class="sb">`opencmis-server-impl-0.1-SNAPSHOT.jar`</span> <span class="n">from</span> <span class="n">the</span>
 </pre></div>
 
 
-<p>target directory to your project directory. Add all jar files from the
+<p>Then copy the file named <code>opencmis-server-impl-0.1-SNAPSHOT.jar</code> from the
+target directory to your project directory. Add all jar files from the
 <code>.war</code> and the one created in the previous step to your project setup.
 Add the <code>repository.properties</code> file to your classpath.</p>
-<div class="codehilite"><pre><span class="n">Now</span> <span class="n">you</span> <span class="n">have</span> <span class="n">an</span> <span class="n">initial</span> <span class="sb">`web.xml`</span> <span class="ow">and</span> <span class="n">the</span> <span class="n">required</span> <span class="n">support</span> <span class="n">files</span> <span class="k">for</span> <span class="n">the</span>
-</pre></div>
-
-
-<p>web services binding. Unless you have specific requirements you do not need
+<p>Now you have an initial <code>web.xml</code> and the required support files for the
+web services binding. Unless you have specific requirements you do not need
 to modify them.</p>
 <h2 id="implementing_the_services">Implementing the services</h2>
-<div class="codehilite"><pre><span class="n">The</span> <span class="n">first</span> <span class="n">step</span> <span class="n">is</span> <span class="n">to</span> <span class="nb">tell</span> <span class="n">opencmis</span> <span class="n">where</span> <span class="n">it</span> <span class="n">can</span> <span class="n">find</span> <span class="n">your</span> <span class="n">classes</span> <span class="n">that</span>
-</pre></div>
-
-
-<p>implement the CMIS logic. For this purpose a file named
+<p>The first step is to tell opencmis where it can find your classes that
+implement the CMIS logic. For this purpose a file named
 repository.properties must be in the classpath. It must contain a property
 named class that refers to your service factory:</p>
-<div class="codehilite"><pre><span class="n">class</span><span class="o">=</span><span class="nb">local</span><span class="o">.</span><span class="n">mycmis</span><span class="o">.</span><span class="n">ServiceFactory</span>
-
-<span class="n">The</span> <span class="n">ServiceFactory</span> <span class="n">class</span> <span class="n">should</span> <span class="n">extend</span> <span class="n">the</span> <span class="sb">`AbstractServiceFactory`</span> <span class="n">class</span>
+<div class="codehilite"><pre><span class="na">class</span><span class="o">=</span><span class="s">local.mycmis.ServiceFactory</span>
 </pre></div>
 
 
-<p>from org.apache.chemistry.opencmis.commons.impl.server. You have to
+<p>The ServiceFactory class should extend the <code>AbstractServiceFactory</code> class
+from org.apache.chemistry.opencmis.commons.impl.server. You have to
 implement the interface CmisServiceFactory:</p>
 <div class="codehilite"><pre><span class="kd">public</span> <span class="kt">void</span> <span class="nf">init</span><span class="o">(</span><span class="n">Map</span><span class="o">&lt;</span><span class="n">String</span><span class="o">,</span> <span class="n">String</span><span class="o">&gt;</span> <span class="n">parameters</span><span class="o">)</span> <span class="o">{</span>
 <span class="o">}</span>
@@ -386,19 +374,16 @@ configuration parameters from repository
 <div class="codehilite"><pre><span class="nd">@Override</span>
 <span class="kd">public</span> <span class="kt">void</span> <span class="nf">init</span><span class="o">(</span><span class="n">Map</span><span class="o">&lt;</span><span class="n">String</span><span class="o">,</span> <span class="n">String</span><span class="o">&gt;</span> <span class="n">parameters</span><span class="o">)</span> <span class="o">{</span>
 <span class="o">}</span>
-
-<span class="n">Typically</span> <span class="n">you</span> <span class="n">will</span> <span class="n">create</span> <span class="n">an</span> <span class="n">instance</span> <span class="n">of</span> <span class="n">your</span> <span class="n">service</span> <span class="n">implementation</span><span class="o">.</span>
-
-<span class="n">There</span> <span class="n">is</span> <span class="n">also</span> <span class="n">wrapper</span> <span class="n">classes</span> <span class="n">is</span> <span class="n">explained</span> <span class="n">in</span> <span class="n">the</span> <span class="n">next</span> <span class="n">section</span><span class="o">.</span>
-
-<span class="n">The</span> <span class="n">next</span> <span class="n">step</span> <span class="n">is</span> <span class="n">that</span> <span class="n">you</span> <span class="n">need</span> <span class="n">to</span> <span class="n">implement</span> <span class="n">the</span> <span class="n">services</span> <span class="n">according</span> <span class="n">to</span> <span class="n">the</span>
 </pre></div>
 
 
-<p>CMIS spec. We will do this here for one example call. The important piece
+<p>Typically you will create an instance of your service implementation.</p>
+<p>There is also wrapper classes is explained in the next section.</p>
+<p>The next step is that you need to implement the services according to the
+CMIS spec. We will do this here for one example call. The important piece
 is that your class implements <code>CmisService</code> which is central access point
 to all incoming calls. Here is an implementation of an example call
-getRepositoryInfo():</p>
+<code>getRepositoryInfo()</code>:</p>
 <div class="codehilite"><pre><span class="kd">public</span> <span class="kd">class</span> <span class="nc">MyCmisServiceImpl</span> <span class="kd">extends</span> <span class="n">AbstractCmisService</span> <span class="o">{</span>
 
     <span class="kd">public</span> <span class="n">RepositoryInfo</span> <span class="nf">getRepositoryInfo</span><span class="o">(</span><span class="n">CallContext</span> <span class="n">context</span><span class="o">,</span>
@@ -422,14 +407,12 @@ getRepositoryInfo():</p>
         <span class="n">repoInfo</span><span class="o">.</span><span class="na">setProductVersion</span><span class="o">(</span><span class="s">&quot;0.1&quot;</span><span class="o">);</span>
 
         <span class="c1">// set capabilities</span>
-        <span class="n">RepositoryCapabilitiesImpl</span> <span class="n">caps</span> <span class="o">=</span> <span class="k">new</span>
-            <span class="n">RepositoryCapabilitiesImpl</span><span class="o">();</span>
+        <span class="n">RepositoryCapabilitiesImpl</span> <span class="n">caps</span> <span class="o">=</span> <span class="k">new</span> <span class="n">RepositoryCapabilitiesImpl</span><span class="o">();</span>
         <span class="n">caps</span><span class="o">.</span><span class="na">setAllVersionsSearchable</span><span class="o">(</span><span class="kc">false</span><span class="o">);</span>
         <span class="n">caps</span><span class="o">.</span><span class="na">setCapabilityAcl</span><span class="o">(</span><span class="n">CapabilityAcl</span><span class="o">.</span><span class="na">NONE</span><span class="o">);</span>
         <span class="n">caps</span><span class="o">.</span><span class="na">setCapabilityChanges</span><span class="o">(</span><span class="n">CapabilityChanges</span><span class="o">.</span><span class="na">PROPERTIES</span><span class="o">);</span>
 
-        <span class="n">caps</span><span class="o">.</span><span class="na">setCapabilityContentStreamUpdates</span><span class="o">(</span>
-            <span class="n">CapabilityContentStreamUpdates</span><span class="o">.</span><span class="na">PWCONLY</span><span class="o">);</span>
+        <span class="n">caps</span><span class="o">.</span><span class="na">setCapabilityContentStreamUpdates</span><span class="o">(</span><span class="n">CapabilityContentStreamUpdates</span><span class="o">.</span><span class="na">PWCONLY</span><span class="o">);</span>
         <span class="n">caps</span><span class="o">.</span><span class="na">setCapabilityJoin</span><span class="o">(</span><span class="n">CapabilityJoin</span><span class="o">.</span><span class="na">NONE</span><span class="o">);</span>
         <span class="n">caps</span><span class="o">.</span><span class="na">setCapabilityQuery</span><span class="o">(</span><span class="n">CapabilityQuery</span><span class="o">.</span><span class="na">METADATAONLY</span><span class="o">);</span>
         <span class="n">caps</span><span class="o">.</span><span class="na">setCapabilityRendition</span><span class="o">(</span><span class="n">CapabilityRenditions</span><span class="o">.</span><span class="na">NONE</span><span class="o">);</span>
@@ -440,13 +423,14 @@ getRepositoryInfo():</p>
         <span class="n">caps</span><span class="o">.</span><span class="na">setSupportsMultifiling</span><span class="o">(</span><span class="kc">true</span><span class="o">);</span>
         <span class="n">caps</span><span class="o">.</span><span class="na">setSupportsUnfiling</span><span class="o">(</span><span class="kc">true</span><span class="o">);</span>
         <span class="n">caps</span><span class="o">.</span><span class="na">setSupportsVersionSpecificFiling</span><span class="o">(</span><span class="kc">false</span><span class="o">);</span>
-            <span class="n">repoInfo</span><span class="o">.</span><span class="na">setRepositoryCapabilities</span><span class="o">(</span><span class="n">caps</span><span class="o">);</span>
+        <span class="n">repoInfo</span><span class="o">.</span><span class="na">setRepositoryCapabilities</span><span class="o">(</span><span class="n">caps</span><span class="o">);</span>
 
         <span class="n">AclCapabilitiesDataImpl</span> <span class="n">aclCaps</span> <span class="o">=</span> <span class="k">new</span> <span class="n">AclCapabilitiesDataImpl</span><span class="o">();</span>
         <span class="n">aclCaps</span><span class="o">.</span><span class="na">setAclPropagation</span><span class="o">(</span><span class="n">AclPropagation</span><span class="o">.</span><span class="na">REPOSITORYDETERMINED</span><span class="o">);</span>
         <span class="n">aclCaps</span><span class="o">.</span><span class="na">setPermissionDefinitionData</span><span class="o">(</span><span class="kc">null</span><span class="o">);</span>
         <span class="n">aclCaps</span><span class="o">.</span><span class="na">setPermissionMappingData</span><span class="o">(</span><span class="kc">null</span><span class="o">);</span>
         <span class="n">repoInfo</span><span class="o">.</span><span class="na">setAclCapabilities</span><span class="o">(</span><span class="n">aclCaps</span><span class="o">);</span>
+
         <span class="k">return</span> <span class="n">repoInfo</span><span class="o">;</span>
       <span class="o">}</span>
      <span class="c1">// ...</span>
@@ -475,7 +459,7 @@ subtle differences that need to be refle
 chapter explains where the differences are and why they are needed.</p>
 <p><a name="HowToBuildAServer-TheObjectInfointerface"></a></p>
 <h3 id="the_objectinfo_interface">The ObjectInfo interface</h3>
-<p>The methods in the interfaces <em>CmisService</em> are following the data model
+<p>The methods in the interfaces <code>CmisService</code> are following the data model
 in the CMIS specification. The specification defines the following
 services:</p>
 <ul>
@@ -498,44 +482,44 @@ Take the creation of a document as an ex
 this case a single string value containing the id of the created document.
 A response in the AtomPub binding however consists of an AtomPub entry
 element which is an XML fragment (for an example look at
-<em>DocumentEntry.xml</em> in the examples directory of the CMIS specification).
+<code>DocumentEntry.xml</code> in the examples directory of the CMIS specification).
 You will notice that generating this XML requires much more information
 than the create...() methods in the specification provide as return value.
 Your implementation needs to provide all the information so that opencmis
-can generate the complete response. For this purpose the <em>ObjectInfo</em> was
-introduced. <em>getObjectInfo</em> is the method of the CmisService interface
-that provides this information. The <em>AbstractCmisService</em> contains a
-member <em>objectInfoMap</em> that you can fill with this information. If you
-ignore this the class <em>AbstractCmisService</em> contains a default
+can generate the complete response. For this purpose the <code>ObjectInfo</code> was
+introduced. <code>getObjectInfo</code> is the method of the <code>CmisService</code> interface
+that provides this information. The <code>AbstractCmisService</code> contains a
+member <code>objectInfoMap</code> that you can fill with this information. If you
+ignore this the class <code>AbstractCmisService</code> contains a default
 implementation which works but is very ineffecient. You should use this
 only as a starting point. Beware that a service can be called from multiple
 threads, so have to take care to handle threading issues properly.</p>
 <p>If the method you are implementing returns a list of objects and not only a
-single value (for example methods like <em>getChildren(), getDescendants()</em>
-in the navigation service) you need to provide an <em>ObjectInfo</em> for each
-element in the collection. <em>getObjectInfo</em> therefore returns a map with
-the object id for each object as key and the corresponding <em>ObjectInfo</em>
-as value. You can use the method <em>addObjectInfo</em> to add an element to the
+single value (for example methods like <code>getChildren()</code>, <code>getDescendants()</code>
+in the navigation service) you need to provide an <code>ObjectInfo</code> for each
+element in the collection. <code>getObjectInfo</code> therefore returns a map with
+the object id for each object as key and the corresponding <code>ObjectInfo</code>
+as value. You can use the method <code>addObjectInfo</code> to add an element to the
 map. </p>
 <p><a name="HowToBuildAServer-Thecreate()methods"></a></p>
 <h3 id="the_create_methods">The create() methods</h3>
 <p>The web service binding has separate calls for each object type to be
-created: policies, relationshiops, documents and folders:</p>
+created: policies, relationships, documents and folders:</p>
 <ul>
 <li>createDocument</li>
 <li>createFolder</li>
 <li>createRelationship</li>
 <li>createPolicy</li>
 </ul>
-<p>In the AtomPub binding there is one general <em>create()</em> method that is
+<p>In the AtomPub binding there is one general <code>create()</code> method that is
 used for all object types. The CmisObjectService interface therefore
-contains 5 <em>create()</em> methods, the four specific ones are used for the
+contains 5 <code>create()</code> methods, the four specific ones are used for the
 web service bindings and the general one for the AtomPub binding.</p>
 <p><a name="HowToBuildAServer-ApplyingACLs"></a></p>
 <h3 id="applying_acls">Applying ACLs</h3>
-<p>The class CmisAclService has two methods <em>applyAcl()</em>. One uses two
-AccessControlLists with one Acl to add &nbsp;and one to remove. The other
-method contains only one Acl to be set on the target object. The web
+<p>The class <code>CmisAclService</code> has two methods <code>applyAcl()</code>. One uses two
+<code>AccessControlList</code>s with one <code>Acl</code> to add &nbsp;and one to remove. The other
+method contains only one <code>Acl</code> to be set on the target object. The web
 service binding uses the method with two parameters, the AtomPub binding
 uses the method with one parameter.</p>
 <p><a name="HowToBuildAServer-RunningTheServer"></a></p>
@@ -548,11 +532,11 @@ setup your project you can run</p>
 
 
 <p>to generate a war file that you will find in the target directory. If you
-have not used maven create the war with the mechanisms of your build
-environment. Check the war contains a &nbsp;web.xml, the wsdl files in
+have not used maven, create the war with the mechanisms of your build
+environment. Check the war contains a <code>web.xml</code>, the wsdl files in
 <code>WEB-INF</code> and all the required jars from opencmis and dependent libraries
 in <code>WEB-INF/lib</code>. For jetty maven contains a build-in integration that
-you may use if you like using <code>mvn jetty:run</code>. Adjust your pom.xml in
+you may use if you like using <code>mvn jetty:run</code>. Adjust your <code>pom.xml</code> in
 this case accordingly.</p>
 <p>Deploy your application and start testing.</p>
 <p><a name="HowToBuildAServer-HandlingAuthentication"></a></p>
@@ -562,14 +546,14 @@ authentication is handled. It provides s
 user name and password depending on the protocol. For AtomPub binding http
 basic authentication is supported, for web services WS-Security 1.1 for
 Username Token Profile 1.1 is supported.</p>
-<p>If you want to use servlet filters dealing with authentication, &nbsp;just
-add them to your web.xml file. You also can handle authentication inside of
-your code. In this case derive a class from <em>BasicAuthCallContextHandler</em>
-and implement method <em>getCallContextMap()</em>. There you have access to user
+<p>If you want to use servlet filters dealing with authentication, just
+add them to your <code>web.xml</code> file. You also can handle authentication inside of
+your code. In this case derive a class from <code>BasicAuthCallContextHandler</code>
+and implement method <code>getCallContextMap()</code>. There you have access to user
 name and password as provided by the user. By default opencmis does not
 enforce authentication, so initially the map will be null. If you raise a
-CmisPermissionDeniedException the exception is caught by the server
-implementation and a <em>401</em> http return code is sent as response to the
+<code>CmisPermissionDeniedException</code> the exception is caught by the server
+implementation and a <code>401</code> http return code is sent as response to the
 browser. This usually opens a dialog for user name and password then.</p>
 <div class="codehilite"><pre><span class="kd">public</span> <span class="kd">class</span> <span class="nc">MyContextHandler</span>
     <span class="kd">extends</span> <span class="n">BasicAuthCallContextHandler</span>
@@ -592,42 +576,35 @@ browser. This usually opens a dialog for
     <span class="k">return</span> <span class="n">ctxMap</span><span class="o">;</span>
   <span class="o">}</span>
 <span class="o">}</span>
-
-<span class="n">Beyond</span> <span class="k">this</span> <span class="n">it</span> <span class="n">is</span> <span class="n">up</span> <span class="n">to</span> <span class="n">you</span> <span class="n">how</span> <span class="n">to</span> <span class="n">implement</span> <span class="n">authentication</span><span class="o">.</span> <span class="n">Creating</span>
 </pre></div>
 
 
-<p>tokens for example, using cookies, etc. is not covered by opencmis, but you
+<p>Beyond this it is up to you how to implement authentication. Creating
+tokens for example, using cookies, etc. is not covered by opencmis, but you
 can add it in your code.</p>
 <h2 id="configuring_your_server">Configuring your server</h2>
-<div class="codehilite"><pre><span class="n">Opencmis</span> <span class="n">reads</span> <span class="n">a</span> <span class="n">file</span> <span class="n">repository</span><span class="o">.</span><span class="n">properties</span> <span class="n">on</span> <span class="n">startup</span><span class="o">.</span> <span class="n">By</span> <span class="n">default</span> <span class="n">you</span> <span class="n">only</span>
-</pre></div>
-
-
-<p>have to configure the class of your service factory (see above). You can
+<p>Opencmis reads a file <code>repository.properties</code> on startup. By default you only
+have to configure the class of your service factory (see above). You can
 add additional properties in this file. These configuration parameters are
-then passed to the <code>init()</code> method of your ServiceFactory method as key
+then passed to the <code>init()</code> method of your <code>ServiceFactory</code> as key
 value pairs in a hashmap.</p>
-<div class="codehilite"><pre><span class="p">{</span><span class="n">code:title</span><span class="o">=</span><span class="n">repository</span><span class="o">.</span><span class="n">properties</span><span class="o">|</span><span class="n">borderStyle</span><span class="o">=</span><span class="n">solid</span><span class="p">}</span>
-  <span class="n">class</span><span class="o">=</span><span class="nb">local</span><span class="o">.</span><span class="n">mycmis</span><span class="o">.</span><span class="n">ServiceFactory</span>
-  <span class="n">myparam</span><span class="o">=</span><span class="k">my</span><span class="o">-</span><span class="n">configuration</span><span class="o">-</span><span class="n">value</span>
-</pre></div>
+<div class="codehilite"><pre><span class="na">class</span><span class="o">=</span><span class="s">local.mycmis.ServiceFactory</span>
+<span class="na">myparam</span><span class="o">=</span><span class="s">my-configuration-value</span>
 
-
-<p>{code:java|title=local.mycmis.ServiceFactory.java|borderStyle=solid}
-// ...
-@Override
-public void init(Map<String, String> parameters) {
-  String myParamValue = parameters.get("myparam");
-    // use myParamValue
-}
-// ...</p>
-<h2 id="testing_the_server">Testing the server</h2>
-<div class="codehilite"><pre><span class="n">There</span> <span class="n">are</span> <span class="n">various</span> <span class="n">ways</span> <span class="n">how</span> <span class="n">you</span> <span class="n">can</span> <span class="n">test</span> <span class="n">your</span> <span class="n">implementation</span><span class="o">.</span> <span class="n">You</span> <span class="n">may</span> <span class="n">add</span>
+<span class="o">:</span><span class="s">::java</span>
+<span class="c">// ...</span>
+<span class="err">@Override</span>
+<span class="err">public</span> <span class="err">void</span> <span class="err">init(Map&lt;String,</span> <span class="err">String&gt;</span> <span class="err">parameters)</span> <span class="err">{</span>
+  <span class="na">String myParamValue</span> <span class="o">=</span> <span class="s">parameters.get(&quot;myparam&quot;);</span>
+         <span class="c">// use myParamValue</span>
+<span class="err">}</span>
+<span class="c">// ...</span>
 </pre></div>
 
 
-<p>unit tests that directly call your service implementations as a first step.
+<h2 id="testing_the_server">Testing the server</h2>
+<p>There are various ways how you can test your implementation. You may add
+unit tests that directly call your service implementations as a first step.
 Opencmis also contains some basic tests that perform client-server
 communication. You can choose the protocol binding and whether read-only or
 read-write tests are performed. The amount of functionality tested depends
@@ -664,17 +641,17 @@ can run them using junit:</p>
 <h3 id="test_using_curl">Test using curl</h3>
 <p>Simple tests (which might be useful at the beginning) can also be done
 using tools like curl or wget (AtomPub binding only). A simple example for
-a .BAT file (Windows) would look like this:</p>
-<div class="codehilite"><pre><span class="n">rem</span> <span class="n">set</span> <span class="n">PATH</span><span class="o">=...\</span><span class="n">libcurl</span><span class="o">-</span><span class="mf">7.19.7</span><span class="p">;</span><span class="o">...\</span><span class="n">OpenSSL</span><span class="o">\</span><span class="n">bin</span><span class="p">;</span><span class="nv">%PATH%</span>
-<span class="nv">set</span> <span class="n">CURL</span><span class="o">=</span><span class="n">curl</span><span class="o">.</span><span class="n">exe</span>
-<span class="n">set</span> <span class="n">VIEWER</span><span class="o">=</span><span class="s">&quot;C:\Program Files\Mozilla Firefox\firefox.exe&quot;</span>
-<span class="n">set</span> <span class="n">USER</span><span class="o">=</span><span class="n">XXX</span>
-<span class="n">set</span> <span class="n">PWD</span><span class="o">=</span><span class="n">YYY</span>
-<span class="n">set</span> <span class="n">URLPREFIX</span><span class="o">=</span><span class="p">[</span><span class="n">http:</span><span class="sr">//</span><span class="n">localhost:8080</span><span class="sr">/opencmis/</span><span class="n">atom</span><span class="p">]</span>
-<span class="n">SET</span> <span class="n">OUTFILE</span><span class="o">=</span><span class="n">atom</span><span class="o">.</span><span class="n">xml</span>
+a <code>.BAT</code> file (Windows) would look like this:</p>
+<div class="codehilite"><pre><span class="c">rem set PATH=...\libcurl-7.19.7;...\OpenSSL\bin;%PATH%</span>
+<span class="k">set</span> <span class="nv">CURL</span><span class="o">=</span>curl.exe
+<span class="k">set</span> <span class="nv">VIEWER</span><span class="o">=</span><span class="s2">&quot;C:\Program Files\Mozilla Firefox\firefox.exe&quot;</span>
+<span class="k">set</span> <span class="nv">USER</span><span class="o">=</span>XXX
+<span class="k">set</span> <span class="nv">PWD</span><span class="o">=</span>YYY
+<span class="k">set</span> <span class="nv">URLPREFIX</span><span class="o">=</span>[http:<span class="n">//localhost:8080/opencmis/atom]</span>
+<span class="k">SET</span> <span class="nv">OUTFILE</span><span class="o">=</span>atom.xml
 
-<span class="nv">%CURL%</span> <span class="err">\--</span><span class="nv">user</span> <span class="nv">%USER%:%PWD%</span> <span class="err">\--</span><span class="nv">dump</span><span class="o">-</span><span class="n">header</span> <span class="n">header</span><span class="o">.</span><span class="n">txt</span> <span class="o">\--</span><span class="n">output</span> <span class="nv">%OUTFILE%</span> <span class="err">%</span><span class="nv">URLPREFIX%</span>
-<span class="nv">IF</span> <span class="n">ERRORLEVEL</span> <span class="mi">0</span> <span class="nv">%VIEWER%</span> <span class="err">%</span><span class="nv">OUTFILE%</span>
+<span class="nv">%CURL%</span> \--user <span class="nv">%USER%</span>:<span class="nv">%PWD%</span> \--dump-header header.txt \--output <span class="nv">%OUTFILE%</span> <span class="nv">%URLPREFIX%</span>
+<span class="k">IF</span> <span class="k">ERRORLEVEL</span> <span class="m">0</span> <span class="nv">%VIEWER%</span> <span class="nv">%OUTFILE%</span>
 </pre></div>