Record Class CaptureGenerationRequest

java.lang.Object
java.lang.Record
com.shaft.capture.generate.CaptureGenerationRequest
Record Components:
sessionPath - persisted Capture session
outputDirectory - generated project root
packageName - generated Java package
className - optional generated class name
overwrite - whether existing generated artifacts may be replaced
compile - whether to compile the generated source
replay - whether to execute the compiled TestNG test
replayTimeout - maximum replay duration
enrichmentMode - optional AI enrichment phase
enrichmentPreviewPath - preview path to write or apply
enrichmentApproved - whether a reviewed preview may be applied
aiApprovalPolicy - explicit evidence and processing-location approval for preview generation
fallbackLocators - whether generated WebDriver replay should try captured fallback locators
controlFlowMode - deterministic control-flow suggestion lifecycle
controlFlowPreviewPath - control-flow preview path to write or apply

public record CaptureGenerationRequest(Path sessionPath, Path outputDirectory, String packageName, String className, boolean overwrite, boolean compile, boolean replay, Duration replayTimeout, CaptureGenerationRequest.EnrichmentMode enrichmentMode, Path enrichmentPreviewPath, boolean enrichmentApproved, ApprovalPolicy aiApprovalPolicy, boolean fallbackLocators, CaptureGenerationRequest.ControlFlowMode controlFlowMode, Path controlFlowPreviewPath) extends Record
Immutable options for converting a persisted Capture session into a SHAFT TestNG test.
  • Constructor Details

    • CaptureGenerationRequest

      public CaptureGenerationRequest(Path sessionPath, Path outputDirectory, String packageName, String className, boolean overwrite, boolean compile, boolean replay, Duration replayTimeout, CaptureGenerationRequest.EnrichmentMode enrichmentMode, Path enrichmentPreviewPath, boolean enrichmentApproved, ApprovalPolicy aiApprovalPolicy, boolean fallbackLocators, CaptureGenerationRequest.ControlFlowMode controlFlowMode, Path controlFlowPreviewPath)
      Creates normalized generation options.
    • CaptureGenerationRequest

      public CaptureGenerationRequest(Path sessionPath, Path outputDirectory, String packageName, String className, boolean overwrite, boolean compile, boolean replay, Duration replayTimeout, CaptureGenerationRequest.EnrichmentMode enrichmentMode, Path enrichmentPreviewPath, boolean enrichmentApproved, ApprovalPolicy aiApprovalPolicy, boolean fallbackLocators)
      Compatibility constructor with control-flow suggestions disabled.
      Parameters:
      sessionPath - persisted Capture session
      outputDirectory - generated project root
      packageName - generated Java package
      className - optional generated class name
      overwrite - whether existing generated artifacts may be replaced
      compile - whether to compile the generated source
      replay - whether to execute the compiled TestNG test
      replayTimeout - maximum replay duration
      enrichmentMode - optional AI enrichment phase
      enrichmentPreviewPath - preview path to write or apply
      enrichmentApproved - whether a reviewed preview may be applied
      aiApprovalPolicy - explicit evidence and processing-location approval for preview generation
      fallbackLocators - whether generated WebDriver replay should try captured fallback locators
    • CaptureGenerationRequest

      public CaptureGenerationRequest(Path sessionPath, Path outputDirectory, String packageName, String className, boolean overwrite, boolean compile, boolean replay, Duration replayTimeout, CaptureGenerationRequest.EnrichmentMode enrichmentMode, Path enrichmentPreviewPath, boolean enrichmentApproved, ApprovalPolicy aiApprovalPolicy)
      Compatibility constructor with fallback locator replay disabled.
      Parameters:
      sessionPath - persisted Capture session
      outputDirectory - generated project root
      packageName - generated Java package
      className - optional generated class name
      overwrite - whether existing generated artifacts may be replaced
      compile - whether to compile the generated source
      replay - whether to execute the compiled TestNG test
      replayTimeout - maximum replay duration
      enrichmentMode - optional AI enrichment phase
      enrichmentPreviewPath - preview path to write or apply
      enrichmentApproved - whether a reviewed preview may be applied
      aiApprovalPolicy - explicit evidence and processing-location approval for preview generation
  • Method Details

    • defaults

      public static CaptureGenerationRequest defaults(Path sessionPath)
      Creates deterministic defaults for one session.
      Parameters:
      sessionPath - persisted session
      Returns:
      default request
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • sessionPath

      public Path sessionPath()
      Returns the value of the sessionPath record component.
      Returns:
      the value of the sessionPath record component
    • outputDirectory

      public Path outputDirectory()
      Returns the value of the outputDirectory record component.
      Returns:
      the value of the outputDirectory record component
    • packageName

      public String packageName()
      Returns the value of the packageName record component.
      Returns:
      the value of the packageName record component
    • className

      public String className()
      Returns the value of the className record component.
      Returns:
      the value of the className record component
    • overwrite

      public boolean overwrite()
      Returns the value of the overwrite record component.
      Returns:
      the value of the overwrite record component
    • compile

      public boolean compile()
      Returns the value of the compile record component.
      Returns:
      the value of the compile record component
    • replay

      public boolean replay()
      Returns the value of the replay record component.
      Returns:
      the value of the replay record component
    • replayTimeout

      public Duration replayTimeout()
      Returns the value of the replayTimeout record component.
      Returns:
      the value of the replayTimeout record component
    • enrichmentMode

      public CaptureGenerationRequest.EnrichmentMode enrichmentMode()
      Returns the value of the enrichmentMode record component.
      Returns:
      the value of the enrichmentMode record component
    • enrichmentPreviewPath

      public Path enrichmentPreviewPath()
      Returns the value of the enrichmentPreviewPath record component.
      Returns:
      the value of the enrichmentPreviewPath record component
    • enrichmentApproved

      public boolean enrichmentApproved()
      Returns the value of the enrichmentApproved record component.
      Returns:
      the value of the enrichmentApproved record component
    • aiApprovalPolicy

      public ApprovalPolicy aiApprovalPolicy()
      Returns the value of the aiApprovalPolicy record component.
      Returns:
      the value of the aiApprovalPolicy record component
    • fallbackLocators

      public boolean fallbackLocators()
      Returns the value of the fallbackLocators record component.
      Returns:
      the value of the fallbackLocators record component
    • controlFlowMode

      public CaptureGenerationRequest.ControlFlowMode controlFlowMode()
      Returns the value of the controlFlowMode record component.
      Returns:
      the value of the controlFlowMode record component
    • controlFlowPreviewPath

      public Path controlFlowPreviewPath()
      Returns the value of the controlFlowPreviewPath record component.
      Returns:
      the value of the controlFlowPreviewPath record component