@Test public void getIntegrationById() throws IntegrationConfigException { service.init(); IntegrationSettings jira = service.getIntegrationById("575062074b54ba5e759c0fd9", 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 getIntegrationById(String integrationId, String userId) { if (integrationId == null) { String message = logMessage.getMessage(INTEGRATION_INVALID_ID); String solution = logMessage.getMessage(INTEGRATION_INVALID_ID_SOLUTION); throw new InvalidConfigurationIdException(message,solution); } IntegrationSettings settings = repository.getIntegrationById(integrationId); if (settings == null) { String message = logMessage.getMessage(INTEGRATION_NOT_FOUND, integrationId); String solution = logMessage.getMessage(INTEGRATION_NOT_FOUND_SOLUTION, integrationId); throw new ConfigurationNotFoundException(message, solution); } return settings; }
LocalIntegrationService implements IntegrationService { @Override public IntegrationSettings getIntegrationById(String integrationId, String userId) { if (integrationId == null) { String message = logMessage.getMessage(INTEGRATION_INVALID_ID); String solution = logMessage.getMessage(INTEGRATION_INVALID_ID_SOLUTION); throw new InvalidConfigurationIdException(message,solution); } IntegrationSettings settings = repository.getIntegrationById(integrationId); if (settings == null) { String message = logMessage.getMessage(INTEGRATION_NOT_FOUND, integrationId); String solution = logMessage.getMessage(INTEGRATION_NOT_FOUND_SOLUTION, integrationId); throw new ConfigurationNotFoundException(message, solution); } return settings; } }
LocalIntegrationService implements IntegrationService { @Override public IntegrationSettings getIntegrationById(String integrationId, String userId) { if (integrationId == null) { String message = logMessage.getMessage(INTEGRATION_INVALID_ID); String solution = logMessage.getMessage(INTEGRATION_INVALID_ID_SOLUTION); throw new InvalidConfigurationIdException(message,solution); } IntegrationSettings settings = repository.getIntegrationById(integrationId); if (settings == null) { String message = logMessage.getMessage(INTEGRATION_NOT_FOUND, integrationId); String solution = logMessage.getMessage(INTEGRATION_NOT_FOUND_SOLUTION, integrationId); throw new ConfigurationNotFoundException(message, solution); } return settings; }  }
LocalIntegrationService implements IntegrationService { @Override public IntegrationSettings getIntegrationById(String integrationId, String userId) { if (integrationId == null) { String message = logMessage.getMessage(INTEGRATION_INVALID_ID); String solution = logMessage.getMessage(INTEGRATION_INVALID_ID_SOLUTION); throw new InvalidConfigurationIdException(message,solution); } IntegrationSettings settings = repository.getIntegrationById(integrationId); if (settings == null) { String message = logMessage.getMessage(INTEGRATION_NOT_FOUND, integrationId); String solution = logMessage.getMessage(INTEGRATION_NOT_FOUND_SOLUTION, integrationId); throw new ConfigurationNotFoundException(message, solution); } return settings; }  @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 getIntegrationById(String integrationId, String userId) { if (integrationId == null) { String message = logMessage.getMessage(INTEGRATION_INVALID_ID); String solution = logMessage.getMessage(INTEGRATION_INVALID_ID_SOLUTION); throw new InvalidConfigurationIdException(message,solution); } IntegrationSettings settings = repository.getIntegrationById(integrationId); if (settings == null) { String message = logMessage.getMessage(INTEGRATION_NOT_FOUND, integrationId); String solution = logMessage.getMessage(INTEGRATION_NOT_FOUND_SOLUTION, integrationId); throw new ConfigurationNotFoundException(message, solution); } return settings; }  @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);  }