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 "Harding, Christopher (Student Assistant)" <Ch...@softwareag.com> on 2000/11/01 16:35:14 UTC

ObjectNode - tree structure

Hello,
  Can you tell me if this is correct, if not please correct me.

  An SubjectNode with the URI of "/action" is created in the
MemoryDescriptorsStore, this is then stored under the Object hashtable with
the URI "/actions", then the "/" ObjectNode has it's CHILDREN vector updated
with the "/action" (is this a URI or String? not to sure). So when the "/"
ObjectNode is retrieved and displayed in MS Webfolders it's displayed as a
folder.

  If I create a SubjectNode called "/messabout" I would go through the
following steps:-
	Create SubjectNode "/messabout"
	Store SubjectNode "/messabout"
	Add to "/" SubjectNode the child "/messabout"
	Store SubjectNode "/"

  So if I got this correct then "/messabout" is displayed as a folder (as
you get a tree structure from the "/" SubjectNode children"), are these the
correct steps to do this? (Sorry there's no code but I'm still trying to
figure how the stores work). Is there anything in these steps / other steps
that I must do?

  Thank you for any help

  Chris Harding

please unsubscribe me....

Posted by Jeff Klein <pe...@speakeasy.org>.
Hi folks, sorry to post directly to the list, but I need help to get
unsubscribed.  I am subscribed as jeffk@jps.net, which i no longer have
access to. therfore, i cannot simply send mail to the unsubscribe link on
the jakarta page (because it would be originating from this address rather
than jeffk@jps.net.  So if there are any admins listening, please help!

Thanks in advance,
Jeff


Re: ObjectNode - tree structure

Posted by Remy Maucherat <re...@apache.org>.
> Hello,
>   Can you tell me if this is correct, if not please correct me.
>
>   An SubjectNode with the URI of "/action" is created in the
> MemoryDescriptorsStore, this is then stored under the Object hashtable
with
> the URI "/actions", then the "/" ObjectNode has it's CHILDREN vector
updated
> with the "/action" (is this a URI or String? not to sure). So when the "/"
> ObjectNode is retrieved and displayed in MS Webfolders it's displayed as a
> folder.
>
>   If I create a SubjectNode called "/messabout" I would go through the
> following steps:-
> Create SubjectNode "/messabout"
> Store SubjectNode "/messabout"
> Add to "/" SubjectNode the child "/messabout"
> Store SubjectNode "/"

Actually, that's what the Structure helper (structure.StructureImpl) does
internally.
So you just need to do :
SubjectNode subject = new SubjectNode();
structure.create(token, subject, "/messabout");

I think you looked at the store API, which is never ever accessible to the
client application (otherwise, you can say bye to security). The helpers use
the store API to handle objects, and indeed the store API usually provide
atomic functions, which only modify one object at a time (to make them
easier to implement).

The access token you get from the domain gives access to a namespace through
a set of helpers (structure, content, lock, macro, security).

Regarding the structure operations you are talking about above, you don't
need to do a store after the create (although it wouldn't break anything).
Slide doesn't use a factory paradigm : you instantiate the objects yourself,
then you call some_helper.create(token, the_new_object,
some_other_parameters).

Here, the "/" node will be automatically updated by the helper.

>   So if I got this correct then "/messabout" is displayed as a folder (as
> you get a tree structure from the "/" SubjectNode children"), are these
the
> correct steps to do this? (Sorry there's no code but I'm still trying to
> figure how the stores work).

Actually, "/messabout" would be displayed as a folder since it has no
attached information (no revisions, so no properties), so since I don't
really know what to do, I assume it's a collection.

> Is there anything in these steps / other steps
> that I must do?

For the structure, that's about it. If you remove a node, the parent will be
updated automatically. There's also some "macro" functions in the macro
helper, like a recursive copy, a recursive delete (and a recursive move
which uses the other two).

>   Thank you for any help

Remy