You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by ak...@apache.org on 2006/01/06 09:09:29 UTC

svn commit: r366448 - in /directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/exception: LdapSizeLimitExceededException.java LdapTimeLimitExceededException.java

Author: akarasulu
Date: Fri Jan  6 00:09:24 2006
New Revision: 366448

URL: http://svn.apache.org/viewcvs?rev=366448&view=rev
Log:
adding exceptions for time and size limit handling

Added:
    directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/exception/LdapSizeLimitExceededException.java   (with props)
    directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/exception/LdapTimeLimitExceededException.java   (with props)

Added: directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/exception/LdapSizeLimitExceededException.java
URL: http://svn.apache.org/viewcvs/directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/exception/LdapSizeLimitExceededException.java?rev=366448&view=auto
==============================================================================
--- directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/exception/LdapSizeLimitExceededException.java (added)
+++ directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/exception/LdapSizeLimitExceededException.java Fri Jan  6 00:09:24 2006
@@ -0,0 +1,69 @@
+/*
+ *   Copyright 2004 The Apache Software Foundation
+ *
+ *   Licensed 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.ldap.common.exception;
+
+
+import javax.naming.SizeLimitExceededException;
+
+import org.apache.ldap.common.message.ResultCodeEnum;
+
+
+/**
+ * A SizeLimitExceededException which associates a resultCode namely the
+ * {@link ResultCodeEnum#SIZELIMITEXCEEDED} resultCode with the exception.
+ *
+ * @see LdapException
+ * @see SizeLimitExceededException
+ * @see <a href="http://java.sun.com/j2se/1.4.2/docs/guide/jndi/jndi-ldap-gl.html#EXCEPT">
+ * LDAP ResultCode to JNDI Exception Mappings</a>
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$
+ */
+public class LdapSizeLimitExceededException extends SizeLimitExceededException
+        implements LdapException
+{
+    static final long serialVersionUID = -8611970137960601723L;
+
+
+    /**
+     * @see SizeLimitExceededException#SizeLimitExceededException()
+     */
+    public LdapSizeLimitExceededException()
+    {
+        super();
+    }
+
+
+    /**
+     * @see SizeLimitExceededException#SizeLimitExceededException(String)
+     */
+    public LdapSizeLimitExceededException( String explanation )
+    {
+        super( explanation );
+    }
+
+
+    /**
+     * Always returns {@link ResultCodeEnum#SIZELIMITEXCEEDED}
+     *
+     * @see LdapException#getResultCode()
+     */
+    public ResultCodeEnum getResultCode()
+    {
+        return ResultCodeEnum.SIZELIMITEXCEEDED;
+    }
+}

Propchange: directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/exception/LdapSizeLimitExceededException.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/exception/LdapTimeLimitExceededException.java
URL: http://svn.apache.org/viewcvs/directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/exception/LdapTimeLimitExceededException.java?rev=366448&view=auto
==============================================================================
--- directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/exception/LdapTimeLimitExceededException.java (added)
+++ directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/exception/LdapTimeLimitExceededException.java Fri Jan  6 00:09:24 2006
@@ -0,0 +1,69 @@
+/*
+ *   Copyright 2004 The Apache Software Foundation
+ *
+ *   Licensed 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.ldap.common.exception;
+
+
+import javax.naming.SizeLimitExceededException;
+
+import org.apache.ldap.common.message.ResultCodeEnum;
+
+
+/**
+ * A SizeLimitExceededException which associates a resultCode namely the
+ * {@link ResultCodeEnum#SIZELIMITEXCEEDED} resultCode with the exception.
+ *
+ * @see LdapException
+ * @see SizeLimitExceededException
+ * @see <a href="http://java.sun.com/j2se/1.4.2/docs/guide/jndi/jndi-ldap-gl.html#EXCEPT">
+ * LDAP ResultCode to JNDI Exception Mappings</a>
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$
+ */
+public class LdapTimeLimitExceededException extends SizeLimitExceededException
+        implements LdapException
+{
+    static final long serialVersionUID = -8611970137960601723L;
+
+
+    /**
+     * @see SizeLimitExceededException#SizeLimitExceededException()
+     */
+    public LdapTimeLimitExceededException()
+    {
+        super();
+    }
+
+
+    /**
+     * @see SizeLimitExceededException#SizeLimitExceededException(String)
+     */
+    public LdapTimeLimitExceededException( String explanation )
+    {
+        super( explanation );
+    }
+
+
+    /**
+     * Always returns {@link ResultCodeEnum#SIZELIMITEXCEEDED}
+     *
+     * @see LdapException#getResultCode()
+     */
+    public ResultCodeEnum getResultCode()
+    {
+        return ResultCodeEnum.SIZELIMITEXCEEDED;
+    }
+}

Propchange: directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/exception/LdapTimeLimitExceededException.java
------------------------------------------------------------------------------
    svn:eol-style = native