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.
- See Also:
-
ResourceMapperResourceResolver.map(String)ResourceResolver.map(javax.servlet.http.HttpServletRequest, String)
-
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 Map<String,Collection<String>> getAliasMap(@NotNull org.apache.sling.api.resource.Resource parent) @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 mappings
-
Field Details
-
EMPTY
-
-
Method Details
-
getAliasMap
Returns all alias entries for children of the specifiedparentPathThe 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
-
getAliasMap
@NotNull @NotNull Map<String,Collection<String>> getAliasMap(@NotNull @NotNull org.apache.sling.api.resource.Resource parent) -
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
-