1
2
3
4
5 package com.hack23.cia.model.application.dto.common;
6
7 import java.io.IOException;
8 import java.util.Properties;
9
10 /***
11 * The Class ApplicationProperties.
12 */
13 public class ApplicationProperties {
14
15 /*** The properties. */
16 private final Properties properties = new Properties();
17
18 /***
19 * Instantiates a new application properties.
20 */
21 public ApplicationProperties() {
22 super();
23 try {
24 properties.load(ApplicationProperties.class
25 .getResourceAsStream("/application.properties"));
26 } catch (final IOException e) {
27 e.printStackTrace();
28 }
29 }
30
31 /***
32 * Gets the name.
33 *
34 * @return the name
35 */
36 public final String getName() {
37 return properties.getProperty("application.name");
38 }
39
40 /***
41 * Gets the url.
42 *
43 * @return the url
44 */
45 public final String getUrl() {
46 return properties.getProperty("application.url");
47 }
48
49 /***
50 * Gets the version.
51 *
52 * @return the version
53 */
54 public final String getVersion() {
55 return properties.getProperty("application.version");
56 }
57
58
59 }