Avatar

Level 1

@Jagadeesh_Prakash when ever we are publishing the assert sling content distribution will trigger(that setup i was unable to do in local). so i tried in dev environment by publishing the assert but still it is not triggering. Please suggest me. I got struck.

 

@Component(immediate = true, service = EventHandler.class, property = {
        Constants.SERVICE_DESCRIPTION + "= This event handler listens the events on page activation",
        EventConstants.EVENT_TOPIC + "=org/apache/sling/distribution/importer/package/imported",
        EventConstants.EVENT_FILTER + "=(&(distribution.paths=/content/dam/test/*) (|(distribution.type=ADD)(distribution.type=DELETE)))",
})
public class TestHandler implements EventHandler {
    private static final Logger log = LoggerFactory.getLogger(TestHandler.class);@Override
    public void handleEvent(Event event) {
        log.info("Testing on DEV...");
}}