This project has retired. For details please refer to its Attic page.
CmisRuntimeException xref
View Javadoc

1   /*
2    * Licensed to the Apache Software Foundation (ASF) under one
3    * or more contributor license agreements.  See the NOTICE file
4    * distributed with this work for additional information
5    * regarding copyright ownership.  The ASF licenses this file
6    * to you under the Apache License, Version 2.0 (the
7    * "License"); you may not use this file except in compliance
8    * with the License.  You may obtain a copy of the License at
9    *
10   * http://www.apache.org/licenses/LICENSE-2.0
11   *
12   * Unless required by applicable law or agreed to in writing,
13   * software distributed under the License is distributed on an
14   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15   * KIND, either express or implied.  See the License for the
16   * specific language governing permissions and limitations
17   * under the License.
18   */
19  package org.apache.chemistry.opencmis.commons.exceptions;
20  
21  import java.math.BigInteger;
22  import java.util.Map;
23  
24  /**
25   * CMIS Runtime Exception.
26   * <p>
27   * Cause: Any other cause not expressible by another CMIS exception.
28   */
29  public class CmisRuntimeException extends CmisBaseException {
30  
31      private static final long serialVersionUID = 1L;
32      public static final String EXCEPTION_NAME = "runtime";
33  
34      /**
35       * Default constructor.
36       */
37      public CmisRuntimeException() {
38          super();
39      }
40  
41      /**
42       * Constructor.
43       * 
44       * @param message
45       *            error message
46       * @param code
47       *            error code
48       * @param cause
49       *            the cause
50       */
51      public CmisRuntimeException(String message, BigInteger code, Throwable cause) {
52          super(message, code, cause);
53      }
54  
55      /**
56       * Constructor.
57       * 
58       * @param message
59       *            error message
60       * @param errorContent
61       *            error page content
62       */
63      public CmisRuntimeException(String message, String errorContent) {
64          super(message, errorContent);
65      }
66  
67      /**
68       * Constructor.
69       * 
70       * @param message
71       *            error message
72       * @param code
73       *            error code
74       */
75      public CmisRuntimeException(String message, BigInteger code) {
76          super(message, code);
77      }
78  
79      /**
80       * Constructor.
81       * 
82       * @param message
83       *            error message
84       * @param code
85       *            error code
86       * @param errorContent
87       *            error page content
88       */
89      public CmisRuntimeException(String message, BigInteger code, String errorContent) {
90          super(message, code, errorContent);
91      }
92  
93      /**
94       * Constructor.
95       * 
96       * @param message
97       *            error message
98       * @param code
99       *            error code
100      * @param errorContent
101      *            error page content
102      * @param additionalData
103      *            additional data
104      */
105     public CmisRuntimeException(String message, BigInteger code, String errorContent,
106             Map<String, String> additionalData) {
107         super(message, code, errorContent, additionalData);
108     }
109 
110     /**
111      * Constructor.
112      * 
113      * @param message
114      *            error message
115      * @param errorContent
116      *            error page content
117      * @param additionalData
118      *            additional data
119      * @param cause
120      *            the cause
121      */
122     public CmisRuntimeException(String message, String errorContent, Map<String, String> additionalData, Throwable cause) {
123         super(message, errorContent, additionalData, cause);
124     }
125 
126     /**
127      * Constructor.
128      * 
129      * @param message
130      *            error message
131      * @param errorContent
132      *            error page content
133      * @param cause
134      *            the cause
135      */
136     public CmisRuntimeException(String message, String errorContent, Throwable cause) {
137         super(message, errorContent, cause);
138     }
139 
140     /**
141      * Constructor.
142      * 
143      * @param message
144      *            error message
145      * @param cause
146      *            the cause
147      */
148     public CmisRuntimeException(String message, Throwable cause) {
149         super(message, BigInteger.ZERO, cause);
150     }
151 
152     /**
153      * Constructor.
154      * 
155      * @param message
156      *            error message
157      */
158     public CmisRuntimeException(String message) {
159         super(message, BigInteger.ZERO);
160     }
161 
162     @Override
163     public final String getExceptionName() {
164         return EXCEPTION_NAME;
165     }
166 }