Indeed, events can't fail the import. We do support auto-installation of content packages [0] that can act as a post processor but AFAIK we don't support anything that can act as a pre-processor.
We could add an SPI if there's a use case. Do you already have a design in mind ? Regards, Timothee [0] https://github.com/apache/sling-org-apache-sling-distribution-journal/blob/master/src/main/java/org/apache/sling/distribution/journal/bookkeeper/ContentPackageExtractor.java Le mar. 2 févr. 2021 à 10:42, Konrad Windszus <konra...@gmx.de> a écrit : > Hi Timothee, > The idea is that the pre/postprocessing can actually return a failure > somehow to the publisher (at least in case of exceptions). > With OSGi events this wouldn't be possible IIUC. > > Thanks for raising https://issues.apache.org/jira/browse/SLING-10114 < > https://issues.apache.org/jira/browse/SLING-10114>. > > Cheers, > Konrad > > > On 1. Feb 2021, at 21:38, Timothee Maret <tma...@apache.org> wrote: > > > > Hi Konrad, > > > > Are those processor required to operate in the same thread and same > session > > as the import ? > > > > If not, how about leveraging distribution events > > > https://sling.apache.org/documentation/bundles/content-distribution.html#events > > ? We could raise an extra event before importing content. > > > > Regards, > > > > Timothee > > > > Le lun. 1 févr. 2021 à 17:11, Konrad Windszus <konra...@gmx.de> a écrit > : > > > >> Hi everyone, > >> when looking at > >> > https://sling.apache.org/documentation/bundles/content-distribution.html > >> and https://github.com/apache/sling-org-apache-sling-distribution-core > I > >> couldn't find hooks for preprocessing/postprocessing distribution > packages. > >> Is the only option to to apply some operations before and after the > actual > >> installation to implement a custom distribution package or is there > maybe a > >> more lightweight approach? > >> > >> Thanks, > >> Konrad > >> > >> P.S. I know of FileVault Install Hooks ( > >> http://jackrabbit.apache.org/filevault/installhooks.html) but since > those > >> can only be executed by admin users, they cannot be used in this > particular > >> use case (https://issues.apache.org/jira/browse/JCRVLT-427). > >> > >> > >