GigaSpaces XAP 9.7.2 API

org.openspaces.core.util
Class PlaceholderReplacer

java.lang.Object
  extended by org.openspaces.core.util.PlaceholderReplacer

public class PlaceholderReplacer
extends Object

Author:
Dan Kilman

Nested Class Summary
static class PlaceholderReplacer.PlaceholderResolutionException
           
 
Constructor Summary
PlaceholderReplacer()
           
 
Method Summary
static String replacePlaceholders(Map<String,String> variables, String value)
          Replaces each occurence of ${SOME_VALUE} with the varible SOME_VALUE in 'variables' If any error occures during parsing, i.e: variable doesn't exist, bad syntax, etc...
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PlaceholderReplacer

public PlaceholderReplacer()
Method Detail

replacePlaceholders

public static String replacePlaceholders(Map<String,String> variables,
                                         String value)
                                  throws PlaceholderReplacer.PlaceholderResolutionException
Replaces each occurence of ${SOME_VALUE} with the varible SOME_VALUE in 'variables' If any error occures during parsing, i.e: variable doesn't exist, bad syntax, etc... a PlaceholderReplacer.PlaceholderResolutionException is thrown, otherwise the new string after all replacements have been made will be returned.

Parameters:
variables - The variables map to match placeholders against
value - the string, possibly containing placeholders
Returns:
the value after placeholder replacement have been made
Throws:
PlaceholderReplacer.PlaceholderResolutionException - if an empty placeholder is found or a place holder with no suitable value in 'variables'

GigaSpaces XAP 9.7.2 API

Copyright © GigaSpaces.