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