@Test public void allClientConfigurationsMustBeLoaded() { String[] expectedNames = {"One", "Two", "Three", "Four", "Five"}; String[] expectedBindings = {null, "http: List<DbLoadedSamlClientConfigurationDto> configurations = templateUnderTest.loadAllClients(); assertNotNull(configurations); assertEquals(5, configurations.size()); for (int i = 1; i <= 5; i++) { DbLoadedSamlClientConfigurationDto cfg = configurations.get(i-1); assertEquals(expectedNames[i-1], cfg.getClientName()); byte[] keystoreData = cfg.getKeystoreBinaryData(); byte[] expectedKeystoreData = createExpectedKeystoreData((byte) i); assertArrayEquals(expectedKeystoreData, keystoreData); assertEquals("KsPwd"+i, cfg.getKeystorePassword()); assertEquals("Alias"+i, cfg.getKeystoreAlias()); assertEquals("PrKeyPwd"+i, cfg.getPrivateKeyPassword()); assertEquals("CLOB-"+i, cfg.getIdentityProviderMetadata()); assertEquals("urn:idp"+i, cfg.getIdentityProviderEntityId()); assertEquals("urn:sp"+i, cfg.getServiceProviderEntityId()); assertEquals(i * 1000, cfg.getMaximumAuthenticationLifetime()); assertEquals(expectedBindings[i-1], cfg.getDestinationBindingType()); } }
@Override @Transactional(readOnly=true) public List<DbLoadedSamlClientConfigurationDto> loadAllClients() { final List<DbLoadedSamlClientConfigurationDto> configurations = template.query(selectAllClientsSqlText, selectAllClientsParameters, selectAllClientsParameterTypes, fullRowMapper); return configurations; }
SpringJdbcTemplateSamlClientDaoImpl implements SamlClientDao { @Override @Transactional(readOnly=true) public List<DbLoadedSamlClientConfigurationDto> loadAllClients() { final List<DbLoadedSamlClientConfigurationDto> configurations = template.query(selectAllClientsSqlText, selectAllClientsParameters, selectAllClientsParameterTypes, fullRowMapper); return configurations; } }
SpringJdbcTemplateSamlClientDaoImpl implements SamlClientDao { @Override @Transactional(readOnly=true) public List<DbLoadedSamlClientConfigurationDto> loadAllClients() { final List<DbLoadedSamlClientConfigurationDto> configurations = template.query(selectAllClientsSqlText, selectAllClientsParameters, selectAllClientsParameterTypes, fullRowMapper); return configurations; } SpringJdbcTemplateSamlClientDaoImpl(final DataSource dataSource, final LobHandler lobHandler, final String tableName, final String environment); }
SpringJdbcTemplateSamlClientDaoImpl implements SamlClientDao { @Override @Transactional(readOnly=true) public List<DbLoadedSamlClientConfigurationDto> loadAllClients() { final List<DbLoadedSamlClientConfigurationDto> configurations = template.query(selectAllClientsSqlText, selectAllClientsParameters, selectAllClientsParameterTypes, fullRowMapper); return configurations; } SpringJdbcTemplateSamlClientDaoImpl(final DataSource dataSource, final LobHandler lobHandler, final String tableName, final String environment); @Override @Transactional(readOnly=true) List<String> loadClientNames(); @Override @Transactional(readOnly=true) List<DbLoadedSamlClientConfigurationDto> loadAllClients(); @Override @Transactional(readOnly=true) DbLoadedSamlClientConfigurationDto loadClient(final String clientName); }
SpringJdbcTemplateSamlClientDaoImpl implements SamlClientDao { @Override @Transactional(readOnly=true) public List<DbLoadedSamlClientConfigurationDto> loadAllClients() { final List<DbLoadedSamlClientConfigurationDto> configurations = template.query(selectAllClientsSqlText, selectAllClientsParameters, selectAllClientsParameterTypes, fullRowMapper); return configurations; } SpringJdbcTemplateSamlClientDaoImpl(final DataSource dataSource, final LobHandler lobHandler, final String tableName, final String environment); @Override @Transactional(readOnly=true) List<String> loadClientNames(); @Override @Transactional(readOnly=true) List<DbLoadedSamlClientConfigurationDto> loadAllClients(); @Override @Transactional(readOnly=true) DbLoadedSamlClientConfigurationDto loadClient(final String clientName);  }