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.
  • Constructor Details

    • ATXValidator

      public ATXValidator()
      Instantiates a new ATXValidator. 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 exception
      KeyManagementException - 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 name
      value - 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 URL
      serverPort - the server port
      serverContextPath - the server context path
      useHttpsConnection - if secure connection is used
      ignoreSSL - 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 URL
      serverPort - the server port
      serverContextPath - the server context path
      useHttpsConnection - if secure connection is used
      proxyUrl - the proxy URL
      ignoreSSL - 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 URL
      ignoreSSL - 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 URL
      proxyUrl - the proxy URL
      ignoreSSL - specifies whether to ignore SSL issues
      Returns:
      the form validation