Spring Framework PropertyPlaceholderHelper - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Spring Framework PropertyPlaceholderHelper class.

This code example shows how to use the following methods:replacePlaceholders
	 * with {@link org.springframework.util.PropertyPlaceholderHelper}. 
	 * Only retained for compatibility with Spring 2.5 extensions. 
	 */ 
	@Deprecated 
	protected String parseStringValue(String strVal, Properties props, Set<?> visitedPlaceholders) {
		PropertyPlaceholderHelper helper = new PropertyPlaceholderHelper(
				placeholderPrefix, placeholderSuffix, valueSeparator, ignoreUnresolvablePlaceholders);
		PlaceholderResolver resolver = new PropertyPlaceholderConfigurerResolver(props);
		return helper.replacePlaceholders(strVal, resolver);
	} 
 
 
	private class PlaceholderResolvingStringValueResolver implements StringValueResolver {
 
		private final PropertyPlaceholderHelper helper;
 
		private final PlaceholderResolver resolver;
 
		public PlaceholderResolvingStringValueResolver(Properties props) {
			this.helper = new PropertyPlaceholderHelper(
5
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:replacePlaceholders
     * @param text   the text which may contain spring placeholders 
     * @param properties the properties 
     * @return the parsed text with replaced placeholders, or the original text as is 
     */ 
    protected String springResolvePlaceholders(String text, Properties properties) {
        return helper.replacePlaceholders(text, new BridgePropertyPlaceholderResolver(properties));
    } 
 
    public void setResolver(PropertiesResolver resolver) {
        this.resolver = resolver;
    } 
 
    public void setParser(PropertiesParser parser) {
        this.parser = parser;
    } 
 
    /** 
     * {@link PropertyPlaceholderHelper.PlaceholderResolver} to support using 
     */ 
    private class BridgePropertyPlaceholderResolver implements PropertyPlaceholderHelper.PlaceholderResolver {
4
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:replacePlaceholders
        String headerStr = header.applyDefinitionAndSections(parser.getHeaderDefinition(), parser.getFileContent().isUnix());
        parser.getFileContent().insert(parser.getBeginPosition(), mergeProperties(headerStr));
    } 
 
    public String mergeProperties(String str) {
        return placeholderHelper.replacePlaceholders(str, documentPropertiesLoader.load(this));
    } 
 
    public void save() { 
        saveTo(file);
    } 
 
    public void saveTo(File dest) {
        if (parser != null) {
            try { 
                FileUtils.write(dest, parser.getFileContent().getContent(), encoding);
            } catch (IOException e) {
                throw new IllegalStateException("Cannot write new header in file " + getFile() + ". Cause: " + e.getMessage(), e);
            } 
        } 
4
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:replacePlaceholders
This code example shows how to use the following methods:replacePlaceholders
        this.resolver = new DispatchingPlaceholderResolver(resolverName, beanFactory);
    } 
 
    @Override 
    public String resolveStringValue(String strVal) {
        return this.propertyPlaceholderHelper.replacePlaceholders(strVal, this.resolver);
    } 
} 
4
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
See Code Examples for Spring Framework PropertyPlaceholderHelper Methods: