1package org.apache.archiva.rest.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 */2021import org.apache.archiva.rest.api.services.ArchivaRestServiceException;
2223import javax.xml.bind.annotation.XmlRootElement;
2425/**26 * @author Olivier Lamy27 * @since 1.4-M228 */29 @XmlRootElement( name = "archivaRestError" )
30publicclassArchivaRestError31 {
3233private String errorKey;
3435private String errorMessage;
3637/**38 * can return the field name of bean with issue39 * can be <code>null</code>40 *41 * @since 1.4-M342 */43private String fieldName;
4445publicArchivaRestError()
46 {
47// no op48 }
4950publicArchivaRestError( ArchivaRestServiceException e )
51 {
52 errorKey = e.getErrorKey();
53 errorMessage = e.getMessage();
54 fieldName = e.getFieldName();
55 }
5657public String getErrorKey()
58 {
59return errorKey;
60 }
6162publicvoid setErrorKey( String errorKey )
63 {
64this.errorKey = errorKey;
65 }
6667public String getErrorMessage()
68 {
69return errorMessage;
70 }
7172publicvoid setErrorMessage( String errorMessage )
73 {
74this.errorMessage = errorMessage;
75 }
7677public String getFieldName()
78 {
79return fieldName;
80 }
8182publicvoid setFieldName( String fieldName )
83 {
84this.fieldName = fieldName;
85 }
86 }