com.googlecode.flyway.core.migration.sql
Class PlaceholderReplacer

java.lang.Object
  extended by com.googlecode.flyway.core.migration.sql.PlaceholderReplacer

public class PlaceholderReplacer
extends java.lang.Object

Tool for replacing placeholders.


Field Summary
static PlaceholderReplacer NO_PLACEHOLDERS
          PlaceholderReplacer that doesn't replace any placeholders.
 
Constructor Summary
PlaceholderReplacer(java.util.Map<java.lang.String,java.lang.String> placeholders, java.lang.String placeholderPrefix, java.lang.String placeholderSuffix)
          Creates a new PlaceholderReplacer.
 
Method Summary
 java.lang.String replacePlaceholders(java.lang.String input)
          Replaces the placeholders in this input string with their corresponding values.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NO_PLACEHOLDERS

public static final PlaceholderReplacer NO_PLACEHOLDERS
PlaceholderReplacer that doesn't replace any placeholders.

Constructor Detail

PlaceholderReplacer

public PlaceholderReplacer(java.util.Map<java.lang.String,java.lang.String> placeholders,
                           java.lang.String placeholderPrefix,
                           java.lang.String placeholderSuffix)
Creates a new PlaceholderReplacer.

Parameters:
placeholders - A map of to apply to sql migration scripts.
placeholderPrefix - The prefix of every placeholder. Usually ${
placeholderSuffix - The suffix of every placeholder. Usually }
Method Detail

replacePlaceholders

public java.lang.String replacePlaceholders(java.lang.String input)
Replaces the placeholders in this input string with their corresponding values.

Parameters:
input - The input to process.
Returns:
The input string with all placeholders replaced.


Copyright © 2010. All Rights Reserved.