001/** 002 * Copyright 2010-2014 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.common.util.spring; 017 018import org.kuali.common.util.execute.Executable; 019import org.springframework.context.annotation.Bean; 020import org.springframework.context.annotation.Configuration; 021 022/** 023 * Provides an easy way to make Spring "do something". Somewhat similar to <code>public static void main(String[] args)</code> in a regular Java class. This class provides a way 024 * for extending classes to capture what it is they want to do in an <code>Executable</code> and then have Spring automatically execute it. 025 * 026 * The idea here is to provide a clean separation between the configuring and assembling of Executables from their actual execution. 027 * 028 * @deprecated 029 */ 030@Configuration 031@Deprecated 032public abstract class ExecutableConfig { 033 034 protected abstract Executable getExecutable(); 035 036 @Bean(initMethod = "execute") 037 public Executable executable() { 038 return getExecutable(); 039 } 040}