Class ATXValidator
java.lang.Object
de.tracetronic.jenkins.plugins.ecutest.util.validation.AbstractValidator
de.tracetronic.jenkins.plugins.ecutest.util.validation.ATXValidator
Validator to check ATX related form fields.
-
Field Summary
Fields inherited from class de.tracetronic.jenkins.plugins.ecutest.util.validation.AbstractValidator
PARAMETER
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
ignoreSSLIssues
(HttpsURLConnection connection) Ignores SSL certification errors by trusting all certificates and host names.testConnection
(String baseUrl, boolean ignoreSSL) Tests the server connection by given base server URL.testConnection
(String baseUrl, String proxyUrl, boolean ignoreSSL) Tests the server connection by given base server URL.testConnection
(String serverUrl, String serverPort, String serverContextPath, boolean useHttpsConnection, boolean ignoreSSL) Tests the server connection by given server settings.testConnection
(String serverUrl, String serverPort, String serverContextPath, boolean useHttpsConnection, String proxyUrl, boolean ignoreSSL) Tests the server connection by given server settings.validateArchiveMiscFiles
(String expression) Validates the archive miscellaneous files.validateCoveredAttributes
(String expression) Validates the covered attributes.Validates the custom setting name and checks for duplicate entries.validateCustomSettingValue
(String value) Validates the custom setting value.validateName
(String value) Validates the test.guide name.validateServerContextPath
(String contextPath) Validates the server context path.validateServerPort
(String serverPort) Validates the server port which must be non negative and in the range of 1-65535.validateServerUrl
(String serverUrl) Validates the server URL.validateSetting
(String name, String value) Validates a setting field.Methods inherited from class de.tracetronic.jenkins.plugins.ecutest.util.validation.AbstractValidator
validatePackageFile, validateParameterizedValue, validateProjectFile, validateRequiredParamValue, validateRequiredValue, validateTimeout
-
Constructor Details
-
ATXValidator
public ATXValidator()Instantiates a newATXValidator
. ATX settings needs permission check.
-
-
Method Details
-
ignoreSSLIssues
public static void ignoreSSLIssues(HttpsURLConnection connection) throws NoSuchAlgorithmException, KeyManagementException Ignores SSL certification errors by trusting all certificates and host names.- Parameters:
connection
- the current connection- Throws:
NoSuchAlgorithmException
- the no such algorithm exceptionKeyManagementException
- the key management exception
-
validateName
Validates the test.guide name.- Parameters:
value
- the value- Returns:
- the form validation
-
validateServerUrl
Validates the server URL.- Parameters:
serverUrl
- the server URL- Returns:
- the form validation
-
validateServerPort
Validates the server port which must be non negative and in the range of 1-65535. A port less than 1024 requires root permission on an Unix-based system.- Parameters:
serverPort
- the server port- Returns:
- the form validation
-
validateServerContextPath
Validates the server context path.- Parameters:
contextPath
- the context path- Returns:
- the form validation
-
validateArchiveMiscFiles
Validates the archive miscellaneous files.- Parameters:
expression
- the files expression- Returns:
- the form validation
-
validateCoveredAttributes
Validates the covered attributes.- Parameters:
expression
- the attribute expression- Returns:
- the form validation
-
validateSetting
Validates a setting field.- Parameters:
name
- the setting namevalue
- the current setting value- Returns:
- the form validation
-
validateCustomSettingName
Validates the custom setting name and checks for duplicate entries.- Parameters:
name
- the setting name- Returns:
- the form validation
-
validateCustomSettingValue
Validates the custom setting value.- Parameters:
value
- the setting value- Returns:
- the form validation
-
testConnection
public FormValidation testConnection(String serverUrl, String serverPort, String serverContextPath, boolean useHttpsConnection, boolean ignoreSSL) Tests the server connection by given server settings.- Parameters:
serverUrl
- the server URLserverPort
- the server portserverContextPath
- the server context pathuseHttpsConnection
- if secure connection is usedignoreSSL
- specifies whether to ignore SSL issues- Returns:
- the form validation
-
testConnection
public FormValidation testConnection(String serverUrl, String serverPort, String serverContextPath, boolean useHttpsConnection, String proxyUrl, boolean ignoreSSL) Tests the server connection by given server settings.- Parameters:
serverUrl
- the server URLserverPort
- the server portserverContextPath
- the server context pathuseHttpsConnection
- if secure connection is usedproxyUrl
- the proxy URLignoreSSL
- specifies whether to ignore SSL issues- Returns:
- the form validation
-
testConnection
Tests the server connection by given base server URL.- Parameters:
baseUrl
- the base server URLignoreSSL
- specifies whether to ignore SSL issues- Returns:
- the form validation
-
testConnection
Tests the server connection by given base server URL.- Parameters:
baseUrl
- the base server URLproxyUrl
- the proxy URLignoreSSL
- specifies whether to ignore SSL issues- Returns:
- the form validation
-