[
https://issues.apache.org/jira/browse/SLING-8591?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Christian Schneider updated SLING-8591:
---------------------------------------
Fix Version/s: (was: Content Distribution Core 0.4.2)
> Hook to support custom code when installing or deleting distribution packages
> -----------------------------------------------------------------------------
>
> Key: SLING-8591
> URL: https://issues.apache.org/jira/browse/SLING-8591
> Project: Sling
> Issue Type: Improvement
> Components: Content Distribution
> Reporter: Christian Schneider
> Assignee: Christian Schneider
> Priority: Major
> Time Spent: 1h 20m
> Remaining Estimate: 0h
>
> The concrete case for this is that some customers would like to automatically
> install content packages that are deployed during a content distribution.
> I would like to avoid putting the content package installation code directly
> into the content distribution core bundle. So the idea is to define a hook
> that can be implemented to support custom code after installation of a
> distribution package and before deletion of such a package.
> The hook could look like this:
> {code:java}
> public interface PackageInstallHook {
> void onPostAdd(ResourceResolver resourceResolver, DistributionPackage
> distPackage);
> void onPreRemove(ResourceResolver resourceResolver, DistributionPackage
> distPackage);
> }
> {code}
> The implementation of the hook can be offered as a service. A default noop
> service is created by default. The referenced service can be overridden by
> specifiying a installHook.target on the DistributionPackageBuilderFactory
> config.
--
This message was sent by Atlassian JIRA
(v7.6.14#76016)