directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kayyag...@apache.org
Subject svn commit: r923838 - in /directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2: engine/Dsmlv2Engine.java reponse/Dsmlv2ResponseGrammar.java request/AddRequestDsml.java request/Dsmlv2Grammar.java
Date Tue, 16 Mar 2010 16:19:39 GMT
Author: kayyagari
Date: Tue Mar 16 16:19:39 2010
New Revision: 923838

URL: http://svn.apache.org/viewvc?rev=923838&view=rev
Log:
replaced the jndi exceptions with ADS exceptions

Modified:
    directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/engine/Dsmlv2Engine.java
    directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/Dsmlv2ResponseGrammar.java
    directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/AddRequestDsml.java
    directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/Dsmlv2Grammar.java

Modified: directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/engine/Dsmlv2Engine.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/engine/Dsmlv2Engine.java?rev=923838&r1=923837&r2=923838&view=diff
==============================================================================
--- directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/engine/Dsmlv2Engine.java
(original)
+++ directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/engine/Dsmlv2Engine.java
Tue Mar 16 16:19:39 2010
@@ -30,8 +30,6 @@ import java.net.UnknownHostException;
 import java.nio.ByteBuffer;
 import java.nio.channels.SocketChannel;
 
-import javax.naming.NamingException;
-
 import org.apache.directory.shared.asn1.ber.Asn1Decoder;
 import org.apache.directory.shared.asn1.ber.IAsn1Container;
 import org.apache.directory.shared.asn1.ber.tlv.TLVStateEnum;
@@ -74,6 +72,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.codec.search.SearchResultDoneCodec;
 import org.apache.directory.shared.ldap.codec.search.SearchResultEntryCodec;
 import org.apache.directory.shared.ldap.codec.search.SearchResultReferenceCodec;
+import org.apache.directory.shared.ldap.exception.LdapInvalidDnException;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.message.control.Control;
 import org.apache.directory.shared.ldap.name.DN;
@@ -313,11 +312,9 @@ public class Dsmlv2Engine
      *      the request to process
      * @throws EncoderException 
      * @throws IOException 
-     * @throws NamingException 
      * @throws DecoderException 
      */
-    private void processRequest( LdapMessageCodec request ) throws EncoderException, IOException,
DecoderException,
-        NamingException
+    private void processRequest( LdapMessageCodec request ) throws EncoderException, IOException,
DecoderException
     {
         ByteBuffer bb = request.encode();
 
@@ -544,9 +541,8 @@ public class Dsmlv2Engine
      *      the response as a LDAP message
      * @throws IOException
      * @throws DecoderException
-     * @throws NamingException
      */
-    private LdapMessageCodec readResponse( ByteBuffer bb ) throws IOException, DecoderException,
NamingException
+    private LdapMessageCodec readResponse( ByteBuffer bb ) throws IOException, DecoderException
     {
 
         LdapMessageCodec messageResp = null;
@@ -612,9 +608,9 @@ public class Dsmlv2Engine
      * @throws EncoderException
      * @throws DecoderException
      * @throws IOException
-     * @throws NamingException
+     * @throws LdapInvalidDnException
      */
-    private void bind( int messageId ) throws EncoderException, DecoderException, IOException,
NamingException
+    private void bind( int messageId ) throws EncoderException, DecoderException, IOException,
LdapInvalidDnException
     {
         BindRequestCodec bindRequest = new BindRequestCodec();
         LdapAuthentication authentication = new SimpleAuthentication();

Modified: directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/Dsmlv2ResponseGrammar.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/Dsmlv2ResponseGrammar.java?rev=923838&r1=923837&r2=923838&view=diff
==============================================================================
--- directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/Dsmlv2ResponseGrammar.java
(original)
+++ directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/Dsmlv2ResponseGrammar.java
Tue Mar 16 16:19:39 2010
@@ -27,8 +27,6 @@ import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Set;
 
-import javax.naming.InvalidNameException;
-
 import org.apache.directory.shared.asn1.codec.DecoderException;
 import org.apache.directory.shared.asn1.primitives.OID;
 import org.apache.directory.shared.dsmlv2.AbstractGrammar;
@@ -56,6 +54,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.codec.search.SearchResultEntryCodec;
 import org.apache.directory.shared.ldap.codec.search.SearchResultReferenceCodec;
 import org.apache.directory.shared.ldap.codec.util.LdapURLEncodingException;
+import org.apache.directory.shared.ldap.exception.LdapInvalidDnException;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.message.control.Control;
 import org.apache.directory.shared.ldap.name.DN;
@@ -805,7 +804,7 @@ public class Dsmlv2ResponseGrammar exten
                 {
                     ldapResult.setMatchedDN( new DN( attributeValue ) );
                 }
-                catch ( InvalidNameException e )
+                catch ( LdapInvalidDnException e )
                 {
                     throw new XmlPullParserException( "" + e.getMessage(), xpp, null );
                 }
@@ -847,7 +846,7 @@ public class Dsmlv2ResponseGrammar exten
                 {
                     ldapResult.setMatchedDN( new DN( attributeValue ) );
                 }
-                catch ( InvalidNameException e )
+                catch ( LdapInvalidDnException e )
                 {
                     throw new XmlPullParserException( "" + e.getMessage(), xpp, null );
                 }
@@ -888,7 +887,7 @@ public class Dsmlv2ResponseGrammar exten
                 {
                     ldapResult.setMatchedDN( new DN( attributeValue ) );
                 }
-                catch ( InvalidNameException e )
+                catch ( LdapInvalidDnException e )
                 {
                     throw new XmlPullParserException( "" + e.getMessage(), xpp, null );
                 }
@@ -929,7 +928,7 @@ public class Dsmlv2ResponseGrammar exten
                 {
                     ldapResult.setMatchedDN( new DN( attributeValue ) );
                 }
-                catch ( InvalidNameException e )
+                catch ( LdapInvalidDnException e )
                 {
                     throw new XmlPullParserException( "" + e.getMessage(), xpp, null );
                 }
@@ -970,7 +969,7 @@ public class Dsmlv2ResponseGrammar exten
                 {
                     ldapResult.setMatchedDN( new DN( attributeValue ) );
                 }
-                catch ( InvalidNameException e )
+                catch ( LdapInvalidDnException e )
                 {
                     throw new XmlPullParserException( "" + e.getMessage(), xpp, null );
                 }
@@ -1011,7 +1010,7 @@ public class Dsmlv2ResponseGrammar exten
                 {
                     ldapResult.setMatchedDN( new DN( attributeValue ) );
                 }
-                catch ( InvalidNameException e )
+                catch ( LdapInvalidDnException e )
                 {
                     throw new XmlPullParserException( "" + e.getMessage(), xpp, null );
                 }
@@ -1052,7 +1051,7 @@ public class Dsmlv2ResponseGrammar exten
                 {
                     ldapResult.setMatchedDN( new DN( attributeValue ) );
                 }
-                catch ( InvalidNameException e )
+                catch ( LdapInvalidDnException e )
                 {
                     throw new XmlPullParserException( "" + e.getMessage(), xpp, null );
                 }
@@ -1548,7 +1547,7 @@ public class Dsmlv2ResponseGrammar exten
                 {
                     searchResultEntry.setObjectName( new DN( attributeValue ) );
                 }
-                catch ( InvalidNameException e )
+                catch ( LdapInvalidDnException e )
                 {
                     throw new XmlPullParserException( e.getMessage(), xpp, null );
                 }
@@ -1621,7 +1620,7 @@ public class Dsmlv2ResponseGrammar exten
                 {
                     searchResultDone.getLdapResult().setMatchedDN( new DN( attributeValue
) );
                 }
-                catch ( InvalidNameException e )
+                catch ( LdapInvalidDnException e )
                 {
                     throw new XmlPullParserException( "" + e.getMessage(), xpp, null );
                 }

Modified: directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/AddRequestDsml.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/AddRequestDsml.java?rev=923838&r1=923837&r2=923838&view=diff
==============================================================================
--- directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/AddRequestDsml.java
(original)
+++ directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/AddRequestDsml.java
Tue Mar 16 16:19:39 2010
@@ -20,14 +20,13 @@
 package org.apache.directory.shared.dsmlv2.request;
 
 
-import javax.naming.NamingException;
-
 import org.apache.directory.shared.dsmlv2.ParserUtils;
 import org.apache.directory.shared.ldap.codec.MessageTypeEnum;
 import org.apache.directory.shared.ldap.codec.add.AddRequestCodec;
 import org.apache.directory.shared.ldap.entry.Entry;
 import org.apache.directory.shared.ldap.entry.EntryAttribute;
 import org.apache.directory.shared.ldap.entry.Value;
+import org.apache.directory.shared.ldap.exception.LdapException;
 import org.apache.directory.shared.ldap.name.DN;
 import org.dom4j.Element;
 import org.dom4j.Namespace;
@@ -146,9 +145,9 @@ public class AddRequestDsml extends Abst
      * Create a new attributeValue
      * 
      * @param type The attribute's name (called 'type' in the grammar)
-     * @throws NamingException 
+     * @throws LdapException 
      */
-    public void addAttributeType( String type ) throws NamingException
+    public void addAttributeType( String type ) throws LdapException
     {
         ( ( AddRequestCodec ) instance ).addAttributeType( type );
     }

Modified: directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/Dsmlv2Grammar.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/Dsmlv2Grammar.java?rev=923838&r1=923837&r2=923838&view=diff
==============================================================================
--- directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/Dsmlv2Grammar.java
(original)
+++ directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/Dsmlv2Grammar.java
Tue Mar 16 16:19:39 2010
@@ -25,9 +25,6 @@ import java.io.IOException;
 import java.lang.reflect.Array;
 import java.util.HashMap;
 
-import javax.naming.InvalidNameException;
-import javax.naming.NamingException;
-
 import org.apache.directory.shared.asn1.Asn1Object;
 import org.apache.directory.shared.asn1.codec.DecoderException;
 import org.apache.directory.shared.asn1.primitives.OID;
@@ -67,6 +64,8 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.entry.Value;
 import org.apache.directory.shared.ldap.entry.client.ClientBinaryValue;
 import org.apache.directory.shared.ldap.entry.client.ClientStringValue;
+import org.apache.directory.shared.ldap.exception.LdapException;
+import org.apache.directory.shared.ldap.exception.LdapInvalidDnException;
 import org.apache.directory.shared.ldap.filter.SearchScope;
 import org.apache.directory.shared.ldap.message.control.Control;
 import org.apache.directory.shared.ldap.name.DN;
@@ -1209,7 +1208,7 @@ public class Dsmlv2Grammar extends Abstr
                 {
                     addRequest.setEntryDn( new DN( attributeValue ) );
                 }
-                catch ( InvalidNameException e )
+                catch ( LdapInvalidDnException e )
                 {
                     throw new XmlPullParserException( "" + e.getMessage(), xpp, null );
                 }
@@ -1242,7 +1241,7 @@ public class Dsmlv2Grammar extends Abstr
                 {
                     addRequest.addAttributeType( attributeValue );
                 }
-                catch ( NamingException e )
+                catch ( LdapException e )
                 {
                     throw new XmlPullParserException( I18n.err(I18n.ERR_03020 ), xpp, e );
                 }
@@ -1330,7 +1329,7 @@ public class Dsmlv2Grammar extends Abstr
                 {
                     authRequest.setName( new DN( attributeValue ) );
                 }
-                catch ( InvalidNameException e )
+                catch ( LdapInvalidDnException e )
                 {
                     throw new XmlPullParserException( "" + e.getMessage(), xpp, null );
                 }
@@ -1377,7 +1376,7 @@ public class Dsmlv2Grammar extends Abstr
                 {
                     compareRequest.setEntry( new DN( attributeValue ) );
                 }
-                catch ( InvalidNameException e )
+                catch ( LdapInvalidDnException e )
                 {
                     throw new XmlPullParserException( "" + e.getMessage(), xpp, null );
                 }
@@ -1488,7 +1487,7 @@ public class Dsmlv2Grammar extends Abstr
                 {
                     delRequest.setEntry( new DN( attributeValue ) );
                 }
-                catch ( InvalidNameException e )
+                catch ( LdapInvalidDnException e )
                 {
                     throw new XmlPullParserException( "" + e.getMessage(), xpp, null );
                 }
@@ -1634,7 +1633,7 @@ public class Dsmlv2Grammar extends Abstr
                 {
                     modifyDNRequest.setEntry( new DN( attributeValue ) );
                 }
-                catch ( InvalidNameException e )
+                catch ( LdapInvalidDnException e )
                 {
                     throw new XmlPullParserException( "" + e.getMessage(), xpp, null );
                 }
@@ -1651,7 +1650,7 @@ public class Dsmlv2Grammar extends Abstr
                 {
                     modifyDNRequest.setNewRDN( new RDN( attributeValue ) );
                 }
-                catch ( InvalidNameException e )
+                catch ( LdapInvalidDnException e )
                 {
                     throw new XmlPullParserException( "" + e.getMessage(), xpp, null );
                 }
@@ -1689,7 +1688,7 @@ public class Dsmlv2Grammar extends Abstr
                 {
                     modifyDNRequest.setNewSuperior( new DN( attributeValue ) );
                 }
-                catch ( InvalidNameException e )
+                catch ( LdapInvalidDnException e )
                 {
                     throw new XmlPullParserException( "" + e.getMessage(), xpp, null );
                 }
@@ -1734,7 +1733,7 @@ public class Dsmlv2Grammar extends Abstr
                 {
                     modifyRequest.setObject( new DN( attributeValue ) );
                 }
-                catch ( InvalidNameException e )
+                catch ( LdapInvalidDnException e )
                 {
                     throw new XmlPullParserException( "" + e.getLocalizedMessage(), xpp,
null );
                 }
@@ -1869,7 +1868,7 @@ public class Dsmlv2Grammar extends Abstr
                 {
                     searchRequest.setBaseObject( new DN( attributeValue ) );
                 }
-                catch ( InvalidNameException e )
+                catch ( LdapInvalidDnException e )
                 {
                     throw new XmlPullParserException( "" + e.getMessage(), xpp, null );
                 }



Mime
View raw message