@Property(label="JCR paths to watch for changes. (legacy)",description="Paths expressed in LDAP syntax. Example: (|(path=/content*)(path=/etc*)) - Watches for changes under /content or /etc. This is deprecated - consider using resource.paths instead for better performance.",name="event.filter") @Property(label="JCR paths to watch for changes.",value={"/content","/etc"},description="List of paths to watch. Entries with the \'glob:\' prefix are interpreted as globs, i.e. the * and ** wildcards are supported.",name="resource.paths") @Property(label="Type of change to listen to",value={"ADDED","REMOVED","CHANGED"},name="resource.change.types") @Property(name="webconsole.configurationFactory.nameHint",value="JCR paths to watch for changes: {event.filter} {resource.paths}",propertyPrivate=true)
public class JCRNodeChangeEventHandler
extends Object
implements org.osgi.service.event.EventHandler, org.apache.sling.api.resource.observation.ResourceChangeListener, org.apache.sling.api.resource.observation.ExternalResourceChangeListener
This is modeled as a sling observer which listens to any change in paths (by default) -- /content, /etc and creates an invalidation job. The intention of this invalidation job is that whenever there is any change in the above said paths, the configured cache needs to be invalidated.
| Constructor and Description |
|---|
JCRNodeChangeEventHandler() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
activate(org.osgi.framework.BundleContext context,
Map<String,Object> config) |
protected void |
deactivate() |
void |
handleEvent(org.osgi.service.event.Event event) |
void |
onChange(List<org.apache.sling.api.resource.observation.ResourceChange> changes) |
@Activate
protected void activate(org.osgi.framework.BundleContext context,
Map<String,Object> config)
@Deactivate protected void deactivate()
public void handleEvent(org.osgi.service.event.Event event)
handleEvent in interface org.osgi.service.event.EventHandlerpublic void onChange(List<org.apache.sling.api.resource.observation.ResourceChange> changes)
onChange in interface org.apache.sling.api.resource.observation.ResourceChangeListenerCopyright © 2013–2020 Adobe. All rights reserved.