Class SimplePathMapping

java.lang.Object
org.apache.jackrabbit.vault.fs.api.SimplePathMapping
All Implemented Interfaces:
PathMapping

public class SimplePathMapping extends Object implements PathMapping
Implements a simple path mapping that strips and prefixes a path.
Since:
2.4.10
  • Constructor Details

    • SimplePathMapping

      public SimplePathMapping(@NotNull @NotNull String strip, @NotNull @NotNull String root)
      Create a simple path mapping.
      Parameters:
      strip - the string to strip from the beginning of the path
      root - the prefix to add to the path.
  • Method Details

    • map

      @NotNull public @NotNull String map(@NotNull @NotNull String path)
      Maps the given path to a new location.
      Specified by:
      map in interface PathMapping
      Parameters:
      path - the path
      Returns:
      the mapped path.
    • map

      @NotNull public @NotNull String map(@NotNull @NotNull String path, boolean reverse)
      Maps the given path to a new location.
      Specified by:
      map in interface PathMapping
      Parameters:
      path - the path
      reverse - if true a reverse mapping is applied
      Returns:
      the mapped path.