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 Wanja Pernath <wa...@combots.com> on 2006/08/09 15:12:45 UTC
How to get the content of a specified revision using the slide api?
Hi all,
I currently have the problem to access the content of a node using a
specified revision. If I simply do the following:
token.begin();
NodeRevisionDescriptors nrds =
token.getContentHelper().retrieve(slideToken, "/files/test.xml");
NodeRevisionDescriptor nrd =
token.getContentHelper().retrieve(slideToken, nrds, new
NodeRevisionNumber("1.7"));
token.rollback();
I'll get the following Exception:
org.apache.slide.content.RevisionDescriptorNotFoundException: No
revision descriptor found on object /1150222013006.1348
at
org.apache.slide.store.impl.rdbms.StandardRDBMSAdapter.retrieveRevisionD
escriptor(StandardRDBMSAdapter.java:820
at
org.apache.slide.store.impl.rdbms.AbstractRDBMSStore.retrieveRevisionDes
criptor(AbstractRDBMSStore.java:709)
at
org.apache.slide.store.AbstractStore.retrieveRevisionDescriptor(Abstract
Store.java:1148)
at
org.apache.slide.store.ExtendedStore.retrieveRevisionDescriptor(Extended
Store.java:880)
at
org.apache.slide.store.BindingStore.retrieveRevisionDescriptor(BindingSt
ore.java:397)
at
org.apache.slide.store.BindingStore.retrieveRevisionDescriptor(BindingSt
ore.java:403)
at
org.apache.slide.content.ContentImpl.retrieve(ContentImpl.java:261)
If I want to enumerate all existing revisions via:
Enumeration ern = nrds.enumerateRevisionNumbers();
while( ern.hasMoreElements() ) {
NodeRevisionNumber nrn = (NodeRevisionNumber) ern.nextElement();
System.out.println( "Revision: " + nrn.toString());
}
I'll get the following output:
Revision: 0.0
Revision: 1.0
However, if I use the Webdav-ClientAPI or tools like DAVExplorer, all
node revisions are present and the Revision called 1.7 is available too!
Is there anybody who can help me?
Many thanks in advance.
Wanja Pernath
Re: How to get the content of a specified revision using the slide
api?
Posted by Martin Petras <pe...@skms.sk>.
Hi,
look at this:
> 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
Wanja Pernath wrote:
> Hi all,
>
>
>
> I currently have the problem to access the content of a node using a
> specified revision. If I simply do the following:
>
>
>
> token.begin();
>
> NodeRevisionDescriptors nrds =
> token.getContentHelper().retrieve(slideToken, "/files/test.xml");
>
> NodeRevisionDescriptor nrd =
> token.getContentHelper().retrieve(slideToken, nrds, new
> NodeRevisionNumber("1.7"));
>
> token.rollback();
>
>
>
> I'll get the following Exception:
>
>
>
> org.apache.slide.content.RevisionDescriptorNotFoundException: No
> revision descriptor found on object /1150222013006.1348
>
> at
> org.apache.slide.store.impl.rdbms.StandardRDBMSAdapter.retrieveRevisionD
> escriptor(StandardRDBMSAdapter.java:820
>
> at
> org.apache.slide.store.impl.rdbms.AbstractRDBMSStore.retrieveRevisionDes
> criptor(AbstractRDBMSStore.java:709)
>
> at
> org.apache.slide.store.AbstractStore.retrieveRevisionDescriptor(Abstract
> Store.java:1148)
>
> at
> org.apache.slide.store.ExtendedStore.retrieveRevisionDescriptor(Extended
> Store.java:880)
>
> at
> org.apache.slide.store.BindingStore.retrieveRevisionDescriptor(BindingSt
> ore.java:397)
>
> at
> org.apache.slide.store.BindingStore.retrieveRevisionDescriptor(BindingSt
> ore.java:403)
>
> at
> org.apache.slide.content.ContentImpl.retrieve(ContentImpl.java:261)
>
>
>
>
>
> If I want to enumerate all existing revisions via:
>
>
>
> Enumeration ern = nrds.enumerateRevisionNumbers();
>
>
> while( ern.hasMoreElements() ) {
>
> NodeRevisionNumber nrn = (NodeRevisionNumber) ern.nextElement();
>
> System.out.println( "Revision: " + nrn.toString());
>
> }
>
>
>
>
>
> I'll get the following output:
>
>
>
> Revision: 0.0
>
> Revision: 1.0
>
>
>
>
>
> However, if I use the Webdav-ClientAPI or tools like DAVExplorer, all
> node revisions are present and the Revision called 1.7 is available too!
>
>
>
> Is there anybody who can help me?
>
>
>
>
>
> Many thanks in advance.
>
>
>
>
>
> Wanja Pernath
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org