1package org.apache.archiva.rest.api.services;
2/*3 * Licensed to the Apache Software Foundation (ASF) under one4 * or more contributor license agreements. See the NOTICE file5 * distributed with this work for additional information6 * regarding copyright ownership. The ASF licenses this file7 * to you under the Apache License, Version 2.0 (the8 * "License"); you may not use this file except in compliance9 * with the License. You may obtain a copy of the License at10 *11 * http://www.apache.org/licenses/LICENSE-2.012 *13 * Unless required by applicable law or agreed to in writing,14 * software distributed under the License is distributed on an15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY16 * KIND, either express or implied. See the License for the17 * specific language governing permissions and limitations18 * under the License.19 */2021/**22 * @author Olivier Lamy23 * @since 1.4-M124 */25publicclassArchivaRestServiceException26extends Exception
27 {
2829privateint httpErrorCode = 500;
3031private String errorKey;
3233/**34 * can return the field name of bean with issue35 * can be <code>null</code>36 *37 * @since 1.4-M338 */39private String fieldName;
404142publicArchivaRestServiceException( String message, Throwable t )
43 {
44super( message, t );
45 }
4647publicArchivaRestServiceException( String message, String fieldName, Throwable t )
48 {
49this( message, t );
50this.fieldName = fieldName;
51 }
5253publicArchivaRestServiceException( String s, int httpErrorCode, Throwable t )
54 {
55super( s, t );
56this.httpErrorCode = httpErrorCode;
57 }
5859publicArchivaRestServiceException( String s, int httpErrorCode, String fieldName, Throwable t )
60 {
61this( s, httpErrorCode, t );
62this.fieldName = fieldName;
63 }
6465publicint getHttpErrorCode()
66 {
67return httpErrorCode;
68 }
6970publicvoid setHttpErrorCode( int httpErrorCode )
71 {
72this.httpErrorCode = httpErrorCode;
73 }
7475public String getErrorKey()
76 {
77return errorKey;
78 }
7980publicvoid setErrorKey( String errorKey )
81 {
82this.errorKey = errorKey;
83 }
8485public String getFieldName()
86 {
87return fieldName;
88 }
8990publicvoid setFieldName( String fieldName )
91 {
92this.fieldName = fieldName;
93 }
9495 }