Record Class CaptureGenerationRequest
java.lang.Object
java.lang.Record
com.shaft.capture.generate.CaptureGenerationRequest
- Record Components:
sessionPath- persisted Capture sessionoutputDirectory- generated project rootpackageName- generated Java packageclassName- optional generated class nameoverwrite- whether existing generated artifacts may be replacedcompile- whether to compile the generated sourcereplay- whether to execute the compiled TestNG testreplayTimeout- maximum replay durationenrichmentMode- optional AI enrichment phaseenrichmentPreviewPath- preview path to write or applyenrichmentApproved- whether a reviewed preview may be appliedaiApprovalPolicy- explicit evidence and processing-location approval for preview generationfallbackLocators- whether generated WebDriver replay should try captured fallback locatorscontrolFlowMode- deterministic control-flow suggestion lifecyclecontrolFlowPreviewPath- 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.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumDeterministic control-flow suggestion lifecycle.static enumAI enrichment lifecycle. -
Constructor Summary
ConstructorsConstructorDescriptionCaptureGenerationRequest(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.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.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. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theaiApprovalPolicyrecord component.Returns the value of theclassNamerecord component.booleancompile()Returns the value of thecompilerecord component.Returns the value of thecontrolFlowModerecord component.Returns the value of thecontrolFlowPreviewPathrecord component.static CaptureGenerationRequestCreates deterministic defaults for one session.booleanReturns the value of theenrichmentApprovedrecord component.Returns the value of theenrichmentModerecord component.Returns the value of theenrichmentPreviewPathrecord component.final booleanIndicates whether some other object is "equal to" this one.booleanReturns the value of thefallbackLocatorsrecord component.final inthashCode()Returns a hash code value for this object.Returns the value of theoutputDirectoryrecord component.booleanReturns the value of theoverwriterecord component.Returns the value of thepackageNamerecord component.booleanreplay()Returns the value of thereplayrecord component.Returns the value of thereplayTimeoutrecord component.Returns the value of thesessionPathrecord component.final StringtoString()Returns a string representation of this record class.
-
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 sessionoutputDirectory- generated project rootpackageName- generated Java packageclassName- optional generated class nameoverwrite- whether existing generated artifacts may be replacedcompile- whether to compile the generated sourcereplay- whether to execute the compiled TestNG testreplayTimeout- maximum replay durationenrichmentMode- optional AI enrichment phaseenrichmentPreviewPath- preview path to write or applyenrichmentApproved- whether a reviewed preview may be appliedaiApprovalPolicy- explicit evidence and processing-location approval for preview generationfallbackLocators- 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 sessionoutputDirectory- generated project rootpackageName- generated Java packageclassName- optional generated class nameoverwrite- whether existing generated artifacts may be replacedcompile- whether to compile the generated sourcereplay- whether to execute the compiled TestNG testreplayTimeout- maximum replay durationenrichmentMode- optional AI enrichment phaseenrichmentPreviewPath- preview path to write or applyenrichmentApproved- whether a reviewed preview may be appliedaiApprovalPolicy- explicit evidence and processing-location approval for preview generation
-
-
Method Details
-
defaults
Creates deterministic defaults for one session.- Parameters:
sessionPath- persisted session- Returns:
- default request
-
toString
-
hashCode
-
equals
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 withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
sessionPath
Returns the value of thesessionPathrecord component.- Returns:
- the value of the
sessionPathrecord component
-
outputDirectory
Returns the value of theoutputDirectoryrecord component.- Returns:
- the value of the
outputDirectoryrecord component
-
packageName
Returns the value of thepackageNamerecord component.- Returns:
- the value of the
packageNamerecord component
-
className
-
overwrite
-
compile
-
replay
-
replayTimeout
Returns the value of thereplayTimeoutrecord component.- Returns:
- the value of the
replayTimeoutrecord component
-
enrichmentMode
Returns the value of theenrichmentModerecord component.- Returns:
- the value of the
enrichmentModerecord component
-
enrichmentPreviewPath
Returns the value of theenrichmentPreviewPathrecord component.- Returns:
- the value of the
enrichmentPreviewPathrecord component
-
enrichmentApproved
public boolean enrichmentApproved()Returns the value of theenrichmentApprovedrecord component.- Returns:
- the value of the
enrichmentApprovedrecord component
-
aiApprovalPolicy
Returns the value of theaiApprovalPolicyrecord component.- Returns:
- the value of the
aiApprovalPolicyrecord component
-
fallbackLocators
public boolean fallbackLocators()Returns the value of thefallbackLocatorsrecord component.- Returns:
- the value of the
fallbackLocatorsrecord component
-
controlFlowMode
Returns the value of thecontrolFlowModerecord component.- Returns:
- the value of the
controlFlowModerecord component
-
controlFlowPreviewPath
Returns the value of thecontrolFlowPreviewPathrecord component.- Returns:
- the value of the
controlFlowPreviewPathrecord component
-