1 | package de.ugoe.cs.swe.exercises.settings;
|
---|
2 |
|
---|
3 | public class Settings {
|
---|
4 | private String svnLocation;
|
---|
5 | private String workingDirectory;
|
---|
6 | private String svnUsername;
|
---|
7 | private String svnPassword;
|
---|
8 | private String mysqlHost;
|
---|
9 | private String mysqlDb;
|
---|
10 | private String mysqlUsername;
|
---|
11 | private String mysqlPassword;
|
---|
12 | private String pdfLatexPath;
|
---|
13 | private String researchGroup;
|
---|
14 | private String researchGroupUrl;
|
---|
15 | private boolean mysqlSSL = false;
|
---|
16 | private static Settings settings;
|
---|
17 |
|
---|
18 | private Settings() {
|
---|
19 | }
|
---|
20 |
|
---|
21 | public static Settings getInstance() {
|
---|
22 | if (settings == null)
|
---|
23 | settings = new Settings();
|
---|
24 |
|
---|
25 | return settings;
|
---|
26 | }
|
---|
27 |
|
---|
28 | public boolean isInitialized() {
|
---|
29 | if (svnLocation == "" || workingDirectory == "" || svnUsername == ""
|
---|
30 | || svnPassword == "" || mysqlHost == "" || mysqlDb == ""
|
---|
31 | || mysqlUsername == "" || mysqlPassword == ""
|
---|
32 | || pdfLatexPath == "") {
|
---|
33 | return false;
|
---|
34 | }
|
---|
35 | return true;
|
---|
36 |
|
---|
37 | }
|
---|
38 |
|
---|
39 | public String getSvnLocation() {
|
---|
40 | return svnLocation;
|
---|
41 | }
|
---|
42 |
|
---|
43 | public void setSvnLocation(String svnLocation) {
|
---|
44 | this.svnLocation = svnLocation;
|
---|
45 | }
|
---|
46 |
|
---|
47 | public String getWorkingDirectory() {
|
---|
48 | return workingDirectory;
|
---|
49 | }
|
---|
50 |
|
---|
51 | public void setWorkingDirectory(String workingDirectory) {
|
---|
52 | this.workingDirectory = workingDirectory;
|
---|
53 | }
|
---|
54 |
|
---|
55 | public String getSvnUsername() {
|
---|
56 | return svnUsername;
|
---|
57 | }
|
---|
58 |
|
---|
59 | public void setSvnUsername(String svnUsername) {
|
---|
60 | this.svnUsername = svnUsername;
|
---|
61 | }
|
---|
62 |
|
---|
63 | public String getSvnPassword() {
|
---|
64 | return svnPassword;
|
---|
65 | }
|
---|
66 |
|
---|
67 | public void setSvnPassword(String svnPassword) {
|
---|
68 | this.svnPassword = svnPassword;
|
---|
69 | }
|
---|
70 |
|
---|
71 | public String getMysqlHost() {
|
---|
72 | return mysqlHost;
|
---|
73 | }
|
---|
74 |
|
---|
75 | public void setMysqlHost(String mysqlHost) {
|
---|
76 | this.mysqlHost = mysqlHost;
|
---|
77 | }
|
---|
78 |
|
---|
79 | public String getMysqlDb() {
|
---|
80 | return mysqlDb;
|
---|
81 | }
|
---|
82 |
|
---|
83 | public void setMysqlDb(String mysqlDb) {
|
---|
84 | this.mysqlDb = mysqlDb;
|
---|
85 | }
|
---|
86 |
|
---|
87 | public String getMysqlUsername() {
|
---|
88 | return mysqlUsername;
|
---|
89 | }
|
---|
90 |
|
---|
91 | public void setMysqlUsername(String mysqlUsername) {
|
---|
92 | this.mysqlUsername = mysqlUsername;
|
---|
93 | }
|
---|
94 |
|
---|
95 | public String getMysqlPassword() {
|
---|
96 | return mysqlPassword;
|
---|
97 | }
|
---|
98 |
|
---|
99 | public void setMysqlPassword(String mysqlPassword) {
|
---|
100 | this.mysqlPassword = mysqlPassword;
|
---|
101 | }
|
---|
102 |
|
---|
103 | public String getPdfLatexPath() {
|
---|
104 | return pdfLatexPath;
|
---|
105 | }
|
---|
106 |
|
---|
107 | public void setPdfLatexPath(String pdfLatexPath) {
|
---|
108 | this.pdfLatexPath = pdfLatexPath;
|
---|
109 | }
|
---|
110 |
|
---|
111 | public String getResearchGroup() {
|
---|
112 | return researchGroup;
|
---|
113 | }
|
---|
114 |
|
---|
115 | public void setResearchGroup(String researchGroup) {
|
---|
116 | this.researchGroup = researchGroup;
|
---|
117 | }
|
---|
118 |
|
---|
119 | public String getResearchGroupUrl() {
|
---|
120 | return researchGroupUrl;
|
---|
121 | }
|
---|
122 |
|
---|
123 | public void setResearchGroupUrl(String researchGroupUrl) {
|
---|
124 | this.researchGroupUrl = researchGroupUrl;
|
---|
125 | }
|
---|
126 |
|
---|
127 | public boolean isMysqlSSL() {
|
---|
128 | return mysqlSSL;
|
---|
129 | }
|
---|
130 |
|
---|
131 | public void setMysqlSSL(boolean mysqlSSL) {
|
---|
132 | this.mysqlSSL = mysqlSSL;
|
---|
133 | }
|
---|
134 |
|
---|
135 | }
|
---|