[exo-jcr-commits] exo-jcr SVN: r5470 - in jcr/branches/1.15.x: exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command and 3 other directories.

do-not-reply at jboss.org do-not-reply at jboss.org
Tue Jan 17 09:06:22 EST 2012


Author: dkuleshov
Date: 2012-01-17 09:06:21 -0500 (Tue, 17 Jan 2012)
New Revision: 5470

Modified:
   jcr/branches/1.15.x/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/WebDavServiceImpl.java
   jcr/branches/1.15.x/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/PutCommand.java
   jcr/branches/1.15.x/exo.jcr.component.webdav/src/test/java/org/exoplatform/services/jcr/webdav/command/TestPut.java
   jcr/branches/1.15.x/exo.jcr.component.webdav/src/test/resources/conf/standalone/test-configuration.xml
   jcr/branches/1.15.x/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/protocols/webdav.xml
Log:
EXOJCR-1719: added new initial parameters for WebDavServiceImpl

Modified: jcr/branches/1.15.x/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/WebDavServiceImpl.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/WebDavServiceImpl.java	2012-01-17 13:28:57 UTC (rev 5469)
+++ jcr/branches/1.15.x/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/WebDavServiceImpl.java	2012-01-17 14:06:21 UTC (rev 5470)
@@ -23,6 +23,7 @@
 import org.exoplatform.commons.utils.MimeTypeResolver;
 import org.exoplatform.container.xml.InitParams;
 import org.exoplatform.container.xml.ValueParam;
+import org.exoplatform.container.xml.ValuesParam;
 import org.exoplatform.services.jcr.RepositoryService;
 import org.exoplatform.services.jcr.core.ManageableRepository;
 import org.exoplatform.services.jcr.ext.app.ThreadLocalSessionProviderService;
@@ -78,8 +79,10 @@
 import java.net.URLEncoder;
 import java.util.ArrayList;
 import java.util.HashMap;
+import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
+import java.util.Set;
 
 import javax.jcr.NoSuchWorkspaceException;
 import javax.jcr.PathNotFoundException;
@@ -143,12 +146,20 @@
 
    public static final String FOLDER_ICON_PATH = "folder-icon-path";
 
+   public static final String READ_ONLY_MIME_TYPES = "read-only-mime-types";
+
    /**
     * Logger.
     */
    private static Log log = ExoLogger.getLogger("exo.jcr.component.webdav.WebDavServiceImpl");
 
    /**
+    * Set to keep all 'read-only' mime types. Mime-types listed here  
+    * are not allowed to be changed. 
+    */
+   private Set<String> readOnlyMimeTypes = new HashSet<String>();
+
+   /**
     * Local Thread SessionProvider.
     */
    private final ThreadLocalSessionProviderService sessionProviderService;
@@ -305,6 +316,12 @@
       }
       this.mimeTypeResolver = new MimeTypeResolver();
       this.mimeTypeResolver.setDefaultMimeType(defaultFileMimeType);
+
+      ValuesParam pReadOnlyMimeTypes = params.getValuesParam(READ_ONLY_MIME_TYPES);
+      if (pReadOnlyMimeTypes != null)
+      {
+         readOnlyMimeTypes.addAll((List<String>)pReadOnlyMimeTypes.getValues());
+      }
    }
 
    /**
@@ -388,6 +405,23 @@
       }
       this.mimeTypeResolver = new MimeTypeResolver();
       this.mimeTypeResolver.setDefaultMimeType(defaultFileMimeType);
+
+      /*
+       * As this constructor receives Map<String, String> instead of InitParams
+       * we cannot pass multi-valued parameters in the form of 
+       * String -> Collection  
+       * We pass a set of 'read-only' mime types as a single String
+       * with mime types separated by comma (",")
+       * i.e. "mimeType1, mimeType2, mimeType3"
+       */
+      paramValue = params.get(READ_ONLY_MIME_TYPES);
+      if (paramValue != null)
+      {
+         for (String mimeType : paramValue.split(","))
+         {
+            readOnlyMimeTypes.add(mimeType.trim());
+         }
+      }
    }
 
    /**
@@ -1174,8 +1208,8 @@
          NodeType nodeType = ntm.getNodeType(contentNodeType);
          NodeTypeUtil.checkContentResourceType(nodeType);
 
-         return new PutCommand(nullResourceLocks, uriInfo.getBaseUriBuilder().path(getClass()).path(repoName)).put(
-            session, path(repoPath), inputStream, fileNodeType, contentNodeType,
+         return new PutCommand(nullResourceLocks, uriInfo.getBaseUriBuilder().path(getClass()).path(repoName),
+            readOnlyMimeTypes).put(session, path(repoPath), inputStream, fileNodeType, contentNodeType,
             NodeTypeUtil.getMixinTypes(mixinTypes), mimeType, encoding, updatePolicyType, autoVersionType, tokens);
 
       }

Modified: jcr/branches/1.15.x/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/PutCommand.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/PutCommand.java	2012-01-17 13:28:57 UTC (rev 5469)
+++ jcr/branches/1.15.x/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/PutCommand.java	2012-01-17 14:06:21 UTC (rev 5470)
@@ -24,7 +24,9 @@
 
 import java.io.InputStream;
 import java.util.Calendar;
+import java.util.HashSet;
 import java.util.List;
+import java.util.Set;
 
 import javax.jcr.AccessDeniedException;
 import javax.jcr.Node;
@@ -57,6 +59,12 @@
    private final UriBuilder uriBuilder;
 
    /**
+    * Set to keep all 'read-only' mime types. Mime-types listed here  
+    * are not allowed to be changed. 
+    */
+   private final Set<String> readOnlyMimeTypes;
+
+   /**
     * Constructor.
     * 
     * @param nullResourceLocks resource locks.
@@ -64,7 +72,15 @@
    public PutCommand(final NullResourceLocksHolder nullResourceLocks)
    {
       this.nullResourceLocks = nullResourceLocks;
+      /* Since no UriBuilder instance provided initialize it with null
+       * to indicate that "Location" header should not be used in "Created" response
+       */
       this.uriBuilder = null;
+      /* Since no 'read-only' mime-types set provided create empty HashSet
+       * which indicates that 'read-only' mime-types set is empty
+       * so any mime-type property can be overwritten
+       */
+      this.readOnlyMimeTypes = new HashSet<String>();
    }
 
    /**
@@ -76,10 +92,33 @@
    public PutCommand(final NullResourceLocksHolder nullResourceLocks, UriBuilder uriBuilder)
    {
       this.nullResourceLocks = nullResourceLocks;
+      /* Since no UriBuilder instance provided initialize it with null
+       * to indicate that "Location" header should not be used in "Created" response
+       */
       this.uriBuilder = uriBuilder;
+      /* Since no 'read-only' mime-types set provided create empty HashSet
+       * which indicates that 'read-only' mime-types set is empty
+       * so any mime-type property can be overwritten
+       */
+      this.readOnlyMimeTypes = new HashSet<String>();
    }
 
    /**
+    * Constructor.
+    * 
+    * @param nullResourceLocks resource locks.
+    * @param uriBuilder - provide data used in 'location' header
+    * @param readOnlyMimeTypes set of 'read-only' mime types 
+    */
+   public PutCommand(final NullResourceLocksHolder nullResourceLocks, UriBuilder uriBuilder,
+      Set<String> readOnlyMimeTypes)
+   {
+      this.nullResourceLocks = nullResourceLocks;
+      this.uriBuilder = uriBuilder;
+      this.readOnlyMimeTypes = readOnlyMimeTypes;
+   }
+
+   /**
     * Webdav Put method implementation.
     * 
     * @param session current session
@@ -231,7 +270,23 @@
    {
 
       Node content = node.getNode("jcr:content");
-      content.setProperty("jcr:mimeType", mimeType);
+
+      /* 
+         Workaround created to fix JCR-1704
+      
+         1. If readOnlyMimeTypes is not initialized it is okay to set any mime-type you want
+         2. If readOnlyMimeTypes is empty, it won't be needed to call !content.hasProperty("jcr:mimeType")
+            which represents a potential query, and again it is okay to set any mime-type you want
+         3. If jcr:mimeType property is not set, we can set it without worries
+         4. If jcr:mimeType property isn't in 'read-only' properties list,
+            we can set it
+      */
+      if (readOnlyMimeTypes == null || readOnlyMimeTypes.isEmpty() || !content.hasProperty("jcr:mimeType")
+         || !readOnlyMimeTypes.contains(content.getProperty("jcr:mimeType").getString()))
+      {
+         content.setProperty("jcr:mimeType", mimeType);
+      }
+
       if (encoding != null)
       {
          content.setProperty("jcr:encoding", encoding);

Modified: jcr/branches/1.15.x/exo.jcr.component.webdav/src/test/java/org/exoplatform/services/jcr/webdav/command/TestPut.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.webdav/src/test/java/org/exoplatform/services/jcr/webdav/command/TestPut.java	2012-01-17 13:28:57 UTC (rev 5469)
+++ jcr/branches/1.15.x/exo.jcr.component.webdav/src/test/java/org/exoplatform/services/jcr/webdav/command/TestPut.java	2012-01-17 14:06:21 UTC (rev 5470)
@@ -184,6 +184,39 @@
          .toString());
    }
 
+   /**
+    * Testing if read-only mime-types properties, which can be set as initial parameters
+    * for WebDavService, are indeed read-only. 
+    * More info can be found here: https://jira.exoplatform.org/browse/JCR-1704
+    * @throws Exception
+    */
+   public void testReadOnlyMimeTypeProperties() throws Exception
+   {
+      String testMimeTypeProperty = "test/mime-type";
+      String content = TestUtils.getFileContent();
+      String path = TestUtils.getFileName();
+      MultivaluedMap<String, String> headers = new MultivaluedMapImpl();
+
+      // setting content-type header
+      // test/mime-type is defined in init params to be read only mime type
+      headers.add(HttpHeaders.CONTENT_TYPE, testMimeTypeProperty);
+      // putting a resource
+      service(WebDAVMethods.PUT, getPathWS() + path, "", headers, content.getBytes());
+
+      headers.clear();
+      // setting content-type header again
+      // this time we set MediaType.TEXT_HTML to replace previous mime type
+      headers.add(HttpHeaders.CONTENT_TYPE, MediaType.TEXT_HTML);
+      // putting one mopre time
+      service(WebDAVMethods.PUT, getPathWS() + path, "", headers, content.getBytes());
+
+      // gettin jcr:content node, which stores jcr:mimeType parameter
+      Node node = session.getRootNode().getNode(TextUtil.relativizePath(path)).getNode("jcr:content");
+
+      assertEquals("Mime-type property should not be changed.", testMimeTypeProperty, node.getProperty("jcr:mimeType")
+         .getString());
+   }
+
    @Override
    protected String getRepositoryName()
    {

Modified: jcr/branches/1.15.x/exo.jcr.component.webdav/src/test/resources/conf/standalone/test-configuration.xml
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.webdav/src/test/resources/conf/standalone/test-configuration.xml	2012-01-17 13:28:57 UTC (rev 5469)
+++ jcr/branches/1.15.x/exo.jcr.component.webdav/src/test/resources/conf/standalone/test-configuration.xml	2012-01-17 14:06:21 UTC (rev 5470)
@@ -209,7 +209,12 @@
             <name>folder-icon-path</name>
             <value>/absolute/path/to/file</value>
          </value-param>
-
+         
+         <values-param>
+            <name>read-only-mime-types</name>
+            <value>test/mime-type</value>
+         </values-param>
+         
       </init-params>
    </component>
 

Modified: jcr/branches/1.15.x/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/protocols/webdav.xml
===================================================================
--- jcr/branches/1.15.x/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/protocols/webdav.xml	2012-01-17 13:28:57 UTC (rev 5469)
+++ jcr/branches/1.15.x/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/protocols/webdav.xml	2012-01-17 14:06:21 UTC (rev 5470)
@@ -1,58 +1,79 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- This document was created with Syntext Serna Free. --><!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" []>
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- This document was created with Syntext Serna Free. -->
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
 <chapter id="JCR.WebDAV">
-<?dbhtml filename="ch-webdav.html"?>  <title>WebDAV</title>
+  <?dbhtml filename="ch-webdav.html"?>
+
+  <title>WebDAV</title>
+
   <section>
     <title>Related documents</title>
+
     <itemizedlist>
       <listitem>
-        <para><link linkend="JCR.LinkProducerService">Link Producer</link></para>
+        <para><link linkend="JCR.LinkProducerService">Link
+        Producer</link></para>
       </listitem>
     </itemizedlist>
   </section>
+
   <section>
     <title>Introduction</title>
+
     <para>The WebDAV protocol enables you to use the third party tools to
     communicate with hierarchical content servers via HTTP. It is possible to
     add and remove documents or a set of documents from a path on the server.
     DeltaV is an extension of the WebDav protocol that allows managing
     document versioning. Locking guarantees protection against multiple access
     when writing resources. The ordering support allows changing the position
-    of the resource in the list and sort the directory  to make  the directory tree viewed  conveniently. The full-text search makes it easy to find the
+    of the resource in the list and sort the directory to make the directory
+    tree viewed conveniently. The full-text search makes it easy to find the
     necessary documents. You can search by using two languages: SQL and
     XPATH.</para>
+
     <para>In eXo JCR, we plug in the WebDAV layer - based on the code taken
     from the extension modules of the reference implementation - on the top of
     our JCR implementation so that it is possible to browse a workspace using
     the third party tools (it can be Windows folders or Mac ones as well as a
     Java WebDAV client, such as DAVExplorer or IE using File-&gt;Open as a Web
     Folder).</para>
+
     <para>Now WebDav is an extension of the REST service. To get the WebDav
     server ready, you must deploy the REST application. Then, you can access
     any workspaces of your repository by using the following URL:</para>
+
     <para>Standalone mode:</para>
+
     <para><uri>http://host:port/rest/jcr/{RepositoryName}/{WorkspaceName}/{Path}</uri></para>
+
     <para>Portal mode:</para>
+
     <para><uri>http://host:port/portal/rest/private/jcr/{RepositoryName}/{WorkspaceName}/{Path}</uri></para>
-    <para>When accessing the WebDAV server with the  URL<uri>http://localhost:8080/rest/jcr/repository/production</uri>, you might
-    also use &quot;collaboration&quot; (instead of &quot;production&quot;) which is the default
-    workspace in eXo products. You will be asked to enter your  login and
-    password. Those will then be checked by using the organization service
-    that can be implemented thanks to an InMemory (dummy) module or a  DB module
-    or an LDAP one and the JCR user session will be created with the correct JCR
-    Credentials.</para>
+
+    <para>When accessing the WebDAV server with the
+    URL<uri>http://localhost:8080/rest/jcr/repository/production</uri>, you
+    might also use "collaboration" (instead of "production") which is the
+    default workspace in eXo products. You will be asked to enter your login
+    and password. Those will then be checked by using the organization service
+    that can be implemented thanks to an InMemory (dummy) module or a DB
+    module or an LDAP one and the JCR user session will be created with the
+    correct JCR Credentials.</para>
+
     <note>
-      <para>If you try the &quot;in ECM&quot;
-    option, add &quot;@ecm&quot; to the user&apos;s password. Alternatively, you may modify
-    jaas.conf by adding the <emphasis role="bold">domain=ecm</emphasis> option
-    as follows:</para>
+      <para>If you try the "in ECM" option, add "@ecm" to the user's password.
+      Alternatively, you may modify jaas.conf by adding the <emphasis
+      role="bold">domain=ecm</emphasis> option as follows:</para>
+
       <programlisting>exo-domain {
      org.exoplatform.services.security.jaas.BasicLoginModule required domain=ecm;
 };</programlisting>
     </note>
   </section>
+
   <section>
     <title>Configuration</title>
+
     <programlisting language="xml">&lt;component&gt;
   &lt;key&gt;org.exoplatform.services.webdav.WebDavServiceImpl&lt;/key&gt;
   &lt;type&gt;org.exoplatform.services.webdav.WebDavServiceImpl&lt;/type&gt;
@@ -68,7 +89,7 @@
     &lt;!-- this is the value of WWW-Authenticate header --&gt;
     &lt;value-param&gt;
       &lt;name&gt;auth-header&lt;/name&gt;
-      &lt;value&gt;Basic realm=&quot;eXo-Platform Webdav Server 1.6.1&quot;&lt;/value&gt;
+      &lt;value&gt;Basic realm="eXo-Platform Webdav Server 1.6.1"&lt;/value&gt;
     &lt;/value-param&gt;
 
     &lt;!-- default node type which is used for the creation of collections --&gt;
@@ -83,7 +104,7 @@
       &lt;value&gt;nt:file&lt;/value&gt;
     &lt;/value-param&gt;
 
-    &lt;!-- if MimeTypeResolver can&apos;t find the required mime type, 
+    &lt;!-- if MimeTypeResolver can't find the required mime type, 
          which conforms with the file extension, and the mimeType header is absent
          in the HTTP request header, this parameter is used 
          as the default mime type--&gt;
@@ -93,9 +114,9 @@
     &lt;/value-param&gt;
 
     &lt;!-- This parameter indicates one of the three cases when you update the content of the resource by PUT command.
-         In case of &quot;create-version&quot;, PUT command creates the new version of the resource if this resource exists.
-         In case of &quot;replace&quot; - if the resource exists, PUT command updates the content of the resource and its last modification date.
-         In case of &quot;add&quot;, the PUT command tries to create the new resource with the same name (if the parent node allows same-name siblings).--&gt;
+         In case of "create-version", PUT command creates the new version of the resource if this resource exists.
+         In case of "replace" - if the resource exists, PUT command updates the content of the resource and its last modification date.
+         In case of "add", the PUT command tries to create the new resource with the same name (if the parent node allows same-name siblings).--&gt;
 
     &lt;value-param&gt;
       &lt;name&gt;update-policy&lt;/name&gt;
@@ -106,8 +127,8 @@
 
     &lt;!--
         This parameter determines how service responds to a method that attempts to modify file content.
-        In case of &quot;checkout-checkin&quot; value, when a modification request is applied to a checked-in version-controlled resource, the request is automatically preceded by a checkout and followed by a checkin operation.
-        In case of &quot;checkout&quot; value, when a modification request is applied to a checked-in version-controlled resource, the request is automatically preceded by a checkout operation.
+        In case of "checkout-checkin" value, when a modification request is applied to a checked-in version-controlled resource, the request is automatically preceded by a checkout and followed by a checkin operation.
+        In case of "checkout" value, when a modification request is applied to a checked-in version-controlled resource, the request is automatically preceded by a checkout operation.
     --&gt;         
     &lt;value-param&gt;
       &lt;name&gt;auto-version&lt;/name&gt;
@@ -117,7 +138,7 @@
 
     &lt;!--
         This parameter is responsible for managing Cache-Control header value which will be returned to the client.
-        You can use patterns like &quot;text/*&quot;, &quot;image/*&quot; or wildcard to define the type of content.
+        You can use patterns like "text/*", "image/*" or wildcard to define the type of content.
     --&gt;  
     &lt;value-param&gt;
       &lt;name&gt;cache-control&lt;/name&gt;
@@ -133,209 +154,313 @@
       &lt;value&gt;/absolute/path/to/file&lt;/value&gt;
     &lt;/value-param&gt;
 
+    &lt;!--
+        This parameter is responsible for definition of read-only mime-type properties.
+        That basically means that all mime-types mentioned here will be set as read-only properties
+        (i. e. you cannot change resource's mime-type after it is set).
+    --&gt;
+    &lt;values-param&gt;
+      &lt;name&gt;read-only-mime-types&lt;/name&gt;
+      &lt;value&gt;application/vnd.openxmlformats-officedocument.wordprocessingml.document&lt;/value&gt;
+    &lt;/values-param&gt;
+
   &lt;/init-params
 &lt;/component&gt;</programlisting>
   </section>
+
   <section>
     <title>Screenshots</title>
-    <para>At present, eXo JCR WebDav server is  tested by using MS Internet
-    Explorer, <ulink url="http://www.ics.uci.edu/~webdav">Dav Explorer</ulink>, <ulink url="http://www.xythos.com/home/xythos/products/xythos_drive.html">Xythos Drive</ulink>, Microsoft Office 2003 (as client), and Ubuntu Linux.</para>
+
+    <para>At present, eXo JCR WebDav server is tested by using MS Internet
+    Explorer, <ulink url="http://www.ics.uci.edu/~webdav">Dav
+    Explorer</ulink>, <ulink
+    url="http://www.xythos.com/home/xythos/products/xythos_drive.html">Xythos
+    Drive</ulink>, Microsoft Office 2003 (as client), and Ubuntu Linux.</para>
+
     <section>
       <title>MS Internet Explorer</title>
+
       <para>(File -&gt; Open as Web Folder)</para>
+
       <mediaobject>
         <imageobject>
-          <imagedata fileref="images/protocols/webdav_explorer.jpg"/>
+          <imagedata fileref="images/protocols/webdav_explorer.jpg" />
         </imageobject>
       </mediaobject>
     </section>
+
     <section>
       <title>Dav Explorer</title>
+
       <mediaobject>
         <imageobject>
-          <imagedata fileref="images/protocols/webdav_davexplorer.jpg"/>
+          <imagedata fileref="images/protocols/webdav_davexplorer.jpg" />
         </imageobject>
       </mediaobject>
     </section>
+
     <section>
       <title>Xythos Drive</title>
+
       <mediaobject>
         <imageobject>
-          <imagedata fileref="images/protocols/webdav_xythosdrive.jpg"/>
+          <imagedata fileref="images/protocols/webdav_xythosdrive.jpg" />
         </imageobject>
       </mediaobject>
     </section>
+
     <section>
       <title>Microsoft Office 2003</title>
+
       <para>(as client) (File-&gt;Open with typing http://... href in the file
       name box)</para>
+
       <mediaobject>
         <imageobject>
-          <imagedata fileref="images/protocols/webdav_msoffice2003.jpg"/>
+          <imagedata fileref="images/protocols/webdav_msoffice2003.jpg" />
         </imageobject>
       </mediaobject>
     </section>
+
     <section>
       <title>Ubuntu Linux</title>
+
       <mediaobject>
         <imageobject>
-          <imagedata fileref="images/protocols/webdav_ubuntulinux.jpg"/>
+          <imagedata fileref="images/protocols/webdav_ubuntulinux.jpg" />
         </imageobject>
       </mediaobject>
     </section>
   </section>
+
   <section>
     <title>Comparison table of WebDav and JCR commands</title>
+
     <table>
-      <title/>
+      <title></title>
+
       <tgroup cols="2">
         <thead>
           <row>
             <entry>WebDav</entry>
+
             <entry>JCR</entry>
           </row>
         </thead>
+
         <tbody>
           <row>
             <entry>COPY</entry>
+
             <entry>Workspace.copy(...)</entry>
           </row>
+
           <row>
             <entry>DELETE</entry>
+
             <entry>Node.remove()</entry>
           </row>
+
           <row>
             <entry>GET</entry>
+
             <entry>Node.getProperty(...); Property.getValue()</entry>
           </row>
+
           <row>
             <entry>HEAD</entry>
+
             <entry>Node.getProperty(...); Property.getLength()</entry>
           </row>
+
           <row>
             <entry>MKCOL</entry>
+
             <entry>Node.addNode(...)</entry>
           </row>
+
           <row>
             <entry>MOVE</entry>
+
             <entry>Session.move(...) or Workspace.move(...)</entry>
           </row>
+
           <row>
             <entry>PROPFIND</entry>
-            <entry>Session.getNode(...); Node.getNode(...); Node.getNodes(...); Node.getProperties()</entry>
+
+            <entry>Session.getNode(...); Node.getNode(...);
+            Node.getNodes(...); Node.getProperties()</entry>
           </row>
+
           <row>
             <entry>PROPPATCH</entry>
-            <entry>Node.setProperty(...); Node.getProperty(...).remove()</entry>
+
+            <entry>Node.setProperty(...);
+            Node.getProperty(...).remove()</entry>
           </row>
+
           <row>
             <entry>PUT</entry>
-            <entry>Node.addNode(&quot;node&quot;,&quot;nt:file&quot;); Node.setProperty(&quot;jcr:data&quot;, &quot;data&quot;)</entry>
+
+            <entry>Node.addNode("node","nt:file");
+            Node.setProperty("jcr:data", "data")</entry>
           </row>
+
           <row>
             <entry>CHECKIN</entry>
+
             <entry>Node.checkin()</entry>
           </row>
+
           <row>
             <entry>CHECKOUT</entry>
+
             <entry>Node.checkout()</entry>
           </row>
+
           <row>
             <entry>REPORT</entry>
-            <entry>Node.getVersionHistory(); VersionHistory.getAllVersions(); Version.getProperties()</entry>
+
+            <entry>Node.getVersionHistory(); VersionHistory.getAllVersions();
+            Version.getProperties()</entry>
           </row>
+
           <row>
             <entry>RESTORE</entry>
+
             <entry>Node.restore(...)</entry>
           </row>
+
           <row>
             <entry>UNCHECKOUT</entry>
+
             <entry>Node.restore(...)</entry>
           </row>
+
           <row>
             <entry>VERSION-CONTROL</entry>
-            <entry>Node.addMixin(&quot;mix:versionable&quot;)</entry>
+
+            <entry>Node.addMixin("mix:versionable")</entry>
           </row>
+
           <row>
             <entry>LOCK</entry>
+
             <entry>Node.lock(...)</entry>
           </row>
+
           <row>
             <entry>UNLOCK</entry>
+
             <entry>Node.unlock()</entry>
           </row>
+
           <row>
             <entry>ORDERPATCH</entry>
+
             <entry>Node.orderBefore(...)</entry>
           </row>
+
           <row>
             <entry>SEARCH</entry>
-            <entry>Workspace.getQueryManager(); QueryManager.createQuery(); Query.execute()</entry>
+
+            <entry>Workspace.getQueryManager(); QueryManager.createQuery();
+            Query.execute()</entry>
           </row>
         </tbody>
       </tgroup>
     </table>
   </section>
+
   <section>
     <title>Restrictions</title>
+
     <para>There are some restrictions for WebDAV in different Operating
     systems.</para>
+
     <section>
       <title>Windows 7</title>
+
       <para>When you try to set up a web folder by “adding a network location”
       or “map a network drive” through My Computer, you can get an error
-      message saying that either “The folder you entered does not appear to be valid.
-      Please choose another” or “Windows cannot access… Check the spelling of
-      the name. Otherwise, there might be…”. These errors may  appear when you are
-      using SSL or non-SSL.</para>
-      <para>To fix this,   do as follows:</para>
+      message saying that either “The folder you entered does not appear to be
+      valid. Please choose another” or “Windows cannot access… Check the
+      spelling of the name. Otherwise, there might be…”. These errors may
+      appear when you are using SSL or non-SSL.</para>
+
+      <para>To fix this, do as follows:</para>
+
       <orderedlist>
         <listitem>
           <para>Go to Windows Registry Editor.</para>
         </listitem>
+
         <listitem>
           <para>Find a key:
           \HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlset\services\WebClient\Parameters\BasicAuthLevel
           .</para>
         </listitem>
+
         <listitem>
           <para>Change the value to 2.</para>
         </listitem>
       </orderedlist>
     </section>
-        <section>
+
+    <section>
       <title>Microsoft Office 2010</title>
-      <para>If you have Microsoft Office 2010 applications or Microsoft Office 2007 applications installed on a client computer. From that client computer, you try to access an Office file that is stored on a web server that is configured for Basic authentication. The connection between your computer and the web server does not use Secure Sockets Layer (SSL). When you try to open or to download the file, you experience the following symptoms:
-        <itemizedlist>
+
+      <para>If you have Microsoft Office 2010 applications or Microsoft Office
+      2007 applications installed on a client computer. From that client
+      computer, you try to access an Office file that is stored on a web
+      server that is configured for Basic authentication. The connection
+      between your computer and the web server does not use Secure Sockets
+      Layer (SSL). When you try to open or to download the file, you
+      experience the following symptoms: <itemizedlist>
           <listitem>
             <para>The Office file does not open or download.</para>
-          </listitem> 
+          </listitem>
+
           <listitem>
-            <para>You do not receive a Basic authentication password prompt when you try to open or to download the file.</para>
+            <para>You do not receive a Basic authentication password prompt
+            when you try to open or to download the file.</para>
           </listitem>
+
           <listitem>
-            <para>You do not receive an error message when you try to open the file. The associated Office application starts. However, the selected file does not open.</para>
+            <para>You do not receive an error message when you try to open the
+            file. The associated Office application starts. However, the
+            selected file does not open.</para>
           </listitem>
-        </itemizedlist>
-      </para>
-      <para>To enable Basic authentication on the client computer, follow these steps:</para>
+        </itemizedlist></para>
+
+      <para>To enable Basic authentication on the client computer, follow
+      these steps:</para>
+
       <orderedlist>
         <listitem>
-          <para>Click Start, type regedit in the Start Search box, and then press Enter.</para>
+          <para>Click Start, type regedit in the Start Search box, and then
+          press Enter.</para>
         </listitem>
+
         <listitem>
-          <para>Locate and then click the following registry subkey: </para>
+          <para>Locate and then click the following registry subkey:</para>
+
           <para>HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\Common\Internet</para>
         </listitem>
+
         <listitem>
-          <para>On the Edit menu, point to New, and then click DWORD Value.</para>
+          <para>On the Edit menu, point to New, and then click DWORD
+          Value.</para>
         </listitem>
+
         <listitem>
           <para>Type BasicAuthLevel, and then press Enter.</para>
         </listitem>
+
         <listitem>
           <para>Right-click BasicAuthLevel, and then click Modify.</para>
         </listitem>
+
         <listitem>
           <para>In the Value data box, type 2, and then click OK.</para>
         </listitem>



More information about the exo-jcr-commits mailing list