You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-user@jakarta.apache.org by James Higginbotham <jh...@betweenmarkets.com> on 2003/03/25 16:50:48 UTC

Listing Revisions

Hi,

I'm in the process of creating a web page to view the list of revisions
for a resource. I am seeing only version 1.0 showing up in the web view
(via the struts tag lib) but can see other versions being stored either
via the file or jdbc (using hsql) stores using a Slide daily build from
mid November. I am performing the following steps and seeing the
following results:

1. Putting files into Slide via Windows XP Web folders - a v1.0 is
created for each file
2. Navigating to the folder that contains my resource I'm interested in,
and putting a new copy of the same file using MS web folders
3. I can see within the hsql files the SQL commands that create a 1.1
version into the DB
4. I use the following JSP code to view the revisions, which only shows
a version 1.0:

<%@ taglib uri="/WEB-INF/struts-bean.tld"      prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld"      prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld"     prefix="logic" %>
<%@ taglib uri="/WEB-INF/struts-template.tld"  prefix="template" %>
<%@ taglib uri="/WEB-INF/struts-tiles.tld"     prefix="tiles" %>
<%@ taglib uri="/WEB-INF/slide-struts.tld"     prefix="slide" %>
<%@ taglib uri="/WEB-INF/display.tld"          prefix="display" %>
<%@ taglib uri="/WEB-INF/calvary.tld"          prefix="calvary" %>
<p>
	<slide:node id="node" uriName='viewer' uriProperty='computedUri'
resolveLinks='true'>
		<bean:define id="latestRevision" name="node"
property="latestRevision"/>
		<p class="viewerName"><bean:write name='node'
property='name'/></p>
		<p>Latest revision=<bean:write name="latestRevision"
property="number"/></p>
	</slide:node>	
</p>

5. Concerned about caching being the bug, I shutdown and restart the
server and still see only v1.0 as the latest version
6. I'm using Eclipse to debug into the slide kernel and basically the
jdbc store is only finding the 1 revision. I haven't debugged into the
JDBC store but that will be next on my list when time allows
7. I have the following Domain.xml:

<?xml version="1.0"?>
<slide logger="org.apache.slide.util.logger.SimpleLogger"
logger-level="6" default="slide">
  <namespace name="slide">
         <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>
                       <parameter name="version">true</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>true</auto-create-users>
                     <!-- Default properties mapping -->
                     <default-property
namespace="http://jakarta.apache.org/slide/" name="password" value=""
role="user"/>
                   </configuration>
                   <data>
                     <objectnode
classname="org.apache.slide.structure.SubjectNode" uri="/">
                       <!-- <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
namespace="http://jakarta.apache.org/slide/"
name="password">root</property>
                           </revision>
                         </objectnode>
                         <!-- /users/john represents an authenticated
user -->
                         <objectnode
classname="slideroles.basic.UserRoleImpl" uri="/users/john">
                           <revision>
                             <property
namespace="http://jakarta.apache.org/slide/"
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
namespace="http://jakarta.apache.org/slide/" 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/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>
                      <parameter name="historypath">/history</parameter>
                      <parameter
name="workspacepath">/workspace</parameter>
                      <parameter
name="workingresourcepath">/workingresource</parameter>
                      <parameter
name="auto-version">checkout-checkin</parameter>
                      <parameter
name="auto-version-control">true</parameter>
                      <parameter
name="versioncontrol-exclude"></parameter>
                      <parameter
name="checkout-fork">forbidden</parameter>
                      <parameter
name="checkin-fork">forbidden</parameter>
</slide>


8. If I view the properties for the 1.0 revision, here is what I get:

DAV:getetag -63123322_48563_24152 
DAV:workspace  
DAV:source  
DAV:owner root 
DAV:comment  
DAV:creator-displayname root 
DAV:getcontentlanguage en 
DAV:getlastmodified Tue, 25 Mar 2003 02:44:51 GMT 
DAV:checked-in /history/210/1.2  <==== NOTE: version 1.2 which is
correct, but Slide says 1.0 is the only version via the
RevisionDescriptors class!
DAV:resourcetype  
DAV:getcontentlength 24152 
DAV:getcontenttype text/xml 
DAV:creationdate 2003-03-22T03:39:12Z 
DAV:auto-version  
DAV:displayname sitemap.xml 


Any ideas? Is this a known bug or something I'm doing or ??

Thanks,
James



Client part and inconsistence of data

Posted by Wong Kam Lai <kl...@onk.cintec.cuhk.edu.hk>.
Two questions .
1. Is client moduels is defined for making webdav client just like windows
explorer?
2. I have use windows explorer and IE to view the paths using the same
account. At windows explorer, it shows a normal situation such that I
can't see the paths that I haven't the access right. However, I can access
all paths even I haven't the right to access, what's the problem?


---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org


Example

Posted by Wong Kam Lai <kl...@onk.cintec.cuhk.edu.hk>.
Hello, I want some examples to see how to implement a CMS with Slide,
(access domain, namespace, acl)
anyone has sample codes for that or some code fragment?


---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org


Re: Listing Revisions

Posted by Ryan McDonough <rm...@mac.com>.
Hey James,

I know this probably isn't the email you might have been hoping for, but you
seem like someone who might have the answers I'm looking for. You are doing
some of the stuff I'd like to be doing but I'd say you're like 4 steps ahead
of me right now. I would like to create a customized web interface to slide,
but I don't seem to be able to. I'm using Slide 1.0.16. In one case, I tried
to see if I could muck with the "server" implementation that comes with the
distribution. The trouble for me there was that the wrapper classes have the
paths to the WARs hard coded. Why, I do not know, and why the Wrapper
classes in the 1st place? Anyway, I then tried using the web apps. The Slide
web app worked fine, but the admin app bombs. I've realized that it bombs
because the domain is not loaded. Now, I would like to use JBoss for this,
and I see that Slide has an Mbean interface available and I have noticed
that you have been doing some work with JBoss and Slide. Have you been able
to get slide working as an Mbean or have you gotten slide working another
way?

Ryan-

On 3/25/03 10:50 AM, "James Higginbotham" <jh...@betweenmarkets.com>
wrote:

> Hi,
> 
> I'm in the process of creating a web page to view the list of revisions
> for a resource. I am seeing only version 1.0 showing up in the web view
> (via the struts tag lib) but can see other versions being stored either
> via the file or jdbc (using hsql) stores using a Slide daily build from
> mid November. I am performing the following steps and seeing the
> following results:
> 
> 1. Putting files into Slide via Windows XP Web folders - a v1.0 is
> created for each file
> 2. Navigating to the folder that contains my resource I'm interested in,
> and putting a new copy of the same file using MS web folders
> 3. I can see within the hsql files the SQL commands that create a 1.1
> version into the DB
> 4. I use the following JSP code to view the revisions, which only shows
> a version 1.0:
> 
> <%@ taglib uri="/WEB-INF/struts-bean.tld"      prefix="bean" %>
> <%@ taglib uri="/WEB-INF/struts-html.tld"      prefix="html" %>
> <%@ taglib uri="/WEB-INF/struts-logic.tld"     prefix="logic" %>
> <%@ taglib uri="/WEB-INF/struts-template.tld"  prefix="template" %>
> <%@ taglib uri="/WEB-INF/struts-tiles.tld"     prefix="tiles" %>
> <%@ taglib uri="/WEB-INF/slide-struts.tld"     prefix="slide" %>
> <%@ taglib uri="/WEB-INF/display.tld"          prefix="display" %>
> <%@ taglib uri="/WEB-INF/calvary.tld"          prefix="calvary" %>
> <p>
> <slide:node id="node" uriName='viewer' uriProperty='computedUri'
> resolveLinks='true'>
> <bean:define id="latestRevision" name="node"
> property="latestRevision"/>
> <p class="viewerName"><bean:write name='node'
> property='name'/></p>
> <p>Latest revision=<bean:write name="latestRevision"
> property="number"/></p>
> </slide:node>    
> </p>
> 
> 5. Concerned about caching being the bug, I shutdown and restart the
> server and still see only v1.0 as the latest version
> 6. I'm using Eclipse to debug into the slide kernel and basically the
> jdbc store is only finding the 1 revision. I haven't debugged into the
> JDBC store but that will be next on my list when time allows
> 7. I have the following Domain.xml:
> 
> <?xml version="1.0"?>
> <slide logger="org.apache.slide.util.logger.SimpleLogger"
> logger-level="6" default="slide">
> <namespace name="slide">
>        <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>
>                      <parameter name="version">true</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>true</auto-create-users>
>                    <!-- Default properties mapping -->
>                    <default-property
> namespace="http://jakarta.apache.org/slide/" name="password" value=""
> role="user"/>
>                  </configuration>
>                  <data>
>                    <objectnode
> classname="org.apache.slide.structure.SubjectNode" uri="/">
>                      <!-- <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
> namespace="http://jakarta.apache.org/slide/"
> name="password">root</property>
>                          </revision>
>                        </objectnode>
>                        <!-- /users/john represents an authenticated
> user -->
>                        <objectnode
> classname="slideroles.basic.UserRoleImpl" uri="/users/john">
>                          <revision>
>                            <property
> namespace="http://jakarta.apache.org/slide/"
> 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
> namespace="http://jakarta.apache.org/slide/" 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/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>
>                     <parameter name="historypath">/history</parameter>
>                     <parameter
> name="workspacepath">/workspace</parameter>
>                     <parameter
> name="workingresourcepath">/workingresource</parameter>
>                     <parameter
> name="auto-version">checkout-checkin</parameter>
>                     <parameter
> name="auto-version-control">true</parameter>
>                     <parameter
> name="versioncontrol-exclude"></parameter>
>                     <parameter
> name="checkout-fork">forbidden</parameter>
>                     <parameter
> name="checkin-fork">forbidden</parameter>
> </slide>
> 
> 
> 8. If I view the properties for the 1.0 revision, here is what I get:
> 
> DAV:getetag -63123322_48563_24152
> DAV:workspace  
> DAV:source  
> DAV:owner root 
> DAV:comment  
> DAV:creator-displayname root
> DAV:getcontentlanguage en
> DAV:getlastmodified Tue, 25 Mar 2003 02:44:51 GMT
> DAV:checked-in /history/210/1.2  <==== NOTE: version 1.2 which is
> correct, but Slide says 1.0 is the only version via the
> RevisionDescriptors class!
> DAV:resourcetype 
> DAV:getcontentlength 24152
> DAV:getcontenttype text/xml
> DAV:creationdate 2003-03-22T03:39:12Z
> DAV:auto-version 
> DAV:displayname sitemap.xml
> 
> 
> Any ideas? Is this a known bug or something I'm doing or ??
> 
> Thanks,
> James
> 
> 
> 

-- 
"Light travels faster than sound. This is why some people appear bright
until you hear them speak."



---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org