Class ATXValidator
- java.lang.Object
-
- de.tracetronic.jenkins.plugins.ecutest.util.validation.AbstractValidator
-
- de.tracetronic.jenkins.plugins.ecutest.util.validation.ATXValidator
-
public class ATXValidator extends AbstractValidator
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 Constructor Description ATXValidator()
Instantiates a newATXValidator
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static void
ignoreSSLIssues(HttpsURLConnection connection)
Ignores SSL certification errors by trusting all certificates and host names.FormValidation
testConnection(String baseUrl, boolean ignoreSSL)
Tests the server connection by given base server URL.FormValidation
testConnection(String baseUrl, String proxyUrl, boolean ignoreSSL)
Tests the server connection by given base server URL.FormValidation
testConnection(String serverUrl, String serverPort, String serverContextPath, boolean useHttpsConnection, boolean ignoreSSL)
Tests the server connection by given server settings.FormValidation
testConnection(String serverUrl, String serverPort, String serverContextPath, boolean useHttpsConnection, String proxyUrl, boolean ignoreSSL)
Tests the server connection by given server settings.FormValidation
validateArchiveMiscFiles(String expression)
Validates the archive miscellaneous files.FormValidation
validateCoveredAttributes(String expression)
Validates the covered attributes.FormValidation
validateCustomSettingName(String name)
Validates the custom setting name and checks for duplicate entries.FormValidation
validateCustomSettingValue(String value)
Validates the custom setting value.FormValidation
validateName(String value)
Validates the test.guide name.FormValidation
validateServerContextPath(String contextPath)
Validates the server context path.FormValidation
validateServerPort(String serverPort)
Validates the server port which must be non negative and in the range of 1-65535.FormValidation
validateServerUrl(String serverUrl)
Validates the server URL.FormValidation
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 Detail
-
ATXValidator
public ATXValidator()
Instantiates a newATXValidator
. ATX settings needs permission check.
-
-
Method Detail
-
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
public FormValidation validateName(String value)
Validates the test.guide name.- Parameters:
value
- the value- Returns:
- the form validation
-
validateServerUrl
public FormValidation validateServerUrl(String serverUrl)
Validates the server URL.- Parameters:
serverUrl
- the server URL- Returns:
- the form validation
-
validateServerPort
public FormValidation validateServerPort(String serverPort)
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
public FormValidation validateServerContextPath(String contextPath)
Validates the server context path.- Parameters:
contextPath
- the context path- Returns:
- the form validation
-
validateArchiveMiscFiles
public FormValidation validateArchiveMiscFiles(String expression)
Validates the archive miscellaneous files.- Parameters:
expression
- the files expression- Returns:
- the form validation
-
validateCoveredAttributes
public FormValidation validateCoveredAttributes(String expression)
Validates the covered attributes.- Parameters:
expression
- the attribute expression- Returns:
- the form validation
-
validateSetting
public FormValidation validateSetting(String name, String value)
Validates a setting field.- Parameters:
name
- the setting namevalue
- the current setting value- Returns:
- the form validation
-
validateCustomSettingName
public FormValidation validateCustomSettingName(String name)
Validates the custom setting name and checks for duplicate entries.- Parameters:
name
- the setting name- Returns:
- the form validation
-
validateCustomSettingValue
public FormValidation validateCustomSettingValue(String value)
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
public FormValidation testConnection(String baseUrl, boolean ignoreSSL)
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
public FormValidation testConnection(String baseUrl, String proxyUrl, boolean ignoreSSL)
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
-
-