cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From step...@apache.org
Subject cvs commit: xml-cocoon2/src/scratchpad/webapp/samples/slide slide.xconf
Date Thu, 18 Jul 2002 22:25:35 GMT
stephan     2002/07/18 15:25:35

  Modified:    src/scratchpad/src/org/apache/cocoon/components/repository/impl
                        SlideConfigurationAdapter.java SlideRepository.java
               src/scratchpad/webapp/samples/slide slide.xconf
  Added:       src/scratchpad/lib slide-kernel-20020718.jar
                        slide-roles-20020718.jar slide-stores-20020718.jar
  Removed:     src/scratchpad/lib slide-kernel-1.0.16.jar
                        slide-roles-1.0.16.jar slide-stores-1.0.16.jar
                        slide-webdavlib.jar slide-webdavservlet-1.0.16.jar
  Log:
  A wrong return value in SlideConfigurationAdapter prevents Slide to load the correct
  store implementations.
  Also Slide libaries updated through the lastest CVS snapshots.
  
  Revision  Changes    Path
  1.1                  xml-cocoon2/src/scratchpad/lib/slide-kernel-20020718.jar
  
  	<<Binary file>>
  
  
  1.1                  xml-cocoon2/src/scratchpad/lib/slide-roles-20020718.jar
  
  	<<Binary file>>
  
  
  1.1                  xml-cocoon2/src/scratchpad/lib/slide-stores-20020718.jar
  
  	<<Binary file>>
  
  
  1.2       +4 -6      xml-cocoon2/src/scratchpad/src/org/apache/cocoon/components/repository/impl/SlideConfigurationAdapter.java
  
  Index: SlideConfigurationAdapter.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/components/repository/impl/SlideConfigurationAdapter.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- SlideConfigurationAdapter.java	11 Jun 2002 18:09:12 -0000	1.1
  +++ SlideConfigurationAdapter.java	18 Jul 2002 22:25:35 -0000	1.2
  @@ -70,8 +70,7 @@
   
       private org.apache.avalon.framework.configuration.Configuration configuration;
   
  -    public SlideConfigurationAdapter(org.apache.avalon.framework.configuration.Configuration

  -              configuration) {
  +    public SlideConfigurationAdapter(org.apache.avalon.framework.configuration.Configuration
configuration) {
           this.configuration = configuration;
       }
   
  @@ -99,8 +98,7 @@
        * @exception ConfigurationException If no child with that name exists.
        */
       public Configuration getConfiguration(String child)
  -    throws ConfigurationException
  -    {
  +            throws ConfigurationException {
           return new SlideConfigurationAdapter(this.configuration.getChild(child));
       }
   
  @@ -251,7 +249,7 @@
           try {
               return this.configuration.getValue();
           } catch (org.apache.avalon.framework.configuration.ConfigurationException ce) {
  -            return null;
  +            return "";
           }
       }
       
  
  
  
  1.2       +13 -12    xml-cocoon2/src/scratchpad/src/org/apache/cocoon/components/repository/impl/SlideRepository.java
  
  Index: SlideRepository.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/components/repository/impl/SlideRepository.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- SlideRepository.java	4 Jul 2002 17:32:41 -0000	1.1
  +++ SlideRepository.java	18 Jul 2002 22:25:35 -0000	1.2
  @@ -56,7 +56,7 @@
   package org.apache.cocoon.components.repository.impl;
   
   import org.apache.avalon.excalibur.xml.Parser;
  -import org.apache.avalon.framework.activity.Initializable;
  +//import org.apache.avalon.framework.activity.Initializable;
   import org.apache.avalon.framework.component.Component;
   import org.apache.avalon.framework.component.ComponentException;
   import org.apache.avalon.framework.component.ComponentManager;
  @@ -94,7 +94,7 @@
    * @version $Id$
    */
   public class SlideRepository implements Repository, ThreadSafe, 
  -                                        Composable, Configurable, LogEnabled, Initializable
{
  +                                        Composable, Configurable, LogEnabled/*, Initializable*/
{
   
       /** The component manager instance */
       protected ComponentManager manager = null;
  @@ -102,6 +102,7 @@
       private EmbeddedDomain domain = new EmbeddedDomain();
       private Logger logger;
       private String file;
  +    private boolean initialized = false;
   
       /**
        * Provide component with a logger.
  @@ -209,15 +210,15 @@
       }
   
       public EmbeddedDomain getDomain() {
  +        if (!initialized) {
  +            try {
  +                initialize();
  +                initialized = true;
  +            } catch (Exception e) {
  +                this.logger.error("Could not initialize Slide repository", e);
  +            }
  +        }
  +
           return this.domain;
       }
  -
  -    /**
  -     * Returns the user manager by a given admin user.
  -     */
  -    /*public UserManager getUserManager(User admin) throws ProcessingException {
  -        return new SlideUserManager(domain.getNamespaceToken(domain.getDefaultNamespace()),

  -                   new SlideTokenImpl(new CredentialsToken(admin.getPrincipal())));
  -    }*/
   }
  -
  
  
  
  1.5       +217 -145  xml-cocoon2/src/scratchpad/webapp/samples/slide/slide.xconf
  
  Index: slide.xconf
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/scratchpad/webapp/samples/slide/slide.xconf,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- slide.xconf	5 Jul 2002 13:37:37 -0000	1.4
  +++ slide.xconf	18 Jul 2002 22:25:35 -0000	1.5
  @@ -1,150 +1,222 @@
   <?xml version="1.0"?>
   <slide default="myrepository">
   
  - <namespace name="myrepository">
  +    <namespace name="myrepository">
   
  -  <definition>
  -   <store name="jdbc">
  -
  -    <nodestore classname="slidestore.reference.JDBCDescriptorsStore">
  -     <parameter name="driver">org.hsqldb.jdbcDriver</parameter>
  -     <parameter name="url">jdbc:hsqldb:slidestructure</parameter>
  -     <parameter name="user">sa</parameter>
  -     <parameter name="password"></parameter>
  -    </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.JDBCContentStore">
  -     <parameter name="driver">org.hsqldb.jdbcDriver</parameter>
  -     <parameter name="url">jdbc:hsqldb:slidecontent</parameter>
  -     <parameter name="user">sa</parameter>
  -     <parameter name="password"></parameter>
  -    </contentstore>
  -
  -   </store>
  -   <scope match="/" store="jdbc" />
  -  </definition>
  -
  -  <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>false</auto-create-users>
  -  </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
  -         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>
  -
  -     <!-- /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"/>
  -      </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" subject="/users/guest"/> 
  -     <permission action="/actions/manage" subject="/users/john"/>
  -     <permission action="/actions/write" subject="+/users/groupA"/>
  -     <permission action="/actions/read" subject="nobody"/>
  -    </objectnode>
  -   </objectnode>
  -
  -  </data>
  -
  - </namespace>
  - 
  +        <!-- ### 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"/>
  +                <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">
  +                <parameter name="driver">org.hsqldb.jdbcDriver</parameter>
  +                <parameter name="url">jdbc:hsqldb:slidestructure</parameter>
  +                <parameter name="user">sa</parameter>
  +                <parameter name="password"></parameter>
  +            </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.JDBCContentStore">
  +                <parameter name="driver">org.hsqldb.jdbcDriver</parameter>
  +                <parameter name="url">jdbc:hsqldb:slidecontent</parameter>
  +                <parameter name="user">sa</parameter>
  +                <parameter name="password"></parameter>
  +            </contentstore>
  +            </store>
  +            <scope match="/" store="jdbc" />
  +        </definition>
  +        <!-- ### Mixed JDBC - Filesystem ###
  +        stores: slidestore.reference.JDBCDescriptorsStore
  +                slidestore.reference.FileContentStore
  +        !!! set resetBeforeStarting parameter for FileContentStore to false !!!
  +        -->
  +        <!-- ### 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) ###
  +        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"/>
  +        </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
  +                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>
  +                    <!-- /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"/>
  +                        </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>
   </slide>
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          cocoon-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-cvs-help@xml.apache.org


Mime
View raw message