Newer
Older
/**
*
*/
package org.josast.property;
import java.io.File;
import java.util.logging.Logger;
/**
* @author Christophe
*
*/
public abstract class ConfigObject {
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
private String ConfigFilename=null;
private String fullConfigFilename=null;
protected CONFIG ConfigFile = CONFIG.getInstance();
public ConfigObject ()
{
}
public String getFulFileName()
{
fullConfigFilename = System.getProperty("user.dir")+"/config";
File apath = new File(fullConfigFilename);
if (!apath.exists())
{
boolean res = apath.mkdir();
if (!res)
{
log.severe("fail to create "+ fullConfigFilename);
}
}
return fullConfigFilename;
}
/**
* @param configFilename Configuration file name
*/
public ConfigObject(String configFilename) {
super();
ConfigFilename = configFilename;
ConfigFile.setFileName(configFilename);
}
/**
* @return Configuration Filename
*/
public String getConfigFilename() {
return ConfigFilename;
}
}