[dna-issues] [JBoss JIRA] Commented: (DNA-563) Connectors Are Not Generating Events For Children Of Nodes Being Added Or Removed

Randall Hauch (JIRA) jira-events at lists.jboss.org
Sat Dec 5 12:54:29 EST 2009


    [ https://jira.jboss.org/jira/browse/DNA-563?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12498422#action_12498422 ] 

Randall Hauch commented on DNA-563:
-----------------------------------

It seems intuitive that the LOE for each approach is about the same, primarily because the largest part of the effort is changing the connectors to determine the correct information.

When considering whether to augment the original ChangeRequest or simply generate additional ChangeRequest objects in the event stream, it may be important to know what information is required. For example, a DeleteBranchRequest could be addressed by either adding a Collection<Location> for all nodes that were deleted, or it could be addressed by generating additional DeleteBranchRequest for each node.  (This latter is a bit odd.)

But for a CopyBranchRequest, the events need to know about the Location of each created node (for the NODE_ADDED event) and that node's property names (for the PROPERTY_ADDED events).  So the augmenting approach could add a LinkedHashMap<Location,Set<Name>>, since that would retain the order of insertion of Location (which should probably be the top-down order of the nodes being created).

Augmenting might actually work out better than generating extra events, especially because I think the existing ChangeRequest types won't fit our need well.  Consider that we don't have a DeleteNodeRequest (because semantically when a node is deleted all nodes below it must also be deleted).  CopyBranchRequest is similar: each connector would need to generate a CreateNodeRequest for each of the new nodes, but the CreateNodeRequest only has a slot for the collection of the Property objects whereas we only need the property names to generate the correct PROPERTY_ADDED events.  We could require the event store the values, but that would increase the size of the Changes and seems unnecessary (especially for Binary objects) considering that we may not need the values on the Observer side (NetChangeObserver certainly does NOT need them) and that it may place an extra burden on the connectors to retrieve the values.

I would tentatively vote for the 'augmenting' approach. It is more straightforward (a connector must simply fill out the information in each request) and thus easier for us to document and connector developers and Observer developers to understand the semantics (one request maps into one event).

Before we go much further, however, I'd like to see a list of every ChangeRequest that is affected by this issue, and how it would be augmented to provide the information that is currently missing.

> Connectors Are Not Generating Events For Children Of Nodes Being Added Or Removed
> ---------------------------------------------------------------------------------
>
>                 Key: DNA-563
>                 URL: https://jira.jboss.org/jira/browse/DNA-563
>             Project: DNA
>          Issue Type: Bug
>          Components: Connectors
>    Affects Versions: 0.7
>            Reporter: Dan Florian
>            Priority: Blocker
>             Fix For: 0.7
>
>
> If a node is created (or removed) which causes child nodes to also be created (or removed), events should be generated for those child nodes. See Section 8.3.7 of the JCR 1.0 specification. Copying, moving, and reordering of nodes, under the covers, may also add and remove nodes.
> See JBoss forum referenced below for more information.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the dna-issues mailing list