Class ResourceDecoratorTracker
java.lang.Object
org.apache.sling.resourceresolver.impl.helper.ResourceDecoratorTracker
Helper class to track the resource decorators and keep them sorted by their
service ranking.
-
Field Summary
Modifier and TypeFieldDescriptionprotected final List<org.apache.sling.resourceresolver.impl.helper.ResourceDecoratorTracker.ResourceDecoratorEntry>
The (optional) resource decorators, working copy. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
bindResourceDecorator
(ResourceDecorator decorator, org.osgi.framework.ServiceReference<ResourceDecorator> ref) Bind a resource decorator.void
close()
Decorate a resource.void
unbindResourceDecorator
(ResourceDecorator decorator) Unbind a resouce decorator.
-
Field Details
-
resourceDecorators
protected final List<org.apache.sling.resourceresolver.impl.helper.ResourceDecoratorTracker.ResourceDecoratorEntry> resourceDecoratorsThe (optional) resource decorators, working copy.
-
-
Constructor Details
-
ResourceDecoratorTracker
public ResourceDecoratorTracker()
-
-
Method Details
-
close
public void close() -
decorate
Decorate a resource.- Parameters:
resource
- The resource- Returns:
- The decorated resource or the original
-
bindResourceDecorator
public void bindResourceDecorator(ResourceDecorator decorator, org.osgi.framework.ServiceReference<ResourceDecorator> ref) Bind a resource decorator.- Parameters:
decorator
- The decoratorref
- The service reference
-
unbindResourceDecorator
Unbind a resouce decorator.- Parameters:
decorator
- The decorator
-