View Javadoc
1   /*
2    * Copyright 2001-2013 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  package org.apache.juddi.webconsole;
18  
19  /**
20   * Provides a very basic, no stack trace exception, useful for throwing at a
21   * browser without revealing any details
22   *
23   * @author <a href="mailto:alexoree@apache.org">Alex O'Ree</a>
24   */
25  public class CrossSiteRequestForgeryException extends Exception {
26  
27          private static final long serialVersionUID = 1L;
28      //Parameterless Constructor
29  
30          /**
31           * CrossSiteRequestForgeryException
32           */
33          public CrossSiteRequestForgeryException() {
34                  super(msg, null);
35          }
36  
37          /**
38           * Constructor that accepts a message
39           *
40           * @param message
41           */
42          public CrossSiteRequestForgeryException(String message) {
43                  super(msg, null);
44          }
45  
46          /**
47           * CrossSiteRequestForgeryException
48           *
49           * @param message
50           * @param cause
51           */
52          public CrossSiteRequestForgeryException(String message, Throwable cause) {
53                  super(msg, null);
54          }
55          private static final String msg = "Cross Site Request Forgery";
56  
57          @Override
58          public String toString() {
59                  return msg;
60          }
61  
62          @Override
63          public String getMessage() {
64                  return msg;
65          }
66  
67          @Override
68          public String getLocalizedMessage() {
69                  return msg;
70          }
71  
72          @Override
73          public Throwable getCause() {
74                  return null;
75          }
76  }