You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-dev@jakarta.apache.org by "Pill, Juergen" <Ju...@softwareag.com> on 2000/12/29 14:46:29 UTC
Deleting a revision
Hello,
Deleting a revision is implemented in ContentImpl.remove in following way:
1) check security
2) open transaction
3) call the method removeRevisionDescriptor
4) call the method removeRevisionContent
5) close transaction
I am using milestone 4 (so the transaction handling may have moved).
I have now following problem with this implementation:
To remove the revisionContent in the TaminoStore I need to read two live
properties, so I ask the RevisionStore for this information. This returns an
exception (because it was already deleted just before).
What do you think about changing the order of deletion:
First delete the content and afterwards delete the descriptor? (in my
environment I detected no side effects).
Best regards
Juergen Pill
-----Original Message-----
From: Pill, Juergen [mailto:Juergen.Pill@softwareag.com]
Sent: Friday, December 29, 2000 1:59 PM
To: 'slide-dev@jakarta.apache.org'
Subject: NodeRevisionContent.getContent() bug
<< File: NodeRevisionContent.java >> Hello,
To my understanding the method "NodeRevisionContent.getContent()" is not
implemented correctly.
I have applied following changes to the class file:
1) removed the unnecessary field binaryContent
2) Implemented all 3 options in getContent() [ content, inputStream, reader
]
3) Some minor changes in more functions to deal with the case either
content, inputStream or reader is set.
4) Implemented 2 private methods to read content from a stream and a reader.
Does this make sense. Please see attached file.
By the way: Wouldn't it be better to store the content as a byte[] instead
of a char[]. If binary data is send, this may cause problems?
Best regards and a happy new year to all of you
Juergen Pill
<<NodeRevisionContent.java>>
Re: Deleting a revision
Posted by Remy Maucherat <re...@betaversion.org>.
Quoting "Pill, Juergen" <Ju...@softwareag.com>:
> Hello,
>
> Deleting a revision is implemented in ContentImpl.remove in following
> way:
>
> 1) check security
> 2) open transaction
> 3) call the method removeRevisionDescriptor
> 4) call the method removeRevisionContent
> 5) close transaction
Actually, I'm considering modifying the semantics of that call instead, since I
think the "removed" revisions should be hidden instead of physically removed
(just as CVS does). What do you think ?
Remy