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 the exception text
22: */
23:
24: public ReadOnlyException(String text) {
25: super (text);
26: }
27:
28: /**
29: * Constructs a new read-only exception when the portlet needs to do
30: * the following:
31: * <ul>
32: * <il>throw an exception
33: * <li>include a message about the "root cause" that interfered
34: * with its normal operation
35: * <li>include a description message
36: * </ul>
37: *
38: * @param text the exception text
39: * @param cause the root cause
40: */
41:
42: public ReadOnlyException(String text, Throwable cause) {
43: super (text, cause);
44: }
45:
46: /**
47: * Constructs a new read-only exception when the portlet needs to throw an
48: * exception. The exception message is based on the localized message
49: * of the underlying exception.
50: *
51: * @param cause the root cause
52: */
53:
54: public ReadOnlyException(Throwable cause) {
55: super(cause);
56: }
57:
58: }
|