org.apache.sling.resourceresolver.impl
Class CommonResourceResolverFactoryImpl

java.lang.Object
  extended by org.apache.sling.resourceresolver.impl.CommonResourceResolverFactoryImpl
All Implemented Interfaces:
org.apache.sling.api.resource.ResourceResolverFactory, MapConfigurationProvider

public class CommonResourceResolverFactoryImpl
extends Object
implements org.apache.sling.api.resource.ResourceResolverFactory, MapConfigurationProvider

The CommonResourceResolverFactoryImpl is a singleton implementing the shared/common functionality of all resource resolver factories.


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.apache.sling.resourceresolver.impl.mapping.MapConfigurationProvider
MapConfigurationProvider.VanityPathConfig
 
Field Summary
 
Fields inherited from interface org.apache.sling.api.resource.ResourceResolverFactory
PASSWORD, SUBSERVICE, USER, USER_IMPERSONATION
 
Constructor Summary
CommonResourceResolverFactoryImpl(ResourceResolverFactoryActivator activator)
           
 
Method Summary
protected  void activate(org.osgi.framework.BundleContext bundleContext)
          Activates this component
protected  void deactivate()
          Deativates this component
 org.apache.sling.api.resource.ResourceResolver getAdministrativeResourceResolver(Map<String,Object> passedAuthenticationInfo)
           
 int getDefaultVanityPathRedirectStatus()
           
 MapEntries getMapEntries()
           
 Mapping[] getMappings()
           
 String getMapRoot()
           
 ResourceAccessSecurityTracker getResourceAccessSecurityTracker()
          get's the ServiceTracker of the ResourceAccessSecurity service
 ResourceDecoratorTracker getResourceDecoratorTracker()
           
 org.apache.sling.api.resource.ResourceResolver getResourceResolver(Map<String,Object> passedAuthenticationInfo)
           
 org.apache.sling.api.resource.ResourceResolver getResourceResolverInternal(Map<String,Object> authenticationInfo, boolean isAdmin)
          Create a new ResourceResolver
 RootResourceProviderEntry getRootProviderEntry()
           
 String[] getSearchPath()
           
 org.apache.sling.api.resource.ResourceResolver getServiceResourceResolver(Map<String,Object> authenticationInfo)
           
 List<MapConfigurationProvider.VanityPathConfig> getVanityPathConfig()
          A list of white and black list prefixes all ending with a slash.
 org.apache.commons.collections.BidiMap getVirtualURLMap()
           
 boolean isMangleNamespacePrefixes()
           
 boolean isOptimizeAliasResolutionEnabled()
           
 boolean isVanityPathEnabled()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CommonResourceResolverFactoryImpl

public CommonResourceResolverFactoryImpl(ResourceResolverFactoryActivator activator)
Method Detail

getAdministrativeResourceResolver

public org.apache.sling.api.resource.ResourceResolver getAdministrativeResourceResolver(Map<String,Object> passedAuthenticationInfo)
                                                                                 throws org.apache.sling.api.resource.LoginException
Specified by:
getAdministrativeResourceResolver in interface org.apache.sling.api.resource.ResourceResolverFactory
Throws:
org.apache.sling.api.resource.LoginException

getResourceResolver

public org.apache.sling.api.resource.ResourceResolver getResourceResolver(Map<String,Object> passedAuthenticationInfo)
                                                                   throws org.apache.sling.api.resource.LoginException
Specified by:
getResourceResolver in interface org.apache.sling.api.resource.ResourceResolverFactory
Throws:
org.apache.sling.api.resource.LoginException

getResourceResolverInternal

public org.apache.sling.api.resource.ResourceResolver getResourceResolverInternal(Map<String,Object> authenticationInfo,
                                                                                  boolean isAdmin)
                                                                           throws org.apache.sling.api.resource.LoginException
Create a new ResourceResolver

Parameters:
authenticationInfo - The authentication map
isAdmin - is an administrative resolver requested?
Returns:
A resource resolver
Throws:
org.apache.sling.api.resource.LoginException - if login to any of the required resource providers fails.

getMapEntries

public MapEntries getMapEntries()

activate

protected void activate(org.osgi.framework.BundleContext bundleContext)
Activates this component


deactivate

protected void deactivate()
Deativates this component


getResourceDecoratorTracker

public ResourceDecoratorTracker getResourceDecoratorTracker()

getSearchPath

public String[] getSearchPath()

isMangleNamespacePrefixes

public boolean isMangleNamespacePrefixes()

getMapRoot

public String getMapRoot()
Specified by:
getMapRoot in interface MapConfigurationProvider

getMappings

public Mapping[] getMappings()
Specified by:
getMappings in interface MapConfigurationProvider

getVirtualURLMap

public org.apache.commons.collections.BidiMap getVirtualURLMap()
Specified by:
getVirtualURLMap in interface MapConfigurationProvider

getRootProviderEntry

public RootResourceProviderEntry getRootProviderEntry()

getDefaultVanityPathRedirectStatus

public int getDefaultVanityPathRedirectStatus()
Specified by:
getDefaultVanityPathRedirectStatus in interface MapConfigurationProvider

getResourceAccessSecurityTracker

public ResourceAccessSecurityTracker getResourceAccessSecurityTracker()
get's the ServiceTracker of the ResourceAccessSecurity service


getServiceResourceResolver

public org.apache.sling.api.resource.ResourceResolver getServiceResourceResolver(Map<String,Object> authenticationInfo)
                                                                          throws org.apache.sling.api.resource.LoginException
Specified by:
getServiceResourceResolver in interface org.apache.sling.api.resource.ResourceResolverFactory
Throws:
org.apache.sling.api.resource.LoginException

isVanityPathEnabled

public boolean isVanityPathEnabled()
Specified by:
isVanityPathEnabled in interface MapConfigurationProvider

isOptimizeAliasResolutionEnabled

public boolean isOptimizeAliasResolutionEnabled()
Specified by:
isOptimizeAliasResolutionEnabled in interface MapConfigurationProvider

getVanityPathConfig

public List<MapConfigurationProvider.VanityPathConfig> getVanityPathConfig()
Description copied from interface: MapConfigurationProvider
A list of white and black list prefixes all ending with a slash. If null is returned, all paths are allowed.

Specified by:
getVanityPathConfig in interface MapConfigurationProvider


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