org.apache.sling.resourceresolver.impl.mapping
Class MapEntries

java.lang.Object
  extended by org.apache.sling.resourceresolver.impl.mapping.MapEntries
All Implemented Interfaces:
org.osgi.service.event.EventHandler

public class MapEntries
extends Object
implements org.osgi.service.event.EventHandler


Field Summary
static int DEFAULT_DEFAULT_VANITY_PATH_REDIRECT_STATUS
           
static String DEFAULT_MAP_ROOT
           
static MapEntries EMPTY
           
static String PROP_REDIRECT_EXTERNAL
           
static String PROP_REDIRECT_EXTERNAL_REDIRECT_STATUS
           
static String PROP_REDIRECT_EXTERNAL_STATUS
           
 
Constructor Summary
MapEntries(MapConfigurationProvider factory, org.osgi.framework.BundleContext bundleContext, org.osgi.service.event.EventAdmin eventAdmin)
           
 
Method Summary
 void dispose()
          Cleans up this class.
protected  void doInit()
          Actual initializer.
 Map<String,String> getAliasMap(String parentPath)
           
 Collection<MapEntry> getMapMaps()
           
 List<MapEntry> getResolveMaps()
          This is for the web console plugin
 Iterator<MapEntry> getResolveMapsIterator(String requestPath)
          Calculate the resolve maps.
 void handleEvent(org.osgi.service.event.Event event)
          Handles the change to any of the node properties relevant for vanity URL mappings.
 boolean isOptimizeAliasResolutionEnabled()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EMPTY

public static final MapEntries EMPTY

PROP_REDIRECT_EXTERNAL

public static final String PROP_REDIRECT_EXTERNAL
See Also:
Constant Field Values

PROP_REDIRECT_EXTERNAL_STATUS

public static final String PROP_REDIRECT_EXTERNAL_STATUS
See Also:
Constant Field Values

PROP_REDIRECT_EXTERNAL_REDIRECT_STATUS

public static final String PROP_REDIRECT_EXTERNAL_REDIRECT_STATUS
See Also:
Constant Field Values

DEFAULT_MAP_ROOT

public static final String DEFAULT_MAP_ROOT
See Also:
Constant Field Values

DEFAULT_DEFAULT_VANITY_PATH_REDIRECT_STATUS

public static final int DEFAULT_DEFAULT_VANITY_PATH_REDIRECT_STATUS
See Also:
Constant Field Values
Constructor Detail

MapEntries

public MapEntries(MapConfigurationProvider factory,
                  org.osgi.framework.BundleContext bundleContext,
                  org.osgi.service.event.EventAdmin eventAdmin)
           throws org.apache.sling.api.resource.LoginException
Throws:
org.apache.sling.api.resource.LoginException
Method Detail

doInit

protected void doInit()
Actual initializer. Guards itself against concurrent use by using a ReentrantLock. Does nothing if the resource resolver has already been null-ed.


isOptimizeAliasResolutionEnabled

public boolean isOptimizeAliasResolutionEnabled()

dispose

public void dispose()
Cleans up this class.


getResolveMaps

public List<MapEntry> getResolveMaps()
This is for the web console plugin


getResolveMapsIterator

public Iterator<MapEntry> getResolveMapsIterator(String requestPath)
Calculate the resolve maps. As the entries have to be sorted by pattern length, we have to create a new list containing all relevant entries.


getMapMaps

public Collection<MapEntry> getMapMaps()

getAliasMap

public Map<String,String> getAliasMap(String parentPath)

handleEvent

public void handleEvent(org.osgi.service.event.Event event)
Handles the change to any of the node properties relevant for vanity URL mappings. The #MapEntries(ResourceResolverFactoryImpl, BundleContext, EventAdmin) constructor makes sure the event listener is registered to only get appropriate events.

Specified by:
handleEvent in interface org.osgi.service.event.EventHandler


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