In Event Handler, how to exclude the specific folder in path.
Example: my path is "/content", after triggered the event handler my event path shouldn't contain the folder like "version".
Help me how to resolve this.
Solved! Go to Solution.
Views
Replies
Total Likes
Hi,
With JCR events it is not possible. Either you swicth to Sling events or check path while act on event.
Views
Replies
Total Likes
If you are using Sling Events then you can do with the help of Event_Filter and add exclude pattern
EventConstants.EVENT_FILTER property takes LDAP filter syntax, and has a path attribute, so we can do e.g. (path=/content/my/root/*) or even (path=/content/my/root/*/myNode).
For JCR Events, you can't filter path based on regEx while listening events but can do while acting(onEvent)
aem63app-repo/SampleJCREvent.java at master · arunpatidar02/aem63app-repo · GitHub
Views
Replies
Total Likes
final String[] types = { "nt:unstructured"};
final String path = "/content/dam/assets"; // define the path
observationManager.addEventListener(this, Event.PROPERTY_CHANGED, path, true, null, null, false);
in that path i need to restrict one folder like "versions"
Views
Replies
Total Likes
Hi,
For this you can't do while listening to event but restrict path while eating on event.
Please check.
Event listener for patterned path
Views
Replies
Total Likes
Hi Arun,
In my case i need to restrict the path starting itself (before triggering the event).
Thanks,
Aravind
Views
Replies
Total Likes
Hi,
With JCR events it is not possible. Either you swicth to Sling events or check path while act on event.
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies