Hi There,
Does anyone know why this is not triggered, i want to get the removed event under this node /conf.
@component(
service = EventHandler.class,
immediate = true,
property = {
EventConstants.EVENT_TOPIC + "=" + TestEventHandler.EVENT_TOPIC,
EventConstants.EVENT_FILTER + "=(path=/conf/*)"
}
)
@Slf4j
public class TestEventHandler implements EventHandler {
public static final String EVENT_TOPIC = "org/apache/sling/api/resource/Resource/REMOVED";
........
-
Solved! Go to Solution.
Views
Replies
Total Likes
Hi @anelem1760873 ,
Just check if the system user is having right permission which you must be using to get resolver. Like below-
Map<String, Object> params = new HashMap<>();
params.put(ResourceResolverFactory.SUBSERVICE, "myEventService");
resolver = resolverFactory.getServiceResourceResolver(params);
Hi @anelem1760873 ,
Just check if the system user is having right permission which you must be using to get resolver. Like below-
Map<String, Object> params = new HashMap<>();
params.put(ResourceResolverFactory.SUBSERVICE, "myEventService");
resolver = resolverFactory.getServiceResourceResolver(params);
Alright! Agree with Ritesh. use a resource resolver using the service user and resource resolver factory.
A good article describes this - http://www.aemcq5tutorials.com/tutorials/create-system-user-in-aem/
make sure to give proper permission to the user.
Debug it and check if you are getting a resource resolver.
Views
Replies
Total Likes