Class UpOptions.Builder

Enclosing class:
UpOptions

public static final class UpOptions.Builder extends UpdateOptions.Builder<UpOptions.Builder>
Builder for UpOptions.
  • Method Details

    • expectNoChanges

      public UpOptions.Builder expectNoChanges(boolean expectNoChanges)
      Return an error if any changes are proposed by this preview.
      Parameters:
      expectNoChanges - true if the preview should fail if any changes are proposed
      Returns:
      the builder
    • diff

      public UpOptions.Builder diff(boolean diff)
      Display the operation as a rich diff showing the overall change.
      Parameters:
      diff - true if a rich diff should be displayed
      Returns:
      the builder
    • replaces

      public UpOptions.Builder replaces(List<String> replaces)
      Resources to replace.
      Parameters:
      replaces - the list of resource URNs to replace
      Returns:
      the builder
    • excludeDependents

      public UpOptions.Builder excludeDependents(boolean excludeDependents)
      Allows exclusion of dependent targets discovered but not specified UpdateOptions.Builder.excludes(java.util.List<java.lang.String>).
      Parameters:
      excludeDependents - true if dependent targets should be excluded
      Returns:
      the builder
    • targetDependents

      public UpOptions.Builder targetDependents(boolean targetDependents)
      Allows updating of dependent targets discovered but not specified UpdateOptions.Builder.targets(java.util.List<java.lang.String>).
      Parameters:
      targetDependents - true if dependent targets should be updated
      Returns:
      the builder
    • program

      public UpOptions.Builder program(Consumer<Context> program)
      The program to execute as part of the update.
      Parameters:
      program - the program to execute
      Returns:
      the builder
    • plan

      public UpOptions.Builder plan(String plan)
      The path to an update plan to use for the update.
      Parameters:
      plan - the path to the update plan
      Returns:
      the builder
    • showSecrets

      public UpOptions.Builder showSecrets(boolean showSecrets)
      Show config secrets when they appear.
      Parameters:
      showSecrets - whether to show secrets
      Returns:
      the builder
    • logger

      public UpOptions.Builder logger(Logger logger)
      A custom logger instance that will be used for the action. Note that it will only be used if program is also provided.
      Parameters:
      logger - the logger
      Returns:
      the builder
    • continueOnError

      public UpOptions.Builder continueOnError(boolean continueOnError)
      Continue to perform the update operation despite the occurrence of errors.
      Parameters:
      continueOnError - whether to continue on error
      Returns:
      the builder
    • build

      public UpOptions build()
      Builds the UpOptions.
      Returns:
      the up options