01: /***
02: * jwma Java WebMail
03: * Copyright (c) 2000-2003 jwma team
04: *
05: * jwma is free software; you can distribute and use this source
06: * under the terms of the BSD-style license received along with
07: * the distribution.
08: ***/package dtw.webmail.model;
09:
10: /**
11: * An interface defining the contract for interaction with
12: * the JwmaError model.
13: * <p>
14: * The JwmaError allows a view programmer to obtain
15: * information about an error to display it in free style
16: * and in any language. Note that the description will be in
17: * the language of the <tt>errormessages.properties</tt> file.
18: *
19: * @author Dieter Wimberger
20: * @version 0.9.7 07/02/2003
21: *
22: */
23: public interface JwmaError {
24:
25: /**
26: * Tests if the error is an inline error.
27: * <p>
28: * An inline error should be displayed within the same view
29: * and not on the error view.
30: *
31: * @return true if it is an inline error, false otherwise.
32: */
33: public boolean isInlineError();
34:
35: /**
36: * Tests if the error has been displayed.
37: *
38: * @return true if it was displayed, false otherwise.
39: */
40: public boolean isDisplayed();
41:
42: /**
43: * Set's the flag that stores if an error has
44: * been displayed.
45: *
46: * @param b true if it was displayed, false otherwise.
47: */
48: public void setDisplayed(boolean b);
49:
50: /**
51: * Returns an <tt>String[]</tt> containing the
52: * keys to the locale specific error descriptions.
53: *
54: * @return an array of strings containing the error
55: * description keys.
56: */
57: public String[] getDescriptions();
58:
59: /**
60: * Tests if the error has an embedded exception.
61: *
62: * @return true if error has an embedded exception,
63: * false otherwise.
64: */
65: public boolean hasException();
66:
67: /**
68: * Returns a <tt>String</tt> representing the Errors
69: * embedded exception stack trace.
70: *
71: * @return the error's embedded exception stacktrace as
72: * <tt>String</tt>.
73: */
74: public String getExceptionTrace();
75:
76: }//JwmaError
|