Interface MapEntriesHandler

All Known Implementing Classes:
MapEntries

public interface MapEntriesHandler
Exposes low-level methods used for resource resolving and mapping

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:
  • Field Details

  • Method Details

    • isOptimizeAliasResolutionEnabled

      boolean isOptimizeAliasResolutionEnabled()
      Whether alias resolution optimization is enabled. If it is enabled getAliasMap(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

      @NotNull @NotNull Map<String,Collection<String>> getAliasMap(@NotNull @NotNull String parentPath)
      Returns all alias entries for children of the specified parentPath

      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

      @NotNull @NotNull Iterator<MapEntry> getResolveMapsIterator(@NotNull @NotNull String requestPath)
      Creates an iterator over the possibly applicable mapping entries for resolving a resource

      This 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

      @NotNull @NotNull Collection<MapEntry> getMapMaps()
      Return a flat listing of map entries used for mapping resources to URLs

      This method returns information about all mapping rules. Note that vanity paths are excluded.

      Returns:
      an unmodifiable collection of map entries
    • getResolveMaps

      @NotNull @NotNull List<MapEntry> getResolveMaps()
      Creates a flat listing of all the map entries used for resolving URLs to resources

      This 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

      @NotNull @NotNull Map<String,List<String>> getVanityPathMappings()
      Returns vanity paths mappings

      The keys in the map are resource paths and the values are the vanity mappings.

      Returns:
      an unmodifiable list of vanity path mappings