// Path: java/src/org/drupal/project/computing/exception/DConfigException.java
// public class DConfigException extends Exception {
//     public DConfigException() {
//     }
// 
//     public DConfigException(String s) {
//         super(s);
//     }
// 
//     public DConfigException(String s, Throwable throwable) {
//         super(s, throwable);
//     }
// 
//     public DConfigException(Throwable throwable) {
//         super(throwable);
//     }
// }
// 
// Path: java/src/org/drupal/project/computing/exception/DNotFoundException.java
// public class DNotFoundException extends Exception {
//     public DNotFoundException() {}
// 
//     public DNotFoundException(String s) {
//         super(s);
//     }
// }


import org.apache.commons.lang3.StringUtils;
import org.drupal.project.computing.exception.DConfigException;
import org.drupal.project.computing.exception.DNotFoundException;
import java.io.*;
import java.net.InetAddress;
import java.net.UnknownHostException;
import java.util.Properties;
import java.util.logging.Logger;
            return properties.getProperty(propertyName);
        }

        // 2. Java system property (not assuming it's already in system properties)
        Properties systemProperties = System.getProperties();
        if (systemProperties.containsKey(propertyName)) {
            return systemProperties.getProperty(propertyName);
        }

        // 3.Property set in system ENV: replace '.' with '_' and lower case to upper case.
        String envPropertyName = propertyName.replaceAll("\\.", "_").toUpperCase();
        String envValue = System.getenv(envPropertyName);

        return envValue == null ? defaultValue : envValue;
    }

    public void setProperty(String propertyName, String value) {
        assert StringUtils.isNotBlank(propertyName);
        properties.setProperty(propertyName, value);
    }


    /**
     * Try to read "dcomp.database.url" in config.properties or system env. Throws exception if can't find.
     *
     * @return The database url string that can be used directly in JDBC connections.
     * @throws DConfigException
     * @see <a href="http://dev.mysql.com/doc/connector-j/en/connector-j-usagenotes-connect-drivermanager.html">Simple MySQL example</a>
     * @see <a href="http://dev.mysql.com/doc/connector-j/en/connector-j-reference-configuration-properties.html">MySQL connection properties</a>
     */
// Path: java/src/org/drupal/project/computing/exception/DConfigException.java
// public class DConfigException extends Exception {
//     public DConfigException() {
//     }
// 
//     public DConfigException(String s) {
//         super(s);
//     }
// 
//     public DConfigException(String s, Throwable throwable) {
//         super(s, throwable);
//     }
// 
//     public DConfigException(Throwable throwable) {
//         super(throwable);
//     }
// }
// 
// Path: java/src/org/drupal/project/computing/exception/DNotFoundException.java
// public class DNotFoundException extends Exception {
//     public DNotFoundException() {}
// 
//     public DNotFoundException(String s) {
//         super(s);
//     }
// }


// Path: java/src/org/drupal/project/computing/DConfig.java
import org.apache.commons.lang3.StringUtils;
import org.drupal.project.computing.exception.DConfigException;
import org.drupal.project.computing.exception.DNotFoundException;
import java.io.*;
import java.net.InetAddress;
import java.net.UnknownHostException;
import java.util.Properties;
import java.util.logging.Logger;

            return properties.getProperty(propertyName);
        }

        // 2. Java system property (not assuming it's already in system properties)
        Properties systemProperties = System.getProperties();
        if (systemProperties.containsKey(propertyName)) {
            return systemProperties.getProperty(propertyName);
        }

        // 3.Property set in system ENV: replace '.' with '_' and lower case to upper case.
        String envPropertyName = propertyName.replaceAll("\\.", "_").toUpperCase();
        String envValue = System.getenv(envPropertyName);

        return envValue == null ? defaultValue : envValue;
    }

    public void setProperty(String propertyName, String value) {
        assert StringUtils.isNotBlank(propertyName);
        properties.setProperty(propertyName, value);
    }


    /**
     * Try to read "dcomp.database.url" in config.properties or system env. Throws exception if can't find.
     *
     * @return The database url string that can be used directly in JDBC connections.
     * @throws DConfigException
     * @see <a href="http://dev.mysql.com/doc/connector-j/en/connector-j-usagenotes-connect-drivermanager.html">Simple MySQL example</a>
     * @see <a href="http://dev.mysql.com/doc/connector-j/en/connector-j-reference-configuration-properties.html">MySQL connection properties</a>
     */
    public String getDatabaseUrl() throws DConfigException {