KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > javax > portlet > ReadOnlyException


1 /**
2   * Copyright 2003 IBM Corporation and Sun Microsystems, Inc.
3   * All rights reserved.
4   * Use is subject to license terms.
5   */

6
7 package javax.portlet;
8
9 /**
10  * The <CODE>ReadOnlyException</CODE> is thrown when a portlet tries
11  * to change the value for a read-only preference attribute.
12  */

13
14 public class ReadOnlyException extends PortletException
15 {
16
17   private ReadOnlyException ()
18   {
19   }
20
21   /**
22    * Constructs a new read-only exception with the given text. The
23    * portlet container may use the text write it to a log.
24    *
25    * @param text
26    * the exception text
27    */

28
29   public ReadOnlyException (String JavaDoc text)
30   {
31     super (text);
32   }
33
34   /**
35    * Constructs a new read-only exception when the portlet needs to do
36    * the following:
37    * <ul>
38    * <il>throw an exception
39    * <li>include a message about the "root cause" that interfered
40    * with its normal operation
41    * <li>include a description message
42    * </ul>
43    *
44    * @param text
45    * the exception text
46    * @param cause
47    * the root cause
48    */

49   
50   public ReadOnlyException (String JavaDoc text, Throwable JavaDoc cause)
51   {
52     super(text, cause);
53   }
54
55   /**
56    * Constructs a new read-only exception when the portlet needs to throw an
57    * exception. The exception message is based on the localized message
58    * of the underlying exception.
59    *
60    * @param cause
61    * the root cause
62    */

63
64   public ReadOnlyException (Throwable JavaDoc cause)
65   {
66     super(cause);
67   }
68
69
70 }
71
Popular Tags