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 */ 20 21 package org.apache.directory.server.changepw.exceptions; 22 23 24 import org.apache.directory.server.kerberos.shared.exceptions.KerberosException; 25 26 27 /** 28 * The root of the Change Password exception hierarchy. 29 * 30 * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a> 31 * @version $Rev: 542351 $, $Date: 2007-05-29 00:25:39 +0200 (Di, 29 Mai 2007) $ 32 */ 33 public class ChangePasswordException extends KerberosException 34 { 35 private static final long serialVersionUID = 4880242751298831543L; 36 37 38 /** 39 * Creates a ChangePasswordException with an {@link ErrorType}. 40 * 41 * @param errorType The {@link ErrorType} associated with this ChangePasswordException. 42 */ 43 public ChangePasswordException( ErrorType errorType ) 44 { 45 super( errorType.getOrdinal(), errorType.getMessage() ); 46 } 47 48 49 /** 50 * Creates a ChangePasswordException with an {@link ErrorType} and an 51 * underlying throwable that caused this fault. 52 * 53 * @param errorType The {@link ErrorType} associated with this ChangePasswordException. 54 * @param cause The underlying failure, if any. 55 */ 56 public ChangePasswordException( ErrorType errorType, Throwable cause ) 57 { 58 super( errorType.getOrdinal(), errorType.getMessage(), cause ); 59 } 60 61 62 /** 63 * Creates a ChangePasswordException with an {@link ErrorType} and 64 * data helping to explain what caused this fault. 65 * 66 * @param errorType The {@link ErrorType} associated with this ChangePasswordException. 67 * @param explanatoryData Data helping to explain this fault, if any. 68 */ 69 public ChangePasswordException( ErrorType errorType, byte[] explanatoryData ) 70 { 71 super( errorType.getOrdinal(), errorType.getMessage(), explanatoryData ); 72 } 73 74 75 /** 76 * Creates a ChangePasswordException with an {@link ErrorType}, data helping to explain 77 * what caused this fault, and an underlying throwable that caused this fault. 78 * 79 * @param errorType The error type associated with this ChangePasswordException. 80 * @param explanatoryData Data helping to explain this fault, if any. 81 * @param cause The underlying failure, if any. 82 */ 83 public ChangePasswordException( ErrorType errorType, byte[] explanatoryData, Throwable cause ) 84 { 85 super( errorType.getOrdinal(), errorType.getMessage(), explanatoryData, cause ); 86 } 87 }