Skip to content

Commit

Permalink
Improve javadoc
Browse files Browse the repository at this point in the history
Document WebDAV with listings since otherwise it won't really work.
Add the test schema for the database since it's a working example.
  • Loading branch information
rmaucher committed Jan 16, 2025
1 parent ea7c2bd commit 41eb324
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 10 deletions.
23 changes: 17 additions & 6 deletions java/org/apache/catalina/servlets/DataSourcePropertyStore.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,23 @@
/**
* WebDAV dead properties storage using a DataSource.
* <p>
* The schema is:
* table properties ( path, namespace, name, node )
* path: the resource path
* namespace: the node namespace
* name: the local name in the namespace
* node: the full serialized XML node including the name
* A single properties table with four columns is used:
* <ul>
* <li>path: the resource path</li>
* <li>namespace: the node namespace</li>
* <li>name: the local name in the namespace</li>
* <li>node: the full serialized XML node including the name</li>
* </ul>
* The table name used can be configured using the <code>tableName</code> property of the store.
* <p>
* Example table schema:
* <code>CREATE TABLE properties (
* path VARCHAR(1024) NOT NULL,
* namespace VARCHAR(64) NOT NULL,
* name VARCHAR(64) NOT NULL,
* node VARCHAR(2048) NOT NULL,
* PRIMARY KEY (path, namespace, name)
* )</code>
*/
public class DataSourcePropertyStore implements WebdavServlet.PropertyStore {

Expand Down
8 changes: 4 additions & 4 deletions java/org/apache/catalina/servlets/WebdavServlet.java
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
* &lt;/init-param&gt;
* &lt;init-param&gt;
* &lt;param-name&gt;listings&lt;/param-name&gt;
* &lt;param-value&gt;false&lt;/param-value&gt;
* &lt;param-value&gt;true&lt;/param-value&gt;
* &lt;/init-param&gt;
* &lt;/servlet&gt;
* &lt;servlet-mapping&gt;
Expand All @@ -104,7 +104,7 @@
* &lt;/servlet-mapping&gt;
* </pre>
*
* This will enable read only access. To enable read-write access add:
* This will enable read only access with folder listings enabled. To enable read-write access add:
*
* <pre>
* &lt;init-param&gt;
Expand All @@ -122,7 +122,7 @@
* &lt;/servlet-mapping&gt;
* </pre>
*
* By default access to /WEB-INF and META-INF are not available via WebDAV. To enable access to these URLs, use add:
* By default access to /WEB-INF and META-INF are not available via WebDAV. To enable access to these URLs, add:
*
* <pre>
* &lt;init-param&gt;
Expand All @@ -142,7 +142,7 @@
* interface and configuring the Servlet to use that store. The <code>propertyStore</code> init-param allows configuring
* the classname of the store to use, while the parameters in the form of <code>store.xxx</code> will be set on the
* store object as bean properties. For example, this would configure a store with class
* <code>com.MyPropertyStore</code>, and set its field <code>myName</code> to value <code>myValue</code>:
* <code>com.MyPropertyStore</code>, and set its property <code>myName</code> to value <code>myValue</code>:
*
* <pre>
* &lt;init-param&gt;
Expand Down

0 comments on commit 41eb324

Please sign in to comment.