001/**
002 * Copyright 2005-2018 The Kuali Foundation
003 *
004 * Licensed under the Educational Community License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 * http://www.opensource.org/licenses/ecl2.php
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016package org.kuali.rice.sql.spring;
017
018import org.kuali.common.jdbc.reset.JdbcResetExecConfig;
019import org.kuali.common.util.execute.Executable;
020import org.springframework.beans.factory.annotation.Autowired;
021import org.springframework.context.annotation.Bean;
022import org.springframework.context.annotation.Configuration;
023import org.springframework.context.annotation.Import;
024
025/**
026 * Central configuration file for launching the database reset process.
027 *
028 * @author Kuali Rice Team (rice.collab@kuali.org)
029 */
030@Configuration
031@Import({ SourceSqlConfig.class, JdbcResetExecConfig.class })
032public class SourceSqlExecConfig {
033
034    /**
035     * The JDBC reset database configuration.
036     */
037    @Autowired
038    JdbcResetExecConfig config;
039
040    /**
041     * Returns the executable for launching the database reset process.
042     *
043     * @return the executable for launching the database reset process
044     */
045    @Bean
046    public Executable sourceSqlExecutable() {
047        return config.executable();
048    }
049
050}