Package com.breachlock.controllers
Class DASTScan.DescriptorImpl
- java.lang.Object
-
- hudson.model.Descriptor<T>
-
- hudson.tasks.BuildStepDescriptor<Builder>
-
- com.breachlock.controllers.DASTScan.DescriptorImpl
-
- Enclosing class:
- DASTScan
@Symbol("DASTScan") @Extension public static final class DASTScan.DescriptorImpl extends BuildStepDescriptor<Builder>
Form descriptor used for form handling.
-
-
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 DescriptorImpl()
Provide access to the API key from DASTScan
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FormValidation
doCheckApikey(String apikey, Item item)
Check the API key field.FormValidation
doCheckAsset(String asset, Item item)
Check the asset field.FormValidation
doCheckEmail(String email, Item item)
Check the email field.ListBoxModel
doFillAssetItems(String apikey, String email)
Fill the selectbox of with assets supplied by the Breachlock Platform.FormValidation
doTestConnection(String apikey, String asset, String email)
Register the plugin to the Breachlock Platform.Secret
getApikey()
Return the encrypted secret API key.String
getDisplayName()
Name to display on top of the form and as plugin name.boolean
isApplicable(Class<? extends AbstractProject> aClass)
Always allow this class to be used as a "build step" for a job.void
setApikey(String apikey)
Encode and set the string API key.-
Methods inherited from class hudson.tasks.BuildStepDescriptor
filter
-
Methods inherited from class hudson.model.Descriptor
addHelpFileRedirect, calcAutoCompleteSettings, calcFillSettings, configure, 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, getT, getViewPage, isInstance, isSubTypeOf, load, newInstance, newInstance, newInstancesFromHeteroList, newInstancesFromHeteroList, save, self, toArray, toList, toMap
-
-
-
-
Method Detail
-
getApikey
public Secret getApikey()
Return the encrypted secret API key. This is required for functioning of the form- Returns:
- apiKey Jenkins integration API key
-
setApikey
public void setApikey(String apikey)
Encode and set the string API key. This is required for functioning of the form- Parameters:
apikey
- Jenkins integration API key
-
doCheckEmail
public FormValidation doCheckEmail(@QueryParameter String email, @AncestorInPath Item item) throws IOException, javax.servlet.ServletException
Check the email field.- Parameters:
email
- Email used for app.breachlock.comitem
-- Returns:
- FormValidation
- Throws:
IOException
javax.servlet.ServletException
-
doCheckAsset
@POST public FormValidation doCheckAsset(@QueryParameter String asset, @AncestorInPath Item item) throws IOException, javax.servlet.ServletException
Check the asset field.- Parameters:
asset
- Asset to scanitem
-- Returns:
- FormValidation
- Throws:
IOException
javax.servlet.ServletException
-
doCheckApikey
public FormValidation doCheckApikey(@QueryParameter String apikey, @AncestorInPath Item item) throws IOException, javax.servlet.ServletException
Check the API key field.- Parameters:
apikey
- Jenkins integration API keyitem
-- Returns:
- FormValidation
- Throws:
IOException
javax.servlet.ServletException
-
doTestConnection
@POST public FormValidation doTestConnection(@QueryParameter String apikey, @QueryParameter String asset, @QueryParameter String email) throws IOException, javax.servlet.ServletException
Register the plugin to the Breachlock Platform.- Parameters:
apikey
- Jenkins integration API keyasset
- Asset to scanemail
- Email used for app.breachlock.com- Returns:
- FormValidation
- Throws:
IOException
javax.servlet.ServletException
-
doFillAssetItems
@POST public ListBoxModel doFillAssetItems(@QueryParameter String apikey, @QueryParameter String email)
Fill the selectbox of with assets supplied by the Breachlock Platform.- Parameters:
apikey
- Jenkins integration API keyemail
- Email used for app.breachlock.com- Returns:
- ListBoxModel Selectbox with assets
-
isApplicable
public boolean isApplicable(Class<? extends AbstractProject> aClass)
Always allow this class to be used as a "build step" for a job.- Specified by:
isApplicable
in classBuildStepDescriptor<Builder>
- Parameters:
aClass
-- Returns:
-
getDisplayName
public String getDisplayName()
Name to display on top of the form and as plugin name.- Overrides:
getDisplayName
in classDescriptor<Builder>
- Returns:
- Display Name
-
-