[ https://issues.apache.org/jira/browse/JCRVLT-733?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17788724#comment-17788724 ]
Konrad Windszus edited comment on JCRVLT-733 at 11/22/23 11:17 AM: ------------------------------------------------------------------- One possibility is to combine that with the node types used for validation outlined at JCRVLT-619. Another one is to extend the filter.xml to allow the enforcement of ancestor node types there. For example with an additional child element called {{ancestorTypes}} with comma-separated text values specifying the types. Additional attributes could be used to restrict where those types should be enforced like {{levelStart}} and {{levelEnd}} and maybe an additional boolean flag {{lenient}} which determines what should happen in case the type cannot be enforced (due to existing incompatible properties/child nodes). Example filter.xml {code} <filter root="/apps/settings/granite/operations/maintenance/granite_weekly"> <ancestorTypes levelStart="3" levelEnd="4">sling:Folder</ancestorTypes> </filter> {code} was (Author: kwin): One possibility is to combine that with the node types used for validation outlined at JCRVLT-619. Another one is to extend the filter.xml to allow the enforcement of ancestor node types there. For example with an additional child element called {{ancestorTypes}} with comma-separated text values specifying the types. Additional attributes could be used to restrict where those types should be enforced like {{levelStart}} and {{levelEnd}} and maybe an additional boolean flag {{lenient}} which determines what should happen in case the type cannot be enforced (due to existing incompatible properties/child nodes). Example filter.xml {code} <filter root="/apps/settings/granite/operations/maintenance/granite_weekly"> <ancestorTypes levelStart="3" levelEnd="4">sling:Folder</ancestorTypes> </filter> {code} > Allow to enforce ancestor primary and mixin type > ------------------------------------------------ > > Key: JCRVLT-733 > URL: https://issues.apache.org/jira/browse/JCRVLT-733 > Project: Jackrabbit FileVault > Issue Type: Improvement > Reporter: Konrad Windszus > Priority: Major > > Currently it is impossible to enforce a type for an uncovered ancestor node: > https://jackrabbit.apache.org/filevault/filter.html#Uncovered_ancestor_nodes. > Existing nodes are never touched, and therefore might have an incompatible > type which prevent the actual child node installation. > The workaround outlined e.g. at JCRVLT-403 is to leverage include patterns > which override the full ancestor node (but not arbitrary children). This > might also destroy other properties though (apart from types). > This is necessary whenever two packages might contribute to subtrees sharing > a common ancestor. There is often no dependent package which just provides > the common ancestor (as that would also overwrite the full subtree). -- This message was sent by Atlassian Jira (v8.20.10#820010)