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 Matthew Stone <ma...@jcafeinc.com> on 2001/07/02 15:35:17 UTC

Follow Up: MacroImpl.delete() fails

FYI - The delete() works on the structure I describe in my first message if
I do one of these 2 steps first:

- if the target of the LinkNode is deleted manually using a DAV client
or
- if the target of the LinkNode is deleted by calling delete()

Is it a bug?

On another note, I looked to see what was left behind in the DB after I
called delete() on the LinkNode target object and I see the MacroImpl leaves
behind the records in the Revision table's.  Should the MacroImpl delete
those records?

Matt

----- Original Message -----
From: "Matthew Stone" <ma...@jcafeinc.com>
To: <sl...@jakarta.apache.org>
Sent: Monday, July 02, 2001 8:13 AM
Subject: MacroImpl.delete() fails


> I'm using MacroImpl.delete() and it's failing on me.  I've tried using
both
> delete methods:
>
> delete(SlideToken token, java.lang.String targetUri)
> delete(SlideToken token, java.lang.String targetUri, MacroParameters
> parameters)
>
> It keeps throwing an ObjectHasChildrenException.  I'm sure the
> MacroParameters are both set to true.
>
> The structure I'm attempting to delete is a group node.  Here's an exact
> representation:
>
> GroupNode
> +-- GroupNode
>  |    +-- LinkNode > SubjectNode(Folder in the Slide file system)
> +-- GroupNode
>     +-- LinkNode > SubjectNode(Folder in the Slide file system)
>     +-- LinkNode > SubjectNode(Folder in the Slide file system)
>
> or
>
> GroupNode
> +-- LinkNode > SubjectNode(Folder in the Slide file system)
>
>
> Please advise.
>
> Matt


Re: Follow Up: MacroImpl.delete() fails

Posted by Remy Maucherat <re...@apache.org>.
> FYI - The delete() works on the structure I describe in my first message
if
> I do one of these 2 steps first:
>
> - if the target of the LinkNode is deleted manually using a DAV client
> or
> - if the target of the LinkNode is deleted by calling delete()
>
> Is it a bug?

It looks like it is a bug indeed.
I looked at the MacroImpl code, and I think the links shouldn't be resolved
(ie, we should use Structure.retrieve(token, uri, false)).

> On another note, I looked to see what was left behind in the DB after I
> called delete() on the LinkNode target object and I see the MacroImpl
leaves
> behind the records in the Revision table's.  Should the MacroImpl delete
> those records?

Yes, if the object is not versioned.

Remy