Search in sources :

Example 1 with ConfigurationValidationException

use of net.nemerosa.ontrack.model.support.ConfigurationValidationException in project ontrack by nemerosa.

the class SVNConfigurationServiceImpl method validateAndCheck.

@Override
protected void validateAndCheck(SVNConfiguration configuration) {
    super.validateAndCheck(configuration);
    // Checks the issue service identifier
    String issueServiceConfigurationIdentifier = configuration.getIssueServiceConfigurationIdentifier();
    if (StringUtils.isNotBlank(issueServiceConfigurationIdentifier)) {
        ConfiguredIssueService configuredIssueService = issueServiceRegistry.getConfiguredIssueService(issueServiceConfigurationIdentifier);
        if (configuredIssueService == null || configuredIssueService.getIssueServiceConfiguration() == null) {
            throw new ConfigurationValidationException(configuration, String.format("Issue service configuration cannot be validated: %s", issueServiceConfigurationIdentifier));
        }
    }
}
Also used : ConfigurationValidationException(net.nemerosa.ontrack.model.support.ConfigurationValidationException) ConfiguredIssueService(net.nemerosa.ontrack.extension.issues.model.ConfiguredIssueService)

Aggregations

ConfiguredIssueService (net.nemerosa.ontrack.extension.issues.model.ConfiguredIssueService)1 ConfigurationValidationException (net.nemerosa.ontrack.model.support.ConfigurationValidationException)1