Multiple node types event listener.
-----------------------------------
Key: MGNLOBS-12
URL: http://jira.magnolia-cms.com/browse/MGNLOBS-12
Project: Magnolia Observation Module
Issue Type: Improvement
Affects Versions: 1.2
Reporter: Danilo Ghirardelli
Assignee: Teresa Miyar
Attachments: RestrictToNodeTypesEventListener.java
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.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.magnolia-cms.com/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------