/** * Load properties from the given EncodedResource, * potentially defining a specific encoding for the properties file. * @see #fillProperties(java.util.Properties, EncodedResource) */ public static Properties loadProperties(EncodedResource resource) throws IOException { Properties props = new Properties(); fillProperties(props, resource); return props; }
/** * Load properties from the given resource (in ISO-8859-1 encoding). * @param resource the resource to load from * @return the populated Properties instance * @throws IOException if loading failed * @see #fillProperties(java.util.Properties, Resource) */ public static Properties loadProperties(Resource resource) throws IOException { Properties props = new Properties(); fillProperties(props, resource); return props; }
/** * Load properties from the given EncodedResource, * potentially defining a specific encoding for the properties file. * @see #fillProperties(java.util.Properties, EncodedResource) */ public static Properties loadProperties(EncodedResource resource) throws IOException { Properties props = new Properties(); fillProperties(props, resource); return props; }
/** * Load properties from the given resource (in ISO-8859-1 encoding). * @param resource the resource to load from * @return the populated Properties instance * @throws IOException if loading failed * @see #fillProperties(java.util.Properties, Resource) */ public static Properties loadProperties(Resource resource) throws IOException { Properties props = new Properties(); fillProperties(props, resource); return props; }
/** * Fill the given properties from the given EncodedResource, * potentially defining a specific encoding for the properties file. * @param props the Properties instance to load into * @param resource the resource to load from * @throws IOException in case of I/O errors */ public static void fillProperties(Properties props, EncodedResource resource) throws IOException { fillProperties(props, resource, new DefaultPropertiesPersister()); }
/** * Merges the {@code Properties} configured in the {@code mappings} and * {@code mappingLocations} into the final {@code Properties} instance * used for {@code ObjectName} resolution. */ @Override public void afterPropertiesSet() throws IOException { this.mergedMappings = new Properties(); CollectionUtils.mergePropertiesIntoMap(this.mappings, this.mergedMappings); if (this.mappingLocations != null) { for (Resource location : this.mappingLocations) { if (logger.isDebugEnabled()) { logger.debug("Loading JMX object name mappings file from " + location); } PropertiesLoaderUtils.fillProperties(this.mergedMappings, location); } } }
/** * Load properties into the given instance. * @param props the Properties instance to load into * @throws IOException in case of I/O errors * @see #setLocations */ protected void loadProperties(Properties props) throws IOException { if (this.locations != null) { for (Resource location : this.locations) { if (logger.isTraceEnabled()) { logger.trace("Loading properties file from " + location); } try { PropertiesLoaderUtils.fillProperties( props, new EncodedResource(location, this.fileEncoding), this.propertiesPersister); } catch (FileNotFoundException | UnknownHostException ex) { if (this.ignoreResourceNotFound) { if (logger.isDebugEnabled()) { logger.debug("Properties resource not found: " + ex.getMessage()); } } else { throw ex; } } } } }
/** * Fill the given properties from the given EncodedResource, * potentially defining a specific encoding for the properties file. * @param props the Properties instance to load into * @param resource the resource to load from * @throws IOException in case of I/O errors */ public static void fillProperties(Properties props, EncodedResource resource) throws IOException { fillProperties(props, resource, new DefaultPropertiesPersister()); }
/** * Merges the {@code Properties} configured in the {@code mappings} and * {@code mappingLocations} into the final {@code Properties} instance * used for {@code ObjectName} resolution. */ @Override public void afterPropertiesSet() throws IOException { this.mergedMappings = new Properties(); CollectionUtils.mergePropertiesIntoMap(this.mappings, this.mergedMappings); if (this.mappingLocations != null) { for (Resource location : this.mappingLocations) { if (logger.isDebugEnabled()) { logger.debug("Loading JMX object name mappings file from " + location); } PropertiesLoaderUtils.fillProperties(this.mergedMappings, location); } } }
logger.debug("Loading Quartz config from [" + this.configLocation + "]"); PropertiesLoaderUtils.fillProperties(mergedProps, this.configLocation);
/** * Load properties into the given instance. * @param props the Properties instance to load into * @throws IOException in case of I/O errors * @see #setLocations */ protected void loadProperties(Properties props) throws IOException { if (this.locations != null) { for (Resource location : this.locations) { if (logger.isTraceEnabled()) { logger.trace("Loading properties file from " + location); } try { PropertiesLoaderUtils.fillProperties( props, new EncodedResource(location, this.fileEncoding), this.propertiesPersister); } catch (FileNotFoundException | UnknownHostException ex) { if (this.ignoreResourceNotFound) { if (logger.isDebugEnabled()) { logger.debug("Properties resource not found: " + ex.getMessage()); } } else { throw ex; } } } } }
logger.debug("Loading FreeMarker configuration from " + this.configLocation); PropertiesLoaderUtils.fillProperties(props, this.configLocation);
logger.debug("Loading Quartz config from [" + this.configLocation + "]"); PropertiesLoaderUtils.fillProperties(mergedProps, this.configLocation);
logger.debug("Loading FreeMarker configuration from " + this.configLocation); PropertiesLoaderUtils.fillProperties(props, this.configLocation);
/** * Load properties from the given resource. * @param resource the resource to load from * @return the populated Properties instance * @throws IOException if loading failed */ public static Properties loadProperties(Resource resource) throws IOException { Properties props = new Properties(); fillProperties(props, resource); return props; }
/** * Load properties from the given EncodedResource, * potentially defining a specific encoding for the properties file. * @see #fillProperties(java.util.Properties, EncodedResource) */ public static Properties loadProperties(EncodedResource resource) throws IOException { Properties props = new Properties(); fillProperties(props, resource); return props; }
/** * Load properties from the given EncodedResource, * potentially defining a specific encoding for the properties file. * @see #fillProperties(java.util.Properties, EncodedResource) */ public static Properties loadProperties(EncodedResource resource) throws IOException { Properties props = new Properties(); fillProperties(props, resource); return props; }
/** * Load properties from the given resource (in ISO-8859-1 encoding). * @param resource the resource to load from * @return the populated Properties instance * @throws IOException if loading failed * @see #fillProperties(java.util.Properties, Resource) */ public static Properties loadProperties(Resource resource) throws IOException { Properties props = new Properties(); fillProperties(props, resource); return props; }
/** * Fill the given properties from the given EncodedResource, * potentially defining a specific encoding for the properties file. * @param props the Properties instance to load into * @param resource the resource to load from * @throws IOException in case of I/O errors */ public static void fillProperties(Properties props, EncodedResource resource) throws IOException { fillProperties(props, resource, new DefaultPropertiesPersister()); }
/** * Fill the given properties from the given EncodedResource, * potentially defining a specific encoding for the properties file. * @param props the Properties instance to load into * @param resource the resource to load from * @throws IOException in case of I/O errors */ public static void fillProperties(Properties props, EncodedResource resource) throws IOException { fillProperties(props, resource, new DefaultPropertiesPersister()); }