Revision 24064 branches/v2_0_0_prep/libraries/libTools/src/org/gvsig/tools/exception/IBaseException.java
IBaseException.java | ||
---|---|---|
2 | 2 |
* |
3 | 3 |
* Copyright (C) 2007-2008 Infrastructures and Transports Department |
4 | 4 |
* of the Valencian Gobernment (CIT) |
5 |
*
|
|
5 |
* |
|
6 | 6 |
* This program is free software; you can redistribute it and/or |
7 | 7 |
* modify it under the terms of the GNU General Public License |
8 | 8 |
* as published by the Free Software Foundation; either version 2 |
9 | 9 |
* of the License, or (at your option) any later version. |
10 |
*
|
|
10 |
* |
|
11 | 11 |
* This program is distributed in the hope that it will be useful, |
12 | 12 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 | 13 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
14 | 14 |
* GNU General Public License for more details. |
15 |
*
|
|
15 |
* |
|
16 | 16 |
* You should have received a copy of the GNU General Public License |
17 | 17 |
* along with this program; if not, write to the Free Software |
18 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
|
18 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
|
19 | 19 |
* MA 02110-1301, USA. |
20 |
*
|
|
20 |
* |
|
21 | 21 |
*/ |
22 | 22 |
|
23 | 23 |
/* |
... | ... | |
28 | 28 |
import java.util.Iterator; |
29 | 29 |
|
30 | 30 |
/** |
31 |
*
|
|
32 |
*
|
|
31 |
* |
|
32 |
* |
|
33 | 33 |
* @author Equipo de desarrollo de gvSIG |
34 | 34 |
* |
35 | 35 |
*/ |
36 | 36 |
public interface IBaseException { |
37 |
|
|
38 |
/**
|
|
37 |
|
|
38 |
/** |
|
39 | 39 |
* Returns the message that describes the exception. |
40 |
*
|
|
40 |
* |
|
41 | 41 |
* @return The message. |
42 | 42 |
*/ |
43 | 43 |
public String getMessage(); |
44 | 44 |
|
45 |
/**
|
|
45 |
/** |
|
46 | 46 |
* Returns the message that describes the exception, with indentation. |
47 |
*
|
|
47 |
* |
|
48 | 48 |
* @param indent Quantity of blanks to insert |
49 | 49 |
* at the start of the message. |
50 | 50 |
* @return The message with indentation. |
51 | 51 |
*/ |
52 | 52 |
public String getMessage(int indent); |
53 | 53 |
|
54 |
/**
|
|
54 |
/** |
|
55 | 55 |
* Returns the translated message that describes the exception. |
56 |
*
|
|
56 |
* |
|
57 | 57 |
* @return The translated message with indentation. |
58 | 58 |
*/ |
59 | 59 |
public String getLocalizedMessage(); |
60 |
|
|
61 |
/**
|
|
60 |
|
|
61 |
/** |
|
62 | 62 |
* Returns the translated message that |
63 | 63 |
* describes the exception with indentation. |
64 | 64 |
* |
... | ... | |
71 | 71 |
* at the start of the message. |
72 | 72 |
* @return The translated message with indentation. |
73 | 73 |
*/ |
74 |
public String getLocalizedMessage(IExceptionTranslator translator, int indent);
|
|
75 |
|
|
76 |
/**
|
|
74 |
public String getLocalizedMessage(ExceptionTranslator translator, int indent); |
|
75 |
|
|
76 |
/** |
|
77 | 77 |
* Crosses the exceptions chained through cause to conform |
78 | 78 |
* the message. |
79 |
*
|
|
79 |
* |
|
80 | 80 |
* @return The compound message with all the messages |
81 | 81 |
* of the stack of exceptions. |
82 | 82 |
*/ |
83 | 83 |
public String getMessageStack(); |
84 | 84 |
|
85 |
/**
|
|
85 |
/** |
|
86 | 86 |
* Crosses the exceptions chained through cause to conform |
87 | 87 |
* the compound message with indentation. |
88 |
*
|
|
88 |
* |
|
89 | 89 |
* @param indent Quantity of blanks to insert |
90 | 90 |
* at the start of the messages. |
91 | 91 |
* @return The compound message with all the messages |
... | ... | |
94 | 94 |
*/ |
95 | 95 |
public String getMessageStack(int indent); |
96 | 96 |
|
97 |
/**
|
|
97 |
/** |
|
98 | 98 |
* Crosses the exceptions chained through cause |
99 | 99 |
* to conform the compound message in the corresponding language. |
100 |
*
|
|
100 |
* |
|
101 | 101 |
* @return The translated compound message. |
102 |
*
|
|
102 |
* |
|
103 | 103 |
*/ |
104 | 104 |
public String getLocalizedMessageStack(); |
105 | 105 |
|
106 |
/**
|
|
106 |
/** |
|
107 | 107 |
* Crosses the exceptions chained through cause |
108 | 108 |
* to conform the compound message in the corresponding language. |
109 |
*
|
|
109 |
* |
|
110 | 110 |
* @param translator Instance of a class that fulfills |
111 | 111 |
* the IExceptionTranslator interface. |
112 | 112 |
* His method "getText" takes charge returning |
... | ... | |
115 | 115 |
* @param indent Quantity of blanks to insert |
116 | 116 |
* at the start of the messages. |
117 | 117 |
* @return The translated message with indentation. |
118 |
*
|
|
118 |
* |
|
119 | 119 |
*/ |
120 |
public String getLocalizedMessageStack(IExceptionTranslator translator, int indent); |
|
121 |
|
|
122 |
|
|
123 |
/** |
|
120 |
public String getLocalizedMessageStack(ExceptionTranslator translator, |
|
121 |
int indent); |
|
122 |
|
|
123 |
|
|
124 |
/** |
|
124 | 125 |
* @return The exception's code. |
125 | 126 |
*/ |
126 | 127 |
public long getCode(); |
127 |
|
|
128 |
/**
|
|
128 |
|
|
129 |
/** |
|
129 | 130 |
* @return The format string. |
130 | 131 |
*/ |
131 | 132 |
public String getFormatString(); |
132 |
|
|
133 |
/**
|
|
133 |
|
|
134 |
/** |
|
134 | 135 |
* @return The message key associated to the exception. |
135 | 136 |
*/ |
136 | 137 |
public String getMessageKey(); |
137 |
|
|
138 |
/**
|
|
138 |
|
|
139 |
/** |
|
139 | 140 |
* @return A iterator for the chained exceptions. |
140 | 141 |
*/ |
141 | 142 |
public Iterator iterator(); |
142 |
|
|
143 |
|
|
143 | 144 |
} |
Also available in: Unified diff