001 /* 002 * Licensed to the Apache Software Foundation (ASF) under one 003 * or more contributor license agreements. See the NOTICE file 004 * distributed with this work for additional information 005 * regarding copyright ownership. The ASF licenses this file 006 * to you under the Apache License, Version 2.0 (the 007 * "License"); you may not use this file except in compliance 008 * with the License. You may obtain a copy of the License at 009 * 010 * http://www.apache.org/licenses/LICENSE-2.0 011 * 012 * Unless required by applicable law or agreed to in writing, 013 * software distributed under the License is distributed on an 014 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 015 * KIND, either express or implied. See the License for the 016 * specific language governing permissions and limitations 017 * under the License. 018 * 019 */ 020 021 package org.apache.directory.server.changepw.exceptions; 022 023 024 import org.apache.directory.server.kerberos.shared.exceptions.KerberosException; 025 026 027 /** 028 * The root of the Change Password exception hierarchy. 029 * 030 * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a> 031 * @version $Rev: 542351 $, $Date: 2007-05-29 00:25:39 +0200 (Tue, 29 May 2007) $ 032 */ 033 public class ChangePasswordException extends KerberosException 034 { 035 private static final long serialVersionUID = 4880242751298831543L; 036 037 038 /** 039 * Creates a ChangePasswordException with an {@link ErrorType}. 040 * 041 * @param errorType The {@link ErrorType} associated with this ChangePasswordException. 042 */ 043 public ChangePasswordException( ErrorType errorType ) 044 { 045 super( errorType.getOrdinal(), errorType.getMessage() ); 046 } 047 048 049 /** 050 * Creates a ChangePasswordException with an {@link ErrorType} and an 051 * underlying throwable that caused this fault. 052 * 053 * @param errorType The {@link ErrorType} associated with this ChangePasswordException. 054 * @param cause The underlying failure, if any. 055 */ 056 public ChangePasswordException( ErrorType errorType, Throwable cause ) 057 { 058 super( errorType.getOrdinal(), errorType.getMessage(), cause ); 059 } 060 061 062 /** 063 * Creates a ChangePasswordException with an {@link ErrorType} and 064 * data helping to explain what caused this fault. 065 * 066 * @param errorType The {@link ErrorType} associated with this ChangePasswordException. 067 * @param explanatoryData Data helping to explain this fault, if any. 068 */ 069 public ChangePasswordException( ErrorType errorType, byte[] explanatoryData ) 070 { 071 super( errorType.getOrdinal(), errorType.getMessage(), explanatoryData ); 072 } 073 074 075 /** 076 * Creates a ChangePasswordException with an {@link ErrorType}, data helping to explain 077 * what caused this fault, and an underlying throwable that caused this fault. 078 * 079 * @param errorType The error type associated with this ChangePasswordException. 080 * @param explanatoryData Data helping to explain this fault, if any. 081 * @param cause The underlying failure, if any. 082 */ 083 public ChangePasswordException( ErrorType errorType, byte[] explanatoryData, Throwable cause ) 084 { 085 super( errorType.getOrdinal(), errorType.getMessage(), explanatoryData, cause ); 086 } 087 }