Package com.veracode.jenkins.plugin
Class VeracodeNotifier.VeracodeDescriptor
- java.lang.Object
-
- hudson.model.Descriptor<T>
-
- hudson.tasks.BuildStepDescriptor<Publisher>
-
- com.veracode.jenkins.plugin.VeracodeNotifier.VeracodeDescriptor
-
- Enclosing class:
- VeracodeNotifier
@Extension public static final class VeracodeNotifier.VeracodeDescriptor extends BuildStepDescriptor<Publisher>
Contains the code that is executed after a user submits the "Configure System" form and provides getter methods for the form fields defined in global.jelly. This class extends theBuildStepDescriptor
class. Converting this class to a top-level class should be done with the understanding that doing so might prevent the plugin from working properly if not at all.
-
-
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 VeracodeDescriptor()
This constructor makes it possible for global configuration data to be re-loaded after Jenkins is restarted.
-
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 formData)
Called by Jenkins when the "Configure System" page is submitted.FormValidation
doCheckAppname(String value)
FormValidation
doCheckFilenamepattern(String filename_pattern, String replacement_pattern)
FormValidation
doCheckGvid(String gv_id, String gv_key)
FormValidation
doCheckGvkey(String gv_id, String gv_key)
FormValidation
doCheckReplacementpattern(String filename_pattern, String replacement_pattern)
FormValidation
doCheckTimeout(String timeout)
FormValidation
doCheckVersion(String value)
FormValidation
doCheckVid(String v_id, String v_key)
FormValidation
doCheckVkey(String v_id, String v_key)
ListBoxModel
doFillCriticalityItems(String criticality)
ListBoxModel
doFillDeleteIncompleteScanItems(String deleteIncompleteScan)
FormValidation
doTestConnection(String gv_id, String gv_key, boolean _proxy, String p_host, String p_port, String p_user, String p_password)
boolean
getAutoappname()
boolean
getAutodescription()
boolean
getAutoversion()
boolean
getCopyremotefiles()
boolean
getDebug()
String
getDisplayName()
The name of the plugin displayed in the UI.boolean
getFailbuild()
String
getGvid()
String
getGvkey()
String
getPhost()
static String
getPostBuildActionDisplayText()
String
getPpassword()
String
getPport()
boolean
getProxy()
String
getPuser()
boolean
hasGlobalCredentials()
Whether Veracode credentials were supplied in the "Configure System" page.boolean
hasValidCredentials(String id, String key)
Checks to see if the id and key fields are empty despite having valid information in the global settings pageboolean
isApplicable(Class<? extends AbstractProject> aClass)
Whether this task is applicable to the given project.boolean
isUnstablebuild()
Publisher
newInstance(org.kohsuke.stapler.StaplerRequest req, net.sf.json.JSONObject formData)
Called by Jenkins when it needs to create an instance of theVeracodeNotifier
class.-
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, newInstancesFromHeteroList, newInstancesFromHeteroList, save, self, toArray, toList, toMap
-
-
-
-
Method Detail
-
getGvid
public String getGvid()
-
getGvkey
public String getGvkey()
-
getFailbuild
public boolean getFailbuild()
-
isUnstablebuild
public boolean isUnstablebuild()
-
getCopyremotefiles
public boolean getCopyremotefiles()
-
getAutoappname
public boolean getAutoappname()
-
getAutodescription
public boolean getAutodescription()
-
getAutoversion
public boolean getAutoversion()
-
getDebug
public boolean getDebug()
-
getProxy
public boolean getProxy()
-
getPhost
public String getPhost()
-
getPport
public String getPport()
-
getPuser
public String getPuser()
-
getPpassword
public String getPpassword()
-
doTestConnection
public FormValidation doTestConnection(@QueryParameter("gvid") String gv_id, @QueryParameter("gvkey") String gv_key, @QueryParameter("proxy") boolean _proxy, @QueryParameter("phost") String p_host, @QueryParameter("pport") String p_port, @QueryParameter("puser") String p_user, @QueryParameter("ppassword") String p_password)
-
doCheckGvid
public FormValidation doCheckGvid(@QueryParameter("gvid") String gv_id, @QueryParameter("gvkey") String gv_key) throws IOException, javax.servlet.ServletException
- Throws:
IOException
javax.servlet.ServletException
-
doCheckGvkey
public FormValidation doCheckGvkey(@QueryParameter("gvid") String gv_id, @QueryParameter("gvkey") String gv_key) throws IOException, javax.servlet.ServletException
- Throws:
IOException
javax.servlet.ServletException
-
doCheckVid
public FormValidation doCheckVid(@QueryParameter("vid") String v_id, @QueryParameter("vkey") String v_key) throws IOException, javax.servlet.ServletException
- Throws:
IOException
javax.servlet.ServletException
-
doCheckVkey
public FormValidation doCheckVkey(@QueryParameter("vid") String v_id, @QueryParameter("vkey") String v_key) throws IOException, javax.servlet.ServletException
- Throws:
IOException
javax.servlet.ServletException
-
doCheckAppname
public FormValidation doCheckAppname(@QueryParameter String value) throws IOException, javax.servlet.ServletException
- Throws:
IOException
javax.servlet.ServletException
-
doCheckVersion
public FormValidation doCheckVersion(@QueryParameter String value) throws IOException, javax.servlet.ServletException
- Throws:
IOException
javax.servlet.ServletException
-
doCheckFilenamepattern
public FormValidation doCheckFilenamepattern(@QueryParameter("filenamepattern") String filename_pattern, @QueryParameter("replacementpattern") String replacement_pattern) throws IOException, javax.servlet.ServletException
- Throws:
IOException
javax.servlet.ServletException
-
doCheckReplacementpattern
public FormValidation doCheckReplacementpattern(@QueryParameter("filenamepattern") String filename_pattern, @QueryParameter("replacementpattern") String replacement_pattern) throws IOException, javax.servlet.ServletException
- Throws:
IOException
javax.servlet.ServletException
-
doCheckTimeout
public FormValidation doCheckTimeout(@QueryParameter("timeout") String timeout)
-
doFillCriticalityItems
public ListBoxModel doFillCriticalityItems(@QueryParameter("criticality") String criticality)
-
doFillDeleteIncompleteScanItems
public ListBoxModel doFillDeleteIncompleteScanItems(@QueryParameter("deleteIncompleteScan") String deleteIncompleteScan)
-
getDisplayName
public String getDisplayName()
The name of the plugin displayed in the UI.- Overrides:
getDisplayName
in classDescriptor<Publisher>
-
isApplicable
public boolean isApplicable(Class<? extends AbstractProject> aClass)
Whether this task is applicable to the given project.- Specified by:
isApplicable
in classBuildStepDescriptor<Publisher>
-
newInstance
public Publisher newInstance(org.kohsuke.stapler.StaplerRequest req, net.sf.json.JSONObject formData) throws Descriptor.FormException
Called by Jenkins when it needs to create an instance of theVeracodeNotifier
class.- Overrides:
newInstance
in classDescriptor<Publisher>
- Throws:
Descriptor.FormException
-
configure
public boolean configure(org.kohsuke.stapler.StaplerRequest req, net.sf.json.JSONObject formData) throws Descriptor.FormException
Called by Jenkins when the "Configure System" page is submitted.- Overrides:
configure
in classDescriptor<Publisher>
- Throws:
Descriptor.FormException
-
hasGlobalCredentials
public boolean hasGlobalCredentials()
Whether Veracode credentials were supplied in the "Configure System" page.This method is public because it is also called from config.jelly.
- Returns:
- boolean
-
hasValidCredentials
public boolean hasValidCredentials(String id, String key)
Checks to see if the id and key fields are empty despite having valid information in the global settings page- Parameters:
id
- Stringkey
- String- Returns:
- boolean
-
getPostBuildActionDisplayText
public static String getPostBuildActionDisplayText()
-
-