[MGNLOBS-12] Multiple node types event listener. Created: 05/Oct/11  Updated: 04/Nov/15  Resolved: 04/Nov/15

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

Type: Improvement Priority: Neutral
Reporter: Danilo Ghirardelli Assignee: Teresa Miyar
Resolution: Won't Do Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Java Source File RestrictToNodeTypesEventListener.java    
Template:
Patch included:
Yes
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)
Date of First Response:

 Description   

At the moment there is the possibility to set a single node type in a CommandEventListener, but in some cases this may not be enough.
Using data module, if you want to version contents upon modification, you can set a listerer for each type. But this could be a problem if you have subtypes: if you want to version also subtypes and add corresponding listeners, an exception might be raised during versioning, because you will version concurrently the subtype item and its parent (subtype path contains also parent path, so even if you have two listeners with two different types, both are going to be versioned). It does not happen in memory, but happens a lot using a db and clustering.
The attached class, which is mostly a copy of RestrictToNodeTypeEventListener, allows you to set a list of node types that should be listened, so when the event is triggered on a subtype, the listener will catch just the highest level node, avoiding unwanted propagation to the parent node.

On the other side, without this class, you can set a restriction on node type on the "parent" listener configuration (the config node that is a parent of the node in which you define the listener class), and copy that entire configuration for each node type or subtype you need.



 Comments   
Comment by Michael Mühlebach [ 04/Nov/15 ]

Given the thousands of other issues we have open that are more highly requested, we won't be able to address this issue in the foreseeable future. Instead we will focus on issues with a higher impact, and more votes.
Thanks for taking the time to raise this issue. As you are no doubt aware this issue has been on our backlog for some time now with very little movement.
I'm going to close this to set expectations so the issue doesn't stay open for years with few updates. If the issue is still relevant please feel free to reopen it or create a new issue.

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