package com.oculusinfo.tile.rest.config;

import java.io.File;

/**
 * The ConfigService is responsible for replacing property keys in templated configuration files with values from a properties file.
 *
 * @author danielabar
 */
public interface ConfigService {

    String replaceProperties(File configFile) throws ConfigException;

}

@@ -257,16 +257,1882 @@
 vice %7B%0A%0A
+    /**%0A     * Given a configFile (usually JSON format but could be any text file) such as:%0A     * %5B%0A     *      %7B%0A     *          %22id%22: %22some-id%22,%0A     *          %22private%22: %7B%0A     *              %22data%22: %7B%0A     *                  %22pyramidio%22: %7B%0A     *                      %22type%22: %22hbase%22,%0A     *                      %22hbase.zookeeper.quorum%22: %22%5Bhbase.zookeeper.quorum%5D%22,%0A     *                      %22hbase.zookeeper.port%22: %22%5B%22hbase.zookeeper.port%22%5D%22%0A     *                  %7D%0A     *              %7D%0A     *          %7D%0A     *      %7D%0A     * %5D%0A     *%0A     * And environment variable pointing to a properties file TILE_CONFIG_PROPERTIES=/path/to/app.properties%0A     *%0A     * And app.properties%0A     *  hbase.zookeeper.quorum=some.host%0A     *  hbase.zookeeper.port=55555%0A     *%0A     *  Then this method will return%0A     *  * %5B%0A     *      %7B%0A     *          %22id%22: %22some-id%22,%0A     *          %22private%22: %7B%0A     *              %22data%22: %7B%0A     *                  %22pyramidio%22: %7B%0A     *                      %22type%22: %22hbase%22,%0A     *                      %22hbase.zookeeper.quorum%22: %22some.host%22,%0A     *                      %22hbase.zookeeper.port%22: %2255555%22%0A     *                  %7D%0A     *              %7D%0A     *          %7D%0A     *      %7D%0A     * %5D%0A     *%0A     * If TILE_CONFIG_PROPERTIES environment variable is not set, then this method will attempt to%0A     * read a file named default-config.properties from the classpath and use that for the replacements.%0A     *%0A     * If default-config.properties is not found, then this method will return the String contents%0A     * of configFile exactly as is, i.e. with no replacements.%0A     *%0A     * @param configFile The configuration file containing tokens to be replaced%0A     * @return String contents of configFile with tokens replaced by properties%0A     * @throws ConfigException If unable to read configuration or properties file%0A     */%0A
     Stri

add javadoc for ConfigService