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 Grant Gongaware <gg...@itensil.com> on 2004/08/24 03:51:28 UTC
Re: Slide Revision Management + Revision History
I know there was/is NodeRevisions, but there was also a separate history
folder for Delta-V...
But, I don't have a good answer, maybe somebody in the list can help.
-Grant
Gbenga Bello wrote:
> Hello Grant
>
> Thanks for the other time.Your adviseon turning my slide app into EJB
> was really helpful for me
>
> Now I have some versioning issues that I need to have input on.
>
> First I think u need to know the environment my slide runs in.
> a) I am running Slide 2.0 release
> b) MySQL 4.0.12 as my ContentStore
> c) Win 2000 as OS platform
> d) I relate with slide thru a Java application written with Slide 2.0
> native API also I access document content thru webdav client like MS
> Word 2000 over the webdav protocol connected to same slide
> contentstore earlier mentioned.
> Now to the versioning issues
> 1) I want to able to view the list of all previous revision number
> [revision history] for a specific document resource thru the Java
> application. Which class of the slide native api helps to achieve
> this. I have searched the api doc but couldn't get something
> meaningful yet. Pls I need your input
>
> 2) I want to be able to request to view content for a specific
> revision (from the revision history) of a document . Take for
> instance, if there are the following revision nos for a document
> resource; 1.0,1.1,1.2,1.3,1.4 where 1.4 is the latest document
> revision number. I should be able to programmatically and randomly
> pool revision 1.2 to see what is in there.
>
> 3) You may have observed the way slide handles numbering of revisions
> for a document; that instead of increamenting the whole number part of
> the revision no, it rather increaments the decimal part of the number.
> Take for instance, if previous revision number is 1.0. When Slide does
> the next revision, it assigns the number, 1.1
> At what point will it move the version numbering to 2.0?
>
> Please I will appreciate all contributions in form of code snippet,
> links to mail list, other reference documentation that will help me
> get this thing right and working.
> I thank you in advance.
>
> Gbenga COGI
>
> ------------------------------------------------------------------------
> Do you Yahoo!?
> Win 1 of 4,000 free domain names from Yahoo! Enter now
> <http://us.rd.yahoo.com/evt=26640/*http://promotions.yahoo.com/goldrush>.
Help with custom slide realm - passing custom Principal
Posted by kranga <kr...@k2d2.org>.
I'm trying to customize Slide and have the need to implement a custom
login/security Realm. I've written a simple Realm that extends RealmBase. In
teh getPrincipal() method, I return my own custom class.
However, when I call servletContext's getUserPrincipal() method and try to
cast the return value to my custom class, it fails. Does Tomcat intervene
and put in its own Principal object? Is this a tomcat bug/restriction or am
I doing something wrong? I did notice that while SlideRealm creates a
SlideRealmPrincipal object as the return value of getPrincipal() in
SlideRealm class, the core Slide code itself doesn't access the information
anywhere... Please help as I find myself in a fix
---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org
Re: Slide Revision Management + Revision History
Posted by Stefan Fromm <sf...@inf.tu-dresden.de>.
Hello Gbenga,
>> 1) I want to able to view the list of all previous revision number
>> [revision history] for a specific document resource thru the Java
>> application. Which class of the slide native api helps to achieve
>> this. I have searched the api doc but couldn't get something
>> meaningful yet. Pls I need your input
Note that there might occur problems with the versions because functionality
is implemented inconsistently in the helper-layer and WebDAV-layer as mentioned
in these messages:
http://www.mail-archive.com/slide-user@jakarta.apache.org/msg06761.html
http://www.mail-archive.com/slide-user@jakarta.apache.org/msg03708.html
http://www.mail-archive.com/slide-dev@jakarta.apache.org/msg10230.html
So it depends on if you access versions with Slide-API or via WebDAV.
For Slide-API it should work like this:
NamespaceAccessToken nsat =
Domain.accessNamespace(new SecurityToken(""), Domain.getDefaultNamespace());
SlideToken token = new SlideTokenImpl(new CredentialsToken(slideusername));
Content contentHelper = nsat.getContentHelper();
NodeRevisionDescriptors revisions = contentHelper.retrieve(token, "/files/test.txt");
for ( Enumeration e = revisions.enumerateRevisionNumbers(); e.hasMoreElements(); )
{
NodeRevisionNumber nrno = (NodeRevisionNumber)e.nextElement();
// get metadata
NodeRevisionDescriptor nrd = contentHelper.retrieve(token, revisions, nrno);
// get content
NodeRevisionContent nrc = contentHelper.retrieve(token, revisions, nrd);
}
For WebDAV there is defined the DAV:version-tree report in RFC3253
(DeltaV Specification). See http://www.ietf.org/rfc.html
>> 2) I want to be able to request to view content for a specific
>> revision (from the revision history) of a document . Take for
>> instance, if there are the following revision nos for a document
>> resource; 1.0,1.1,1.2,1.3,1.4 where 1.4 is the latest document
>> revision number. I should be able to programmatically and randomly
>> pool revision 1.2 to see what is in there.
NodeRevisionNumber provides some constructors where you can provide a
version number in different ways. In connection with the above shown
code for Helper-API you should be able to do it.
For WebDAV it could be the additional Label-Header in the GET-request
where you can provide a version label. Since version numbers are just
server-side generated version labels this could work.
>> 3) You may have observed the way slide handles numbering of revisions
>> for a document; that instead of increamenting the whole number part of
>> the revision no, it rather increaments the decimal part of the number.
>> Take for instance, if previous revision number is 1.0. When Slide does
>> the next revision, it assigns the number, 1.1
>> At what point will it move the version numbering to 2.0?
To me it seems there is never created a next major version. Good points
to have a look at are
org.apache.slide.content.ContentImpl and
org.apache.slide.webdav.util.VersioningHelper
Regards
Stefan
---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org