View Javadoc

1   /*
2    * Copyright 2003,2004 The Apache Software Foundation.
3    * 
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    * 
8    *      http://www.apache.org/licenses/LICENSE-2.0
9    * 
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  /*
17   * This source code implements specifications defined by the Java
18   * Community Process. In order to remain compliant with the specification
19   * DO NOT add / change / or delete method signatures!
20   */
21  package javax.portlet;
22  
23  /***
24   * The <CODE>ReadOnlyException</CODE> is thrown when a portlet tries
25   * to change the value for a read-only preference attribute.
26   */
27  
28  public class ReadOnlyException extends PortletException
29  {
30  
31  
32    private ReadOnlyException ()
33    {
34    }
35  
36    /***
37     * Constructs a new read-only exception with the given text. The
38     * portlet container may use the text write it to a log.
39     *
40     * @param   text
41     *          the exception text
42     */
43  
44    public ReadOnlyException (String text)
45    {
46      super (text);
47    }
48  
49    /***
50     * Constructs a new read-only exception when the portlet needs to do
51     * the following:
52     * <ul>
53     * <il>throw an exception 
54     * <li>include a message about the "root cause" that interfered
55     *     with its normal operation
56     * <li>include a description message
57     * </ul>
58     *
59     * @param   text
60     *          the exception text
61     * @param   cause
62     *          the root cause
63     */
64    
65    public ReadOnlyException (String text, Throwable cause)
66    {
67      super(text, cause);
68    }
69  
70    /***
71     * Constructs a new read-only exception when the portlet needs to throw an
72     * exception. The exception message is based on the localized message
73     * of the underlying exception.
74     *
75     * @param   cause
76     *          the root cause
77     */
78  
79    public ReadOnlyException (Throwable cause)
80    {
81      super(cause);
82    }
83  
84  
85  }