You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-dev@jakarta.apache.org by re...@locus.apache.org on 2000/09/24 19:20:09 UTC
cvs commit: jakarta-slide/src/share/org/apache/slide/content NodeRevisionDescriptor.java
remm 00/09/24 10:20:08
Modified: src/conf/webapp Domain.xml
src/doc conf-lib.xml project.xml
src/doc/samples avalon-conf.sample noavalon-conf.sample
src/share/org/apache/slide/content
NodeRevisionDescriptor.java
Added: src/doc installation.xml
Log:
- Doc fixes
- Fix for a date format problem
- Fix the documentation samples
Revision Changes Path
1.3 +0 -4 jakarta-slide/src/conf/webapp/Domain.xml
Index: Domain.xml
===================================================================
RCS file: /home/cvs/jakarta-slide/src/conf/webapp/Domain.xml,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- Domain.xml 2000/09/23 07:41:31 1.2
+++ Domain.xml 2000/09/24 17:20:06 1.3
@@ -54,10 +54,6 @@
<objectnode classname="org.apache.slide.structure.SubjectNode"
uri="/users">
- <revision>
- <property name="password">root</property>
- </revision>
-
<!-- /users/root represents the administrator -->
<objectnode classname="org.apache.slide.structure.SubjectNode"
1.10 +7 -60 jakarta-slide/src/doc/conf-lib.xml
Index: conf-lib.xml
===================================================================
RCS file: /home/cvs/jakarta-slide/src/doc/conf-lib.xml,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- conf-lib.xml 2000/09/23 07:41:37 1.9
+++ conf-lib.xml 2000/09/24 17:20:06 1.10
@@ -2,9 +2,9 @@
<document url="./conf-lib.xml">
<body>
- <title>First Steps with Slide</title>
+ <title>Slide Configuration</title>
- <section title="The Slide properties file">
+ <section title="The slide.properties file">
<p>
Slide uses a configuration file for environmental properties that
@@ -14,7 +14,7 @@
security of the slide.proporties file is crucial, and access to it
should be restricted to the server administrator. These properties are
specified in a Java properties file with the name
- <tt>slide.properties</tt>.
+ <tt>org.apache.slide.slide.properties</tt>.
</p>
<p>
@@ -61,59 +61,6 @@
</section>
- <section title="Dependencies with external libraries">
-
- <p>
- Slide has dependencies to some external function libraries. Some of
- these dependencies are both compile-time and runtime dependencies,
- while some are only runtime dependencies. Some build options also
- require additional external libraries.
- </p>
-
- <section title="Slide">
-
- <p>
- Slide depends on the following software libraries at build time :
- <ul>
- <li>Sun JAXP 1.0.1</li>
- <li>Sun Servlet API 2.2</li>
- <li>Apache Avalon 2.2 (avalon-dist target only)</li>
- <li>Jakarta Tomcat 4.0 (catalina-dist target only)</li>
- </ul>
- </p>
-
- <p>
- Slide depends on the following software libraries at run time :
- <ul>
- <li>Sun JAXP 1.0.1</li>
- <li>A JAXP-compliant XML parser</li>
- <li>Sun Servlet API 2.2 compliant servlet implementation to run
- the DAV servlet</li>
- <li>Apache Avalon 2.2 (Avalon based distribution only)</li>
- <li>Jakarta Tomcat 4.0 (Catalina based distribution only)</li>
- </ul>
- </p>
-
- <p>
- Slide can be managed at run time if it is run on top of a management
- framework like Apache Avalon or Sun JMX (in a future Slide release).
- </p>
-
- <p>
- As said above, the requirements for the various build options can
- vary. Some might require :
- <ul>
- <li>Tomcat Catalina</li>
- <li>Apache Avalon</li>
- <li>A properly installed Avalon full distribution</li>
- <li>A JMX MBean server, and the JMX libraries</li>
- </ul>
- Additional dependencies will probably be added as more deployment
- scenarios are supported.
- </p>
-
- </section>
-
<section title="Services">
<p>
@@ -162,8 +109,6 @@
</section>
- </section>
-
<section title="The Domain configuration file">
<p>
@@ -545,11 +490,13 @@
</section>
- <section title="With Avalon (not implemented yet)">
+ <section title="With Avalon">
<p>
Sample configuration file :
- <a href="samples/avalon-conf.sample">click here</a>.
+ <a href="samples/avalon-conf.sample">click here</a>. This file
+ includes only the Avalon specific parts. The namespace declarations
+ have to be inserted where indicated in the file.
</p>
<p>
1.11 +1 -0 jakarta-slide/src/doc/project.xml
Index: project.xml
===================================================================
RCS file: /home/cvs/jakarta-slide/src/doc/project.xml,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- project.xml 2000/09/21 22:46:29 1.10
+++ project.xml 2000/09/24 17:20:07 1.11
@@ -19,6 +19,7 @@
<item name="Library" href="library.xml"/>
</menu>
<menu name="User's Guide">
+ <item name="Installation" href="installation.xml"/>
<item name="Configuration" href="conf-lib.xml"/>
<item name="FAQ" href="faq.xml"/>
<item name="Examples" href="examples.xml"/>
1.1 jakarta-slide/src/doc/installation.xml
Index: installation.xml
===================================================================
<?xml version="1.0" encoding="ISO-8859-1"?>
<document url="./installation.xml">
<body>
<title>Installation</title>
<section title="Dependencies">
<p>
Slide has dependencies to some external function libraries. Some of
these dependencies are both compile-time and runtime dependencies,
while some are only runtime dependencies. Some build options also
require additional external libraries.
</p>
<p>
Slide depends on the following software libraries at build time :
<ul>
<li>Sun JAXP 1.0.1</li>
<li>Sun Servlet API 2.2</li>
<li>Apache Avalon 2.2 ("avalon-dist" target only)</li>
<li>Jakarta Tomcat 4.0 ("catalina-dist" target only)</li>
</ul>
</p>
<p>
Slide depends on the following software libraries at run time :
<ul>
<li>Sun JAXP 1.0.1</li>
<li>A JAXP-compliant XML parser</li>
<li>Sun Servlet API 2.2 compliant servlet implementation to run
the DAV servlet</li>
<li>Apache Avalon 2.2 (Avalon based distribution only)</li>
<li>Jakarta Tomcat 4.0 (Catalina based distribution only)</li>
</ul>
</p>
<p>
Slide can be managed at run time if it is run on top of a management
framework like Apache Avalon or Sun JMX.
</p>
<p>
As said above, the requirements for the various build options can
vary. Some might require :
<ul>
<li>Tomcat Catalina</li>
<li>Apache Avalon</li>
<li>A JMX MBean server, and the JMX libraries</li>
</ul>
Additional dependencies could be added as more deployment
scenarios are supported.
</p>
</section>
<section title="Slide">
<p>
If you want to build an application which uses the Slide API, just add
the slide.jar to your classpath. Then, be sure to put the domain
configuration file in the appropriate directory. By default, it is a
file called "Domain.xml" placed in the directory from which the JVM is
started.
</p>
</section>
<section title="WebDAV Servlet">
<p>
The WebDAV servlet requires a servlet container which supports at least
the 2.2 API. The easiest solution is to use the web application archive
which is included in the slide distribution (webapp/slide.war) and deploy
it in your servlet container. The WAR file contains a "Domain.xml" file
which should be modified to configure the domain.
</p>
</section>
</body>
</document>
1.2 +24 -94 jakarta-slide/src/doc/samples/avalon-conf.sample
Index: avalon-conf.sample
===================================================================
RCS file: /home/cvs/jakarta-slide/src/doc/samples/avalon-conf.sample,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- avalon-conf.sample 2000/07/07 22:47:56 1.1
+++ avalon-conf.sample 2000/09/24 17:20:07 1.2
@@ -1,99 +1,29 @@
<?xml version="1.0"?>
<avalon>
-
- <servicesmap>
-
- <service name="Slide">
- <resource type="org.apache.avalon.blocks.Logger"
- mapTo="ApacheDefaultLogger"/>
- </service>
-
- </servicesmap>
-
- <blocks>
-
- <block class="org.apache.slide.common.SlideBlock"
- name="Slide"
- implementedInterface="org.apache.slide.common.Slide"
- help="Slide server">
-
- <!-- Insert here the definitions of the namespaces -->
-
- <namespace name="webdav">
-
- <definition>
-
- <!--descriptorsstore
- name="database"
- classname="org.apache.slide.store.DescriptorsStoreDatabaseImpl">
- <parameter name="driver">org.hsql.jdbcDriver</parameter>
- <parameter name="url">HypersonicSQL:database</parameter>
- <parameter name="user">sa</parameter>
- <parameter name="password"></parameter>
- </descriptorsstore-->
-
- <descriptorsstore
- name="memory"
- classname="org.apache.slide.store.DescriptorsStoreMemoryImpl"/>
-
- <contentstore
- name="file"
- classname="org.apache.slide.store.ContentStoreFilesystemImpl">
- <parameter name="rootpath">files</parameter>
- </contentstore>
-
- <!--contentstore
- name="tempfiles"
- classname="org.apache.slide.store.ContentStoreFilesystemImpl">
- <parameter name="rootpath">tempfiles</parameter>
- </contentstore-->
-
- <scope
- match="/"
- descriptorsstore="memory"
- contentstore="file"/>
- <!--scope
- match="/files/temp"
- descriptorsstore="memory"
- contentstore="tempfiles"/-->
-
- </definition>
-
- <configuration>
- <default-action>/actions</default-action>
- <userspath>/users</userspath>
- <filespath></filespath>
- <parameter name="dav">true</parameter>
- <parameter name="standalone">true</parameter>
- </configuration>
-
- <data>
-
- <objectnode
- classname="org.apache.slide.structure.SubjectNode"
- uri="/">
- <permission
- action="/actions"
- subject="/users/root"/>
- <objectnode
- classname="org.apache.slide.structure.SubjectNode"
- uri="/users">
- <objectnode
- classname="org.apache.slide.structure.SubjectNode"
- uri="/users/root"/>
- </objectnode>
- <objectnode
- classname="org.apache.slide.structure.ActionNode"
- uri="/actions"/>
- </objectnode>
-
- </data>
-
- </namespace>
-
- </block>
-
- </blocks>
+
+ <servicesmap>
+
+ <service name="Slide">
+ <resource type="org.apache.avalon.blocks.Logger"
+ mapTo="ApacheDefaultLogger"/>
+ </service>
+
+ </servicesmap>
+
+ <blocks>
+
+ <block class="org.apache.slide.common.SlideBlock"
+ name="Slide"
+ implementedInterface="org.apache.slide.common.Slide"
+ help="Slide server">
+
+ <!-- Insert here the definitions of the namespaces -->
+
+
+
+ </block>
+
+ </blocks>
</avalon>
1.2 +113 -67 jakarta-slide/src/doc/samples/noavalon-conf.sample
Index: noavalon-conf.sample
===================================================================
RCS file: /home/cvs/jakarta-slide/src/doc/samples/noavalon-conf.sample,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- noavalon-conf.sample 2000/07/07 22:47:56 1.1
+++ noavalon-conf.sample 2000/09/24 17:20:07 1.2
@@ -1,71 +1,117 @@
<?xml version="1.0"?>
<slide>
-
- <namespace name="webdav">
-
- <definition>
-
- <!--descriptorsstore
- name="database"
- classname="org.apache.slide.store.DescriptorsStoreDatabaseImpl">
- <parameter name="driver">org.hsql.jdbcDriver</parameter>
- <parameter name="url">HypersonicSQL:database</parameter>
- <parameter name="user">sa</parameter>
- <parameter name="password"></parameter>
- </descriptorsstore-->
-
- <descriptorsstore
- name="memory"
- classname="org.apache.slide.store.DescriptorsStoreMemoryImpl"/>
-
- <contentstore
- name="file"
- classname="org.apache.slide.store.ContentStoreFilesystemImpl">
- <parameter name="rootpath">files</parameter>
- </contentstore>
-
- <scope
- match="/"
- descriptorsstore="memory"
- contentstore="file"/>
- <!--scope
- match="/files/temp"
- descriptorsstore="memory"
- contentstore="tempfiles"/-->
-
- </definition>
-
- <configuration>
- <default-action>/actions</default-action>
- <userspath>/users</userspath>
- <filespath></filespath>
- <parameter name="dav">true</parameter>
- <parameter name="standalone">true</parameter>
- </configuration>
-
- <data>
-
- <objectnode
- classname="org.apache.slide.structure.SubjectNode"
- uri="/">
- <permission
- action="/actions"
- subject="/users/root"/>
- <objectnode
- classname="org.apache.slide.structure.SubjectNode"
- uri="/users">
- <objectnode
- classname="org.apache.slide.structure.SubjectNode"
- uri="/users/root"/>
- </objectnode>
- <objectnode
- classname="org.apache.slide.structure.ActionNode"
- uri="/actions"/>
- </objectnode>
-
- </data>
-
- </namespace>
-
+
+ <namespace name="webdav">
+
+ <definition>
+
+ <descriptorsstore name="memory" />
+
+ <contentstore name="file"
+ classname="org.apache.slide.store.ContentStoreFilesystemImpl">
+ <parameter name="rootpath">files</parameter>
+ </contentstore>
+
+ <scope match="/" descriptorsstore="memory" contentstore="file"/>
+
+ </definition>
+
+ <configuration>
+ <default-action>/actions</default-action>
+ <read-object>/actions/read</read-object>
+ <create-object>/actions/write</create-object>
+ <remove-object>/actions/write</remove-object>
+ <grant-permission>/actions/manage</grant-permission>
+ <revoke-permission>/actions/manage</revoke-permission>
+ <read-permissions>/actions/manage</read-permissions>
+ <lock-object>/actions/write</lock-object>
+ <kill-lock>/actions/manage</kill-lock>
+ <read-locks>/actions/read</read-locks>
+ <read-revision-metadata>/actions/read</read-revision-metadata>
+ <create-revision-metadata>/actions/write</create-revision-metadata>
+ <modify-revision-metadata>/actions/write</modify-revision-metadata>
+ <remove-revision-metadata>/actions/write</remove-revision-metadata>
+ <read-revision-content>/actions/read</read-revision-content>
+ <create-revision-content>/actions/write</create-revision-content>
+ <modify-revision-content>/actions/write</modify-revision-content>
+ <remove-revision-content>/actions/write</remove-revision-content>
+ <userspath>/users</userspath>
+ <filespath></filespath>
+ <parameter name="dav">true</parameter>
+ <parameter name="standalone">true</parameter>
+ </configuration>
+
+ <data>
+
+ <objectnode classname="org.apache.slide.structure.SubjectNode" uri="/">
+
+ <permission action="/actions" subject="/users/root"/>
+ <permission action="/actions/read" subject="/users"/>
+
+ <!-- /users represents the unauthenticated user -->
+
+ <objectnode classname="org.apache.slide.structure.SubjectNode"
+ uri="/users">
+
+ <revision>
+ <property name="password">root</property>
+ </revision>
+
+ <!-- /users/root represents the administrator -->
+
+ <objectnode classname="org.apache.slide.structure.SubjectNode"
+ uri="/users/root">
+ <revision>
+ <property name="password">root</property>
+ </revision>
+ </objectnode>
+
+ <!-- /users/john represents an authenticated user -->
+
+ <objectnode classname="org.apache.slide.structure.SubjectNode"
+ uri="/users/john">
+ <revision>
+ <property name="password">john</property>
+ </revision>
+ </objectnode>
+
+ <!-- /users/guest represents an authenticated guest user -->
+
+ <objectnode classname="org.apache.slide.structure.SubjectNode"
+ uri="/users/guest">
+ <revision>
+ <property name="password"></property>
+ </revision>
+ </objectnode>
+
+ </objectnode>
+
+ <objectnode classname="org.apache.slide.structure.ActionNode"
+ uri="/actions">
+
+ <objectnode classname="org.apache.slide.structure.ActionNode"
+ uri="/actions/read"/>
+
+ <objectnode classname="org.apache.slide.structure.ActionNode"
+ uri="/actions/write"/>
+
+ <objectnode classname="org.apache.slide.structure.ActionNode"
+ uri="/actions/manage"/>
+
+ </objectnode>
+
+ <objectnode classname="org.apache.slide.structure.SubjectNode"
+ uri="/files">
+
+ <permission action="/actions/write" subject="/users/john"/>
+
+ </objectnode>
+
+ </objectnode>
+
+ </data>
+
+ </namespace>
+
</slide>
1.5 +15 -6 jakarta-slide/src/share/org/apache/slide/content/NodeRevisionDescriptor.java
Index: NodeRevisionDescriptor.java
===================================================================
RCS file: /home/cvs/jakarta-slide/src/share/org/apache/slide/content/NodeRevisionDescriptor.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- NodeRevisionDescriptor.java 2000/09/04 23:49:10 1.4
+++ NodeRevisionDescriptor.java 2000/09/24 17:20:08 1.5
@@ -1,7 +1,7 @@
/*
- * $Header: /home/cvs/jakarta-slide/src/share/org/apache/slide/content/NodeRevisionDescriptor.java,v 1.4 2000/09/04 23:49:10 remm Exp $
- * $Revision: 1.4 $
- * $Date: 2000/09/04 23:49:10 $
+ * $Header: /home/cvs/jakarta-slide/src/share/org/apache/slide/content/NodeRevisionDescriptor.java,v 1.5 2000/09/24 17:20:08 remm Exp $
+ * $Revision: 1.5 $
+ * $Date: 2000/09/24 17:20:08 $
*
* ====================================================================
*
@@ -69,13 +69,15 @@
import java.util.Vector;
import java.util.Date;
import java.util.StringTokenizer;
+import java.util.Locale;
+import java.text.SimpleDateFormat;
import org.apache.slide.common.*;
/**
* Node Revision Descriptor class.
*
* @author <a href="mailto:remm@exoffice.com">Remy Maucherat</a>
- * @version $Revision: 1.4 $
+ * @version $Revision: 1.5 $
*/
public final class NodeRevisionDescriptor implements Serializable, Cloneable {
@@ -143,6 +145,13 @@
public static final String COLLECTION_TYPE = "<collection/>";
+ /**
+ * HTTP date format.
+ */
+ protected static final SimpleDateFormat format =
+ new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss zzz", Locale.US);
+
+
// ----------------------------------------------------------- Constructors
@@ -717,13 +726,13 @@
private void initDefaultProperties() {
- setCreationDate(new Date());
+ setCreationDate(format.format(new Date()));
setName("");
// By default, a resource is a collection
setProperty(TYPE, "<collection/>", true);
setProperty(SOURCE, "", true);
setContentLength(0);
- setLastModified(new Date());
+ setLastModified(format.format(new Date()));
}