org.apache.sling.jcr.resource.internal
Class ResourceDecoratorTracker

java.lang.Object
  extended by org.apache.sling.jcr.resource.internal.ResourceDecoratorTracker

public class ResourceDecoratorTracker
extends Object

Helper class to track the resource decorators and keep them sorted by their service ranking.


Field Summary
protected  List<org.apache.sling.jcr.resource.internal.ResourceDecoratorTracker.ResourceDecoratorEntry> resourceDecorators
          The (optional) resource decorators, working copy.
 
Constructor Summary
ResourceDecoratorTracker()
           
 
Method Summary
protected  void bindResourceDecorator(ResourceDecorator decorator, Map<String,Object> props)
           
 void close()
           
 Resource decorate(Resource resource, String workspaceName, javax.servlet.http.HttpServletRequest request)
          Decorate a resource.
 ResourceDecorator[] getResourceDecorators()
           
protected  void unbindResourceDecorator(ResourceDecorator decorator, Map<String,Object> props)
           
protected  void updateResourceDecoratorsArray()
          Updates the ResourceDecorators array, this method is not thread safe and should only be called from a synchronized block.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

resourceDecorators

protected final List<org.apache.sling.jcr.resource.internal.ResourceDecoratorTracker.ResourceDecoratorEntry> resourceDecorators
The (optional) resource decorators, working copy.

Constructor Detail

ResourceDecoratorTracker

public ResourceDecoratorTracker()
Method Detail

close

public void close()

decorate

public Resource decorate(Resource resource,
                         String workspaceName,
                         javax.servlet.http.HttpServletRequest request)
Decorate a resource.


getResourceDecorators

public ResourceDecorator[] getResourceDecorators()

bindResourceDecorator

protected void bindResourceDecorator(ResourceDecorator decorator,
                                     Map<String,Object> props)

unbindResourceDecorator

protected void unbindResourceDecorator(ResourceDecorator decorator,
                                       Map<String,Object> props)

updateResourceDecoratorsArray

protected void updateResourceDecoratorsArray()
Updates the ResourceDecorators array, this method is not thread safe and should only be called from a synchronized block.



Copyright © 2007-2013 The Apache Software Foundation. All Rights Reserved.