01: /**
02: * Copyright 2003 IBM Corporation and Sun Microsystems, Inc.
03: * All rights reserved.
04: * Use is subject to license terms.
05: */package javax.portlet;
06:
07: /**
08: * The <CODE>ReadOnlyException</CODE> is thrown when a portlet tries
09: * to change the value for a read-only preference attribute.
10: */
11:
12: public class ReadOnlyException extends PortletException {
13:
14: private ReadOnlyException() {
15: }
16:
17: /**
18: * Constructs a new read-only exception with the given text. The
19: * portlet container may use the text write it to a log.
20: *
21: * @param text
22: * the exception text
23: */
24:
25: public ReadOnlyException(String text) {
26: super (text);
27: }
28:
29: /**
30: * Constructs a new read-only exception when the portlet needs to do
31: * the following:
32: * <ul>
33: * <il>throw an exception
34: * <li>include a message about the "root cause" that interfered
35: * with its normal operation
36: * <li>include a description message
37: * </ul>
38: *
39: * @param text
40: * the exception text
41: * @param cause
42: * the root cause
43: */
44:
45: public ReadOnlyException(String text, Throwable cause) {
46: super (text, cause);
47: }
48:
49: /**
50: * Constructs a new read-only exception when the portlet needs to throw an
51: * exception. The exception message is based on the localized message
52: * of the underlying exception.
53: *
54: * @param cause
55: * the root cause
56: */
57:
58: public ReadOnlyException(Throwable cause) {
59: super(cause);
60: }
61:
62: }
|