public class MappableTypeHierarchyChangeListener extends Object implements org.osgi.service.event.EventHandler
ModelRegistry
accordingly.
In Sling, the sling type hierarchy of a resource is defined by multiple attributes and can be either explicit or implicit. For instance, a resource may explicitly specify a sling:resourceSuperType or the super type could be derived implicitly from the sling:resourceSuperType of the type the resource's sling:resourceType property is referring to, the former taking precedence. In addition, resources may specify mixin types, which can be added and removed dynamically.
Consequently, cached type hierarchy state must be cleared when these attributes change. This is what this event handler is responsible for.
Only valid cases are handled here. For instance, if a resource points to a sling:resourceType or sling:resourceSuperType, and that type or super type resource is removed at runtime, this handler does not invalidate the cache as this represents an invalid content state and is thus considered a programming error.
Constructor and Description |
---|
MappableTypeHierarchyChangeListener() |
Modifier and Type | Method and Description |
---|---|
protected void |
activate() |
protected void |
deactivate() |
void |
handleEvent(org.osgi.service.event.Event event)
A substantial number of events may reach this handler.
|
protected void activate()
protected void deactivate()
public void handleEvent(org.osgi.service.event.Event event)
handleEvent
in interface org.osgi.service.event.EventHandler
Copyright © 2024. All rights reserved.