View Javadoc

1   /*
2    * Copyright 2001-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  package org.portletbridge;
17  
18  /***
19   * @author jmccrindle
20   */
21  public class ResourceException extends Exception {
22  
23      /***
24       * default serial version id 
25       */
26      private static final long serialVersionUID = 3347348123681235963L;
27  
28      private Object[] args;
29      
30      /***
31       * 
32       */
33      public ResourceException() {
34          super();
35      }
36  
37      /***
38       * @param key
39       */
40      public ResourceException(String key) {
41          super(key);
42      }
43  
44      /***
45       * @param key
46       */
47      public ResourceException(String key, Object[] args) {
48          super(key);
49          this.args = args;
50      }
51  
52      /***
53       * @param key
54       * @param string
55       * @param cause
56       */
57      public ResourceException(String key, Object arg, Throwable cause) {
58          this(key, new Object[] {arg}, cause);
59      }
60  
61      /***
62       * @param key
63       * @param cause
64       */
65      public ResourceException(String key, Object[] args, Throwable cause) {
66          super(key, cause);
67          this.args = args;
68      }
69  
70      /***
71       * @param string
72       * @param stylesheet
73       */
74      public ResourceException(String message, Object arg) {
75          this(message, new Object[] {arg});
76      }
77  
78      public Object[] getArgs() {
79          return args;
80      }
81  }