Class CodeScanBuildStep.BuildStepDescriptorImpl
- java.lang.Object
-
- hudson.model.Descriptor<T>
-
- hudson.tasks.BuildStepDescriptor<Builder>
-
- io.jenkins.plugins.google.analyze.code.security.CodeScanBuildStep.BuildStepDescriptorImpl
-
- Enclosing class:
- CodeScanBuildStep
@Extension public static final class CodeScanBuildStep.BuildStepDescriptorImpl extends BuildStepDescriptor<Builder>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class hudson.model.Descriptor
Descriptor.FormException, Descriptor.PropertyType, Descriptor.Self
-
-
Field Summary
-
Fields inherited from class hudson.model.Descriptor
clazz
-
-
Constructor Summary
Constructors Constructor Description BuildStepDescriptorImpl()
In order to load the persisted global configuration, you have to call load() in the constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
configure(org.kohsuke.stapler.StaplerRequest req, net.sf.json.JSONObject json)
FormValidation
doCheckOrgID(String orgID, Item item)
Validates OrgID is non-empty and contains numeric characters only.FormValidation
doCheckScanFileName(String scanFileName, Item item)
Validates scanFileName is not empty.FormValidation
doCheckScanTimeOut(Integer scanTimeOut, Item item)
Validates scanTimeOut is within expected range.Collection<? extends Descriptor<?>>
getAssetViolationsDescriptors()
List<CredentialPair>
getCredentialPairs()
Integer
getDefaultScanTimeOut()
Invoked by Jenkins UX to fetch default value forthis.scanTimeOut
String
getDisplayName()
boolean
isApplicable(Class<? extends AbstractProject> jobType)
static CodeScanBuildStep.BuildStepDescriptorImpl
newInstanceForTests()
void
setCredentialPairs(List<CredentialPair> credentialPairs)
String
violationHelp()
Description message for IgnoreAssetViolation configuration on Jenkins UX.-
Methods inherited from class hudson.tasks.BuildStepDescriptor
filter
-
Methods inherited from class hudson.model.Descriptor
addHelpFileRedirect, bindJSON, calcAutoCompleteSettings, calcFillSettings, configure, doHelp, find, find, findByDescribableClassName, findById, getCategory, getCheckMethod, getCheckUrl, getConfigFile, getConfigPage, getCurrentDescriptorByNameUrl, getDescriptorFullUrl, getDescriptorUrl, getGlobalConfigPage, getGlobalPropertyType, getHelpFile, getHelpFile, getHelpFile, getId, getJsonSafeClassName, getKlass, getPlugin, getPossibleViewNames, getPropertyType, getPropertyType, getPropertyTypeOrDie, getRequiredGlobalConfigPagePermission, getT, getViewPage, isInstance, isSubTypeOf, load, newInstance, newInstance, newInstancesFromHeteroList, newInstancesFromHeteroList, save, self, toArray, toList, toMap
-
-
-
-
Method Detail
-
newInstanceForTests
public static CodeScanBuildStep.BuildStepDescriptorImpl newInstanceForTests()
-
getAssetViolationsDescriptors
public Collection<? extends Descriptor<?>> getAssetViolationsDescriptors()
-
getDefaultScanTimeOut
public Integer getDefaultScanTimeOut()
Invoked by Jenkins UX to fetch default value forthis.scanTimeOut
-
configure
public boolean configure(org.kohsuke.stapler.StaplerRequest req, net.sf.json.JSONObject json) throws Descriptor.FormException
- Overrides:
configure
in classDescriptor<Builder>
- Throws:
Descriptor.FormException
-
getCredentialPairs
public List<CredentialPair> getCredentialPairs()
-
setCredentialPairs
@DataBoundSetter public void setCredentialPairs(List<CredentialPair> credentialPairs)
-
getDisplayName
@Nonnull public String getDisplayName()
- Overrides:
getDisplayName
in classDescriptor<Builder>
-
isApplicable
public boolean isApplicable(Class<? extends AbstractProject> jobType)
- Specified by:
isApplicable
in classBuildStepDescriptor<Builder>
-
doCheckOrgID
@POST public FormValidation doCheckOrgID(@QueryParameter String orgID, @AncestorInPath Item item)
Validates OrgID is non-empty and contains numeric characters only.- Parameters:
orgID
- GCP organizationId.- Returns:
- FormValidation
-
doCheckScanFileName
@POST public FormValidation doCheckScanFileName(@QueryParameter String scanFileName, @AncestorInPath Item item)
Validates scanFileName is not empty.POST annotation : Added to enable CSRF protection while form validation : CSRF Protection
- Parameters:
scanFileName
- scan file name.item
- basic configuration unit in Hudson.- Returns:
- FormValidation
-
doCheckScanTimeOut
@POST public FormValidation doCheckScanTimeOut(@QueryParameter Integer scanTimeOut, @AncestorInPath Item item)
Validates scanTimeOut is within expected range.- Parameters:
scanTimeOut
- timeout in milliseconds after which scan is aborted.item
- basic configuration unit in Hudson.- Returns:
- String
-
violationHelp
public String violationHelp()
Description message for IgnoreAssetViolation configuration on Jenkins UX.
-
-