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.execute;
017
018import java.io.IOException;
019import java.util.List;
020
021import org.springframework.util.Assert;
022
023/**
024 * @deprecated
025 */
026@Deprecated
027public class MetaInfExecutable implements Executable {
028
029        public static final boolean DEFAULT_SKIP = false;
030
031        boolean skip = DEFAULT_SKIP;
032        List<org.kuali.common.util.metainf.MetaInfContext> contexts;
033
034        @Override
035        public void execute() {
036
037                if (skip) {
038                        return;
039                }
040
041                Assert.notNull(contexts, "contexts is null");
042
043                try {
044                        org.kuali.common.util.MetaInfUtils.scanAndCreateFiles(contexts);
045                } catch (IOException e) {
046                        throw new IllegalStateException(e);
047                }
048
049        }
050
051        public List<org.kuali.common.util.metainf.MetaInfContext> getContexts() {
052                return contexts;
053        }
054
055        public void setContexts(List<org.kuali.common.util.metainf.MetaInfContext> contexts) {
056                this.contexts = contexts;
057        }
058
059        public boolean isSkip() {
060                return skip;
061        }
062
063        public void setSkip(boolean skip) {
064                this.skip = skip;
065        }
066}