blob: 79b36f00047703e9d1a696094e74526a5d2a3845 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
package org.openecomp.sdc.asdctool.impl.validator.config;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;
/**
* Created by chaya on 7/4/2017.
*/
public class ValidationConfigManager {
private static Properties prop = new Properties();
public static String getOutputFilePath() {
return outputFilePath;
}
public static void setOutputFilePath(String outputPath) {
ValidationConfigManager.outputFilePath = outputPath+ "/reportOutput.txt";
}
private static String outputFilePath;
public static String getCsvReportFilePath() {
return csvReportFilePath;
}
public static void setCsvReportFilePath(String outputPath) {
ValidationConfigManager.csvReportFilePath = outputPath +"/csvSummary_"+System.currentTimeMillis()+".csv";
}
private static String csvReportFilePath = "summary.csv";
public static Properties setValidationConfiguration(String path){
InputStream input = null;
try {
input = new FileInputStream(path);
prop.load(input);
} catch (IOException ex) {
ex.printStackTrace();
}
return prop;
}
public static Properties getValidationConfiguration() {
return prop;
}
}
|