View Javadoc

1   /**
2    * Copyright 2010-2013 The Kuali Foundation
3    *
4    * Licensed under the Educational Community License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    * http://www.opensource.org/licenses/ecl2.php
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package org.kuali.common.util.execute;
17  
18  import java.io.IOException;
19  import java.util.List;
20  
21  import org.springframework.util.Assert;
22  
23  /**
24   * @deprecated
25   */
26  @Deprecated
27  public class MetaInfExecutable implements Executable {
28  
29  	public static final boolean DEFAULT_SKIP = false;
30  
31  	boolean skip = DEFAULT_SKIP;
32  	List<org.kuali.common.util.metainf.MetaInfContext> contexts;
33  
34  	@Override
35  	public void execute() {
36  
37  		if (skip) {
38  			return;
39  		}
40  
41  		Assert.notNull(contexts, "contexts is null");
42  
43  		try {
44  			org.kuali.common.util.MetaInfUtils.scanAndCreateFiles(contexts);
45  		} catch (IOException e) {
46  			throw new IllegalStateException(e);
47  		}
48  
49  	}
50  
51  	public List<org.kuali.common.util.metainf.MetaInfContext> getContexts() {
52  		return contexts;
53  	}
54  
55  	public void setContexts(List<org.kuali.common.util.metainf.MetaInfContext> contexts) {
56  		this.contexts = contexts;
57  	}
58  
59  	public boolean isSkip() {
60  		return skip;
61  	}
62  
63  	public void setSkip(boolean skip) {
64  		this.skip = skip;
65  	}
66  }