svn-gvsig-desktop / trunk / libraries / libExceptions / src / org / gvsig / exceptions / IBaseException.java @ 10629
History | View | Annotate | Download (3.09 KB)
1 |
package org.gvsig.exceptions; |
---|---|
2 |
|
3 |
import java.util.Iterator; |
4 |
|
5 |
/**
|
6 |
*
|
7 |
*
|
8 |
* @author Equipo de desarrollo de gvSIG
|
9 |
*
|
10 |
*/
|
11 |
public interface IBaseException { |
12 |
|
13 |
/**
|
14 |
* Returns the message that describes the exception.
|
15 |
*
|
16 |
* @return The message.
|
17 |
*/
|
18 |
public String getMessage(); |
19 |
|
20 |
/**
|
21 |
* Returns the message that describes the exception, with indentation.
|
22 |
*
|
23 |
* @param indent Quantity of blanks to insert
|
24 |
* at the start of the message.
|
25 |
* @return The message with indentation.
|
26 |
*/
|
27 |
public String getMessage(int indent); |
28 |
|
29 |
/**
|
30 |
* Returns the translated message that describes the exception.
|
31 |
*
|
32 |
* @return The translated message with indentation.
|
33 |
*/
|
34 |
public String getLocalizedMessage(); |
35 |
|
36 |
/**
|
37 |
* Returns the translated message that
|
38 |
* describes the exception with indentation.
|
39 |
*
|
40 |
* @param translator Instance of a class that fulfills
|
41 |
* the IExceptionTranslator interface.
|
42 |
* His method "getText" takes charge returning
|
43 |
* the expression, correspondent to the key that
|
44 |
* delivers him, translated into the configured language.
|
45 |
* @param indent Quantity of blanks to insert
|
46 |
* at the start of the message.
|
47 |
* @return The translated message with indentation.
|
48 |
*/
|
49 |
public String getLocalizedMessage(IExceptionTranslator translator, int indent); |
50 |
|
51 |
/**
|
52 |
* Crosses the exceptions chained through cause to conform
|
53 |
* the message.
|
54 |
*
|
55 |
* @return The compound message with all the messages
|
56 |
* of the stack of exceptions.
|
57 |
*/
|
58 |
public String getMessageStack(); |
59 |
|
60 |
/**
|
61 |
* Crosses the exceptions chained through cause to conform
|
62 |
* the compound message with indentation.
|
63 |
*
|
64 |
* @param indent Quantity of blanks to insert
|
65 |
* at the start of the messages.
|
66 |
* @return The compound message with all the messages
|
67 |
* of the stack of exceptions.
|
68 |
|
69 |
*/
|
70 |
public String getMessageStack(int indent); |
71 |
|
72 |
/**
|
73 |
* Crosses the exceptions chained through cause
|
74 |
* to conform the compound message in the corresponding language.
|
75 |
*
|
76 |
* @return The translated compound message.
|
77 |
*
|
78 |
*/
|
79 |
public String getLocalizedMessageStack(); |
80 |
|
81 |
/**
|
82 |
* Crosses the exceptions chained through cause
|
83 |
* to conform the compound message in the corresponding language.
|
84 |
*
|
85 |
* @param translator Instance of a class that fulfills
|
86 |
* the IExceptionTranslator interface.
|
87 |
* His method "getText" takes charge returning
|
88 |
* the expression, correspondent to the key that
|
89 |
* delivers him, translated into the configured language.
|
90 |
* @param indent Quantity of blanks to insert
|
91 |
* at the start of the messages.
|
92 |
* @return The translated message with indentation.
|
93 |
*
|
94 |
*/
|
95 |
public String getLocalizedMessageStack(IExceptionTranslator translator, int indent); |
96 |
|
97 |
|
98 |
/**
|
99 |
* @return The exception's code.
|
100 |
*/
|
101 |
public long getCode(); |
102 |
|
103 |
/**
|
104 |
* @return The format string.
|
105 |
*/
|
106 |
public String getFormatString(); |
107 |
|
108 |
/**
|
109 |
* @return The message key associated to the exception.
|
110 |
*/
|
111 |
public String getMessageKey(); |
112 |
|
113 |
/**
|
114 |
* @return A iterator for the chained exceptions.
|
115 |
*/
|
116 |
public Iterator iterator(); |
117 |
|
118 |
} |