Interface CellPathResolver

    • Method Detail

      • getCurrentCellName

        default CanonicalCellName getCurrentCellName()
        Cell name resolver works in context of some cell. This function returns current cell.
      • getCellNameResolver

        CellNameResolver getCellNameResolver()
        Provides access to the CellNameResolver for this cell. This is to assist in migration to the new name/path resolvers.
      • getCellPath

        Optional<Path> getCellPath​(Optional<String> cellName)
        Parameters:
        cellName - name of cell, Optional.empty() for root cell.
        Returns:
        Absolute path to the physical location of the cell, or Optional.empty() if the cell name cannot be resolved.
      • getCellPathOrThrow

        Path getCellPathOrThrow​(Optional<String> cellName)
        Parameters:
        cellName - name of cell, Optional.empty() for root cell.
        Returns:
        Absolute path to the physical location of the cell
        Throws:
        AssertionError - if cell is not known
      • getCellPathOrThrow

        Path getCellPathOrThrow​(CanonicalCellName cellName)
        Returns:
        Absolute path to the physical location of the cell that contains the provided target
        Throws:
        AssertionError - if cell is not known
      • resolveCellRelativePath

        Path resolveCellRelativePath​(CellRelativePath cellRelativePath)
        Resolve a cell-relative path to an absolute path.
      • getCellPathsByRootCellExternalName

        com.google.common.collect.ImmutableMap<String,​AbsPath> getCellPathsByRootCellExternalName()
        Returns:
        absolute paths to all cells this resolver knows about. The key is the name of the cell in the root cell's config (this is not necessarily the canonical name).
      • getCanonicalCellName

        Optional<String> getCanonicalCellName​(Path cellPath)
        Returns a cell name that can be used to refer to the cell at the given path.

        Returns Optional.empty() if the path refers to the root cell. Returns the lexicographically smallest name if the cell path has multiple names.

        Note: this is not the inverse of getCellPath(Optional), which returns the current, rather than the root, cell path if the cell name is empty.

        Throws:
        IllegalArgumentException - if cell path is not known to the CellPathResolver.
      • getKnownRoots

        com.google.common.collect.ImmutableSortedSet<AbsPath> getKnownRoots()
        Returns:
        paths to roots of all cells known to this resolver.