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   * A portlet should throw a <CODE>PortletSecurityException</CODE>
25   * when a call fails because of security reasons.<br>
26   * Additionally it can be thrown by the portal/portlet-container.
27   */
28  
29  public class PortletSecurityException extends PortletException
30  {
31  
32  
33    private PortletSecurityException ()
34    {
35    }
36  
37    /***
38     * Constructs a new security exception with the given text. The
39     * portlet container may use the text write it to a log.
40     *
41     * @param   text
42     *          the exception text
43     */
44  
45    public PortletSecurityException (String text)
46    {
47      super (text);
48    }
49  
50    /***
51     * Constructs a new portlet security exception when the portlet needs to do
52     * the following:
53     * <ul>
54     * <il>throw an exception 
55     * <li>include a message about the "root cause" that interfered
56     *     with its normal operation
57     * <li>include a description message
58     * </ul>
59     *
60     * @param   text
61     *          the exception text
62     * @param   cause
63     *          the root cause
64     */
65    
66    public PortletSecurityException (String text, Throwable cause)
67    {
68      super(text, cause);
69    }
70  
71    /***
72     * Constructs a new portlet security exception when the portlet needs to throw an
73     * exception. The exception message is based on the localized message
74     * of the underlying exception.
75     *
76     * @param   cause
77     *          the root cause
78     */
79  
80    public PortletSecurityException (Throwable cause)
81    {
82      super(cause);
83    }
84  
85  
86  }