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
53
|
package bjc.utils.cli;
/**
* Status codes output by {@link Terminal}.
*
* Format is a two-letter system code, a two letter subsystem code, a severity
* letter and a five digit error code.
*
* @author bjcul
*
*/
public enum TerminalCodes {
// TODO convert these into a class, and add an ability to read from the file
// The general idea of the format would be a tab-separated value file, with the
// first value being a command, and then the rest being the body of that command.
// Would also have the line-continuation feature
/** Alert for starting processing. */
INFO_STARTCOMPROC("IOLPI00001", "STARTING PROCESSING"),
/** Alert for ending processing. */
INFO_ENDCOMPROC("IOLPI00002", "ENDING PROCESSING"),
/** Prompt on continuation turned on */
INFO_PROMPTON("IOINI00001", "CONTINUATION PROMPT ON"),
/** Prompt on continuation turned off */
INFO_PROMPTOFF("IOINI00001", "CONTINUATION PROMPT OFF"),
/** Error for an unknown command */
ERROR_UNRECCOM("IOINE00001", "UNRECOGNIZED COMMAND"),
/** Error for an invalid number format when identifying a reply. */
ERROR_INVREPNO("IOINE00002", "INVALID REPLY NUMBER FORMAT"),
/** Error for specifying an unrecognized reply. */
ERROR_UNKREPNO("IOINE00002", "UNKNOWN REPLY NUMBER"),
/** Error for unknown configuration setting. */
ERROR_UNKCONFSET("IOINE00003", "UNRECOGNIZED CONFIGURE SETTING"),
/** Error for invalid value for configuration setting. */
ERROR_INVCONFSET("IOINE00003", "INVALID CONFIGURE VALUE"),
;
/** The code for this error. */
public final String code;
/** The summary message for this error. */
public final String message;
private TerminalCodes(String code, String message) {
this.code = code;
this.message = message;
}
@Override
public String toString() {
return code + " " + message;
}
}
|