// Path: src/main/java/org/cloudfoundry/community/servicebroker/datalifecycle/exception/DataProviderSanitizationFailedException.java
// public class DataProviderSanitizationFailedException extends Exception {
// 
// 	private static final long serialVersionUID = 1L;
// 
// 	public DataProviderSanitizationFailedException(String msg) {
// 		super(msg);
// 	}
// }
// 
// Path: src/main/java/org/cloudfoundry/community/servicebroker/datalifecycle/provider/DataProvider.java
// public interface DataProvider {
// 
// 	/**
// 	 * Sanitize the data source with the incoming script. This method is called
// 	 * upon provision and typically removes or modifies sensitive data from the
// 	 * database. This method is always called in order to ensure the sanitize
// 	 * point has a chance to perform operations which my not be scripted.
// 	 *
// 	 * Creds are obtained from the CopyProvider after creating a copy, so the
// 	 * DataProvider needs to understand the object, as it's opaque to the
// 	 * framework.
// 	 *
// 	 * @param script
// 	 *            to run against the data source, may be null
// 	 * @param creds
// 	 *            to login to service instance, provided by the CopyProvider
// 	 * @throws DataProviderSanitizationFailedException
// 	 *             if the script fails.
// 	 */
// 	void sanitize(String script, Map<String, Object> creds)
// 			throws DataProviderSanitizationFailedException;
// 			
// 	//TODO Password change is implicit in above, explicit api?
// }


import java.sql.SQLException;
import java.util.Map;
import org.apache.log4j.Logger;
import org.cloudfoundry.community.servicebroker.datalifecycle.exception.DataProviderSanitizationFailedException;
import org.cloudfoundry.community.servicebroker.datalifecycle.provider.DataProvider;
package org.cloudfoundry.community.servicebroker.datalifecycle.postgres;



/**
 * Created by jkruck on 4/20/15.
 */
public class PostgresDataProvider implements DataProvider {
	private Logger log = Logger.getLogger(PostgresDataProvider.class);

	private PostgresScriptExecutor executor;

	public PostgresDataProvider(PostgresScriptExecutor executor) {
		this.executor = executor;
	}

	@Override
	public void sanitize(String script, Map<String, Object> creds)
// Path: src/main/java/org/cloudfoundry/community/servicebroker/datalifecycle/exception/DataProviderSanitizationFailedException.java
// public class DataProviderSanitizationFailedException extends Exception {
// 
// 	private static final long serialVersionUID = 1L;
// 
// 	public DataProviderSanitizationFailedException(String msg) {
// 		super(msg);
// 	}
// }
// 
// Path: src/main/java/org/cloudfoundry/community/servicebroker/datalifecycle/provider/DataProvider.java
// public interface DataProvider {
// 
// 	/**
// 	 * Sanitize the data source with the incoming script. This method is called
// 	 * upon provision and typically removes or modifies sensitive data from the
// 	 * database. This method is always called in order to ensure the sanitize
// 	 * point has a chance to perform operations which my not be scripted.
// 	 *
// 	 * Creds are obtained from the CopyProvider after creating a copy, so the
// 	 * DataProvider needs to understand the object, as it's opaque to the
// 	 * framework.
// 	 *
// 	 * @param script
// 	 *            to run against the data source, may be null
// 	 * @param creds
// 	 *            to login to service instance, provided by the CopyProvider
// 	 * @throws DataProviderSanitizationFailedException
// 	 *             if the script fails.
// 	 */
// 	void sanitize(String script, Map<String, Object> creds)
// 			throws DataProviderSanitizationFailedException;
// 			
// 	//TODO Password change is implicit in above, explicit api?
// }


// Path: src/main/java/org/cloudfoundry/community/servicebroker/datalifecycle/postgres/PostgresDataProvider.java
import java.sql.SQLException;
import java.util.Map;
import org.apache.log4j.Logger;
import org.cloudfoundry.community.servicebroker.datalifecycle.exception.DataProviderSanitizationFailedException;
import org.cloudfoundry.community.servicebroker.datalifecycle.provider.DataProvider;

package org.cloudfoundry.community.servicebroker.datalifecycle.postgres;



/**
 * Created by jkruck on 4/20/15.
 */
public class PostgresDataProvider implements DataProvider {
	private Logger log = Logger.getLogger(PostgresDataProvider.class);

	private PostgresScriptExecutor executor;

	public PostgresDataProvider(PostgresScriptExecutor executor) {
		this.executor = executor;
	}

	@Override
	public void sanitize(String script, Map<String, Object> creds)
			throws DataProviderSanitizationFailedException {