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, externalizableId, preRelease, projectName, projectVersion, subdomainFields inherited from interface hudson.tasks.BuildStep
BUILDERS, PUBLISHERS -
Constructor Summary
ConstructorsConstructorDescriptionFiniteStateSBOMImportRecorder(String subdomain, String apiTokenCredentialsId, String sbomFilePath, String projectName) -
Method Summary
Modifier and TypeMethodDescriptionprotected intexecuteAnalysis(FilePath cltPath, FilePath filePath, String projectName, String projectVersion, FilePath workspace, Launcher launcher, TaskListener listener) Abstract method for executing the specific analysisprotected 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, getApiTokenCredentialsId, getCLTPath, getExternalizableId, getFileFromWorkspace, getPreRelease, getProjectName, getProjectVersion, getSecretTextValue, getSubdomain, logCommonInfo, parseVersion, perform, setApiTokenCredentialsId, setExternalizableId, setPreRelease, setProjectName, setProjectVersion, setSubdomain, 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
-
executeAnalysis
protected int executeAnalysis(FilePath cltPath, FilePath filePath, String projectName, String projectVersion, FilePath workspace, Launcher launcher, TaskListener listener) throws IOException, InterruptedException Description copied from class:BaseFiniteStateRecorderAbstract method for executing the specific analysis- Specified by:
executeAnalysisin classBaseFiniteStateRecorder- 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
-