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 Stuart MacPherson <ap...@dsl.pipex.com> on 2002/08/27 19:01:40 UTC

custom ContentInterceptor and postRetrieveContent()

I have written a custom ContentInterceptor, and as per the instructions I am
able to differentiate between the retrieval of content and the retrieval of
a descriptor when postRetrieveContent() is called (i.e. in the passed
parameters, if revisionDescriptors is null, it's a content retrieval, and if
revisionContent is null then it's a descriptor retrieval).  Only problem is,
I want to do some stuff to the descriptors of a file after it has been
retrieved. and as such I need its URI. but I have no way of getting it!  All
that is passed to postRetrieveContent() in that instance is the
NodeRevisionDescriptor, NodeRevisionContent and slideToken NONE of which I
can get the URI from!

 

Basically, I can change the parameters that my own postRetrieveContent()
takes, but I need to know where it is called from so I can pass the right
ones.

 

Any better ways of getting the URI based on what I have got would be
preferential.

 

Many thanks

Stuart


Implementing a search facility

Posted by Stuart MacPherson <ap...@dsl.pipex.com>.
I have successfully extended SimpleWebdavServlet, and now it handles the GET
requests as well as the standard WevdavServlet.  

I want to implement a search system (that searches document properties) and
then spits out a listing in a similar way to GET requests on single
collections... except obviously this time it might not be just one
collection, and could be many (depending on the docs that match the query).
I have written search.jsp, which POSTs the search query form to my
WebdavServlet (is this a good idea?), in which I have implemented a doPost()
method which will handle searches and nothing else...

Only problem is that is doesn't seem to be getting that far (I have some
debug println's that aren't being written).  In fact, when I do a directory
listing it seems to taking the request, and (now this is weird) writing it
as a text file to the root directory of slide!  It even shows in the
directory listing!  I can click it, and open it in notepad... and it is
basically the multipart/form-data request that should be getting processed
by the Servlet.  The Servlet doesn't actually do anything with the request
yet apart from the println's, but this other stuff deffo shouldn't be
happening!

I have attached my SimpleWebdavServlet file, but it's basically stock apart
from a few things between custom code markers, and some links that the
writer prints as part of the directory listing response... nothing that
should bust it up.

I pretty much guarantee you that I won't solve this one by myself (as seems
to be my trademark)...  so I hope someone can help!

Regards
Stu




RE: custom ContentInterceptor and postRetrieveContent()

Posted by Stuart MacPherson <ap...@dsl.pipex.com>.
You can... but as I said, I don't have that!  The only way you can tell if
it's a content retrieval being made is if NodeRevisionDescriptors is null.
I only have NodeRevisionDescriptor (note singular!).


-----Original Message-----
From: Oliver Zeigermann [mailto:ozeigermann@c1-fse.de] 
Sent: 28 August 2003 09:00
To: Slide Users Mailing List
Subject: Re: custom ContentInterceptor and postRetrieveContent()

Stuart MacPherson wrote:
> I have written a custom ContentInterceptor, and as per the instructions I
am
> able to differentiate between the retrieval of content and the retrieval
of
> a descriptor when postRetrieveContent() is called (i.e. in the passed
> parameters, if revisionDescriptors is null, it's a content retrieval, and
if
> revisionContent is null then it's a descriptor retrieval).  Only problem
is,
> I want to do some stuff to the descriptors of a file after it has been
> retrieved. and as such I need its URI. but I have no way of getting it!
All
> that is passed to postRetrieveContent() in that instance is the
> NodeRevisionDescriptor, NodeRevisionContent and slideToken NONE of which I
> can get the URI from!

Hmm, have not checked it, yet, but I thought you can get the URI from 
NodeRevisionDescriptors using getUri() which should be passed to 
postRetrieveContent() as well. Can't you?

Oliver



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




Re: custom ContentInterceptor and postRetrieveContent()

Posted by Oliver Zeigermann <oz...@c1-fse.de>.
Stuart MacPherson wrote:
> I have written a custom ContentInterceptor, and as per the instructions I am
> able to differentiate between the retrieval of content and the retrieval of
> a descriptor when postRetrieveContent() is called (i.e. in the passed
> parameters, if revisionDescriptors is null, it's a content retrieval, and if
> revisionContent is null then it's a descriptor retrieval).  Only problem is,
> I want to do some stuff to the descriptors of a file after it has been
> retrieved. and as such I need its URI. but I have no way of getting it!  All
> that is passed to postRetrieveContent() in that instance is the
> NodeRevisionDescriptor, NodeRevisionContent and slideToken NONE of which I
> can get the URI from!

Hmm, have not checked it, yet, but I thought you can get the URI from 
NodeRevisionDescriptors using getUri() which should be passed to 
postRetrieveContent() as well. Can't you?

Oliver