Interface Reviewer

All Superinterfaces:
Function<PathProvider,ReviewResult>
All Known Implementing Classes:
AutomaticReviewer, NoneReviewer

public interface Reviewer extends Function<PathProvider,ReviewResult>
Interface for triggering a review by the user.

This usually means that a diff/merge tool is opened, which presents the difference between the received and the previously approved value to users in case they differ.

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Placeholder in commands that is replaced with the approved file path.
    static final String
    Placeholder in commands that is replaced with the received file path.
  • Method Summary

    Static Methods
    Modifier and Type
    Method
    Description
    static String
    resolveCommand(String commandTemplate, Path approvedPath, Path receivedPath)
    Resolves placeholders in the given command template with the actual file paths.
    static String
    resolveCommand(String commandTemplate, PathProvider pathProvider)
    Resolves placeholders in the given command template with the actual file paths.

    Methods inherited from interface java.util.function.Function

    andThen, apply, compose
  • Field Details

    • RECEIVED_PLACEHOLDER

      static final String RECEIVED_PLACEHOLDER
      Placeholder in commands that is replaced with the received file path.
      See Also:
    • APPROVED_PLACEHOLDER

      static final String APPROVED_PLACEHOLDER
      Placeholder in commands that is replaced with the approved file path.
      See Also:
  • Method Details

    • resolveCommand

      static String resolveCommand(String commandTemplate, PathProvider pathProvider)
      Resolves placeholders in the given command template with the actual file paths.
      Parameters:
      commandTemplate - the command containing "{receivedFile}" and "{approvedFile}" placeholders
      pathProvider - the path provider to resolve paths from
      Returns:
      the command with placeholders replaced by actual paths
    • resolveCommand

      static String resolveCommand(String commandTemplate, Path approvedPath, Path receivedPath)
      Resolves placeholders in the given command template with the actual file paths.
      Parameters:
      commandTemplate - the command containing "{receivedFile}" and "{approvedFile}" placeholders
      approvedPath - the approved file path
      receivedPath - the received file path
      Returns:
      the command with placeholders replaced by actual paths