1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.apache.ibatis.migration.options;
17
18 import static org.apache.ibatis.migration.utils.Util.file;
19
20 import java.io.File;
21 import java.nio.file.Path;
22
23 public class SelectedPaths {
24 private File basePath = Path.of("./").toFile();
25 private File envPath;
26 private File scriptPath;
27 private File driverPath;
28 private File hookPath;
29
30 public File getBasePath() {
31 return basePath;
32 }
33
34 public File getEnvPath() {
35 return envPath == null ? file(basePath, "./environments") : envPath;
36 }
37
38 public File getScriptPath() {
39 return scriptPath == null ? file(basePath, "./scripts") : scriptPath;
40 }
41
42 public File getDriverPath() {
43 return driverPath == null ? file(basePath, "./drivers") : driverPath;
44 }
45
46 public File getHookPath() {
47 return hookPath == null ? file(basePath, "./hooks") : hookPath;
48 }
49
50 public void setBasePath(File aBasePath) {
51 basePath = aBasePath;
52 }
53
54 public void setEnvPath(File aEnvPath) {
55 envPath = aEnvPath;
56 }
57
58 public void setScriptPath(File aScriptPath) {
59 scriptPath = aScriptPath;
60 }
61
62 public void setDriverPath(File aDriverPath) {
63 driverPath = aDriverPath;
64 }
65
66 public void setHookPath(File aHookPath) {
67 hookPath = aHookPath;
68 }
69 }