Interface MapEntriesHandler
- All Known Implementing Classes:
MapEntries
This interface is intended for bundle internal use and its main goal is to prevent accidental modifications of the internal state by only exposing accessor methods.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescription@NotNull Map<String,
Collection<String>> getAliasMap
(@NotNull String parentPath) Returns all alias entries for children of the specifiedparentPath
@NotNull Collection<MapEntry>
Return a flat listing of map entries used for mapping resources to URLsCreates a flat listing of all the map entries used for resolving URLs to resourcesgetResolveMapsIterator
(@NotNull String requestPath) Creates an iterator over the possibly applicable mapping entries for resolving a resourceReturns vanity paths mappingsboolean
Whether alias resolution optimization is enabled.void
Log an error if alias optimization should be used but is currently disabled
-
Field Details
-
EMPTY
-
-
Method Details
-
isOptimizeAliasResolutionEnabled
boolean isOptimizeAliasResolutionEnabled()Whether alias resolution optimization is enabled. If it is enabledgetAliasMap(String)
can be used.- Returns:
- true if the optimizedAliasResolution should be used, false otherwise
-
logDisableAliasOptimization
void logDisableAliasOptimization()Log an error if alias optimization should be used but is currently disabled -
getAliasMap
Returns all alias entries for children of the specifiedparentPath
The returned map has resource names as keys and the assigned aliases as values.
- Parameters:
parentPath
- the parent path- Returns:
- a map of all child alias entries, possibly empty
-
getResolveMapsIterator
Creates an iterator over the possibly applicable mapping entries for resolving a resourceThis method uses the request path to filter out any unapplicable mapping entries and is therefore preferrable over
getResolveMaps()
.The iterator will iterate over the mapping entries in the order of the pattern length.
- Parameters:
requestPath
- the requestPath- Returns:
- the map entry iterator
-
getMapMaps
Return a flat listing of map entries used for mapping resources to URLsThis method returns information about all mapping rules. Note that vanity paths are excluded.
- Returns:
- an unmodifiable collection of map entries
-
getResolveMaps
Creates a flat listing of all the map entries used for resolving URLs to resourcesThis method returns information about all resolve rules, such as vanity paths, mapping entries, virtual URLs and URL mappings.
This list is computed on-demand and therefore should not be used in performance-critical code.
- Returns:
- an unmodifiable, sorted, list of resolution map entries
-
getVanityPathMappings
Returns vanity paths mappingsThe keys in the map are resource paths and the values are the vanity mappings.
- Returns:
- an unmodifiable list of vanity path mappings
-