> > A strange phenomenon has been observed.
> >
> > I created a new ContentInterceptor sub-class.
> >
> > If I access the document content ( using RevisionContent ) in the
> > preStoreContent method of the ContentInterceptor class,
> > I can then see non-zero length content in the postStoreContent method of
> > the ContentInterceptor class.
> >
> > If I do not access the document content ( i.e. do not call any of the
> > methods of the RevisionContent object ) in the preStoreContent method of
> > the ContentInterceptor class, then the RevisionContent object in the
> > postStoreContent method is empty ( has 0 length content ).
> >
> > Is this is a misuse or is this a bug?
>
> Looks strange.
> In my implementation, I'm just using revisionDescriptor and not
> revisionContent but it is always documented : with request headers in
> preStoreContent() and with content properties in postRemoveContent().
>
> Sorry, can't anwer you.
>
Thanks
I have a work around for now. I was just trying to understand the reason.
The contentLength in the request headers always shows the correct length.
It is just that the revisionContent object itself is empty.

The mime-type of the content is not being set by IE6.xx
Is this a bug with IE? I will have to use the extension of the Uri to
guess the mime-type. Not a very good solution but will do for now.

> > On an aside:
> >
> > Although the revisionContent object gets passed to the postRemoveContent
> > method of the ContentInterceptor ( Note: this is post JP's UserQuota
> > changes ),
> > any attempt at accessing content ( thru RevisionContent methods ) in the
> > postRemoveContent method leads to exceptions and a transaction rollback
> > ( on the remove).
>
> No, there is no revisionContent object passed to postRemoveContent()
> method :
>
> protected void postRemoveContent(SlideToken token,
> NodeRevisionDescriptors revisionDescriptors,
> NodeRevisionDescriptor revisionDescriptor,
> Content contentHelper,
> NamespaceConfig namespaceConfig)
>
> Effectively, this method is called just after content removing so I
> think the content is not anymore there :-)
>
> Why are you wanting to access node's content ?
> RevisionDescriptors and revisionDescriptor objects are not carrying
> informations you need for your processing ?

I really do not need this, but I just wanted to understand how this happens.
I suppose, the revisionContent is actually a reference to the Content and
reads it if required. In the case of the postRemove, there is no content to
read ( so exception thrown )
and when the exception is caught, the transaction manager recreates the
Content.

How would I go about volunteering for the documentation part. I would like
to write all the
Javadoc comments for the code ( at least for the stable part ) to help
future developers.
Although I can't find a lot of time, I think I will be able to find a few
hours ( ~5 )  a week.

Any takers?
Akil




--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to