-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathConfigurationService.java
More file actions
52 lines (44 loc) · 1.4 KB
/
ConfigurationService.java
File metadata and controls
52 lines (44 loc) · 1.4 KB
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
50
51
52
import org.apache.commons.configuration.Configuration;
import org.apache.commons.configuration.ConfigurationException;
import org.apache.commons.configuration.PropertiesConfiguration;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.File;
import java.util.Vector;
class ConfigurationService {
private static final Logger logger = LoggerFactory.getLogger(Lgs.class);
private Configuration config;
public ConfigurationService(){
try {
logger.debug("read properties");
this.config = new PropertiesConfiguration("lgs.properties");
logger.debug("read properties ok");
} catch (ConfigurationException e) {
logger.debug("error while reading properties", e);
}
}
public String GetAlbumUrl() {
if(this.config !=null){
return this.config.getString("thalora.albumUrl");
}
return "";
}
public String GetImageUrl() {
if(this.config !=null){
return this.config.getString("thalora.imageUrl");
}
return "";
}
public String GetLssmSearchUrl() {
if(this.config !=null){
return this.config.getString("lssm.searchUrl");
}
return "";
}
public String GetOrderTargetPath() {
if(this.config !=null){
return this.config.getString("orderTargetPath");
}
return "";
}
}