Package com.veracode.jenkins.plugin.args
Class AbstractArgs
- java.lang.Object
-
- com.veracode.jenkins.plugin.args.AbstractArgs
-
- Direct Known Subclasses:
DynamicRescanArgs
,GetAppListArgs
,UploadAndScanArgs
public abstract class AbstractArgs extends Object
The AbstractArgs class contributes API-agnostic switches to Veracode API wrapper command line arguments created by derived types.
-
-
Field Summary
Fields Modifier and Type Field Description protected static String
ACTION
protected List<String>
list
A list of command line arguments.protected static String
PHOST
protected static String
PPASSWORD
protected static String
PPORT
protected static String
PUSER
protected static String
SWITCH
protected static String
USERAGENT
protected static String
VID
protected static String
VKEY
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractArgs()
Constructor for AbstractArgs.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addAction(String action)
Adds the action switch and argument to the command line arguments list.protected void
addApiCredentials(boolean isRemote, EnvVars envVars, String vid, String vkey)
Adds the Veracode API credentials to the EnvVars if the build is happening in a remote workspace.protected void
addProxyConfiguration(boolean isRemote, EnvVars envVars, String phost, String pport, String puser, String ppassword)
Constructs proxy URL and adds it to the EnvVars if the build is happening in a remote workspace.protected void
addProxyConfiguration(String phost, String pport)
Adds the proxy configuration switches and arguments to the command line arguments list.protected void
addProxyCredentials(String puser, String ppassword)
Adds the proxy credentials switches and arguments to the command line arguments list.String[]
getArguments()
Returns a String that represents the plain text command line arguments added to the command line arguments list.String[]
getMaskedArguments()
Returns a String that represents the plain text command line arguments added to the command line arguments list, but replaces sensitive arguments with a fixed-length sequence of '*' characters.
-
-
-
Field Detail
-
SWITCH
protected static final String SWITCH
- See Also:
- Constant Field Values
-
ACTION
protected static final String ACTION
- See Also:
- Constant Field Values
-
PHOST
protected static final String PHOST
- See Also:
- Constant Field Values
-
PPASSWORD
protected static final String PPASSWORD
- See Also:
- Constant Field Values
-
PPORT
protected static final String PPORT
- See Also:
- Constant Field Values
-
PUSER
protected static final String PUSER
- See Also:
- Constant Field Values
-
VID
protected static final String VID
- See Also:
- Constant Field Values
-
VKEY
protected static final String VKEY
- See Also:
- Constant Field Values
-
USERAGENT
protected static final String USERAGENT
- See Also:
- Constant Field Values
-
-
Method Detail
-
addProxyConfiguration
protected void addProxyConfiguration(String phost, String pport)
Adds the proxy configuration switches and arguments to the command line arguments list.
-
addProxyCredentials
protected void addProxyCredentials(String puser, String ppassword)
Adds the proxy credentials switches and arguments to the command line arguments list.
-
addProxyConfiguration
protected void addProxyConfiguration(boolean isRemote, EnvVars envVars, String phost, String pport, String puser, String ppassword)
Constructs proxy URL and adds it to the EnvVars if the build is happening in a remote workspace. If the build is happening in the local workspace, then adds the proxy detail switches and arguments to the command line arguments list.
-
addApiCredentials
protected void addApiCredentials(boolean isRemote, EnvVars envVars, String vid, String vkey)
Adds the Veracode API credentials to the EnvVars if the build is happening in a remote workspace. If the build is happening in the local workspace, then adds the Veracode API credentials switches and arguments to the command line arguments list.
-
addAction
protected void addAction(String action)
Adds the action switch and argument to the command line arguments list.- Parameters:
action
- aString
object.
-
getArguments
public String[] getArguments()
Returns a String that represents the plain text command line arguments added to the command line arguments list.- Returns:
- an array of
String
objects.
-
getMaskedArguments
public String[] getMaskedArguments()
Returns a String that represents the plain text command line arguments added to the command line arguments list, but replaces sensitive arguments with a fixed-length sequence of '*' characters.The length of the sequence of characters is defined by the
MASKED_ARG_LENGTH
constant.- Returns:
- an array of
String
objects.
-
-