pnever 02/05/17 08:49:51
Modified: src/conf/webapp Domain.xml
src/share/org/apache/slide/common NamespaceConfig.java
Log:
Moved the DeltaV-specific namespace config parameters out of the
namespace to be now "global" parameters in the domain.
Revision Changes Path
1.32 +185 -199 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.31
retrieving revision 1.32
diff -u -r1.31 -r1.32
--- Domain.xml 3 May 2002 16:28:27 -0000 1.31
+++ Domain.xml 17 May 2002 15:49:51 -0000 1.32
@@ -1,8 +1,6 @@
<?xml version="1.0"?>
-
<slide logger="org.apache.slide.util.logger.SimpleLogger" logger-level="6"
default="slide">
-
-<!--
+ <!--
logger
~~~~~~
org.apache.slide.util.logger.SimpleLogger
@@ -20,45 +18,41 @@
6 INFO
7 DEBUG
-->
-
- <namespace name="slide">
-<!-- ### Memory Configuration ###
+ <namespace name="slide">
+ <!-- ### Memory Configuration ###
The following memory configuration uses the MemoryDescriptorsStore
for node,security,locks and revisions. For content the FileContentStore
is used. Content is reset before start.
-->
- <definition>
- <store name="memory">
- <nodestore classname="slidestore.reference.MemoryDescriptorsStore">
- </nodestore>
- <securitystore>
- <reference store="nodestore" />
- </securitystore>
- <lockstore>
- <reference store="nodestore" />
- </lockstore>
- <revisiondescriptorsstore>
- <reference store="nodestore" />
- </revisiondescriptorsstore>
- <revisiondescriptorstore>
- <reference store="nodestore" />
- </revisiondescriptorstore>
- <contentstore classname="slidestore.reference.FileContentStore">
- <parameter name="rootpath">contentstore</parameter>
- <parameter name="version">false</parameter>
- <parameter name="resetBeforeStarting">true</parameter>
- </contentstore>
- </store>
- <scope match="/" store="memory" />
- </definition>
-
-
-<!-- ### JDBC Configuration ###
+ <definition>
+ <store name="memory">
+ <nodestore
classname="slidestore.reference.MemoryDescriptorsStore"/>
+ <securitystore>
+ <reference store="nodestore"/>
+ </securitystore>
+ <lockstore>
+ <reference store="nodestore"/>
+ </lockstore>
+ <revisiondescriptorsstore>
+ <reference store="nodestore"/>
+ </revisiondescriptorsstore>
+ <revisiondescriptorstore>
+ <reference store="nodestore"/>
+ </revisiondescriptorstore>
+ <contentstore
classname="slidestore.reference.FileContentStore">
+ <parameter
name="rootpath">contentstore</parameter>
+ <parameter name="version">false</parameter>
+ <parameter
name="resetBeforeStarting">true</parameter>
+ </contentstore>
+ </store>
+ <scope match="/" store="memory"/>
+ </definition>
+ <!-- ### JDBC Configuration ###
The following jdbc sample configuration uses the hsql Database Engine
a relational database engine written in Java, for more info:
http://hsqldb.sourceforge.net/
-->
-<!--
+ <!--
<definition>
<store name="jdbc">
<nodestore classname="slidestore.reference.JDBCDescriptorsStore">
@@ -89,194 +83,186 @@
<scope match="/" store="jdbc" />
</definition>
-->
-
-<!-- ### Mixed JDBC - Filesystem ###
+ <!-- ### Mixed JDBC - Filesystem ###
stores: slidestore.reference.JDBCDescriptorsStore
slidestore.reference.FileContentStore
!!! set resetBeforeStarting parameter for FileContentStore to false !!!
-->
-
-<!-- ### Cloudscape configuration (embedded database) ###
+ <!-- ### Cloudscape configuration (embedded database) ###
stores: slidestore.cloudscape.CloudscapeDescriptorsStore
slidestore.cloudscape.CloudscapeContentStore
driver: COM.cloudscape.core.JDBCDriver
url: jdbc:cloudscape:slidestructure;create=true
jdbc:cloudscape:slidecontent;create=true
-->
-
-<!-- ### Oracle configuration (thin driver) ###
+ <!-- ### Oracle configuration (thin driver) ###
stores: slidestore.reference.JDBCDescriptorsStore
slidestore.oracle.OracleContentStore
driver: oracle.jdbc.OracleDriver
url: jdbc:oracle:thin:@localhost:1521:slide
-->
-
- <configuration>
-
- <!-- Actions mapping -->
- <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>
-
- <!-- Paths configuration -->
- <userspath>/users</userspath>
- <guestpath>guest</guestpath>
- <filespath>/files</filespath>
- <parameter name="dav">true</parameter>
- <parameter name="standalone">true</parameter>
-
- <!-- Roles definition -->
- <role name="root">slideroles.basic.RootRole</role>
- <role name="user">slideroles.basic.UserRole</role>
- <role name="guest">slideroles.basic.GuestRole</role>
-
- <!-- Users management -->
- <auto-create-users>true</auto-create-users>
-
- <!-- Default properties mapping -->
- <default-property name="foo" namespace="nsfoo/" value="bar"
- role="user"/>
- <default-property name="password" namespace="slide/" value=""
- role="user"/>
-
- <!-- DeltaV configuration -->
- <historypath>/history</historypath>
- <workspacepath>/workspace</workspacepath>
- <workingresourcepath>/workingresource</workingresourcepath>
- <auto-version>checkout-checkin</auto-version>
- <auto-version-control>false</auto-version-control>
- <checkout-fork>forbidden</checkout-fork>
- <checkin-fork>forbidden</checkin-fork>
-
- </configuration>
-
- <data>
-
- <objectnode classname="org.apache.slide.structure.SubjectNode" uri="/">
-
- <!-- Subject can be:
+ <configuration>
+ <!-- Actions mapping -->
+ <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>
+ <!-- Paths configuration -->
+ <userspath>/users</userspath>
+ <guestpath>guest</guestpath>
+ <filespath>/files</filespath>
+ <parameter name="dav">true</parameter>
+ <parameter name="standalone">true</parameter>
+ <!-- Roles definition -->
+ <role name="root">slideroles.basic.RootRole</role>
+ <role name="user">slideroles.basic.UserRole</role>
+ <role name="guest">slideroles.basic.GuestRole</role>
+ <!-- Users management -->
+ <auto-create-users>true</auto-create-users>
+ <!-- Default properties mapping -->
+ <default-property name="foo" namespace="nsfoo/" value="bar"
role="user"/>
+ <default-property name="password" namespace="slide/" value=""
role="user"/>
+ </configuration>
+ <data>
+ <objectnode classname="org.apache.slide.structure.SubjectNode"
uri="/">
+ <!-- Subject can be:
self "~"
all "nobody"
user "/users/john"
group "+/users/groupA"
role "root"
-->
-
- <!-- Uncomment the following line to give all permissions to
+ <!-- Uncomment the following line to give all
permissions to
principals have the root role -->
- <!-- <permission action="/actions" subject="root"/> -->
-
- <permission action="/actions" subject="/users/root"/>
- <permission action="/actions/read" subject="/users"
- inheritable="false"/>
- <permission action="/actions/read" subject="nobody"
- inheritable="false"/>
-
- <!-- /users -->
-
- <objectnode classname="org.apache.slide.structure.SubjectNode"
- uri="/users">
-
- <permission action="/actions" subject="~"/>
- <permission action="/actions" subject="/users/guest"
- inheritable="true" negative="true"/>
- <permission action="/actions/read" subject="/users"
- inheritable="false"/>
-
- <!-- Permission group example -->
-
- <objectnode classname="org.apache.slide.structure.GroupNode"
- uri="/users/groupA">
- <objectnode classname="org.apache.slide.structure.LinkNode"
- uri="/users/groupA/john" linkedUri="/users/john" />
- <objectnode classname="org.apache.slide.structure.LinkNode"
- uri="/users/groupA/root" linkedUri="/users/root" />
- <objectnode classname="org.apache.slide.structure.SubjectNode"
- uri="/users/groupA/singleGroupMember" />
- </objectnode>
-
- <!-- /users/root represents the administrator -->
-
- <objectnode classname="slideroles.basic.RootRoleImpl"
- uri="/users/root">
- <revision>
- <property name="password">root</property>
- </revision>
- </objectnode>
-
- <!-- /users/john represents an authenticated user -->
-
- <objectnode classname="slideroles.basic.UserRoleImpl"
- uri="/users/john">
- <revision>
- <property name="password">john</property>
- </revision>
- </objectnode>
-
- <!-- /users/guest represents an authenticated or unauthenticated
+ <!-- <permission action="/actions" subject="root"/> -->
+ <permission action="/actions" subject="/users/root"/>
+ <permission action="/actions/read" subject="/users"
inheritable="false"/>
+ <permission action="/actions/read" subject="nobody"
inheritable="false"/>
+ <!-- /users -->
+ <objectnode
classname="org.apache.slide.structure.SubjectNode" uri="/users">
+ <permission action="/actions" subject="~"/>
+ <permission action="/actions"
subject="/users/guest" inheritable="true" negative="true"/>
+ <permission action="/actions/read"
subject="/users" inheritable="false"/>
+ <!-- Permission group example -->
+ <objectnode
classname="org.apache.slide.structure.GroupNode" uri="/users/groupA">
+ <objectnode
classname="org.apache.slide.structure.LinkNode" uri="/users/groupA/john"
linkedUri="/users/john"/>
+ <objectnode
classname="org.apache.slide.structure.LinkNode" uri="/users/groupA/root"
linkedUri="/users/root"/>
+ <objectnode
classname="org.apache.slide.structure.SubjectNode"
uri="/users/groupA/singleGroupMember"/>
+ </objectnode>
+ <!-- /users/root represents the administrator
-->
+ <objectnode
classname="slideroles.basic.RootRoleImpl" uri="/users/root">
+ <revision>
+ <property
name="password">root</property>
+ </revision>
+ </objectnode>
+ <!-- /users/john represents an authenticated
user -->
+ <objectnode
classname="slideroles.basic.UserRoleImpl" uri="/users/john">
+ <revision>
+ <property
name="password">john</property>
+ </revision>
+ </objectnode>
+ <!-- /users/guest represents an authenticated
or unauthenticated
guest user -->
-
- <objectnode classname="slideroles.basic.GuestRoleImpl"
- 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">
-
- <!-- ### Give read/write/manage permission to guest ###
+ <objectnode
classname="slideroles.basic.GuestRoleImpl" uri="/users/guest">
+ <revision>
+ <property name="password"/>
+ </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">
+ <!-- ### Give read/write/manage permission to
guest ###
Uncomment the following line to give permission to do
all actions on /files to guest (unauthenticated users) -->
- <!-- <permission action="/actions" subject="/users/guest"/> -->
-
- <permission action="/actions/manage" subject="/users/john"/>
- <permission action="/actions/write" subject="+/users/groupA"/>
- <permission action="/actions/read" subject="nobody"/>
-
- </objectnode>
-
- <!-- DeltaV: default history and workspace paths -->
- <objectnode classname="org.apache.slide.structure.SubjectNode"
uri="/history" />
- <objectnode classname="org.apache.slide.structure.SubjectNode"
uri="/workspace" />
- <objectnode classname="org.apache.slide.structure.SubjectNode"
uri="/workingresource" />
-
- </objectnode>
-
- </data>
-
- </namespace>
-
+ <!-- <permission action="/actions"
subject="/users/guest"/> -->
+ <permission action="/actions/manage"
subject="/users/john"/>
+ <permission action="/actions/write"
subject="+/users/groupA"/>
+ <permission action="/actions/read"
subject="nobody"/>
+ </objectnode>
+ <!-- DeltaV: default history and workspace paths -->
+ <objectnode
classname="org.apache.slide.structure.SubjectNode" uri="/history"/>
+ <objectnode
classname="org.apache.slide.structure.SubjectNode" uri="/workspace"/>
+ <objectnode
classname="org.apache.slide.structure.SubjectNode" uri="/workingresource"/>
+ </objectnode>
+ </data>
+ </namespace>
+
+ <!-- DeltaV domain-wide parameters -->
+ <!--
+ The following parameter specifies a Slide path which determines the
location where this DeltaV server stores history data.
+ -->
+ <parameter name="historypath">/history</parameter>
+
+ <!--
+ The following parameter specifies a Slide path which determines the
location where this DeltaV server allows workspaces to reside.
+ -->
+ <parameter name="workspacepath">/workspace</parameter>
+
+ <!--
+ The following parameter specifies a Slide path which determines the
location where this DeltaV server stores working resources.
+ -->
+ <parameter name="workingresourcepath">/workingresource</parameter>
+
+ <!--
+ Controls the DeltaV auto-version behaviour
+ -->
+ <parameter name="auto-version">checkout-checkin</parameter>
+
+ <!--
+ Indicates if a resource just created by a PUT should be set under
version-control.
+ -->
+ <parameter name="auto-version-control">false</parameter>
+
+ <!--
+ Controls the DeltaV check-out behaviour when a version is already
checked-out or has a successor.
+ -->
+ <parameter name="checkout-fork">forbidden</parameter>
+
+ <!--
+ Controls the DeltaV check-out behaviour when a version has already
+ a successor.
+ -->
+ <parameter name="checkin-fork">forbidden</parameter>
+
+ <!--
+ The following parameter determines the "agent" knowing about what the
standard live properties are.
+ It should be a loadable class containing the following static methods:
+ - boolean isLiveProperty( String propName )
+ - boolean isProtectedProperty( String propName )
+ - boolean isComputedProperty( String propName )
+ - Set getAllLiveProperties()
+ - Set getAllProtectedProperties()
+ - Set getAllComputedProperties()
+ -->
+ <parameter
name="standardLivePropertiesClass">org.apache.slide.webdav.util.resourcekind.AbstractResourceKind</parameter>
+
+ <!--
+ The following parameter determines the URI redirector class. The
DeltaV URI redirector is in charge of the following redirections:
+ - version URI to history URI, e.g. /history/2/1.4 to /history/2
+ - latest revision number for history resource to 0.0
+ - latest revision number for version resource to last URI token, e.g.
/history/2/1.4 to 1.4
+ It should be a loadable class containing the following static methods:
+ - String redirectUri( NamespaceAccessToken nsaToken, String uri )
+ - NodeRevisionNumber redirectLatestRevisionNumber(
NamespaceAccessToken nsaToken, String uri )
+ -->
+ <parameter
name="uriRedirectorClass">org.apache.slide.webdav.util.DeltavUriRedirector</parameter>
+
</slide>
1.24 +4 -173
jakarta-slide/src/share/org/apache/slide/common/NamespaceConfig.java
Index: NamespaceConfig.java
===================================================================
RCS file:
/home/cvs/jakarta-slide/src/share/org/apache/slide/common/NamespaceConfig.java,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- NamespaceConfig.java 26 Apr 2002 12:45:41 -0000 1.23
+++ NamespaceConfig.java 17 May 2002 15:49:51 -0000 1.24
@@ -1,7 +1,7 @@
/*
- * $Header:
/home/cvs/jakarta-slide/src/share/org/apache/slide/common/NamespaceConfig.java,v 1.23
2002/04/26 12:45:41 pnever Exp $
- * $Revision: 1.23 $
- * $Date: 2002/04/26 12:45:41 $
+ * $Header:
/home/cvs/jakarta-slide/src/share/org/apache/slide/common/NamespaceConfig.java,v 1.24
2002/05/17 15:49:51 pnever Exp $
+ * $Revision: 1.24 $
+ * $Date: 2002/05/17 15:49:51 $
*
* ====================================================================
*
@@ -81,7 +81,7 @@
* Configuration of the Namespace.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Remy Maucherat</a>
- * @version $Revision: 1.23 $
+ * @version $Revision: 1.24 $
*/
public final class NamespaceConfig {
@@ -235,44 +235,6 @@
/**
- * Identifies the collection that contains history resources.
- */
- protected String historyPath;
-
-
- /**
- * Identifies the collection that may contain workspace resources.
- */
- protected String workspacePath;
-
-
- /**
- * Identifies the collection that may contain working resources.
- */
- protected String workingresourcePath;
-
-
- /**
- * Controls the DeltaV auto-version behaviour.
- */
- protected String autoVersion;
-
-
- /**
- * Controls the DeltaV check-out behaviour when a version is already
- * checked-out or has a successor.
- */
- protected String checkoutFork;
-
-
- /**
- * Controls the DeltaV check-out behaviour when a version has already
- * a successor.
- */
- protected String checkinFork;
-
-
- /**
* Additional parameters.
*/
protected Hashtable parameters;
@@ -323,12 +285,6 @@
*/
protected String autoCreateUsersRole = "slideroles.basic.UserRoleImpl";
- /**
- * Indicates if a resource just created by a <code>PUT</code> should be
- * set under version-control.
- */
- protected boolean autoVersionControl = false;
-
// ------------------------------------------------------------- Properties
@@ -544,77 +500,6 @@
/**
- * History path accessor.
- *
- * @return String history path
- */
- public String getHistoryPath() {
- return historyPath;
- }
-
-
- /**
- * Workspace path accessor.
- *
- * @return String workspace path
- */
- public String getWorkspacePath() {
- return workspacePath;
- }
-
-
- /**
- * WorkingResource path accessor.
- *
- * @return String workingresource path
- */
- public String getWorkingresourcePath() {
- return workingresourcePath;
- }
-
-
- /**
- * Auto-Version accessor.
- *
- * @return String auto-version setting
- */
- public String getAutoVersion() {
- return autoVersion;
- }
-
-
- /**
- * Checkout-fork accessor.
- *
- * @return String checkout-fork setting
- */
- public String getCheckoutFork() {
- return checkoutFork;
- }
-
-
- /**
- * Checkin-fork accessor.
- *
- * @return String checkin-fork setting
- */
- public String getCheckinFork() {
- return checkinFork;
- }
-
- /**
- * Indicates if a resource just created by a <code>PUT</code> should be
- * set under version-control.
- *
- * @return <code>true</code>, if a resource just created by a
<code>PUT</code>
- * should be set under version-control.
- *
- */
- public boolean getAutoVersionControl() {
- return autoVersionControl;
- }
-
- /**
* Get default properties for a given role.
*
* @return Enumeration of properties
@@ -871,48 +756,6 @@
}
try {
- historyPath = config.getConfiguration("historypath").getValue();
- } catch (ConfigurationException e) {
- historyPath = "/history";
- }
-
- try {
- workspacePath = config.getConfiguration("workspacepath").getValue();
- } catch (ConfigurationException e) {
- workspacePath = "/workspace";
- }
-
- try {
- workingresourcePath =
config.getConfiguration("workingresourcepath").getValue();
- } catch (ConfigurationException e) {
- workingresourcePath = "/workingresource";
- }
-
- try {
- autoVersion = config.getConfiguration("auto-version").getValue();
- } catch (ConfigurationException e) {
- autoVersion = "";
- }
-
- try {
- checkoutFork = config.getConfiguration("checkout-fork").getValue();
- } catch (ConfigurationException e) {
- checkoutFork = "";
- }
-
- try {
- checkinFork = config.getConfiguration("checkin-fork").getValue();
- } catch (ConfigurationException e) {
- checkinFork = "";
- }
-
- try {
- autoVersionControl =
config.getConfiguration("auto-version-control").getValueAsBoolean(false);
- } catch (ConfigurationException e) {
- autoVersionControl = false;
- }
-
- try {
autoCreateUsers = Boolean.valueOf
(config.getConfiguration("auto-create-users").getValue())
.booleanValue();
@@ -1144,12 +987,6 @@
usersPath = "";
filesPath = "";
- historyPath = "/history";
- workspacePath = "/workspace";
- workingresourcePath = "/workingresource";
- autoVersion = "checkout-checkin";
- checkoutFork = "forbidden";
- checkinFork = "forbidden";
} catch (Exception e) {
throw new InvalidNamespaceConfigurationException
@@ -1191,12 +1028,6 @@
usersPath = "";
filesPath = "";
- historyPath = "/history";
- workspacePath = "/workspace";
- workingresourcePath = "/workingresource";
- autoVersion = "checkout-checkin";
- checkoutFork = "forbidden";
- checkinFork = "forbidden";
} catch (Exception e) {
throw new InvalidNamespaceConfigurationException
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>