org.apache.sling.resourceresolver.impl
Class ResourceResolverFactoryActivator

java.lang.Object
  extended by org.apache.sling.resourceresolver.impl.ResourceResolverFactoryActivator

@Properties(value={@Property(name="service.description",value="Apache Sling Resource Resolver Factory"),@Property(name="service.vendor",value="The Apache Software Foundation")})
@References(value={@Reference(name="ResourceProvider",referenceInterface=org.apache.sling.api.resource.ResourceProvider.class,cardinality=OPTIONAL_MULTIPLE,policy=DYNAMIC),@Reference(name="ResourceProviderFactory",referenceInterface=org.apache.sling.api.resource.ResourceProviderFactory.class,cardinality=OPTIONAL_MULTIPLE,policy=DYNAMIC),@Reference(name="ResourceDecorator",referenceInterface=org.apache.sling.api.resource.ResourceDecorator.class,cardinality=OPTIONAL_MULTIPLE,policy=DYNAMIC)})
public class ResourceResolverFactoryActivator
extends Object

The ResourceResolverFactoryActivator/code> keeps track of required services for the resource resolver factory. One all required providers and provider factories are available a resource resolver factory is registered. TODO : Should we implement modifiable? It would be easy but what about long running resolvers?


Field Summary
static String PROP_PATH
           
 
Constructor Summary
ResourceResolverFactoryActivator()
           
 
Method Summary
protected  void activate(org.osgi.service.component.ComponentContext componentContext)
          Activates this component, called by SCR before registering as a service
protected  void bindResourceDecorator(org.apache.sling.api.resource.ResourceDecorator decorator, Map<String,Object> props)
          Bind a resource decorator.
protected  void bindResourceProvider(org.apache.sling.api.resource.ResourceProvider provider, Map<String,Object> props)
          Bind a resource provider.
protected  void bindResourceProviderFactory(org.apache.sling.api.resource.ResourceProviderFactory provider, Map<String,Object> props)
          Bind a resource provider factory.
protected  void deactivate()
          Deactivates this component (called by SCR to take out of service)
 int getDefaultVanityPathRedirectStatus()
           
 org.osgi.service.event.EventAdmin getEventAdmin()
           
 Mapping[] getMappings()
          This method is called from MapEntries
 String getMapRoot()
           
 ResourceAccessSecurityTracker getResourceAccessSecurityTracker()
           
 ResourceDecoratorTracker getResourceDecoratorTracker()
          Get the resource decorator tracker.
 RootResourceProviderEntry getRootProviderEntry()
          Getter for rootProviderEntry.
 String[] getSearchPath()
           
 String[] getVanityPathBlackList()
           
 String[] getVanityPathWhiteList()
           
 org.apache.commons.collections.BidiMap getVirtualURLMap()
          This method is called from MapEntries
 boolean isMangleNamespacePrefixes()
           
 boolean isOptimizeAliasResolutionEnabled()
           
 boolean isVanityPathEnabled()
           
protected  void unbindResourceDecorator(org.apache.sling.api.resource.ResourceDecorator decorator, Map<String,Object> props)
          Unbind a resource decorator.
protected  void unbindResourceProvider(org.apache.sling.api.resource.ResourceProvider provider, Map<String,Object> props)
          Unbind a resource provider.
protected  void unbindResourceProviderFactory(org.apache.sling.api.resource.ResourceProviderFactory provider, Map<String,Object> props)
          Unbind a resource provider factory.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROP_PATH

@Property(value={"/apps","/libs"},
          label="Resource Search Path",
          description="The list of absolute path prefixes applied to find resources whose path is just specified with a relative path. The default value is [ \"/apps\", \"/libs\" ]. If an empty path is specified a single entry path of [ \"/\" ] is assumed.")
public static final String PROP_PATH
See Also:
Constant Field Values
Constructor Detail

ResourceResolverFactoryActivator

public ResourceResolverFactoryActivator()
Method Detail

getResourceDecoratorTracker

public ResourceDecoratorTracker getResourceDecoratorTracker()
Get the resource decorator tracker.


getResourceAccessSecurityTracker

public ResourceAccessSecurityTracker getResourceAccessSecurityTracker()

getEventAdmin

public org.osgi.service.event.EventAdmin getEventAdmin()

getRootProviderEntry

public RootResourceProviderEntry getRootProviderEntry()
Getter for rootProviderEntry.


getVirtualURLMap

public org.apache.commons.collections.BidiMap getVirtualURLMap()
This method is called from MapEntries


getMappings

public Mapping[] getMappings()
This method is called from MapEntries


getSearchPath

public String[] getSearchPath()

isMangleNamespacePrefixes

public boolean isMangleNamespacePrefixes()

getMapRoot

public String getMapRoot()

getDefaultVanityPathRedirectStatus

public int getDefaultVanityPathRedirectStatus()

isVanityPathEnabled

public boolean isVanityPathEnabled()

isOptimizeAliasResolutionEnabled

public boolean isOptimizeAliasResolutionEnabled()

getVanityPathWhiteList

public String[] getVanityPathWhiteList()

getVanityPathBlackList

public String[] getVanityPathBlackList()

activate

@Activate
protected void activate(org.osgi.service.component.ComponentContext componentContext)
Activates this component, called by SCR before registering as a service


deactivate

@Deactivate
protected void deactivate()
Deactivates this component (called by SCR to take out of service)


bindResourceProvider

protected void bindResourceProvider(org.apache.sling.api.resource.ResourceProvider provider,
                                    Map<String,Object> props)
Bind a resource provider.


unbindResourceProvider

protected void unbindResourceProvider(org.apache.sling.api.resource.ResourceProvider provider,
                                      Map<String,Object> props)
Unbind a resource provider.


bindResourceProviderFactory

protected void bindResourceProviderFactory(org.apache.sling.api.resource.ResourceProviderFactory provider,
                                           Map<String,Object> props)
Bind a resource provider factory.


unbindResourceProviderFactory

protected void unbindResourceProviderFactory(org.apache.sling.api.resource.ResourceProviderFactory provider,
                                             Map<String,Object> props)
Unbind a resource provider factory.


bindResourceDecorator

protected void bindResourceDecorator(org.apache.sling.api.resource.ResourceDecorator decorator,
                                     Map<String,Object> props)
Bind a resource decorator.


unbindResourceDecorator

protected void unbindResourceDecorator(org.apache.sling.api.resource.ResourceDecorator decorator,
                                       Map<String,Object> props)
Unbind a resource decorator.



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