Package io.jenkins.plugins.finitestate
Class FiniteStateSBOMImportRecorder
java.lang.Object
hudson.tasks.BuildStepCompatibilityLayer
hudson.tasks.Publisher
hudson.tasks.Recorder
io.jenkins.plugins.finitestate.BaseFiniteStateRecorder
io.jenkins.plugins.finitestate.FiniteStateSBOMImportRecorder
- All Implemented Interfaces:
ExtensionPoint,Describable<Publisher>,BuildStep,SimpleBuildStep
Refactored SBOM Import Recorder that extends the base class to reduce code duplication.
This demonstrates how the new base classes can be used to eliminate repetitive code.
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class hudson.tasks.Publisher
Publisher.DescriptorExtensionListImplNested classes/interfaces inherited from interface hudson.tasks.BuildStep
BuildStep.PublisherListNested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudsonNested classes/interfaces inherited from interface jenkins.tasks.SimpleBuildStep
SimpleBuildStep.LastBuildAction, SimpleBuildStep.LastBuildActionFactory -
Field Summary
Fields inherited from class io.jenkins.plugins.finitestate.BaseFiniteStateRecorder
apiTokenCredentialsId, DEFAULT_POLL_TIMEOUT_MINUTES, externalizableId, platform, PLATFORM_2026, PLATFORM_LEGACY, pollTimeoutMinutes, preRelease, projectName, projectVersion, subdomain, waitForCompletionFields inherited from interface hudson.tasks.BuildStep
BUILDERS, PUBLISHERS -
Constructor Summary
ConstructorsConstructorDescriptionFiniteStateSBOMImportRecorder(String subdomain, String apiTokenCredentialsId, String sbomFilePath, String projectName) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidconfigureRequest(FiniteStateScanRequest request) Populate the type-specific portion of the scan request (kind + per-analysis fields), used by the 2026 platform's v0 REST transport.protected intexecuteAnalysis(FilePath cltPath, FilePath filePath, String projectName, String projectVersion, String apiToken, FilePath workspace, Launcher launcher, TaskListener listener) Execute the analysis via the legacy platform's CLT transport.protected StringGet the analysis type name for logging and resultsprotected StringGet the file path field name for validationprotected StringGet the file path valuevoidsetSbomFilePath(String sbomFilePath) Methods inherited from class io.jenkins.plugins.finitestate.BaseFiniteStateRecorder
addConsolidatedResult, addConsolidatedResult, buildCLTEnvironment, getApiTokenCredentialsId, getCLTPath, getExternalizableId, getFileFromWorkspace, getPlatform, getPollTimeoutMinutes, getPreRelease, getProjectName, getProjectVersion, getSecretTextValue, getSubdomain, getWaitForCompletion, isRestApi, logCommonInfo, parseVersion, perform, setApiTokenCredentialsId, setExternalizableId, setPlatform, setPollTimeoutMinutes, setPreRelease, setProjectName, setProjectVersion, setSubdomain, setWaitForCompletion, validateCommonFieldsMethods inherited from class hudson.tasks.Recorder
getDescriptorMethods inherited from class hudson.tasks.Publisher
all, getProjectAction, needsToRunAfterFinalized, prebuildMethods inherited from class hudson.tasks.BuildStepCompatibilityLayer
getProjectAction, getProjectActions, perform, perform, prebuildMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface hudson.tasks.BuildStep
getProjectAction, getProjectActions, getRequiredMonitorService, perform, prebuildMethods inherited from interface jenkins.tasks.SimpleBuildStep
perform, perform, requiresWorkspace
-
Constructor Details
-
FiniteStateSBOMImportRecorder
-
-
Method Details
-
getSbomFilePath
-
setSbomFilePath
-
configureRequest
Description copied from class:BaseFiniteStateRecorderPopulate the type-specific portion of the scan request (kind + per-analysis fields), used by the 2026 platform's v0 REST transport. The framework fills the common fields (subdomain, token, project, version, polling, etc.).- Specified by:
configureRequestin classBaseFiniteStateRecorder
-
executeAnalysis
protected int executeAnalysis(FilePath cltPath, FilePath filePath, String projectName, String projectVersion, String apiToken, FilePath workspace, Launcher launcher, TaskListener listener) throws IOException, InterruptedException Description copied from class:BaseFiniteStateRecorderExecute the analysis via the legacy platform's CLT transport. Invoked byFiniteStateExecutionFrameworkonly whenBaseFiniteStateRecorder.isRestApi()isfalse.- Specified by:
executeAnalysisin classBaseFiniteStateRecorder- Returns:
- CLT process exit code (0 = success, 1 = completed with findings, other = error)
- Throws:
IOExceptionInterruptedException
-
getAnalysisType
Description copied from class:BaseFiniteStateRecorderGet the analysis type name for logging and results- Specified by:
getAnalysisTypein classBaseFiniteStateRecorder
-
getFilePathFieldName
Description copied from class:BaseFiniteStateRecorderGet the file path field name for validation- Specified by:
getFilePathFieldNamein classBaseFiniteStateRecorder
-
getFilePathValue
Description copied from class:BaseFiniteStateRecorderGet the file path value- Specified by:
getFilePathValuein classBaseFiniteStateRecorder
-