1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23 package org.apache.commons.i18n;
24
25 import java.util.Locale;
26
27 public class LocalizedError extends LocalizedMessage {
28 private final static String SUMMARY = "summary";
29 private final static String DETAILS = "details";
30
31 public LocalizedError(String messageId) {
32 super(messageId);
33 }
34
35 public LocalizedError(String messageId, Object[] arguments) {
36 super(messageId, arguments);
37 }
38
39 public String getSummary() throws MessageNotFoundException {
40 return getText(SUMMARY, Locale.getDefault());
41 }
42
43 public String getSummary(Locale locale) throws MessageNotFoundException {
44 return getText(SUMMARY, locale);
45 }
46
47 public String getSummary(String defaultSummary) {
48 return getText(SUMMARY, defaultSummary, Locale.getDefault());
49 }
50
51 public String getSummary(Locale locale, String defaultSummary) {
52 return getText(SUMMARY, defaultSummary, locale);
53 }
54
55 public String getDetails() throws MessageNotFoundException {
56 return getText(DETAILS, Locale.getDefault());
57 }
58
59 public String getDetails(Locale locale) throws MessageNotFoundException {
60 return getText(DETAILS, locale);
61 }
62
63 public String getDetails(String defaultDetails) {
64 return getText(DETAILS, defaultDetails, Locale.getDefault());
65 }
66
67 public String getDetails(Locale locale, String defaultDetails) {
68 return getText(DETAILS, defaultDetails, locale);
69 }
70 }