protected ResourceBundle loadCustomQuartzConfig() { //don't use quartz.properties as default-value String configFile = SchedulerBaseConfig.SCHEDULER_CONFIG_FILE; return PropertyFileUtils.getResourceBundle(configFile); }
PropertyFileConfigSource(URL propertyFileUrl) { super(PropertyFileUtils.loadProperties(propertyFileUrl)); fileName = propertyFileUrl.toExternalForm(); initOrdinal(100); }
AgoravaEnvConfigSourceProvider(String propertyFileName) { try { Enumeration<URL> propertyFileUrls = PropertyFileUtils.resolvePropertyFiles(propertyFileName); while (propertyFileUrls.hasMoreElements()) { URL propertyFileUrl = propertyFileUrls.nextElement(); LOG.log(Level.INFO, "Custom config found by DeltaSpike. Name: ''{0}'', URL: ''{1}''", new Object[] { propertyFileName, propertyFileUrl }); configSources.add(new PropertyFileConfigSource(propertyFileUrl)); } } catch (IOException ioe) { throw new IllegalStateException("problem while loading DeltaSpike property files", ioe); } }
EnvironmentPropertyConfigSourceProvider(String propertyFileName) { try { Enumeration<URL> propertyFileUrls = PropertyFileUtils.resolvePropertyFiles(propertyFileName); while (propertyFileUrls.hasMoreElements()) { URL propertyFileUrl = propertyFileUrls.nextElement(); LOG.log(Level.INFO, "Custom config found by DeltaSpike. Name: ''{0}'', URL: ''{1}''", new Object[] {propertyFileName, propertyFileUrl}); configSources.add(new PropertyFileConfigSource(propertyFileUrl)); } } catch (IOException ioe) { throw new IllegalStateException("problem while loading DeltaSpike property files", ioe); } }
/** * @return the ResourceBundle for the current default Locale */ public static ResourceBundle getResourceBundle(String bundleName) { return getResourceBundle(bundleName, Locale.getDefault()); }
EnvironmentPropertyConfigSourceProvider(String propertyFileName, boolean optional) { try { Enumeration<URL> propertyFileUrls = PropertyFileUtils.resolvePropertyFiles(propertyFileName); if (!optional && !propertyFileUrls.hasMoreElements()) { throw new IllegalStateException(propertyFileName + " wasn't found."); } while (propertyFileUrls.hasMoreElements()) { URL propertyFileUrl = propertyFileUrls.nextElement(); LOG.log(Level.INFO, "Custom config found by DeltaSpike. Name: ''{0}'', URL: ''{1}''", new Object[] {propertyFileName, propertyFileUrl}); configSources.add(new PropertyFileConfigSource(propertyFileUrl)); } } catch (IOException ioe) { throw new IllegalStateException("problem while loading DeltaSpike property files", ioe); } }
PropertyFileConfigSource(URL propertyFileUrl) { super(PropertyFileUtils.loadProperties(propertyFileUrl)); fileName = propertyFileUrl.toExternalForm(); initOrdinal(100); }
/** * @return the ResourceBundle for the current default Locale */ public static ResourceBundle getResourceBundle(String bundleName) { return getResourceBundle(bundleName, Locale.getDefault()); }
@Test public void run() throws IOException, URISyntaxException { test.result = PropertyFileUtils.resolvePropertyFiles(test.file); test.run(); }
PropertyFileConfigSource(URL propertyFileUrl) { super(PropertyFileUtils.loadProperties(propertyFileUrl)); fileName = propertyFileUrl.toExternalForm(); initOrdinal(90); }
/** * @return the ResourceBundle for the current default Locale */ public static ResourceBundle getResourceBundle(String bundleName) { return getResourceBundle(bundleName, Locale.getDefault()); }
ResourceBundle messageBundle = PropertyFileUtils.getResourceBundle(currentMessageSource, locale);
ResourceBundle messageBundle = PropertyFileUtils.getResourceBundle(currentMessageSource, locale);
@Override public String getMessage(MessageContext messageContext, String messageTemplate, String category) { if ( messageTemplate.startsWith("{") && messageTemplate.endsWith("}")) { String resourceKey = messageTemplate.substring(1, messageTemplate.length() - 1); try { ResourceBundle messageBundle = PropertyFileUtils .getResourceBundle(TestMessages.class.getName(), messageContext.getLocale()); String value = null; if (category != null && category.length() > 0) { value = messageBundle.getString(resourceKey + "." + category); } if (value == null) { value = messageBundle.getString(resourceKey); } return value; } catch (MissingResourceException e) { return resourceKey; } } return messageTemplate; } }