001    package org.apache.archiva.admin.model;
002    /*
003     * Licensed to the Apache Software Foundation (ASF) under one
004     * or more contributor license agreements.  See the NOTICE file
005     * distributed with this work for additional information
006     * regarding copyright ownership.  The ASF licenses this file
007     * to you under the Apache License, Version 2.0 (the
008     * "License"); you may not use this file except in compliance
009     * with the License.  You may obtain a copy of the License at
010     *
011     *   http://www.apache.org/licenses/LICENSE-2.0
012     *
013     * Unless required by applicable law or agreed to in writing,
014     * software distributed under the License is distributed on an
015     * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
016     * KIND, either express or implied.  See the License for the
017     * specific language governing permissions and limitations
018     * under the License.
019     */
020    
021    
022    /**
023     * @author Olivier Lamy
024     * @since 1.4-M1
025     */
026    public class RepositoryAdminException
027        extends Exception
028    {
029    
030        /**
031         * can return the field name of bean with issue
032         * can be <code>null</code>
033         * @since 1.4-M3
034         */
035        private String fieldName;
036    
037        public RepositoryAdminException( String s )
038        {
039            super( s );
040        }
041    
042        public RepositoryAdminException( String s, String fieldName )
043        {
044            this( s );
045            this.fieldName = fieldName;
046        }
047    
048        public RepositoryAdminException( String message, Throwable cause )
049        {
050            super( message, cause );
051        }
052    
053        public RepositoryAdminException( String message, Throwable cause,  String fieldName )
054        {
055            super( message, cause );
056            this.fieldName = fieldName;
057        }
058    
059        public String getFieldName()
060        {
061            return fieldName;
062        }
063    
064        public void setFieldName( String fieldName )
065        {
066            this.fieldName = fieldName;
067        }
068    }