Package org.apache.sling.resourceresolver.impl.mapping

# Class VanityPathHandler

java.lang.Object
org.apache.sling.resourceresolver.impl.mapping.VanityPathHandler

public class VanityPathHandler extends Object
All things related to the handling of vanity paths.

## Field Summary

Fields
Modifier and Type
Field
Description
`static final String`
`PROP_REDIRECT_EXTERNAL`
`static final String`
`PROP_REDIRECT_EXTERNAL_REDIRECT_STATUS`
`static final String`
`PROP_VANITY_ORDER`
`static final String`
`PROP_VANITY_PATH`

## Constructor Summary

Constructors
Constructor
Description
`VanityPathHandler(MapConfigurationProvider factory, Map<String,List<MapEntry>> resolveMapsMap, ReentrantLock initializing, Consumer<String> drain)`

## Method Summary

Modifier and Type
Method
Description
`@Nullable Iterator<MapEntry>`
`getCurrentMapEntryForVanityPath(String key)`
`Map<String,List<String>>`
`getVanityPathMappings()`
`protected void`
`initializeVanityPaths()`
Actual vanity path initializer.
`boolean`
`isReady()`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### PROP_REDIRECT_EXTERNAL

public static final String PROP_REDIRECT_EXTERNAL

See Also:
  - Constant Field Values

### PROP_REDIRECT_EXTERNAL_REDIRECT_STATUS

public static final String PROP_REDIRECT_EXTERNAL_REDIRECT_STATUS

See Also:
  - Constant Field Values

### PROP_VANITY_PATH

public static final String PROP_VANITY_PATH

See Also:
  - Constant Field Values

### PROP_VANITY_ORDER

public static final String PROP_VANITY_ORDER

See Also:
  - Constant Field Values

## Constructor Details

### VanityPathHandler

public VanityPathHandler(MapConfigurationProvider factory, Map<String,List<MapEntry>> resolveMapsMap, ReentrantLock initializing, Consumer<String> drain)

## Method Details

### isReady

public boolean isReady()

### getVanityPathMappings

public Map<String,List<String>> getVanityPathMappings()

### initializeVanityPaths

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

### getCurrentMapEntryForVanityPath

@Nullable public @Nullable Iterator<MapEntry> getCurrentMapEntryForVanityPath(String key)