[MGNLOBS-3] Deletion Event (event 2) does not respect mgnl:content nodeType, other actions do Created: 21/Aug/08  Updated: 25/Nov/13  Resolved: 09/Jan/09

Status: Closed
Project: Observation
Component/s: None
Affects Version/s: None
Fix Version/s: 1.0

Type: Bug Priority: Major
Reporter: Julian Frank Assignee: Teresa Miyar
Resolution: Workaround exists Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:

 Description   

Below is a section of a log file showing a single command listener I am developing that is getting events. It is called FileEventCommand. I show the raw event types too. The first event is a 16, "property modified" in /help. The second event is a 1 "node created" because I copied /help0/services -> /help0/services0. The third event is a 2 "node deleted" but you can see its path is not respecting the mgnl:content, it is reporting the deletion of the contentNodes also. I truncated the log, there were about 20 contentNodes with separate events. The rules for the listener are path = / and includeSubNodes = true and nodeType mgnl:content.

  • Joshua

INFO CommandEventListener CommandEventListener.java(onEvent:81) 21.08.2008 11:27:39 start event [FileEventCommand]
INFO FileEventCommand FileEventCommand.java(execute:140) 21.08.2008 11:27:48 writing 16 event for /help
INFO CommandEventListener CommandEventListener.java(onEvent:128) 21.08.2008 11:27:48 event executed successfully [FileEventCommand]
INFO CommandEventListener CommandEventListener.java(onEvent:81) 21.08.2008 11:28:08 start event [FileEventCommand]
INFO FileEventCommand FileEventCommand.java(execute:140) 21.08.2008 11:28:14 writing 1 event for /help0/services0
INFO CommandEventListener CommandEventListener.java(onEvent:128) 21.08.2008 11:28:14 event executed successfully [FileEventCommand]
INFO CommandEventListener CommandEventListener.java(onEvent:81) 21.08.2008 11:28:21 start event [FileEventCommand]
INFO FileEventCommand FileEventCommand.java(execute:140) 21.08.2008 11:28:26 writing 2 event for /help0/services0/mainColumnParagraphs/00/text_files/MetaData
INFO CommandEventListener CommandEventListener.java(onEvent:128) 21.08.2008 11:28:26 event executed successfully [FileEventCommand]
INFO FileEventCommand FileEventCommand.java(execute:140) 21.08.2008 11:28:29 writing 2 event for /help0/services0/mainColumnParagraphs/0/text_files/MetaData



 Comments   
Comment by Teresa Miyar [ 01/Oct/08 ]

Hi Joshua,

Your are right there is a problem with the remove event, as the event is fired when that node doesn't exist any more there is no way to know which node type it is. It's the way jackrabbit works, there is no 'after removal event' a workaround would be to create a new listener for the delete event that sets the includeSubNodes to false.

Regards,
Teresa

Generated at Mon Feb 12 10:23:04 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.