1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.common.util.spring;
17
18 import java.io.File;
19
20 import org.kuali.common.util.execute.ConvertTableListingTextFileExecutable;
21 import org.springframework.beans.factory.annotation.Autowired;
22 import org.springframework.context.annotation.Bean;
23 import org.springframework.context.annotation.Configuration;
24 import org.springframework.core.env.Environment;
25
26 @Configuration
27 public class ConvertTableListingTextFileConfig {
28
29 @Autowired
30 Environment env;
31
32 @Bean
33 public ConvertTableListingTextFileExecutable convertTableListingTextFileExecutable() {
34
35 String artifactId = SpringUtils.getProperty(env, "impex.txt.artifactId");
36 File outputDir = SpringUtils.getFile(env, "project.build.outputDirectory");
37 boolean skip = SpringUtils.getBoolean(env, "impex.txt.skip", false);
38
39 ConvertTableListingTextFileExecutable e = new ConvertTableListingTextFileExecutable();
40 e.setArtifactId(artifactId);
41 e.setOutputDir(outputDir);
42 e.setSkip(skip);
43 return e;
44 }
45
46 }