@Test public void getIntegrationByType() throws IntegrationConfigException { service.init(); IntegrationSettings jira = service.getIntegrationByType("jiraWebHookIntegration", TEST_USER); assertNotNull(jira); assertEquals("575062074b54ba5e759c0fd9", jira.getConfigurationId()); assertEquals("jiraWebHookIntegration", jira.getType()); assertEquals("Jira Webhook Integration", jira.getName()); assertEquals("Integrating JIRA with Symphony", jira.getDescription()); assertTrue(jira.getEnabled()); assertFalse(jira.getVisible()); }
@Override public IntegrationSettings getIntegrationByType(String integrationType, String userId) { if (integrationType == null) { String message = logMessage.getMessage(INTEGRATION_INVALID_INTEGRATION_TYPE); String solution = logMessage.getMessage(INTEGRATION_INVALID_INTEGRATION_TYPE_SOLUTION); throw new InvalidConfigurationIdException(message, solution); } List<IntegrationSettings> integrations = repository.getIntegrations(); for (IntegrationSettings settings : integrations) { if (integrationType.equals(settings.getType())) { return settings; } } String message = logMessage.getMessage(INTEGRATION_TYPE_NOT_FOUND, integrationType); String solution = logMessage.getMessage(INTEGRATION_TYPE_NOT_FOUND_SOLUTION, integrationType); throw new ConfigurationNotFoundException(message, solution); }
LocalIntegrationService implements IntegrationService { @Override public IntegrationSettings getIntegrationByType(String integrationType, String userId) { if (integrationType == null) { String message = logMessage.getMessage(INTEGRATION_INVALID_INTEGRATION_TYPE); String solution = logMessage.getMessage(INTEGRATION_INVALID_INTEGRATION_TYPE_SOLUTION); throw new InvalidConfigurationIdException(message, solution); } List<IntegrationSettings> integrations = repository.getIntegrations(); for (IntegrationSettings settings : integrations) { if (integrationType.equals(settings.getType())) { return settings; } } String message = logMessage.getMessage(INTEGRATION_TYPE_NOT_FOUND, integrationType); String solution = logMessage.getMessage(INTEGRATION_TYPE_NOT_FOUND_SOLUTION, integrationType); throw new ConfigurationNotFoundException(message, solution); } }
LocalIntegrationService implements IntegrationService { @Override public IntegrationSettings getIntegrationByType(String integrationType, String userId) { if (integrationType == null) { String message = logMessage.getMessage(INTEGRATION_INVALID_INTEGRATION_TYPE); String solution = logMessage.getMessage(INTEGRATION_INVALID_INTEGRATION_TYPE_SOLUTION); throw new InvalidConfigurationIdException(message, solution); } List<IntegrationSettings> integrations = repository.getIntegrations(); for (IntegrationSettings settings : integrations) { if (integrationType.equals(settings.getType())) { return settings; } } String message = logMessage.getMessage(INTEGRATION_TYPE_NOT_FOUND, integrationType); String solution = logMessage.getMessage(INTEGRATION_TYPE_NOT_FOUND_SOLUTION, integrationType); throw new ConfigurationNotFoundException(message, solution); }  }
LocalIntegrationService implements IntegrationService { @Override public IntegrationSettings getIntegrationByType(String integrationType, String userId) { if (integrationType == null) { String message = logMessage.getMessage(INTEGRATION_INVALID_INTEGRATION_TYPE); String solution = logMessage.getMessage(INTEGRATION_INVALID_INTEGRATION_TYPE_SOLUTION); throw new InvalidConfigurationIdException(message, solution); } List<IntegrationSettings> integrations = repository.getIntegrations(); for (IntegrationSettings settings : integrations) { if (integrationType.equals(settings.getType())) { return settings; } } String message = logMessage.getMessage(INTEGRATION_TYPE_NOT_FOUND, integrationType); String solution = logMessage.getMessage(INTEGRATION_TYPE_NOT_FOUND_SOLUTION, integrationType); throw new ConfigurationNotFoundException(message, solution); }  @Override @PostConstruct void init(); @Override IntegrationSettings getIntegrationById(String integrationId, String userId); @Override IntegrationSettings getIntegrationByType(String integrationType, String userId); @Override IntegrationSettings save(IntegrationSettings settings, String usedId); @Override IntegrationInstance getInstanceById(String configurationId, String instanceId,
      String userId); @Override IntegrationInstance save(IntegrationInstance instance, String userId); }
LocalIntegrationService implements IntegrationService { @Override public IntegrationSettings getIntegrationByType(String integrationType, String userId) { if (integrationType == null) { String message = logMessage.getMessage(INTEGRATION_INVALID_INTEGRATION_TYPE); String solution = logMessage.getMessage(INTEGRATION_INVALID_INTEGRATION_TYPE_SOLUTION); throw new InvalidConfigurationIdException(message, solution); } List<IntegrationSettings> integrations = repository.getIntegrations(); for (IntegrationSettings settings : integrations) { if (integrationType.equals(settings.getType())) { return settings; } } String message = logMessage.getMessage(INTEGRATION_TYPE_NOT_FOUND, integrationType); String solution = logMessage.getMessage(INTEGRATION_TYPE_NOT_FOUND_SOLUTION, integrationType); throw new ConfigurationNotFoundException(message, solution); }  @Override @PostConstruct void init(); @Override IntegrationSettings getIntegrationById(String integrationId, String userId); @Override IntegrationSettings getIntegrationByType(String integrationType, String userId); @Override IntegrationSettings save(IntegrationSettings settings, String usedId); @Override IntegrationInstance getInstanceById(String configurationId, String instanceId,
      String userId); @Override IntegrationInstance save(IntegrationInstance instance, String userId);  }