src/main/java/org/embulk/input/zendesk/utils/ZendeskValidatorUtils.java in embulk-input-zendesk-0.3.2 vs src/main/java/org/embulk/input/zendesk/utils/ZendeskValidatorUtils.java in embulk-input-zendesk-0.3.3

- old
+ new

@@ -4,35 +4,22 @@ import org.embulk.input.zendesk.ZendeskInputPlugin; import org.embulk.input.zendesk.services.ZendeskSupportAPIService; import org.embulk.spi.Exec; import org.slf4j.Logger; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - public class ZendeskValidatorUtils { private ZendeskValidatorUtils(){} private static final Logger logger = Exec.getLogger(ZendeskValidatorUtils.class); public static void validateInputTask(final ZendeskInputPlugin.PluginTask task, final ZendeskSupportAPIService zendeskSupportAPIService) { - validateHost(task.getLoginUrl()); validateAppMarketPlace(task.getAppMarketPlaceIntegrationName().isPresent(), task.getAppMarketPlaceAppId().isPresent(), task.getAppMarketPlaceOrgId().isPresent()); validateCredentials(task); validateIncremental(task); - } - - private static void validateHost(final String loginUrl) - { - final Matcher matcher = Pattern.compile(ZendeskConstants.Regex.HOST).matcher(loginUrl); - if (!matcher.matches()) { - throw new ConfigException(String.format("Login URL, '%s', is unmatched expectation. " + - "It should be followed this format: https://abc.zendesk.com/", loginUrl)); - } } private static void validateCredentials(final ZendeskInputPlugin.PluginTask task) { switch (task.getAuthenticationMethod()) {