Hi,
There is no specific EVENT for the 'tags', instead of EVENT_TOPIC we can use EVENT_FILTER. The following code snippet can be used for the event to be triggered when tag is moved from one namespace to other.
@Component(
immediate = true,
service = EventHandler.class,
property = {
EventConstants.EVENT_FILTER + "=(path=/etc/tags/*)",
EventConstants.EVENT_TOPIC + "=" + SlingConstants.TOPIC_RESOURCE_ADDED,
EventConstants.EVENT_TOPIC + "=" + SlingConstants.TOPIC_RESOURCE_CHANGED,
EventConstants.EVENT_TOPIC + "=" + SlingConstants.TOPIC_RESOURCE_REMOVED
}
)
public class EventHandlerDemo implements EventHandler {
@Override
public void handleEvent(Event event) {
String topic = event.getTopic();
Object path = event.getProperty(SlingConstants.PROPERTY_PATH);
logger.info("Path of the asset and topic of the event:" + topic + ":::path:" + path);
}
}
Hope this helps.
Regards,
TechAspect Solutions