1 package de.desy.acop.launcher;
2
3 import java.io.IOException;
4 import java.io.InputStream;
5 import java.util.Properties;
6
7
8
9
10
11
12
13
14 public class Utilities {
15
16 private static final String FILE_NAME = "acop/acop.properties";
17 public static final String SPIDER_CUSTOMACTION = "spider.customAction";
18 public static final String WEBPAGE_LOCATION = "about.webpage";
19
20 private static Properties properties;
21
22
23
24
25
26
27
28 public static String getAcopProperty(String name) {
29 return getProperties().getProperty(name);
30 }
31
32
33
34
35
36
37 public static Properties getProperties() {
38 if (properties == null) {
39 properties = System.getProperties();
40 InputStream stream = Utilities.class.getClassLoader().getResourceAsStream(FILE_NAME);
41 try {
42 properties.load(stream);
43 } catch (IOException e) {
44 e.printStackTrace();
45 }
46 }
47 return properties;
48 }
49
50 }