Return-Path: X-Original-To: apmail-directory-commits-archive@www.apache.org Delivered-To: apmail-directory-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B09785C9A for ; Tue, 10 May 2011 14:34:30 +0000 (UTC) Received: (qmail 78709 invoked by uid 500); 10 May 2011 14:34:30 -0000 Delivered-To: apmail-directory-commits-archive@directory.apache.org Received: (qmail 78678 invoked by uid 500); 10 May 2011 14:34:30 -0000 Mailing-List: contact commits-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@directory.apache.org Delivered-To: mailing list commits@directory.apache.org Received: (qmail 78671 invoked by uid 99); 10 May 2011 14:34:30 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 May 2011 14:34:30 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 May 2011 14:34:28 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id ED11D238890A; Tue, 10 May 2011 14:34:07 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1101476 - in /directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model: exception/ message/ Date: Tue, 10 May 2011 14:34:07 -0000 To: commits@directory.apache.org From: elecharny@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20110510143407.ED11D238890A@eris.apache.org> Author: elecharny Date: Tue May 10 14:34:07 2011 New Revision: 1101476 URL: http://svn.apache.org/viewvc?rev=1101476&view=rev Log: Added the missing LdapOperationExceptions Added: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapAdminLimitExceededException.java directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapCannotCancelException.java directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapNoSuchOperationException.java directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapSizeLimitExceededException.java directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapStrongAuthenticationRequiredException.java directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapTooLateException.java directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapUnknownException.java Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapAuthenticationException.java directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapConfigurationException.java directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapContextNotEmptyException.java directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapInvalidDnException.java directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapNoPermissionException.java directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapTimeLimitExceededException.java directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/ResultCodeEnum.java Added: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapAdminLimitExceededException.java URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapAdminLimitExceededException.java?rev=1101476&view=auto ============================================================================== --- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapAdminLimitExceededException.java (added) +++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapAdminLimitExceededException.java Tue May 10 14:34:07 2011 @@ -0,0 +1,59 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * + */ +package org.apache.directory.shared.ldap.model.exception; + + +import org.apache.directory.shared.ldap.model.message.ResultCodeEnum; + + +/** + * A LdapTimeLimitExceededException which associates a resultCode namely the + * {@link ResultCodeEnum#ADMIN_LIMIT_EXCEEDED} resultCode with the exception. + * + * @author Apache Directory Project + */ +public class LdapAdminLimitExceededException extends LdapOperationException +{ + /** The serial version UUID */ + static final long serialVersionUID = 1L; + + + /** + * + * Creates a new instance of LdapAdminLimitExceededException. + * + */ + public LdapAdminLimitExceededException() + { + super( ResultCodeEnum.ADMIN_LIMIT_EXCEEDED, null ); + } + + + /** + * + * Creates a new instance of LdapAdminLimitExceededException. + * + * @param explanation The associated error message + */ + public LdapAdminLimitExceededException( String explanation ) + { + super( ResultCodeEnum.ADMIN_LIMIT_EXCEEDED, explanation ); + } +} Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapAuthenticationException.java URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapAuthenticationException.java?rev=1101476&r1=1101475&r2=1101476&view=diff ============================================================================== --- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapAuthenticationException.java (original) +++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapAuthenticationException.java Tue May 10 14:34:07 2011 @@ -25,7 +25,7 @@ import org.apache.directory.shared.ldap. /** * A subclass of {@link LdapOperationException} which associates the - * {@link org.apache.directory.shared.ldap.model.message.ResultCodeEnum#INVALIDCREDENTIALS} value with the type. + * {@link org.apache.directory.shared.ldap.model.message.ResultCodeEnum#INVALID_CREDENTIALS} value with the type. * * @author Apache Directory Project */ Added: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapCannotCancelException.java URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapCannotCancelException.java?rev=1101476&view=auto ============================================================================== --- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapCannotCancelException.java (added) +++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapCannotCancelException.java Tue May 10 14:34:07 2011 @@ -0,0 +1,59 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * + */ +package org.apache.directory.shared.ldap.model.exception; + + +import org.apache.directory.shared.ldap.model.message.ResultCodeEnum; + + +/** + * A LdapCannotCancelException which associates a resultCode, namely the + * {@link ResultCodeEnum#CANNOT_CANCEL} resultCode with the exception. + * + * @author Apache Directory Project + */ +public class LdapCannotCancelException extends LdapOperationException +{ + /** The serial version UUID */ + static final long serialVersionUID = 1L; + + + /** + * + * Creates a new instance of LdapCannotCancelException. + * + */ + public LdapCannotCancelException() + { + super( ResultCodeEnum.CANNOT_CANCEL, null ); + } + + + /** + * + * Creates a new instance of LdapCannotCancelException. + * + * @param explanation The associated error message + */ + public LdapCannotCancelException( String explanation ) + { + super( ResultCodeEnum.CANNOT_CANCEL, explanation ); + } +} Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapConfigurationException.java URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapConfigurationException.java?rev=1101476&r1=1101475&r2=1101476&view=diff ============================================================================== --- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapConfigurationException.java (original) +++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapConfigurationException.java Tue May 10 14:34:07 2011 @@ -39,7 +39,7 @@ public class LdapConfigurationException /** - * Creates a new instance of LdapAuthenticationException. + * Creates a new instance of LdapConfigurationException. * * @param message The exception message */ @@ -50,7 +50,7 @@ public class LdapConfigurationException /** - * Creates a new instance of LdapAuthenticationException. + * Creates a new instance of LdapConfigurationException. */ public LdapConfigurationException() { @@ -59,7 +59,7 @@ public class LdapConfigurationException /** - * Creates a new instance of LdapAuthenticationException. + * Creates a new instance of LdapConfigurationException. * * @param message the exception message * @param cause the cause Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapContextNotEmptyException.java URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapContextNotEmptyException.java?rev=1101476&r1=1101475&r2=1101476&view=diff ============================================================================== --- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapContextNotEmptyException.java (original) +++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapContextNotEmptyException.java Tue May 10 14:34:07 2011 @@ -24,7 +24,7 @@ import org.apache.directory.shared.ldap. /** - * A ContextNotEmptyException which contains an LDAP result code. + * A LdapContextNotEmptyException which contains an LDAP result code. * * @author Apache Directory Project */ Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapInvalidDnException.java URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapInvalidDnException.java?rev=1101476&r1=1101475&r2=1101476&view=diff ============================================================================== --- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapInvalidDnException.java (original) +++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapInvalidDnException.java Tue May 10 14:34:07 2011 @@ -36,7 +36,7 @@ public class LdapInvalidDnException exte /** - * to be used by some special exceptions like TooComplexException + * to be used by some special exceptions like LdapInvalidDnException */ public LdapInvalidDnException( String message ) { Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapNoPermissionException.java URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapNoPermissionException.java?rev=1101476&r1=1101475&r2=1101476&view=diff ============================================================================== --- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapNoPermissionException.java (original) +++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapNoPermissionException.java Tue May 10 14:34:07 2011 @@ -25,8 +25,8 @@ import org.apache.directory.shared.ldap. /** * A {@link LdapOperationException} which associates a resultCode namely the - * {@link org.apache.directory.shared.ldap.model.message.ResultCodeEnum#INSUFFICIENTACCESSRIGHTS} resultCode with the - * exception. + * {@link org.apache.directory.shared.ldap.model.message.ResultCodeEnum#INSUFFICIENT_ACCESS_RIGHTS} + * resultCode with the exception. * * @author Apache Directory Project */ Added: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapNoSuchOperationException.java URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapNoSuchOperationException.java?rev=1101476&view=auto ============================================================================== --- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapNoSuchOperationException.java (added) +++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapNoSuchOperationException.java Tue May 10 14:34:07 2011 @@ -0,0 +1,59 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * + */ +package org.apache.directory.shared.ldap.model.exception; + + +import org.apache.directory.shared.ldap.model.message.ResultCodeEnum; + + +/** + * A LdapNoSuchOperationException which associates a resultCode, namely the + * {@link ResultCodeEnum#NO_SUCH_OPERATION} resultCode with the exception. + * + * @author Apache Directory Project + */ +public class LdapNoSuchOperationException extends LdapOperationException +{ + /** The serial version UUID */ + static final long serialVersionUID = 1L; + + + /** + * + * Creates a new instance of LdapNoSuchOperationException. + * + */ + public LdapNoSuchOperationException() + { + super( ResultCodeEnum.NO_SUCH_OPERATION, null ); + } + + + /** + * + * Creates a new instance of LdapNoSuchOperationException. + * + * @param explanation The associated error message + */ + public LdapNoSuchOperationException( String explanation ) + { + super( ResultCodeEnum.NO_SUCH_OPERATION, explanation ); + } +} Added: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapSizeLimitExceededException.java URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapSizeLimitExceededException.java?rev=1101476&view=auto ============================================================================== --- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapSizeLimitExceededException.java (added) +++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapSizeLimitExceededException.java Tue May 10 14:34:07 2011 @@ -0,0 +1,59 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * + */ +package org.apache.directory.shared.ldap.model.exception; + + +import org.apache.directory.shared.ldap.model.message.ResultCodeEnum; + + +/** + * A LdapSizeLimitExceededException which associates a resultCode namely the + * {@link ResultCodeEnum#SIZE_LIMIT_EXCEEDED} resultCode with the exception. + * + * @author Apache Directory Project + */ +public class LdapSizeLimitExceededException extends LdapOperationException +{ + /** The serial version UUID */ + static final long serialVersionUID = 1L; + + + /** + * + * Creates a new instance of LdapSizeLimitExceededException. + * + */ + public LdapSizeLimitExceededException() + { + super( ResultCodeEnum.SIZE_LIMIT_EXCEEDED, null ); + } + + + /** + * + * Creates a new instance of LdapSizeLimitExceededException. + * + * @param explanation The associated error message + */ + public LdapSizeLimitExceededException( String explanation ) + { + super( ResultCodeEnum.SIZE_LIMIT_EXCEEDED, explanation ); + } +} Added: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapStrongAuthenticationRequiredException.java URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapStrongAuthenticationRequiredException.java?rev=1101476&view=auto ============================================================================== --- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapStrongAuthenticationRequiredException.java (added) +++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapStrongAuthenticationRequiredException.java Tue May 10 14:34:07 2011 @@ -0,0 +1,55 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * + */ +package org.apache.directory.shared.ldap.model.exception; + + +import org.apache.directory.shared.ldap.model.message.ResultCodeEnum; + + +/** + * A subclass of {@link LdapOperationException} which associates the + * {@link org.apache.directory.shared.ldap.model.message.ResultCodeEnum#STRONG_AUTH_REQUIRED} value with the type. + * + * @author Apache Directory Project + */ +public class LdapStrongAuthenticationRequiredException extends LdapOperationException +{ + /** The serial version UUID */ + static final long serialVersionUID = 1L; + + /** + * Creates a new instance of LdapStrongAuthenticationRequiredException. + * + * @param message The exception message + */ + public LdapStrongAuthenticationRequiredException( String message ) + { + super( ResultCodeEnum.STRONG_AUTH_REQUIRED, message ); + } + + + /** + * Creates a new instance of LdapStrongAuthenticationRequiredException. + */ + public LdapStrongAuthenticationRequiredException() + { + super( ResultCodeEnum.STRONG_AUTH_REQUIRED, null ); + } +} Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapTimeLimitExceededException.java URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapTimeLimitExceededException.java?rev=1101476&r1=1101475&r2=1101476&view=diff ============================================================================== --- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapTimeLimitExceededException.java (original) +++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapTimeLimitExceededException.java Tue May 10 14:34:07 2011 @@ -24,8 +24,8 @@ import org.apache.directory.shared.ldap. /** - * A TiimeLimitExceededException which associates a resultCode namely the - * {@link ResultCodeEnum#SIZELIMITEXCEEDED} resultCode with the exception. + * A LdapTimeLimitExceededException which associates a resultCode namely the + * {@link ResultCodeEnum#TIME_LIMIT_EXCEEDED} resultCode with the exception. * * @author Apache Directory Project */ Added: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapTooLateException.java URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapTooLateException.java?rev=1101476&view=auto ============================================================================== --- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapTooLateException.java (added) +++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapTooLateException.java Tue May 10 14:34:07 2011 @@ -0,0 +1,59 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * + */ +package org.apache.directory.shared.ldap.model.exception; + + +import org.apache.directory.shared.ldap.model.message.ResultCodeEnum; + + +/** + * A LdapTooLateException which associates a resultCode namely the + * {@link ResultCodeEnum#TOO_LATE} resultCode with the exception. + * + * @author Apache Directory Project + */ +public class LdapTooLateException extends LdapOperationException +{ + /** The serial version UUID */ + static final long serialVersionUID = 1L; + + + /** + * + * Creates a new instance of LdapTooLateException. + * + */ + public LdapTooLateException() + { + super( ResultCodeEnum.TOO_LATE, null ); + } + + + /** + * + * Creates a new instance of LdapTooLateException. + * + * @param explanation The associated error message + */ + public LdapTooLateException( String explanation ) + { + super( ResultCodeEnum.TOO_LATE, explanation ); + } +} Added: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapUnknownException.java URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapUnknownException.java?rev=1101476&view=auto ============================================================================== --- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapUnknownException.java (added) +++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapUnknownException.java Tue May 10 14:34:07 2011 @@ -0,0 +1,59 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * + */ +package org.apache.directory.shared.ldap.model.exception; + + +import org.apache.directory.shared.ldap.model.message.ResultCodeEnum; + + +/** + * A LdapUnknownException which associates a resultCode, namely the + * {@link ResultCodeEnum#UNKNOWN} resultCode with the exception. + * + * @author Apache Directory Project + */ +public class LdapUnknownException extends LdapOperationException +{ + /** The serial version UUID */ + static final long serialVersionUID = 1L; + + + /** + * + * Creates a new instance of LdapUnknownException. + * + */ + public LdapUnknownException() + { + super( ResultCodeEnum.UNKNOWN, null ); + } + + + /** + * + * Creates a new instance of LdapUnknownException. + * + * @param explanation The associated error message + */ + public LdapUnknownException( String explanation ) + { + super( ResultCodeEnum.UNKNOWN, explanation ); + } +} Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/ResultCodeEnum.java URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/ResultCodeEnum.java?rev=1101476&r1=1101475&r2=1101476&view=diff ============================================================================== --- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/ResultCodeEnum.java (original) +++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/ResultCodeEnum.java Tue May 10 14:34:07 2011 @@ -29,12 +29,14 @@ import javax.naming.LimitExceededExcepti import javax.naming.PartialResultException; import javax.naming.SizeLimitExceededException; +import org.apache.directory.shared.ldap.model.exception.LdapAdminLimitExceededException; import org.apache.directory.shared.ldap.model.exception.LdapAffectMultipleDsaException; import org.apache.directory.shared.ldap.model.exception.LdapAliasDereferencingException; import org.apache.directory.shared.ldap.model.exception.LdapAliasException; import org.apache.directory.shared.ldap.model.exception.LdapAttributeInUseException; import org.apache.directory.shared.ldap.model.exception.LdapAuthenticationException; import org.apache.directory.shared.ldap.model.exception.LdapAuthenticationNotSupportedException; +import org.apache.directory.shared.ldap.model.exception.LdapCannotCancelException; import org.apache.directory.shared.ldap.model.exception.LdapContextNotEmptyException; import org.apache.directory.shared.ldap.model.exception.LdapEntryAlreadyExistsException; import org.apache.directory.shared.ldap.model.exception.LdapException; @@ -46,13 +48,18 @@ import org.apache.directory.shared.ldap. import org.apache.directory.shared.ldap.model.exception.LdapNoPermissionException; import org.apache.directory.shared.ldap.model.exception.LdapNoSuchAttributeException; import org.apache.directory.shared.ldap.model.exception.LdapNoSuchObjectException; +import org.apache.directory.shared.ldap.model.exception.LdapNoSuchOperationException; import org.apache.directory.shared.ldap.model.exception.LdapOperationErrorException; import org.apache.directory.shared.ldap.model.exception.LdapOperationException; import org.apache.directory.shared.ldap.model.exception.LdapOtherException; import org.apache.directory.shared.ldap.model.exception.LdapProtocolErrorException; import org.apache.directory.shared.ldap.model.exception.LdapSchemaViolationException; import org.apache.directory.shared.ldap.model.exception.LdapServiceUnavailableException; +import org.apache.directory.shared.ldap.model.exception.LdapSizeLimitExceededException; +import org.apache.directory.shared.ldap.model.exception.LdapStrongAuthenticationRequiredException; import org.apache.directory.shared.ldap.model.exception.LdapTimeLimitExceededException; +import org.apache.directory.shared.ldap.model.exception.LdapTooLateException; +import org.apache.directory.shared.ldap.model.exception.LdapUnknownException; import org.apache.directory.shared.ldap.model.exception.LdapUnwillingToPerformException; @@ -1970,6 +1977,7 @@ public enum ResultCodeEnum { // Not erroneous code case SUCCESS : + case PARTIAL_RESULTS : case REFERRAL : case SASL_BIND_IN_PROGRESS : case CANCELED : @@ -2131,32 +2139,53 @@ public enum ResultCodeEnum throw ldapOtherException; + case SIZE_LIMIT_EXCEEDED : + LdapSizeLimitExceededException ldapSizeLimitExceededException = new LdapSizeLimitExceededException( ldapResult.getDiagnosticMessage() ); + ldapSizeLimitExceededException.setResolvedDn( ldapResult.getMatchedDn() ); + + throw ldapSizeLimitExceededException; + + case STRONG_AUTH_REQUIRED : + LdapStrongAuthenticationRequiredException ldapStrongAuthenticationRequiredException = + new LdapStrongAuthenticationRequiredException( ldapResult.getDiagnosticMessage() ); + ldapStrongAuthenticationRequiredException.setResolvedDn( ldapResult.getMatchedDn() ); + + throw ldapStrongAuthenticationRequiredException; + + case ADMIN_LIMIT_EXCEEDED : + LdapAdminLimitExceededException ldapAdminLimitExceededException = + new LdapAdminLimitExceededException( ldapResult.getDiagnosticMessage() ); + ldapAdminLimitExceededException.setResolvedDn( ldapResult.getMatchedDn() ); + + throw ldapAdminLimitExceededException; + case TOO_LATE : - // TODO + LdapTooLateException ldapTooLateException = new LdapTooLateException( ldapResult.getDiagnosticMessage() ); + ldapTooLateException.setResolvedDn( ldapResult.getMatchedDn() ); + throw ldapTooLateException; + case UNKNOWN : - // TODO + LdapUnknownException ldapUnknownException = new LdapUnknownException( ldapResult.getDiagnosticMessage() ); + ldapUnknownException.setResolvedDn( ldapResult.getMatchedDn() ); - case ADMIN_LIMIT_EXCEEDED : - // TODO + throw ldapUnknownException; case CANNOT_CANCEL : - // TODO + LdapCannotCancelException ldapCannotCancelException = new LdapCannotCancelException( ldapResult.getDiagnosticMessage() ); + ldapCannotCancelException.setResolvedDn( ldapResult.getMatchedDn() ); - case E_SYNC_REFRESH_REQUIRED : - // TODO + throw ldapCannotCancelException; - case PARTIAL_RESULTS : - // TODO + case NO_SUCH_OPERATION : + LdapNoSuchOperationException ldapNoSuchOperationException = new LdapNoSuchOperationException( ldapResult.getDiagnosticMessage() ); + ldapNoSuchOperationException.setResolvedDn( ldapResult.getMatchedDn() ); - case STRONG_AUTH_REQUIRED : - // TODO + throw ldapNoSuchOperationException; - case SIZE_LIMIT_EXCEEDED : - // TODO - - case NO_SUCH_OPERATION : - // TODO + case E_SYNC_REFRESH_REQUIRED : + // This is a specific error message. We won't encapsulate it in a dedicated exception + // Fallthrough default : LdapOperationException exception = new LdapOperationException( ldapResult.getResultCode(), ldapResult.getDiagnosticMessage() );