Skip to content

Package: ImondConstants

ImondConstants

nameinstructionbranchcomplexitylinemethod
static {...}
M: 16 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 5 C: 0
0%
M: 1 C: 0
0%

Coverage

1: package update.remote.imond;
2:
3: /**
4: * This class represents the constants of the imond.
5: *
6: * @author Patrick Kriegel
7: *
8: */
9: public final class ImondConstants {
10:
11:         /**
12:          * This is the constructor. No side-effects.
13:          */
14:         private ImondConstants() {
15:         }
16:
17:         /**
18:          * This is the constant 4.
19:          */
20:         public static final Integer FOUR = 4;
21:         /**
22:          * This is the constant 10.
23:          */
24:         public static final Integer TEN = 10;
25:         /**
26:          * This is the constant 100.
27:          */
28:         public static final Integer ONEHUNDRED = 100;
29:         /**
30:          * This is the constant 5000.
31:          */
32:         public static final Integer FIVETHOUSAND = 5000;
33:         /**
34:          * This is the constant 1024.
35:          */
36:         public static final Integer NUMBER_1024 = 1024;
37:         /**
38:          * This is the empty string.
39:          */
40:         public static final String EMPTYSTRING = "";
41:         /**
42:          * This is the constant space.
43:          */
44:         public static final String SPACE = " ";
45:         /**
46:          * This is the ERR string.
47:          */
48:         public static final String ERR = "ERR";
49:         /**
50:          * This is the last part for the receive command.
51:          */
52:         public static final String FORRECEIVECOMMAND = "\r\n";
53:         /**
54:          * This is the letter y.
55:          */
56:         public static final String Y = "y";
57:         /**
58:          * This is the letter n.
59:          */
60:         public static final String N = "n";
61:         /**
62:          * This is the String NAK.
63:          */
64:         public static final String NAK = "NAK";
65:         /**
66:          * This is the welcome message.
67:          */
68:         public static final String WELCOME = "Willkommen zum imond Update Clienten";
69:         /**
70:          * This is the message for requesting the ip adress.
71:          */
72:         public static final String SERVER = "Bitte geben Sie die IP-Adresse des Routers an:";
73:         /**
74:          * This is the message for requesting the port.
75:          */
76:         public static final String PORT = "Bitte geben Sie nun den Port zum Router an:";
77:         /**
78:          * This is the message for requesting the password.
79:          */
80:         public static final String PASSWORD =
81:                         "Bitte geben Sie nun das Passwort zur Authentifizierung an:";
82:         /**
83:          * This is the message, when a socket successfully created.
84:          */
85:         public static final String SOCKETSUCCESFULLY =
86:                         "Verbindung zum Router wurde erfolgreich hergestellt!";
87:         /**
88:          * This is a string for the receive command.
89:          */
90:         public static final String RECEIVE = "receive ";
91:         /**
92:          * This is the String "OK".
93:          */
94:         public static final String OK = "OK";
95:         /**
96:          * This is the String for the pass command, if a password needed.
97:          */
98:         public static final String PASSCOMMAND = "pass";
99:         /**
100:          * This is the String for the pass command with password to check the password.
101:          */
102:         public static final String PASSSPACECOMMAND = "pass ";
103:         /**
104:          * This is the return statement, when nothing password exits.
105:          */
106:         public static final String NOPASSWORDNEEDED =
107:                         "Es existiert kein Passwort - weder User noch Admin. Keine Passworteingabe nötig!";
108:         /**
109:          * This is the message, if the socket closed successfully.
110:          */
111:         public static final String DISCONNECTSUCCESFULLY =
112:                         "Die Verbindung zum Router wurde erfolgreich getrennt!";
113:         /**
114:          * This is the message, if the authentication is successful.
115:          */
116:         public static final String AUTHENTICATIONSUCCESSFULLY = "Authentifikation erfolgreich!";
117:         /**
118:          * This is the message for requesting the file path.
119:          */
120:         public static final String FILEPATHENTRY =
121:                         "Bitte geben Sie den den Speicherort inklusive des Dateinamens für die Update-Datei auf dem Router ein:";
122:         /**
123:          * This is the message for requesting the file of the BuildPath.
124:          */
125:         public static final String FILEOFBUILDPATH =
126:                         "Bitte geben Sie den BuildPath als Quellordner für die Dateien, die nach /boot/ kopiert werden sollen, an:";
127:         /**
128:          * This is the message for requesting a decision, if it update the router again..
129:          */
130:         public static final String UPDATEAGAIN =
131:                         "Möchten Sie ein weiteres Update durchführen? y für ja, n für nein";
132:         /**
133:          * This is the error message, if the Router does not answer.
134:          */
135:         public static final String EME_NOANSWEROFROUTER = "Router antwortet nicht!";
136:         /**
137:          * This is the error message, if nothing connection exists.
138:          */
139:         public static final String EME_NOCONNECTIONTOROUTER =
140:                         "Es besteht keine Verbindung zum Router!";
141:         /**
142:          * This is the error message, if the iput not readable.
143:          */
144:         public static final String EME_INPUTNOTRAEDABLE =
145:                         "Eingabe konnte nicht gelesen werden! | Fehlermeldung: ";
146:         /**
147:          * This is the error message, if the IP adress or port wrong.
148:          */
149:         public static final String EME_IPORPORTWRONG =
150:                         "Verbindung zum Router konnte nicht hergestellt werden. Bitte Router-IP und Port kontrollieren! | Fehlermeldung: ";
151:         /**
152:          * This is the error message, if there are problems at reading the ip adress.
153:          */
154:         public static final String EME_IPREADPROBLEM =
155:                         "Beim Lesen der IP-Adresse ist ein Fehler aufgetreten! | Fehlermeldung: ";
156:         /**
157:          * This is the error message, if there are problems at reading the port.
158:          */
159:         public static final String EME_PORTREADPROBLEM =
160:                         "Beim Lesen des Ports ist ein Fehler aufgetreten! | Fehlermeldung: ";
161:         /**
162:          * This is the error message, if there are problems with reading the password.
163:          */
164:         public static final String EME_PASSWORDREADPROBLEM =
165:                         "Beim Lesen des Passworts ist ein Fehler aufgetreten! | Fehlermeldung: ";
166:         /**
167:          * This is the error message, if there are problems with the authentication.
168:          */
169:         public static final String EME_AUTHENTICATIONPROBLEM =
170:                         "Bei der Authentifizierung ist ein Fehler aufgetreten. Bitte kontrollieren Sie das Passwort! | Fehlermeldung: ";
171:         /**
172:          * This is the error message, if there are problems with the disconnect.
173:          */
174:         public static final String EME_DISCONNECTPROBLEM =
175:                         "Bei der Trennung der Verbindung zum Router ist ein Fehler aufgetreten! | Fehlermeldung: ";
176:         /**
177:          * This is the error message, if the socket cannot be closed.
178:          */
179:         public static final String EME_SOCKETCLOSED =
180:                         "Es trat beim Schließen des Sockets ein Problem auf. Das Schließen wurde erzwungen! | Fehlermeldung: ";
181:         /**
182:          * This is the error message, if the router does not give an answer.
183:          */
184:         public static final String EME_ROUTERNOANSWER =
185:                         "Fehler beim Warten auf Antwort vom Router! | Fehlermeldung: ";
186:         /**
187:          * This is the error message, if the admin password is wrong.
188:          */
189:         public static final String EME_ADMINPASSWORDWRONG =
190:                         "Es existiert kein User Passwort, aber ein Admin Passwort.\nDas eingegebene Passwort wurde nicht als Admin Passwort akzeptiert. | Fehlermeldung: ";
191:         /**
192:          * This is the error message, if the password is empty.
193:          */
194:         public static final String EME_PASSWORDISEMPTY = "Bitte geben Sie ein Passwort ein!";
195:         /**
196:          * This is the error message, if the password is wrong.
197:          */
198:         public static final String EME_PASSWORDISWRONG =
199:                         "Verbindung zum Router konnte nicht hergestellt werden, da das Passwort nicht akzeptiert wurde. | Fehlermeldung: ";
200:         /**
201:          * This is the first part of the error message, if there are a problem with the collecting the
202:          * answer of the router.
203:          */
204:         public static final String EME_COLLECTANSWEROFROUTERPROBLEMPARTONE =
205:                         "Beim Abholen der Antwort des Routers auf den Befehl \"";
206:         /**
207:          * This is the second part of the error message, if there are a problem with the collecting the
208:          * answer of the router.
209:          */
210:         public static final String EME_COLLECTANSWEROFROUTERPROBLEMPARTTWO =
211:                         "\" gab es ein Problem: ";
212:         /**
213:          * This is the first part of the error message, if there are a problem with the authentication.
214:          */
215:         public static final String EME_AUTHENTICATIONPROBLEMPARTONE =
216:                         "Es trat ein Fehler bei der Authentifizierung auf. Imond antwortete: ";
217:         /**
218:          * This is the second part of the error message, if there are a problem with the authentication.
219:          */
220:         public static final String EME_AUTHENTICATIONPROBLEMPARTTWO =
221:                         " Bitte überprüfen Sie Ihre Eingaben!";
222:         /**
223:          * This is the error message, if there are problems with reading the file path.
224:          */
225:         public static final String EME_FILEPATHREADPROBLEM =
226:                         "Beim Lesen des Dateipfades ist ein Fehler aufgetreten! Bitte überprüfen Sie Ihre Eingabe!| Fehlermeldung: ";
227:         /**
228:          * This is the error message, if there are problems with reading the file size.
229:          */
230:         public static final String EME_FILESIZEREADPROBLEM =
231:                         "Beim Lesen der Dateigröße ist ein Fehler aufgetreten! Bitte überprüfen Sie Ihre Eingabe!| Fehlermeldung: ";
232:         /**
233:          * This is the error message, if there are problems with reading the decision of the user to
234:          * update again or not.
235:          */
236:         public static final String EME_UPDATEAGAINREADPROBLEM =
237:                         "Beim Lesen Ihrer Entscheidung, ein weiteres Update durchzuführen oder nicht, ist ein Fehler aufgetreten! Bitte überprüfen Sie Ihre Eingabe! | Fehlermeldung: ";
238:         /**
239:          * This is the error message, if the character is not a "y" or "n".
240:          */
241:         public static final String EME_UPDATEAGAINWRONGCHAR =
242:                         "Leider haben Sie ein falsches Zeichen eingegeben! Bitte überprüfen Sie Ihre Eingabe! | Fehlermeldung: ";
243:         /**
244:          * This is the error message, if the answer of router is "ERR".
245:          */
246:         public static final String EME_ERRISTHEANSWER =
247:                         "Der Router gab als Antwort einen Error zurück! Bitte Überprüfen Sie Ihre vorigen Eingaben! | Fehlermeldung: ";
248:         /**
249:          * This is the first part of error message, if there are an error with sending the data.
250:          */
251:         public static final String EME_RECEIVEFILEERRORPARTONE = "Beim Senden der Datei ";
252:         /**
253:          * This is the second part of error message, if there are an error with sending the data.
254:          */
255:         public static final String EME_RECEIVEFILEERRORPARTTWO =
256:                         " an den Router ist ein Fehler aufgetreten! | Fehlermeldung: ";
257:         /**
258:          * This is the error message, if there are problems with sending the file.
259:          */
260:         public static final String EME_RECEIVEFILEPROBLEM =
261:                         "Datei konnte nicht korrekt übertragen werden (Rückantwort 'NAK')";
262:         /**
263:          * Destination of rc.cfg.
264:          */
265:         public static final String BOOT_RC_CFG = "/boot/testrccfg.dat";
266:         /**
267:          * Destination of rootfs.img.
268:          */
269:         public static final String BOOT_ROOTFS_IMG = "/boot/testrootfsimg.dat";
270:         /**
271:          * Destination of kernel.
272:          */
273:         public static final String BOOT_KERNEL = "/boot/testkernel.dat";
274:         /**
275:          * Destination of opt.img.
276:          */
277:         public static final String BOOT_OPT_IMG = "/boot/testoptimg.dat";
278:         /**
279:          * Destination of syslinux.cfg.
280:          */
281:         public static final String BOOT_SYSLINUX_CFG = "/boot/testsyslinuxcfg.dat";
282:         /**
283:          * Filename of rc.cfg.
284:          */
285:         public static final String RC_CFG = "rc.cfg";
286:         /**
287:          * Filename of rootf.img.
288:          */
289:         public static final String ROOTFS_IMG = "rootfs.img";
290:         /**
291:          * Filename of kernel.
292:          */
293:         public static final String KERNEL = "kernel";
294:         /**
295:          * Filename of opt.img.
296:          */
297:         public static final String OPT_IMG = "opt.img";
298:         /**
299:          * Filename of syslinux.cfg.
300:          */
301:         public static final String SYSLINUX_CFG = "syslinux.cfg";
302: }