01: package org.swingml.errors;
02:
03: import java.util.*;
04:
05: /**
06: * @author CrossLogic
07: */
08: public interface ISwingMLError {
09:
10: // ** NOTE ** : The integer value of these errors is significant, as they are sorted by the value and processed in
11: // ascending order.
12: public static final int ERROR_BUSINESS_LOGIC = 4; // server returned business logic errors from the request
13: public static final int ERROR_INVALID_SERVER_RESPONSE = 3; // server returned malformed xml response
14: public static final int ERROR_NO_SERVER_RESPONSE = 1; // server never returned a response (timed out)
15: public static final int ERROR_PROCESSING_REQUEST = 2; // server was unable to compile a response (i.e. null pointer exception)
16: public static final int ERROR_SERVER_COMMUNICATION = 0; // unable to make connection to server
17: public static final int ERROR_UNKNOWN = 5; // unknown error
18: public static final int MESSAGE = 6; // informational message
19: public static final int WARNING = -1; // warning message
20:
21: /**
22: * Return the attribute value associated with the given key. Return NULL if no value found.
23: * @param key
24: * @return
25: */
26: public String getAttribute(String key);
27:
28: /**
29: * Return a Map of name/value pairs of attributes.
30: * @return
31: */
32: public Map getAttributes();
33:
34: /**
35: * Return the descriptive message of the error.
36: *
37: * @return
38: */
39: public String getText();
40:
41: /**
42: * Return the message of the error to use for mouse/cursor hover text.
43: *
44: * @return
45: */
46: public String getTooltipText();
47:
48: /**
49: * Return the error type.
50: *
51: * @return
52: */
53: public int getType();
54:
55: /**
56: * Set the key/value attribute pair on this error.
57: * @param key
58: * @param value
59: */
60: public void setAttribute(String key, String value);
61:
62: }
|