[
https://issues.apache.org/jira/browse/JCR-4046?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15602570#comment-15602570
]
Chetan Mehrotra commented on JCR-4046:
--------------------------------------
This looks useful but we would need to see feasibility of supporting this under
the event listener approach. Supporting this via
{{org.apache.jackrabbit.oak.plugins.observation.NodeObserver}} would have been
much more simpler as its easy to maintain context.
Similar requirement can be seen for other nodetype where changes in specific
micro tree need to be reported at micro tree root level. For e.g. in AEM for a
dam:Asset a workflow would be configured to be triggered if change happens in
jcr:content/renditions/original.
Similar problem was solved in oak-lucene for doing aggregation where the
problem statement was that if any change happens in aggregated path
'jcr:content' then root node for that path should be reindexed. This was solved
with a Matcher like pattern which transitions from one state to another as diff
editor traverse down the tree
> Improve observation of files
> ----------------------------
>
> Key: JCR-4046
> URL: https://issues.apache.org/jira/browse/JCR-4046
> Project: Jackrabbit Content Repository
> Issue Type: Improvement
> Components: core
> Reporter: Carsten Ziegeler
> Attachments: JCR-4046.patch
>
>
> A file in JCR is represented by at least two nodes, the nt:file node and a
> child node named jcr:content holding the contents of the file (and metadata).
> This has the consequence that if the contents of a file changes, a change
> event of the jcr:content node is reported - but not of the nt:file node.
> This makes creating listeners listening for changes in files complicated, as
> you can't use the file name to filter - especially with glob patterns (see
> JCR-4044) this becomes troublesome.
> In addition, whenever you get a change for a jcr:content node, you have to
> check if the parent is a nt:file node and decide based on the result.
> It would be great to have a flag on the JackrabbitEventFilter to enable
> smarter reporting just for nt:files: if a property on jcr:content is changed,
> a change to the nt:file node is reported.
> See also SLING-6163 and OAK-4940
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)