directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r179312 - /directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/grammars/LdapResultGrammar.java
Date Tue, 31 May 2005 23:46:00 GMT
Author: elecharny
Date: Tue May 31 16:46:00 2005
New Revision: 179312

URL: http://svn.apache.org/viewcvs?rev=179312&view=rev
Log:
Substituated references to BindResponsePOJO by ResponsePOJO references in many places in the
code.

Modified:
    directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/grammars/LdapResultGrammar.java

Modified: directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/grammars/LdapResultGrammar.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/grammars/LdapResultGrammar.java?rev=179312&r1=179311&r2=179312&view=diff
==============================================================================
--- directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/grammars/LdapResultGrammar.java
(original)
+++ directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/grammars/LdapResultGrammar.java
Tue May 31 16:46:00 2005
@@ -29,9 +29,9 @@
 import org.apache.asn1.ldap.codec.primitives.LdapString;
 import org.apache.asn1.ldap.codec.utils.IntegerDecoder;
 import org.apache.asn1.ldap.codec.utils.LdapResultEnum;
-import org.apache.asn1.ldap.pojo.BindResponsePOJO;
 import org.apache.asn1.ldap.pojo.LdapMessagePOJO;
 import org.apache.asn1.ldap.pojo.LdapResultPOJO;
+import org.apache.asn1.ldap.pojo.ResponsePOJO;
 import org.apache.asn1.util.MutableString;
 
 import org.apache.log4j.Logger;
@@ -95,21 +95,22 @@
                             container;
                         LdapMessagePOJO      ldapMessage          =
                             ldapMessageContainer.getLdapMessage();
-                        BindResponsePOJO     bindResponse         = ldapMessage.getBindResponse();
+                        ResponsePOJO         response             = ( ResponsePOJO )
+                            ldapMessage.getProtocolOp();
 
                         // We have to allocate a LdapResultPOJO now
                         LdapResultPOJO ldapResult = null;
 
                         ldapResult = new LdapResultPOJO();
-                        bindResponse.setLdapResult( ldapResult );
+                        response.setLdapResult( ldapResult );
 
                         TLV tlv = ldapMessageContainer.getCurrentTLV();
 
                         ldapResult.setExpectedLength( tlv.getLength().getLength() );
                         ldapResult.setCurrentLength( 0 );
-                        ldapResult.setFather( bindResponse );
+                        ldapResult.setFather( response );
 
-                        checkLength( bindResponse, tlv );
+                        checkLength( response, tlv );
 
                         return;
                     }
@@ -177,8 +178,9 @@
                             container;
                         LdapMessagePOJO      ldapMessage          =
                             ldapMessageContainer.getLdapMessage();
-                        BindResponsePOJO     bindResponse         = ldapMessage.getBindResponse();
-                        LdapResultPOJO       ldapResult           = bindResponse.getLdapResult();
+                        ResponsePOJO         response             = ( ResponsePOJO )
+                            ldapMessage.getProtocolOp();
+                        LdapResultPOJO       ldapResult           = response.getLdapResult();
 
                         // We don't have to allocate a LdapResultPOJO first.
 
@@ -268,13 +270,14 @@
                             container;
                         LdapMessagePOJO      ldapMessage          =
                             ldapMessageContainer.getLdapMessage();
-                        BindResponsePOJO     bindResponse         = ldapMessage.getBindResponse();
-                        LdapResultPOJO       ldapResult           = bindResponse.getLdapResult();
+                        ResponsePOJO         response             = ( ResponsePOJO )
+                            ldapMessage.getProtocolOp();
+                        LdapResultPOJO       ldapResult           = response.getLdapResult();
 
                         TLV                  tlv                  =
                             ldapMessageContainer.getCurrentTLV();
 
-                        checkLength( bindResponse, tlv );
+                        checkLength( response, tlv );
 
                         // We have to handle the special case of a 0 length matched DN
                         if ( tlv.getLength().getLength() == 0 )
@@ -301,8 +304,9 @@
                             container;
                         LdapMessagePOJO      ldapMessage          =
                             ldapMessageContainer.getLdapMessage();
-                        BindResponsePOJO     bindResponse         = ldapMessage.getBindResponse();
-                        LdapResultPOJO       ldapResult           = bindResponse.getLdapResult();
+                        ResponsePOJO         response             = ( ResponsePOJO )
+                            ldapMessage.getProtocolOp();
+                        LdapResultPOJO       ldapResult           = response.getLdapResult();
 
                         // Get the Value and store it in the BindResponse
                         TLV           tlv       = ldapMessageContainer.getCurrentTLV();
@@ -340,13 +344,14 @@
                             container;
                         LdapMessagePOJO      ldapMessage          =
                             ldapMessageContainer.getLdapMessage();
-                        BindResponsePOJO     bindResponse         = ldapMessage.getBindResponse();
-                        LdapResultPOJO       ldapResult           = bindResponse.getLdapResult();
+                        ResponsePOJO         response             = ( ResponsePOJO )
+                            ldapMessage.getProtocolOp();
+                        LdapResultPOJO       ldapResult           = response.getLdapResult();
 
                         TLV                  tlv                  =
                             ldapMessageContainer.getCurrentTLV();
 
-                        checkLength( bindResponse, tlv );
+                        checkLength( response, tlv );
 
                         // We have to handle the special case of a 0 length error message
                         if ( tlv.getLength().getLength() == 0 )
@@ -372,8 +377,9 @@
                             container;
                         LdapMessagePOJO      ldapMessage          =
                             ldapMessageContainer.getLdapMessage();
-                        BindResponsePOJO     bindResponse         = ldapMessage.getBindResponse();
-                        LdapResultPOJO       ldapResult           = bindResponse.getLdapResult();
+                        ResponsePOJO         response             = ( ResponsePOJO )
+                            ldapMessage.getProtocolOp();
+                        LdapResultPOJO       ldapResult           = response.getLdapResult();
 
                         // Get the Value and store it in the BindResponse
                         TLV           tlv          = ldapMessageContainer.getCurrentTLV();
@@ -426,13 +432,14 @@
                             container;
                         LdapMessagePOJO      ldapMessage          =
                             ldapMessageContainer.getLdapMessage();
-                        BindResponsePOJO     bindResponse         = ldapMessage.getBindResponse();
-                        LdapResultPOJO       ldapResult           = bindResponse.getLdapResult();
+                        ResponsePOJO         response             = ( ResponsePOJO )
+                            ldapMessage.getProtocolOp();
+                        LdapResultPOJO       ldapResult           = response.getLdapResult();
 
                         TLV                  tlv                  =
                             ldapMessageContainer.getCurrentTLV();
 
-                        checkLength( bindResponse, tlv );
+                        checkLength( response, tlv );
 
                         // We will use the LdapString POJO to check the expected length of
the following
                         // referrals. This is quite a trick, but as this POJO's expected
length is never
@@ -448,8 +455,8 @@
         // This is a SEQUENCE, we will have at least one referral, but may be many.
         // As this is the tag, we don't have anything to do.
         super.transitions[LdapStatesEnum.LDAP_RESULT_REFERRAL_TAG][0x04] = new GrammarTransition(
-                LdapStatesEnum.LDAP_RESULT_REFERRAL_TAG, LdapStatesEnum.LDAP_RESULT_REFERRAL_LENGTH,
-                null );
+                LdapStatesEnum.LDAP_RESULT_REFERRAL_TAG,
+                LdapStatesEnum.LDAP_RESULT_REFERRAL_LENGTH, null );
 
         // Referral ::= SEQUENCE OF LDAPURL (Length)
         // This is a SEQUENCE, we will have at least one referral, but may be many.
@@ -467,8 +474,9 @@
                             container;
                         LdapMessagePOJO      ldapMessage          =
                             ldapMessageContainer.getLdapMessage();
-                        BindResponsePOJO     bindResponse         = ldapMessage.getBindResponse();
-                        LdapResultPOJO       ldapResult           = bindResponse.getLdapResult();
+                        ResponsePOJO         response             = ( ResponsePOJO )
+                            ldapMessage.getProtocolOp();
+                        LdapResultPOJO       ldapResult           = response.getLdapResult();
 
                         TLV                  tlv                  =
                             ldapMessageContainer.getCurrentTLV();
@@ -501,8 +509,9 @@
                             container;
                         LdapMessagePOJO      ldapMessage          =
                             ldapMessageContainer.getLdapMessage();
-                        BindResponsePOJO     bindResponse         = ldapMessage.getBindResponse();
-                        LdapResultPOJO       ldapResult           = bindResponse.getLdapResult();
+                        ResponsePOJO         response             = ( ResponsePOJO )
+                            ldapMessage.getProtocolOp();
+                        LdapResultPOJO       ldapResult           = response.getLdapResult();
 
                         TLV                  tlv                  =
                             ldapMessageContainer.getCurrentTLV();



Mime
View raw message