@Test public void throwExceptionIfAppDictionaryIsNotFound() throws Exception { DefaultDataDictionaryProvider provider = new DefaultDataDictionaryProvider(); try { provider.getApplicationDataDictionary(new ApplVerID("Invalid_Test")); } catch (QFJException e) { assertThat(e.getMessage(), containsString("Unknown or unsupported ApplVerID")); } }
public DataDictionary getApplicationDataDictionary(ApplVerID applVerID) { AppVersionKey appVersionKey = new AppVersionKey(applVerID); DataDictionary dd = applicationDictionaries.get(appVersionKey); if (dd == null && findDataDictionaries) { String beginString = toBeginString(applVerID); String path = beginString.replace(".", "") + ".xml"; try { dd = new DataDictionary(path); applicationDictionaries.put(appVersionKey, dd); } catch (ConfigError e) { throw new QFJException(e); } } return dd; }
DefaultDataDictionaryProvider implements DataDictionaryProvider { public DataDictionary getApplicationDataDictionary(ApplVerID applVerID) { AppVersionKey appVersionKey = new AppVersionKey(applVerID); DataDictionary dd = applicationDictionaries.get(appVersionKey); if (dd == null && findDataDictionaries) { String beginString = toBeginString(applVerID); String path = beginString.replace(".", "") + ".xml"; try { dd = new DataDictionary(path); applicationDictionaries.put(appVersionKey, dd); } catch (ConfigError e) { throw new QFJException(e); } } return dd; } }
DefaultDataDictionaryProvider implements DataDictionaryProvider { public DataDictionary getApplicationDataDictionary(ApplVerID applVerID) { AppVersionKey appVersionKey = new AppVersionKey(applVerID); DataDictionary dd = applicationDictionaries.get(appVersionKey); if (dd == null && findDataDictionaries) { String beginString = toBeginString(applVerID); String path = beginString.replace(".", "") + ".xml"; try { dd = new DataDictionary(path); applicationDictionaries.put(appVersionKey, dd); } catch (ConfigError e) { throw new QFJException(e); } } return dd; } DefaultDataDictionaryProvider();  DefaultDataDictionaryProvider(boolean findDataDictionaries); }
DefaultDataDictionaryProvider implements DataDictionaryProvider { public DataDictionary getApplicationDataDictionary(ApplVerID applVerID) { AppVersionKey appVersionKey = new AppVersionKey(applVerID); DataDictionary dd = applicationDictionaries.get(appVersionKey); if (dd == null && findDataDictionaries) { String beginString = toBeginString(applVerID); String path = beginString.replace(".", "") + ".xml"; try { dd = new DataDictionary(path); applicationDictionaries.put(appVersionKey, dd); } catch (ConfigError e) { throw new QFJException(e); } } return dd; } DefaultDataDictionaryProvider();  DefaultDataDictionaryProvider(boolean findDataDictionaries); synchronized DataDictionary getSessionDataDictionary(String beginString); DataDictionary getApplicationDataDictionary(ApplVerID applVerID); void addTransportDictionary(String beginString, DataDictionary dd); void addApplicationDictionary(ApplVerID applVerID, DataDictionary dataDictionary); }
DefaultDataDictionaryProvider implements DataDictionaryProvider { public DataDictionary getApplicationDataDictionary(ApplVerID applVerID) { AppVersionKey appVersionKey = new AppVersionKey(applVerID); DataDictionary dd = applicationDictionaries.get(appVersionKey); if (dd == null && findDataDictionaries) { String beginString = toBeginString(applVerID); String path = beginString.replace(".", "") + ".xml"; try { dd = new DataDictionary(path); applicationDictionaries.put(appVersionKey, dd); } catch (ConfigError e) { throw new QFJException(e); } } return dd; } DefaultDataDictionaryProvider();  DefaultDataDictionaryProvider(boolean findDataDictionaries); synchronized DataDictionary getSessionDataDictionary(String beginString); DataDictionary getApplicationDataDictionary(ApplVerID applVerID); void addTransportDictionary(String beginString, DataDictionary dd); void addApplicationDictionary(ApplVerID applVerID, DataDictionary dataDictionary);  }