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/03 10:04:21 UTC
svn commit: r365584 [4/5] - in /directory/trunk: apacheds-server-main/
apacheds/xdocs/users/ ldap-common/src/main/java/org/apache/asn1new/ldap/
ldap-common/src/main/java/org/apache/asn1new/ldap/codec/
ldap-common/src/main/java/org/apache/asn1new/ldap/c...
Copied: directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/ExtendedResponse.java (from r365566, directory/trunk/ldap-common/src/main/java/org/apache/asn1new/ldap/pojo/ExtendedResponse.java)
URL: http://svn.apache.org/viewcvs/directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/ExtendedResponse.java?p2=directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/ExtendedResponse.java&p1=directory/trunk/ldap-common/src/main/java/org/apache/asn1new/ldap/pojo/ExtendedResponse.java&r1=365566&r2=365584&rev=365584&view=diff
==============================================================================
--- directory/trunk/ldap-common/src/main/java/org/apache/asn1new/ldap/pojo/ExtendedResponse.java (original)
+++ directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/ExtendedResponse.java Tue Jan 3 01:02:13 2006
@@ -14,15 +14,15 @@
* limitations under the License.
*
*/
-package org.apache.asn1new.ldap.pojo;
+package org.apache.ldap.common.asn1.pojo;
import java.nio.BufferOverflowException;
import java.nio.ByteBuffer;
import org.apache.asn1.codec.EncoderException;
-import org.apache.asn1new.ber.tlv.Length;
-import org.apache.asn1new.primitives.OID;
-import org.apache.asn1new.ldap.codec.LdapConstants;
+import org.apache.asn1.primitives.OID;
+import org.apache.asn1.ber.tlv.Length;
+import org.apache.ldap.common.asn1.codec.LdapConstants;
import org.apache.ldap.common.util.StringTools;
@@ -44,7 +44,7 @@
/** The response */
private Object response;
-
+
/** The extended response length */
private transient int extendedResponseLength;
@@ -83,7 +83,7 @@
/**
* Set the extended response name
*
- * @param name The name to set.
+ * @param responseName The name to set.
*/
public void setResponseName( OID responseName )
{
@@ -142,7 +142,7 @@
{
if ( response instanceof String )
{
- int responseLength = StringTools.getBytesUtf8( (String)response ).length;
+ int responseLength = StringTools.getBytesUtf8( (String)response ).length;
extendedResponseLength += 1 + Length.getNbBytes( responseLength ) + responseLength;
}
else
@@ -174,21 +174,21 @@
throw new EncoderException("Cannot put a PDU in a null buffer !");
}
- try
+ try
{
// The BindResponse Tag
buffer.put( LdapConstants.EXTENDED_RESPONSE_TAG );
buffer.put( Length.getBytes( extendedResponseLength ) );
-
+
// The LdapResult
super.encode(buffer);
// The responseName, if any
if ( responseName != null )
{
- buffer.put( (byte)LdapConstants.EXTENDED_RESPONSE_RESPONSE_NAME_TAG );
+ buffer.put( (byte) LdapConstants.EXTENDED_RESPONSE_RESPONSE_NAME_TAG );
buffer.put( Length.getBytes( responseName.getOIDLength() ) );
-
+
if ( responseName.getOIDLength() != 0 )
{
buffer.put( responseName.getOID() );
@@ -199,12 +199,12 @@
if ( response != null )
{
buffer.put( (byte)LdapConstants.EXTENDED_RESPONSE_RESPONSE_TAG );
-
+
if ( response instanceof String )
{
byte[] responseBytes = StringTools.getBytesUtf8( (String)response );
buffer.put( Length.getBytes( responseBytes.length ) );
-
+
if ( responseBytes.length != 0 )
{
buffer.put( responseBytes );
@@ -213,7 +213,7 @@
else
{
buffer.put( Length.getBytes( ( (byte[])response).length ) );
-
+
if ( ( (byte[])response).length != 0 )
{
buffer.put( (byte[])response );
@@ -223,9 +223,9 @@
}
catch ( BufferOverflowException boe )
{
- throw new EncoderException("The PDU buffer size is too small !");
+ throw new EncoderException("The PDU buffer size is too small !");
}
-
+
return buffer;
}
Propchange: directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/ExtendedResponse.java
------------------------------------------------------------------------------
svn:eol-style = native
Copied: directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/LdapAuthentication.java (from r365566, directory/trunk/ldap-common/src/main/java/org/apache/asn1new/ldap/pojo/LdapAuthentication.java)
URL: http://svn.apache.org/viewcvs/directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/LdapAuthentication.java?p2=directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/LdapAuthentication.java&p1=directory/trunk/ldap-common/src/main/java/org/apache/asn1new/ldap/pojo/LdapAuthentication.java&r1=365566&r2=365584&rev=365584&view=diff
==============================================================================
--- directory/trunk/ldap-common/src/main/java/org/apache/asn1new/ldap/pojo/LdapAuthentication.java (original)
+++ directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/LdapAuthentication.java Tue Jan 3 01:02:13 2006
@@ -14,9 +14,10 @@
* limitations under the License.
*
*/
-package org.apache.asn1new.ldap.pojo;
+package org.apache.ldap.common.asn1.pojo;
+
+import org.apache.asn1.Asn1Object;
-import org.apache.asn1new.Asn1Object;
/**
* This abstract class is just used to have a common super class for
Propchange: directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/LdapAuthentication.java
------------------------------------------------------------------------------
svn:eol-style = native
Copied: directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/LdapMessage.java (from r365566, directory/trunk/ldap-common/src/main/java/org/apache/asn1new/ldap/pojo/LdapMessage.java)
URL: http://svn.apache.org/viewcvs/directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/LdapMessage.java?p2=directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/LdapMessage.java&p1=directory/trunk/ldap-common/src/main/java/org/apache/asn1new/ldap/pojo/LdapMessage.java&r1=365566&r2=365584&rev=365584&view=diff
==============================================================================
--- directory/trunk/ldap-common/src/main/java/org/apache/asn1new/ldap/pojo/LdapMessage.java (original)
+++ directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/LdapMessage.java Tue Jan 3 01:02:13 2006
@@ -14,14 +14,14 @@
* limitations under the License.
*
*/
-package org.apache.asn1new.ldap.pojo;
+package org.apache.ldap.common.asn1.pojo;
-import org.apache.asn1new.Asn1Object;
import org.apache.asn1.codec.EncoderException;
-import org.apache.asn1new.ber.tlv.Length;
-import org.apache.asn1new.ber.tlv.UniversalTag;
-import org.apache.asn1new.ber.tlv.Value;
-import org.apache.asn1new.ldap.codec.LdapConstants;
+import org.apache.asn1.Asn1Object;
+import org.apache.asn1.ber.tlv.Value;
+import org.apache.asn1.ber.tlv.Length;
+import org.apache.asn1.ber.tlv.UniversalTag;
+import org.apache.ldap.common.asn1.codec.LdapConstants;
import java.nio.BufferOverflowException;
import java.nio.ByteBuffer;
@@ -47,16 +47,16 @@
/** The controls */
private ArrayList controls;
-
+
/** The current control */
private transient Control currentControl;
-
+
/** The LdapMessage length */
private transient int ldapMessageLength;
-
+
/** The controls length */
private transient int controlsLength;
-
+
/** The controls sequence length */
private transient int controlsSequenceLength;
@@ -448,7 +448,7 @@
// - the length of the Id length, 1 byte
// - the Id length, 1 to 4 bytes
ldapMessageLength = 1 + 1 + Value.getNbBytes(messageId);
-
+
// Get the protocolOp length
int protocolOpLength = protocolOp.computeLength();
@@ -478,25 +478,25 @@
// LdapMessageLength = LdapMessageLength + Length(0x90)
// + Length(L3) + L3
controlsSequenceLength = 0;
-
+
Iterator controlIterator = controls.iterator();
-
+
// We may have more than one control. ControlsLength is L4.
while (controlIterator.hasNext())
{
controlsSequenceLength += ((Control)controlIterator.next()).computeLength();
}
-
+
// Computes the controls length
controlsLength = controlsSequenceLength; //1 + Length.getNbBytes( controlsSequenceLength ) + controlsSequenceLength;
-
+
// Now, add the tag and the length of the controls length
ldapMessageLength += 1 + Length.getNbBytes( controlsSequenceLength ) + controlsSequenceLength;
}
-
+
// finally, calculate the global message size :
// length(Tag) + Length(length) + length
-
+
return 1 + ldapMessageLength + Length.getNbBytes(ldapMessageLength);
}
@@ -519,7 +519,7 @@
*
* LdapMessageLength = Length(0x30) + Length(L1) + L1
*
- * @param object The encoded PDU
+ * @param buffer The encoded PDU
* @return A ByteBuffer that contaons the PDU
* @throws EncoderException If anything goes wrong.
*/
@@ -528,26 +528,26 @@
// Allocate the bytes buffer.
ByteBuffer bb = ByteBuffer.allocate( computeLength() );
- try
+ try
{
// The LdapMessage Sequence
bb.put( UniversalTag.SEQUENCE_TAG );
-
+
// The length has been calculated by the computeLength method
bb.put( Length.getBytes( ldapMessageLength ) );
}
catch ( BufferOverflowException boe )
{
- throw new EncoderException("The PDU buffer size is too small !");
+ throw new EncoderException("The PDU buffer size is too small !");
}
-
-
+
+
// The message Id
Value.encode( bb, messageId);
-
+
// Add the protocolOp part
protocolOp.encode(bb);
-
+
// Do the same thing for Controls, if any.
if (controls != null)
{
@@ -561,7 +561,7 @@
// Encode each control
Iterator controlIterator = controls.iterator();
-
+
while (controlIterator.hasNext())
{
((Control)controlIterator.next()).encode( bb );
Propchange: directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/LdapMessage.java
------------------------------------------------------------------------------
svn:eol-style = native
Copied: directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/LdapResponse.java (from r365566, directory/trunk/ldap-common/src/main/java/org/apache/asn1new/ldap/pojo/LdapResponse.java)
URL: http://svn.apache.org/viewcvs/directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/LdapResponse.java?p2=directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/LdapResponse.java&p1=directory/trunk/ldap-common/src/main/java/org/apache/asn1new/ldap/pojo/LdapResponse.java&r1=365566&r2=365584&rev=365584&view=diff
==============================================================================
--- directory/trunk/ldap-common/src/main/java/org/apache/asn1new/ldap/pojo/LdapResponse.java (original)
+++ directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/LdapResponse.java Tue Jan 3 01:02:13 2006
@@ -14,11 +14,12 @@
* limitations under the License.
*
*/
-package org.apache.asn1new.ldap.pojo;
+package org.apache.ldap.common.asn1.pojo;
import java.nio.ByteBuffer;
import org.apache.asn1.codec.EncoderException;
+import org.apache.ldap.common.asn1.pojo.LdapMessage;
/**
@@ -32,7 +33,7 @@
/** The LdapResult element */
private LdapResult ldapResult;
-
+
/** The response length */
private transient int ldapResponseLength;
@@ -67,7 +68,7 @@
{
this.ldapResult = ldapResult;
}
-
+
/**
* @return Returns the ldapResponseLength.
*/
@@ -75,7 +76,7 @@
{
return ldapResponseLength;
}
-
+
/**
* Compute the LdapResponse length
*
@@ -86,10 +87,10 @@
public int computeLength()
{
ldapResponseLength = ldapResult.computeLength();
-
+
return ldapResponseLength;
}
-
+
/**
* Encode the AddResponse message to a PDU.
*
@@ -102,10 +103,10 @@
{
throw new EncoderException("Cannot put a PDU in a null buffer !");
}
-
+
// The ldapResult
ldapResult.encode( buffer );
-
+
// The ldapResult
return buffer;
}
Propchange: directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/LdapResponse.java
------------------------------------------------------------------------------
svn:eol-style = native
Copied: directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/LdapResult.java (from r365566, directory/trunk/ldap-common/src/main/java/org/apache/asn1new/ldap/pojo/LdapResult.java)
URL: http://svn.apache.org/viewcvs/directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/LdapResult.java?p2=directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/LdapResult.java&p1=directory/trunk/ldap-common/src/main/java/org/apache/asn1new/ldap/pojo/LdapResult.java&r1=365566&r2=365584&rev=365584&view=diff
==============================================================================
--- directory/trunk/ldap-common/src/main/java/org/apache/asn1new/ldap/pojo/LdapResult.java (original)
+++ directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/LdapResult.java Tue Jan 3 01:02:13 2006
@@ -14,18 +14,18 @@
* limitations under the License.
*
*/
-package org.apache.asn1new.ldap.pojo;
+package org.apache.ldap.common.asn1.pojo;
-import org.apache.asn1new.Asn1Object;
import org.apache.asn1.codec.EncoderException;
-import org.apache.asn1new.ber.tlv.Length;
-import org.apache.asn1new.ber.tlv.UniversalTag;
-import org.apache.asn1new.ber.tlv.Value;
-import org.apache.asn1new.ldap.codec.LdapConstants;
-import org.apache.asn1new.ldap.codec.primitives.LdapDN;
-import org.apache.asn1new.ldap.codec.primitives.LdapString;
-import org.apache.asn1new.ldap.codec.primitives.LdapURL;
-import org.apache.asn1new.ldap.codec.utils.LdapResultEnum;
+import org.apache.asn1.Asn1Object;
+import org.apache.asn1.ber.tlv.Length;
+import org.apache.asn1.ber.tlv.Value;
+import org.apache.asn1.ber.tlv.UniversalTag;
+import org.apache.ldap.common.asn1.codec.LdapConstants;
+import org.apache.ldap.common.asn1.codec.utils.LdapResultEnum;
+import org.apache.ldap.common.asn1.codec.primitives.LdapDN;
+import org.apache.ldap.common.asn1.codec.primitives.LdapString;
+import org.apache.ldap.common.asn1.codec.primitives.LdapURL;
import java.nio.BufferOverflowException;
import java.nio.ByteBuffer;
@@ -270,7 +270,7 @@
throw new EncoderException( "Cannot put a PDU in a null buffer !" );
}
- try
+ try
{
// The result code
buffer.put( UniversalTag.ENUMERATED_TAG );
@@ -279,7 +279,7 @@
}
catch ( BufferOverflowException boe )
{
- throw new EncoderException("The PDU buffer size is too small !");
+ throw new EncoderException("The PDU buffer size is too small !");
}
// The matchedDN
@@ -557,7 +557,7 @@
case LdapResultEnum.RESERVED_FOR_APIS_90 :
sb.append( " -- 81-90 reserved for APIs --" );
break;
-
+
default :
sb.append( "Unknown error code : " ).append( resultCode );
}
Propchange: directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/LdapResult.java
------------------------------------------------------------------------------
svn:eol-style = native
Copied: directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/ModifyDNRequest.java (from r365566, directory/trunk/ldap-common/src/main/java/org/apache/asn1new/ldap/pojo/ModifyDNRequest.java)
URL: http://svn.apache.org/viewcvs/directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/ModifyDNRequest.java?p2=directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/ModifyDNRequest.java&p1=directory/trunk/ldap-common/src/main/java/org/apache/asn1new/ldap/pojo/ModifyDNRequest.java&r1=365566&r2=365584&rev=365584&view=diff
==============================================================================
--- directory/trunk/ldap-common/src/main/java/org/apache/asn1new/ldap/pojo/ModifyDNRequest.java (original)
+++ directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/ModifyDNRequest.java Tue Jan 3 01:02:13 2006
@@ -14,17 +14,19 @@
* limitations under the License.
*
*/
-package org.apache.asn1new.ldap.pojo;
+package org.apache.ldap.common.asn1.pojo;
import java.nio.BufferOverflowException;
import java.nio.ByteBuffer;
import org.apache.asn1.codec.EncoderException;
-import org.apache.asn1new.ber.tlv.Length;
-import org.apache.asn1new.ber.tlv.Value;
-import org.apache.asn1new.ldap.codec.LdapConstants;
-import org.apache.asn1new.ldap.codec.primitives.LdapDN;
-import org.apache.asn1new.ldap.codec.primitives.LdapRDN;
+import org.apache.asn1.ber.tlv.Length;
+import org.apache.asn1.ber.tlv.Value;
+import org.apache.ldap.common.asn1.codec.LdapConstants;
+import org.apache.ldap.common.asn1.codec.primitives.LdapDN;
+import org.apache.ldap.common.asn1.codec.primitives.LdapRDN;
+import org.apache.ldap.common.asn1.pojo.LdapMessage;
+
/**
* A ModifyDNRequest Message. Its syntax is :
@@ -51,7 +53,7 @@
/** The optional superior, which will be concatened to the newRdn */
private LdapDN newSuperior;
-
+
/** The modify DN request length */
private transient int modifyDNRequestLength;
@@ -213,7 +215,7 @@
throw new EncoderException( "Cannot put a PDU in a null buffer !" );
}
- try
+ try
{
// The ModifyDNRequest Tag
buffer.put( LdapConstants.MODIFY_DN_REQUEST_TAG );
@@ -221,20 +223,20 @@
// The entry
Value.encode( buffer, entry.getBytes() );
-
+
// The newRDN
Value.encode( buffer, newRDN.getBytes() );
-
+
// The flag deleteOldRdn
Value.encode( buffer, deleteOldRDN );
-
+
// The new superior, if any
if ( newSuperior != null )
{
// Encode the reference
- buffer.put( (byte)LdapConstants.MODIFY_DN_REQUEST_NEW_SUPERIOR_TAG );
+ buffer.put( (byte) LdapConstants.MODIFY_DN_REQUEST_NEW_SUPERIOR_TAG );
buffer.put( Length.getBytes( newSuperior.getNbBytes() ) );
-
+
if ( newSuperior.getNbBytes() != 0 )
{
buffer.put( newSuperior.getBytes() );
@@ -243,7 +245,7 @@
}
catch ( BufferOverflowException boe )
{
- throw new EncoderException("The PDU buffer size is too small !");
+ throw new EncoderException("The PDU buffer size is too small !");
}
return buffer;
Propchange: directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/ModifyDNRequest.java
------------------------------------------------------------------------------
svn:eol-style = native
Copied: directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/ModifyDNResponse.java (from r365566, directory/trunk/ldap-common/src/main/java/org/apache/asn1new/ldap/pojo/ModifyDNResponse.java)
URL: http://svn.apache.org/viewcvs/directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/ModifyDNResponse.java?p2=directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/ModifyDNResponse.java&p1=directory/trunk/ldap-common/src/main/java/org/apache/asn1new/ldap/pojo/ModifyDNResponse.java&r1=365566&r2=365584&rev=365584&view=diff
==============================================================================
--- directory/trunk/ldap-common/src/main/java/org/apache/asn1new/ldap/pojo/ModifyDNResponse.java (original)
+++ directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/ModifyDNResponse.java Tue Jan 3 01:02:13 2006
@@ -14,14 +14,15 @@
* limitations under the License.
*
*/
-package org.apache.asn1new.ldap.pojo;
+package org.apache.ldap.common.asn1.pojo;
import java.nio.BufferOverflowException;
import java.nio.ByteBuffer;
import org.apache.asn1.codec.EncoderException;
-import org.apache.asn1new.ber.tlv.Length;
-import org.apache.asn1new.ldap.codec.LdapConstants;
+import org.apache.asn1.ber.tlv.Length;
+import org.apache.ldap.common.asn1.codec.LdapConstants;
+
/**
* An ModifyDNResponse Message. Its syntax is :
@@ -67,7 +68,7 @@
public int computeLength()
{
int ldapResponseLength = super.computeLength();
-
+
return 1 + Length.getNbBytes( ldapResponseLength ) + ldapResponseLength;
}
@@ -83,7 +84,7 @@
{
throw new EncoderException("Cannot put a PDU in a null buffer !");
}
-
+
try
{
// The tag
@@ -92,9 +93,9 @@
}
catch ( BufferOverflowException boe )
{
- throw new EncoderException("The PDU buffer size is too small !");
+ throw new EncoderException("The PDU buffer size is too small !");
}
-
+
// The ldapResult
return super.encode( buffer);
}
Propchange: directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/ModifyDNResponse.java
------------------------------------------------------------------------------
svn:eol-style = native
Copied: directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/ModifyRequest.java (from r365566, directory/trunk/ldap-common/src/main/java/org/apache/asn1new/ldap/pojo/ModifyRequest.java)
URL: http://svn.apache.org/viewcvs/directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/ModifyRequest.java?p2=directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/ModifyRequest.java&p1=directory/trunk/ldap-common/src/main/java/org/apache/asn1new/ldap/pojo/ModifyRequest.java&r1=365566&r2=365584&rev=365584&view=diff
==============================================================================
--- directory/trunk/ldap-common/src/main/java/org/apache/asn1new/ldap/pojo/ModifyRequest.java (original)
+++ directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/ModifyRequest.java Tue Jan 3 01:02:13 2006
@@ -14,15 +14,15 @@
* limitations under the License.
*
*/
-package org.apache.asn1new.ldap.pojo;
+package org.apache.ldap.common.asn1.pojo;
import org.apache.asn1.codec.EncoderException;
-import org.apache.asn1new.ber.tlv.Length;
-import org.apache.asn1new.ber.tlv.UniversalTag;
-import org.apache.asn1new.ber.tlv.Value;
-import org.apache.asn1new.ldap.codec.LdapConstants;
-import org.apache.asn1new.ldap.codec.primitives.LdapDN;
-import org.apache.asn1new.ldap.codec.primitives.LdapString;
+import org.apache.asn1.ber.tlv.Length;
+import org.apache.asn1.ber.tlv.UniversalTag;
+import org.apache.asn1.ber.tlv.Value;
+import org.apache.ldap.common.asn1.codec.LdapConstants;
+import org.apache.ldap.common.asn1.codec.primitives.LdapDN;
+import org.apache.ldap.common.asn1.codec.primitives.LdapString;
import org.apache.ldap.common.util.StringTools;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -195,8 +195,6 @@
/**
* Return the current attribute's type
- *
- * @param value The current attribute's type
*/
public String getCurrentAttributeType()
{
Propchange: directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/ModifyRequest.java
------------------------------------------------------------------------------
svn:eol-style = native
Copied: directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/ModifyResponse.java (from r365566, directory/trunk/ldap-common/src/main/java/org/apache/asn1new/ldap/pojo/ModifyResponse.java)
URL: http://svn.apache.org/viewcvs/directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/ModifyResponse.java?p2=directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/ModifyResponse.java&p1=directory/trunk/ldap-common/src/main/java/org/apache/asn1new/ldap/pojo/ModifyResponse.java&r1=365566&r2=365584&rev=365584&view=diff
==============================================================================
--- directory/trunk/ldap-common/src/main/java/org/apache/asn1new/ldap/pojo/ModifyResponse.java (original)
+++ directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/ModifyResponse.java Tue Jan 3 01:02:13 2006
@@ -14,14 +14,15 @@
* limitations under the License.
*
*/
-package org.apache.asn1new.ldap.pojo;
+package org.apache.ldap.common.asn1.pojo;
import java.nio.BufferOverflowException;
import java.nio.ByteBuffer;
import org.apache.asn1.codec.EncoderException;
-import org.apache.asn1new.ber.tlv.Length;
-import org.apache.asn1new.ldap.codec.LdapConstants;
+import org.apache.asn1.ber.tlv.Length;
+import org.apache.ldap.common.asn1.codec.LdapConstants;
+
/**
* An ModifyResponse Message. Its syntax is :
@@ -67,7 +68,7 @@
public int computeLength()
{
int ldapResponseLength = super.computeLength();
-
+
return 1 + Length.getNbBytes( ldapResponseLength ) + ldapResponseLength;
}
@@ -83,7 +84,7 @@
{
throw new EncoderException("Cannot put a PDU in a null buffer !");
}
-
+
try
{
// The tag
@@ -92,9 +93,9 @@
}
catch ( BufferOverflowException boe )
{
- throw new EncoderException("The PDU buffer size is too small !");
+ throw new EncoderException("The PDU buffer size is too small !");
}
-
+
// The ldapResult
return super.encode( buffer);
}
Propchange: directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/ModifyResponse.java
------------------------------------------------------------------------------
svn:eol-style = native
Copied: directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/SaslCredentials.java (from r365566, directory/trunk/ldap-common/src/main/java/org/apache/asn1new/ldap/pojo/SaslCredentials.java)
URL: http://svn.apache.org/viewcvs/directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/SaslCredentials.java?p2=directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/SaslCredentials.java&p1=directory/trunk/ldap-common/src/main/java/org/apache/asn1new/ldap/pojo/SaslCredentials.java&r1=365566&r2=365584&rev=365584&view=diff
==============================================================================
--- directory/trunk/ldap-common/src/main/java/org/apache/asn1new/ldap/pojo/SaslCredentials.java (original)
+++ directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/SaslCredentials.java Tue Jan 3 01:02:13 2006
@@ -14,16 +14,16 @@
* limitations under the License.
*
*/
-package org.apache.asn1new.ldap.pojo;
+package org.apache.ldap.common.asn1.pojo;
import java.nio.BufferOverflowException;
import java.nio.ByteBuffer;
import org.apache.asn1.codec.EncoderException;
-import org.apache.asn1new.ber.tlv.Length;
-import org.apache.asn1new.ber.tlv.Value;
-import org.apache.asn1new.ldap.codec.LdapConstants;
-import org.apache.asn1new.ldap.codec.primitives.LdapString;
+import org.apache.asn1.ber.tlv.Length;
+import org.apache.asn1.ber.tlv.Value;
+import org.apache.ldap.common.asn1.codec.LdapConstants;
+import org.apache.ldap.common.asn1.codec.primitives.LdapString;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -147,7 +147,7 @@
try
{
// The saslAuthentication Tag
- buffer.put( (byte)LdapConstants.BIND_REQUEST_SASL_TAG );
+ buffer.put( (byte) LdapConstants.BIND_REQUEST_SASL_TAG );
buffer.put( Length.getBytes( mechanism.getNbBytes() ) ) ;
buffer.put( mechanism.getBytes() ) ;
Propchange: directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/SaslCredentials.java
------------------------------------------------------------------------------
svn:eol-style = native
Copied: directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/SearchRequest.java (from r365566, directory/trunk/ldap-common/src/main/java/org/apache/asn1new/ldap/pojo/SearchRequest.java)
URL: http://svn.apache.org/viewcvs/directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/SearchRequest.java?p2=directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/SearchRequest.java&p1=directory/trunk/ldap-common/src/main/java/org/apache/asn1new/ldap/pojo/SearchRequest.java&r1=365566&r2=365584&rev=365584&view=diff
==============================================================================
--- directory/trunk/ldap-common/src/main/java/org/apache/asn1new/ldap/pojo/SearchRequest.java (original)
+++ directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/SearchRequest.java Tue Jan 3 01:02:13 2006
@@ -14,16 +14,16 @@
* limitations under the License.
*
*/
-package org.apache.asn1new.ldap.pojo;
+package org.apache.ldap.common.asn1.pojo;
import org.apache.asn1.codec.EncoderException;
-import org.apache.asn1new.ber.tlv.Length;
-import org.apache.asn1new.ber.tlv.UniversalTag;
-import org.apache.asn1new.ber.tlv.Value;
-import org.apache.asn1new.ldap.codec.LdapConstants;
-import org.apache.asn1new.ldap.codec.primitives.LdapDN;
-import org.apache.asn1new.ldap.codec.primitives.LdapString;
-import org.apache.asn1new.ldap.pojo.filters.Filter;
+import org.apache.asn1.ber.tlv.Length;
+import org.apache.asn1.ber.tlv.Value;
+import org.apache.asn1.ber.tlv.UniversalTag;
+import org.apache.ldap.common.asn1.codec.LdapConstants;
+import org.apache.ldap.common.asn1.codec.primitives.LdapDN;
+import org.apache.ldap.common.asn1.codec.primitives.LdapString;
+import org.apache.ldap.common.asn1.pojo.filters.Filter;
import org.apache.ldap.common.util.StringTools;
import java.io.UnsupportedEncodingException;
Propchange: directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/SearchRequest.java
------------------------------------------------------------------------------
svn:eol-style = native
Copied: directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/SearchResultDone.java (from r365566, directory/trunk/ldap-common/src/main/java/org/apache/asn1new/ldap/pojo/SearchResultDone.java)
URL: http://svn.apache.org/viewcvs/directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/SearchResultDone.java?p2=directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/SearchResultDone.java&p1=directory/trunk/ldap-common/src/main/java/org/apache/asn1new/ldap/pojo/SearchResultDone.java&r1=365566&r2=365584&rev=365584&view=diff
==============================================================================
--- directory/trunk/ldap-common/src/main/java/org/apache/asn1new/ldap/pojo/SearchResultDone.java (original)
+++ directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/SearchResultDone.java Tue Jan 3 01:02:13 2006
@@ -14,14 +14,15 @@
* limitations under the License.
*
*/
-package org.apache.asn1new.ldap.pojo;
+package org.apache.ldap.common.asn1.pojo;
import java.nio.BufferOverflowException;
import java.nio.ByteBuffer;
import org.apache.asn1.codec.EncoderException;
-import org.apache.asn1new.ber.tlv.Length;
-import org.apache.asn1new.ldap.codec.LdapConstants;
+import org.apache.asn1.ber.tlv.Length;
+import org.apache.ldap.common.asn1.codec.LdapConstants;
+
/**
* A SearchResultDone Message. Its syntax is :
@@ -69,10 +70,10 @@
public int computeLength()
{
int ldapResponseLength = super.computeLength();
-
+
return 1 + Length.getNbBytes( ldapResponseLength ) + ldapResponseLength;
}
-
+
/**
* Encode the SearchResultDone message to a PDU.
*
@@ -85,7 +86,7 @@
{
throw new EncoderException("Cannot put a PDU in a null buffer !");
}
-
+
try
{
// The tag
@@ -94,13 +95,13 @@
}
catch ( BufferOverflowException boe )
{
- throw new EncoderException("The PDU buffer size is too small !");
+ throw new EncoderException("The PDU buffer size is too small !");
}
-
+
// The ldapResult
return super.encode( buffer);
}
-
+
/**
* Get a String representation of a SearchResultDone
*
Propchange: directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/SearchResultDone.java
------------------------------------------------------------------------------
svn:eol-style = native
Copied: directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/SearchResultEntry.java (from r365566, directory/trunk/ldap-common/src/main/java/org/apache/asn1new/ldap/pojo/SearchResultEntry.java)
URL: http://svn.apache.org/viewcvs/directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/SearchResultEntry.java?p2=directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/SearchResultEntry.java&p1=directory/trunk/ldap-common/src/main/java/org/apache/asn1new/ldap/pojo/SearchResultEntry.java&r1=365566&r2=365584&rev=365584&view=diff
==============================================================================
--- directory/trunk/ldap-common/src/main/java/org/apache/asn1new/ldap/pojo/SearchResultEntry.java (original)
+++ directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/SearchResultEntry.java Tue Jan 3 01:02:13 2006
@@ -14,15 +14,15 @@
* limitations under the License.
*
*/
-package org.apache.asn1new.ldap.pojo;
+package org.apache.ldap.common.asn1.pojo;
import org.apache.asn1.codec.EncoderException;
-import org.apache.asn1new.ber.tlv.Length;
-import org.apache.asn1new.ber.tlv.UniversalTag;
-import org.apache.asn1new.ber.tlv.Value;
-import org.apache.asn1new.ldap.codec.LdapConstants;
-import org.apache.asn1new.ldap.codec.primitives.LdapDN;
-import org.apache.asn1new.ldap.codec.primitives.LdapString;
+import org.apache.asn1.ber.tlv.Length;
+import org.apache.asn1.ber.tlv.Value;
+import org.apache.asn1.ber.tlv.UniversalTag;
+import org.apache.ldap.common.asn1.codec.LdapConstants;
+import org.apache.ldap.common.asn1.codec.primitives.LdapDN;
+import org.apache.ldap.common.asn1.codec.primitives.LdapString;
import org.apache.ldap.common.util.AttributeUtils;
import org.apache.ldap.common.util.StringTools;
Propchange: directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/SearchResultEntry.java
------------------------------------------------------------------------------
svn:eol-style = native
Copied: directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/SearchResultReference.java (from r365566, directory/trunk/ldap-common/src/main/java/org/apache/asn1new/ldap/pojo/SearchResultReference.java)
URL: http://svn.apache.org/viewcvs/directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/SearchResultReference.java?p2=directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/SearchResultReference.java&p1=directory/trunk/ldap-common/src/main/java/org/apache/asn1new/ldap/pojo/SearchResultReference.java&r1=365566&r2=365584&rev=365584&view=diff
==============================================================================
--- directory/trunk/ldap-common/src/main/java/org/apache/asn1new/ldap/pojo/SearchResultReference.java (original)
+++ directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/SearchResultReference.java Tue Jan 3 01:02:13 2006
@@ -14,13 +14,13 @@
* limitations under the License.
*
*/
-package org.apache.asn1new.ldap.pojo;
+package org.apache.ldap.common.asn1.pojo;
import org.apache.asn1.codec.EncoderException;
-import org.apache.asn1new.ber.tlv.Length;
-import org.apache.asn1new.ber.tlv.Value;
-import org.apache.asn1new.ldap.codec.LdapConstants;
-import org.apache.asn1new.ldap.codec.primitives.LdapURL;
+import org.apache.asn1.ber.tlv.Length;
+import org.apache.asn1.ber.tlv.Value;
+import org.apache.ldap.common.asn1.codec.LdapConstants;
+import org.apache.ldap.common.asn1.codec.primitives.LdapURL;
import java.nio.BufferOverflowException;
import java.nio.ByteBuffer;
Propchange: directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/SearchResultReference.java
------------------------------------------------------------------------------
svn:eol-style = native
Copied: directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/SimpleAuthentication.java (from r365566, directory/trunk/ldap-common/src/main/java/org/apache/asn1new/ldap/pojo/SimpleAuthentication.java)
URL: http://svn.apache.org/viewcvs/directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/SimpleAuthentication.java?p2=directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/SimpleAuthentication.java&p1=directory/trunk/ldap-common/src/main/java/org/apache/asn1new/ldap/pojo/SimpleAuthentication.java&r1=365566&r2=365584&rev=365584&view=diff
==============================================================================
--- directory/trunk/ldap-common/src/main/java/org/apache/asn1new/ldap/pojo/SimpleAuthentication.java (original)
+++ directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/SimpleAuthentication.java Tue Jan 3 01:02:13 2006
@@ -14,14 +14,14 @@
* limitations under the License.
*
*/
-package org.apache.asn1new.ldap.pojo;
+package org.apache.ldap.common.asn1.pojo;
import java.nio.BufferOverflowException;
import java.nio.ByteBuffer;
import org.apache.asn1.codec.EncoderException;
-import org.apache.asn1new.ber.tlv.Length;
-import org.apache.asn1new.ldap.codec.LdapConstants;
+import org.apache.asn1.ber.tlv.Length;
+import org.apache.ldap.common.asn1.codec.LdapConstants;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -109,7 +109,7 @@
try
{
// The simpleAuthentication Tag
- buffer.put( (byte)LdapConstants.BIND_REQUEST_SIMPLE_TAG );
+ buffer.put( (byte) LdapConstants.BIND_REQUEST_SIMPLE_TAG );
buffer.put( Length.getBytes( simple.length ) ) ;
if ( simple.length != 0 )
Propchange: directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/SimpleAuthentication.java
------------------------------------------------------------------------------
svn:eol-style = native
Copied: directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/UnBindRequest.java (from r365566, directory/trunk/ldap-common/src/main/java/org/apache/asn1new/ldap/pojo/UnBindRequest.java)
URL: http://svn.apache.org/viewcvs/directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/UnBindRequest.java?p2=directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/UnBindRequest.java&p1=directory/trunk/ldap-common/src/main/java/org/apache/asn1new/ldap/pojo/UnBindRequest.java&r1=365566&r2=365584&rev=365584&view=diff
==============================================================================
--- directory/trunk/ldap-common/src/main/java/org/apache/asn1new/ldap/pojo/UnBindRequest.java (original)
+++ directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/UnBindRequest.java Tue Jan 3 01:02:13 2006
@@ -14,13 +14,15 @@
* limitations under the License.
*
*/
-package org.apache.asn1new.ldap.pojo;
+package org.apache.ldap.common.asn1.pojo;
import java.nio.BufferOverflowException;
import java.nio.ByteBuffer;
import org.apache.asn1.codec.EncoderException;
-import org.apache.asn1new.ldap.codec.LdapConstants;
+import org.apache.ldap.common.asn1.codec.LdapConstants;
+import org.apache.ldap.common.asn1.pojo.LdapMessage;
+
/**
* A UnBindRequest ldapObject. Its syntax is :
@@ -67,7 +69,7 @@
{
return 2; // Always 2
}
-
+
/**
* Encode the UnbindRequest message to a PDU.
*
@@ -80,20 +82,20 @@
{
throw new EncoderException("Cannot put a PDU in a null buffer !");
}
-
- try
+
+ try
{
// The tag
buffer.put(LdapConstants.UNBIND_REQUEST_TAG);
-
+
// The length is always null.
buffer.put( (byte)0 );
}
catch ( BufferOverflowException boe )
{
- throw new EncoderException("The PDU buffer size is too small !");
+ throw new EncoderException("The PDU buffer size is too small !");
}
-
+
return buffer;
}
Propchange: directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/UnBindRequest.java
------------------------------------------------------------------------------
svn:eol-style = native
Copied: directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/filters/AndFilter.java (from r365566, directory/trunk/ldap-common/src/main/java/org/apache/asn1new/ldap/pojo/filters/AndFilter.java)
URL: http://svn.apache.org/viewcvs/directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/filters/AndFilter.java?p2=directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/filters/AndFilter.java&p1=directory/trunk/ldap-common/src/main/java/org/apache/asn1new/ldap/pojo/filters/AndFilter.java&r1=365566&r2=365584&rev=365584&view=diff
==============================================================================
--- directory/trunk/ldap-common/src/main/java/org/apache/asn1new/ldap/pojo/filters/AndFilter.java (original)
+++ directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/filters/AndFilter.java Tue Jan 3 01:02:13 2006
@@ -14,15 +14,16 @@
* limitations under the License.
*
*/
-package org.apache.asn1new.ldap.pojo.filters;
+package org.apache.ldap.common.asn1.pojo.filters;
import java.nio.BufferOverflowException;
import java.nio.ByteBuffer;
import java.util.ArrayList;
import org.apache.asn1.codec.EncoderException;
-import org.apache.asn1new.ber.tlv.Length;
-import org.apache.asn1new.ldap.codec.LdapConstants;
+import org.apache.asn1.ber.tlv.Length;
+import org.apache.ldap.common.asn1.codec.LdapConstants;
+
/**
* And Filter Object to store the And filter.
@@ -40,7 +41,7 @@
{
super();
}
-
+
/**
* Get the AndFilter.
*
@@ -50,7 +51,7 @@
{
return filterSet;
}
-
+
/**
* Compute the AndFilter length
*
@@ -64,10 +65,10 @@
public int computeLength()
{
filtersLength = super.computeLength();
-
+
return 1 + Length.getNbBytes( filtersLength ) + filtersLength;
}
-
+
/**
* Encode the AndFilter message to a PDU.
*
@@ -88,17 +89,17 @@
throw new EncoderException("Cannot put a PDU in a null buffer !");
}
- try
+ try
{
// The AndFilter Tag
- buffer.put( (byte)LdapConstants.AND_FILTER_TAG );
+ buffer.put( (byte) LdapConstants.AND_FILTER_TAG );
buffer.put( Length.getBytes( filtersLength ) );
}
catch ( BufferOverflowException boe )
{
- throw new EncoderException("The PDU buffer size is too small !");
+ throw new EncoderException("The PDU buffer size is too small !");
}
-
+
super.encode( buffer );
return buffer;
@@ -112,9 +113,9 @@
public String toString()
{
StringBuffer sb = new StringBuffer();
-
+
sb.append('&').append(super.toString());
-
+
return sb.toString();
}
}
Propchange: directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/filters/AndFilter.java
------------------------------------------------------------------------------
svn:eol-style = native
Copied: directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/filters/AttributeValueAssertionFilter.java (from r365566, directory/trunk/ldap-common/src/main/java/org/apache/asn1new/ldap/pojo/filters/AttributeValueAssertionFilter.java)
URL: http://svn.apache.org/viewcvs/directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/filters/AttributeValueAssertionFilter.java?p2=directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/filters/AttributeValueAssertionFilter.java&p1=directory/trunk/ldap-common/src/main/java/org/apache/asn1new/ldap/pojo/filters/AttributeValueAssertionFilter.java&r1=365566&r2=365584&rev=365584&view=diff
==============================================================================
--- directory/trunk/ldap-common/src/main/java/org/apache/asn1new/ldap/pojo/filters/AttributeValueAssertionFilter.java (original)
+++ directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/filters/AttributeValueAssertionFilter.java Tue Jan 3 01:02:13 2006
@@ -14,16 +14,16 @@
* limitations under the License.
*
*/
-package org.apache.asn1new.ldap.pojo.filters;
+package org.apache.ldap.common.asn1.pojo.filters;
import java.nio.BufferOverflowException;
import java.nio.ByteBuffer;
import org.apache.asn1.codec.EncoderException;
-import org.apache.asn1new.ber.tlv.Length;
-import org.apache.asn1new.ber.tlv.Value;
-import org.apache.asn1new.ldap.codec.LdapConstants;
-import org.apache.asn1new.ldap.pojo.AttributeValueAssertion;
+import org.apache.asn1.ber.tlv.Length;
+import org.apache.asn1.ber.tlv.Value;
+import org.apache.ldap.common.asn1.codec.LdapConstants;
+import org.apache.ldap.common.asn1.pojo.AttributeValueAssertion;
import org.apache.ldap.common.util.StringTools;
@@ -41,7 +41,7 @@
/** The filter type */
private int filterType;
-
+
/** The attributeValueAssertion length */
private transient int avaLength;
@@ -123,14 +123,14 @@
{
avaLength = 0;
int attributeDescLength = assertion.getAttributeDesc().length();
-
+
avaLength = 1 + Length.getNbBytes( attributeDescLength ) + attributeDescLength;
-
+
Object assertionValue = assertion.getAssertionValue();
-
+
int assertionValueLength = 0;
-
- if ( assertionValue instanceof String )
+
+ if ( assertionValue instanceof String )
{
assertionValueLength = StringTools.getBytesUtf8( (String)assertionValue ).length;
}
@@ -138,12 +138,12 @@
{
assertionValueLength = ( (byte[])assertionValue).length;
}
-
+
avaLength += 1 + Length.getNbBytes( assertionValueLength ) + assertionValueLength;
-
+
return 1 + Length.getNbBytes( avaLength ) + avaLength;
}
-
+
/**
* Encode the AttributeValueAssertion Filters to a PDU. The
* following filters are to be encoded :
@@ -168,7 +168,7 @@
throw new EncoderException("Cannot put a PDU in a null buffer !");
}
- try
+ try
{
// The AttributeValueAssertion Tag
switch (filterType)
@@ -176,27 +176,27 @@
case LdapConstants.EQUALITY_MATCH_FILTER :
buffer.put( (byte)LdapConstants.EQUALITY_MATCH_FILTER_TAG );
break;
-
+
case LdapConstants.LESS_OR_EQUAL_FILTER :
buffer.put( (byte)LdapConstants.LESS_OR_EQUAL_FILTER_TAG );
break;
-
+
case LdapConstants.GREATER_OR_EQUAL_FILTER :
buffer.put( (byte)LdapConstants.GREATER_OR_EQUAL_FILTER_TAG );
break;
-
+
case LdapConstants.APPROX_MATCH_FILTER :
buffer.put( (byte)LdapConstants.APPROX_MATCH_FILTER_TAG );
break;
}
-
+
buffer.put( Length.getBytes( avaLength ) );
}
catch ( BufferOverflowException boe )
{
- throw new EncoderException("The PDU buffer size is too small !");
+ throw new EncoderException("The PDU buffer size is too small !");
}
-
+
// The attribute desc
Value.encode( buffer, assertion.getAttributeDesc() );
@@ -209,7 +209,7 @@
{
Value.encode( buffer, (byte[])assertion.getAssertionValue() );
}
-
+
return buffer;
}
Propchange: directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/filters/AttributeValueAssertionFilter.java
------------------------------------------------------------------------------
svn:eol-style = native
Copied: directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/filters/ConnectorFilter.java (from r365566, directory/trunk/ldap-common/src/main/java/org/apache/asn1new/ldap/pojo/filters/ConnectorFilter.java)
URL: http://svn.apache.org/viewcvs/directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/filters/ConnectorFilter.java?p2=directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/filters/ConnectorFilter.java&p1=directory/trunk/ldap-common/src/main/java/org/apache/asn1new/ldap/pojo/filters/ConnectorFilter.java&r1=365566&r2=365584&rev=365584&view=diff
==============================================================================
--- directory/trunk/ldap-common/src/main/java/org/apache/asn1new/ldap/pojo/filters/ConnectorFilter.java (original)
+++ directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/filters/ConnectorFilter.java Tue Jan 3 01:02:13 2006
@@ -14,7 +14,7 @@
* limitations under the License.
*
*/
-package org.apache.asn1new.ldap.pojo.filters;
+package org.apache.ldap.common.asn1.pojo.filters;
import org.apache.asn1.codec.DecoderException;
import org.apache.asn1.codec.EncoderException;
Propchange: directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/filters/ConnectorFilter.java
------------------------------------------------------------------------------
svn:eol-style = native
Copied: directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/filters/ExtensibleMatchFilter.java (from r365566, directory/trunk/ldap-common/src/main/java/org/apache/asn1new/ldap/pojo/filters/ExtensibleMatchFilter.java)
URL: http://svn.apache.org/viewcvs/directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/filters/ExtensibleMatchFilter.java?p2=directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/filters/ExtensibleMatchFilter.java&p1=directory/trunk/ldap-common/src/main/java/org/apache/asn1new/ldap/pojo/filters/ExtensibleMatchFilter.java&r1=365566&r2=365584&rev=365584&view=diff
==============================================================================
--- directory/trunk/ldap-common/src/main/java/org/apache/asn1new/ldap/pojo/filters/ExtensibleMatchFilter.java (original)
+++ directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/filters/ExtensibleMatchFilter.java Tue Jan 3 01:02:13 2006
@@ -14,17 +14,17 @@
* limitations under the License.
*
*/
-package org.apache.asn1new.ldap.pojo.filters;
+package org.apache.ldap.common.asn1.pojo.filters;
import java.nio.BufferOverflowException;
import java.nio.ByteBuffer;
import org.apache.asn1.codec.EncoderException;
-import org.apache.asn1new.ber.tlv.Length;
-import org.apache.asn1new.ber.tlv.UniversalTag;
-import org.apache.asn1new.ber.tlv.Value;
-import org.apache.asn1new.ldap.codec.LdapConstants;
-import org.apache.asn1new.ldap.codec.primitives.LdapString;
+import org.apache.asn1.ber.tlv.Length;
+import org.apache.asn1.ber.tlv.UniversalTag;
+import org.apache.asn1.ber.tlv.Value;
+import org.apache.ldap.common.asn1.codec.LdapConstants;
+import org.apache.ldap.common.asn1.codec.primitives.LdapString;
import org.apache.ldap.common.util.StringTools;
@@ -52,10 +52,10 @@
/** The dnAttributes flag */
private boolean dnAttributes;
-
+
/** The extensible match length */
private transient int extensibleMatchLength;
-
+
/** The matching Rule Assertion Length */
private transient int matchingRuleAssertionLength;
@@ -191,37 +191,37 @@
{
if ( matchingRule != null )
{
- matchingRuleAssertionLength = 1 + Length.getNbBytes( matchingRule.getNbBytes() ) + matchingRule.getNbBytes();
+ matchingRuleAssertionLength = 1 + Length.getNbBytes( matchingRule.getNbBytes() ) + matchingRule.getNbBytes();
}
-
+
if ( type != null )
{
matchingRuleAssertionLength += 1 + Length.getNbBytes( type.getNbBytes() ) + type.getNbBytes();
}
-
+
if ( matchValue != null )
{
if ( matchValue instanceof String )
{
- int matchValueLength = StringTools.getBytesUtf8( (String)matchValue ).length;
- matchingRuleAssertionLength += 1 + Length.getNbBytes( matchValueLength ) + matchValueLength;
+ int matchValueLength = StringTools.getBytesUtf8( (String)matchValue ).length;
+ matchingRuleAssertionLength += 1 + Length.getNbBytes( matchValueLength ) + matchValueLength;
}
else
{
- matchingRuleAssertionLength += 1 + Length.getNbBytes( ((byte[])matchValue).length ) + ((byte[])matchValue).length;
+ matchingRuleAssertionLength += 1 + Length.getNbBytes( ((byte[])matchValue).length ) + ((byte[])matchValue).length;
}
}
-
- if ( dnAttributes == true )
+
+ if ( dnAttributes )
{
matchingRuleAssertionLength += 1 + 1 + 1;
}
extensibleMatchLength = 1 + Length.getNbBytes( matchingRuleAssertionLength ) + matchingRuleAssertionLength;
-
+
return 1 + Length.getNbBytes( extensibleMatchLength ) + extensibleMatchLength;
}
-
+
/**
* Encode the ExtensibleMatch Filters to a PDU.
*
@@ -249,7 +249,7 @@
throw new EncoderException("Cannot put a PDU in a null buffer !");
}
- try
+ try
{
// The ExtensibleMatch Tag
buffer.put( (byte)LdapConstants.EXTENSIBLE_MATCH_FILTER_TAG );
@@ -259,37 +259,37 @@
buffer.put( UniversalTag.SEQUENCE_TAG );
buffer.put( Length.getBytes( matchingRuleAssertionLength ) );
- if ( ( matchingRule == null ) && ( type == null ) )
+ if ( ( matchingRule == null ) && ( type == null ) )
{
throw new EncoderException("Cannot have a null matching rule and a null type");
}
-
+
// The matching rule
- if ( matchingRule != null )
+ if ( matchingRule != null )
{
buffer.put( (byte)LdapConstants.SEARCH_MATCHING_RULE_TAG );
buffer.put( Length.getBytes( matchingRule.getNbBytes() ) );
- buffer.put( matchingRule.getBytes() );
+ buffer.put( matchingRule.getBytes() );
}
-
+
// The type
- if ( type != null )
+ if ( type != null )
{
- buffer.put( (byte)LdapConstants.SEARCH_TYPE_TAG );
+ buffer.put( (byte) LdapConstants.SEARCH_TYPE_TAG );
buffer.put( Length.getBytes( type.getNbBytes() ) );
- buffer.put( type.getBytes() );
+ buffer.put( type.getBytes() );
}
-
+
// The match value
- if ( matchValue != null )
+ if ( matchValue != null )
{
buffer.put( (byte)LdapConstants.SEARCH_MATCH_VALUE_TAG );
if ( matchValue instanceof String )
{
- byte[] matchValueBytes = StringTools.getBytesUtf8( (String)matchValue );
+ byte[] matchValueBytes = StringTools.getBytesUtf8( (String)matchValue );
buffer.put( Length.getBytes( matchValueBytes.length ) );
-
+
if ( matchValueBytes.length != 0 )
{
buffer.put( matchValueBytes );
@@ -298,7 +298,7 @@
else
{
buffer.put( Length.getBytes( ((byte[])matchValue).length ) );
-
+
if ( ((byte[])matchValue).length != 0 )
{
buffer.put( (byte[])matchValue );
@@ -308,18 +308,18 @@
}
// The dnAttributes flag, if true only
- if ( dnAttributes == true )
+ if ( dnAttributes )
{
buffer.put( (byte)LdapConstants.DN_ATTRIBUTES_FILTER_TAG );
buffer.put( (byte)1 );
- buffer.put( Value.TRUE_VALUE );
+ buffer.put( Value.TRUE_VALUE );
}
}
catch ( BufferOverflowException boe )
{
- throw new EncoderException("The PDU buffer size is too small !");
+ throw new EncoderException("The PDU buffer size is too small !");
}
-
+
return buffer;
}
@@ -338,7 +338,7 @@
sb.append( type.toString() );
}
- if ( dnAttributes == true )
+ if ( dnAttributes )
{
sb.append( ":dn" );
}
Propchange: directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/filters/ExtensibleMatchFilter.java
------------------------------------------------------------------------------
svn:eol-style = native
Copied: directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/filters/Filter.java (from r365566, directory/trunk/ldap-common/src/main/java/org/apache/asn1new/ldap/pojo/filters/Filter.java)
URL: http://svn.apache.org/viewcvs/directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/filters/Filter.java?p2=directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/filters/Filter.java&p1=directory/trunk/ldap-common/src/main/java/org/apache/asn1new/ldap/pojo/filters/Filter.java&r1=365566&r2=365584&rev=365584&view=diff
==============================================================================
--- directory/trunk/ldap-common/src/main/java/org/apache/asn1new/ldap/pojo/filters/Filter.java (original)
+++ directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/filters/Filter.java Tue Jan 3 01:02:13 2006
@@ -14,9 +14,9 @@
* limitations under the License.
*
*/
-package org.apache.asn1new.ldap.pojo.filters;
+package org.apache.ldap.common.asn1.pojo.filters;
-import org.apache.asn1new.Asn1Object;
+import org.apache.asn1.Asn1Object;
/**
Propchange: directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/filters/Filter.java
------------------------------------------------------------------------------
svn:eol-style = native
Copied: directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/filters/NotFilter.java (from r365566, directory/trunk/ldap-common/src/main/java/org/apache/asn1new/ldap/pojo/filters/NotFilter.java)
URL: http://svn.apache.org/viewcvs/directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/filters/NotFilter.java?p2=directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/filters/NotFilter.java&p1=directory/trunk/ldap-common/src/main/java/org/apache/asn1new/ldap/pojo/filters/NotFilter.java&r1=365566&r2=365584&rev=365584&view=diff
==============================================================================
--- directory/trunk/ldap-common/src/main/java/org/apache/asn1new/ldap/pojo/filters/NotFilter.java (original)
+++ directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/filters/NotFilter.java Tue Jan 3 01:02:13 2006
@@ -14,15 +14,16 @@
* limitations under the License.
*
*/
-package org.apache.asn1new.ldap.pojo.filters;
+package org.apache.ldap.common.asn1.pojo.filters;
import java.nio.BufferOverflowException;
import java.nio.ByteBuffer;
import org.apache.asn1.codec.DecoderException;
import org.apache.asn1.codec.EncoderException;
-import org.apache.asn1new.ber.tlv.Length;
-import org.apache.asn1new.ldap.codec.LdapConstants;
+import org.apache.asn1.ber.tlv.Length;
+import org.apache.ldap.common.asn1.codec.LdapConstants;
+
/**
* Not Filter Object to store the Not filter.
@@ -39,11 +40,11 @@
public NotFilter()
{
}
-
+
/**
* Subclass the addFilterMethod, as this is specific for a NotFilter
* (we cannot have more than one elements).
- * @param Filter The Filter to add
+ * @param filter The Filter to add
*/
public void addFilter( Filter filter ) throws DecoderException
{
@@ -51,7 +52,7 @@
{
throw new DecoderException("Cannot have more than one Filter within a Not Filter");
}
-
+
super.addFilter( filter );
}
@@ -68,7 +69,7 @@
/**
* Set the NotFilter
*
- * @param not The notFilter to set.
+ * @param notFilter The notFilter to set.
*/
public void setNotFilter( Filter notFilter ) throws DecoderException
{
@@ -76,10 +77,10 @@
{
throw new DecoderException("Cannot have more than one Filter within a Not Filter");
}
-
+
super.addFilter( notFilter );
}
-
+
/**
* Compute the NotFilter length
*
@@ -93,7 +94,7 @@
public int computeLength()
{
filtersLength = super.computeLength();
-
+
return 1 + Length.getNbBytes( filtersLength ) + filtersLength;
}
@@ -115,19 +116,19 @@
throw new EncoderException("Cannot put a PDU in a null buffer !");
}
- try
+ try
{
// The NotFilter Tag
- buffer.put( (byte)LdapConstants.NOT_FILTER_TAG );
+ buffer.put( (byte) LdapConstants.NOT_FILTER_TAG );
buffer.put( Length.getBytes( filtersLength ) );
}
catch ( BufferOverflowException boe )
{
- throw new EncoderException("The PDU buffer size is too small !");
+ throw new EncoderException("The PDU buffer size is too small !");
}
-
+
super.encode( buffer );
-
+
return buffer;
}
@@ -139,9 +140,9 @@
public String toString()
{
StringBuffer sb = new StringBuffer();
-
+
sb.append('!').append(super.toString());
-
+
return sb.toString();
}
}
Propchange: directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/filters/NotFilter.java
------------------------------------------------------------------------------
svn:eol-style = native
Copied: directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/filters/OrFilter.java (from r365566, directory/trunk/ldap-common/src/main/java/org/apache/asn1new/ldap/pojo/filters/OrFilter.java)
URL: http://svn.apache.org/viewcvs/directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/filters/OrFilter.java?p2=directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/filters/OrFilter.java&p1=directory/trunk/ldap-common/src/main/java/org/apache/asn1new/ldap/pojo/filters/OrFilter.java&r1=365566&r2=365584&rev=365584&view=diff
==============================================================================
--- directory/trunk/ldap-common/src/main/java/org/apache/asn1new/ldap/pojo/filters/OrFilter.java (original)
+++ directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/filters/OrFilter.java Tue Jan 3 01:02:13 2006
@@ -14,15 +14,15 @@
* limitations under the License.
*
*/
-package org.apache.asn1new.ldap.pojo.filters;
+package org.apache.ldap.common.asn1.pojo.filters;
import java.nio.BufferOverflowException;
import java.nio.ByteBuffer;
import java.util.ArrayList;
import org.apache.asn1.codec.EncoderException;
-import org.apache.asn1new.ber.tlv.Length;
-import org.apache.asn1new.ldap.codec.LdapConstants;
+import org.apache.asn1.ber.tlv.Length;
+import org.apache.ldap.common.asn1.codec.LdapConstants;
/**
@@ -66,10 +66,10 @@
public int computeLength()
{
filtersLength = super.computeLength();
-
+
return 1 + Length.getNbBytes( filtersLength ) + filtersLength;
}
-
+
/**
* Encode the OrFilter message to a PDU.
*
@@ -88,7 +88,7 @@
throw new EncoderException("Cannot put a PDU in a null buffer !");
}
- try
+ try
{
// The OrFilter Tag
buffer.put( (byte)LdapConstants.OR_FILTER_TAG );
@@ -96,11 +96,11 @@
}
catch ( BufferOverflowException boe )
{
- throw new EncoderException("The PDU buffer size is too small !");
+ throw new EncoderException("The PDU buffer size is too small !");
}
-
+
super.encode( buffer );
-
+
return buffer;
}
Propchange: directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/filters/OrFilter.java
------------------------------------------------------------------------------
svn:eol-style = native
Copied: directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/filters/PresentFilter.java (from r365566, directory/trunk/ldap-common/src/main/java/org/apache/asn1new/ldap/pojo/filters/PresentFilter.java)
URL: http://svn.apache.org/viewcvs/directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/filters/PresentFilter.java?p2=directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/filters/PresentFilter.java&p1=directory/trunk/ldap-common/src/main/java/org/apache/asn1new/ldap/pojo/filters/PresentFilter.java&r1=365566&r2=365584&rev=365584&view=diff
==============================================================================
--- directory/trunk/ldap-common/src/main/java/org/apache/asn1new/ldap/pojo/filters/PresentFilter.java (original)
+++ directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/filters/PresentFilter.java Tue Jan 3 01:02:13 2006
@@ -14,15 +14,15 @@
* limitations under the License.
*
*/
-package org.apache.asn1new.ldap.pojo.filters;
+package org.apache.ldap.common.asn1.pojo.filters;
import java.nio.BufferOverflowException;
import java.nio.ByteBuffer;
import org.apache.asn1.codec.EncoderException;
-import org.apache.asn1new.ber.tlv.Length;
-import org.apache.asn1new.ldap.codec.LdapConstants;
-import org.apache.asn1new.ldap.codec.primitives.LdapString;
+import org.apache.asn1.ber.tlv.Length;
+import org.apache.ldap.common.asn1.codec.LdapConstants;
+import org.apache.ldap.common.asn1.codec.primitives.LdapString;
/**
@@ -82,7 +82,7 @@
{
return 1 + Length.getNbBytes( attributeDescription.getNbBytes() ) + attributeDescription.getNbBytes();
}
-
+
/**
* Encode the PresentFilter message to a PDU.
*
@@ -100,7 +100,7 @@
throw new EncoderException("Cannot put a PDU in a null buffer !");
}
- try
+ try
{
// The PresentFilter Tag
buffer.put( (byte)LdapConstants.PRESENT_FILTER_TAG );
@@ -109,11 +109,11 @@
}
catch ( BufferOverflowException boe )
{
- throw new EncoderException("The PDU buffer size is too small !");
+ throw new EncoderException("The PDU buffer size is too small !");
}
-
+
super.encode( buffer );
-
+
return buffer;
}
Propchange: directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/filters/PresentFilter.java
------------------------------------------------------------------------------
svn:eol-style = native
Copied: directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/filters/SubstringFilter.java (from r365566, directory/trunk/ldap-common/src/main/java/org/apache/asn1new/ldap/pojo/filters/SubstringFilter.java)
URL: http://svn.apache.org/viewcvs/directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/filters/SubstringFilter.java?p2=directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/filters/SubstringFilter.java&p1=directory/trunk/ldap-common/src/main/java/org/apache/asn1new/ldap/pojo/filters/SubstringFilter.java&r1=365566&r2=365584&rev=365584&view=diff
==============================================================================
--- directory/trunk/ldap-common/src/main/java/org/apache/asn1new/ldap/pojo/filters/SubstringFilter.java (original)
+++ directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/filters/SubstringFilter.java Tue Jan 3 01:02:13 2006
@@ -14,7 +14,7 @@
* limitations under the License.
*
*/
-package org.apache.asn1new.ldap.pojo.filters;
+package org.apache.ldap.common.asn1.pojo.filters;
import java.nio.BufferOverflowException;
import java.nio.ByteBuffer;
@@ -22,11 +22,11 @@
import java.util.Iterator;
import org.apache.asn1.codec.EncoderException;
-import org.apache.asn1new.ber.tlv.Length;
-import org.apache.asn1new.ber.tlv.UniversalTag;
-import org.apache.asn1new.ber.tlv.Value;
-import org.apache.asn1new.ldap.codec.LdapConstants;
-import org.apache.asn1new.ldap.codec.primitives.LdapString;
+import org.apache.asn1.ber.tlv.Length;
+import org.apache.asn1.ber.tlv.UniversalTag;
+import org.apache.asn1.ber.tlv.Value;
+import org.apache.ldap.common.asn1.codec.LdapConstants;
+import org.apache.ldap.common.asn1.codec.primitives.LdapString;
/**
@@ -49,7 +49,7 @@
/** This member is used to control the length of the three parts of the substring filter **/
private transient int substringsLength;
-
+
/** The initial filter */
private LdapString initialSubstrings;
@@ -58,13 +58,13 @@
/** The final filter */
private LdapString finalSubstrings;
-
+
private transient int substringsFilterLength;
private transient int substringsFilterSequenceLength;
//~ Methods ------------------------------------------------------------------------------------
-
+
/**
* The constructor. We will create the 'any' subsring arraylist with only one element.
*/
@@ -152,23 +152,23 @@
{
this.type = type;
}
-
+
/**
* @return Returns the substringsLength.
*/
- public int getSubstringsLength()
+ public int getSubstringsLength()
{
return substringsLength;
}
-
+
/**
* @param substringsLength The substringsLength to set.
*/
- public void setSubstringsLength(int substringsLength)
+ public void setSubstringsLength(int substringsLength)
{
this.substringsLength = substringsLength;
}
-
+
/**
* Compute the SubstringFilter length
*
@@ -194,33 +194,33 @@
// The type
substringsFilterLength = 1 + Length.getNbBytes( type.getNbBytes() ) + type.getNbBytes();
substringsFilterSequenceLength = 0;
-
+
if ( initialSubstrings != null )
{
- substringsFilterSequenceLength += 1 + Length.getNbBytes( initialSubstrings.getNbBytes() ) + initialSubstrings.getNbBytes();
+ substringsFilterSequenceLength += 1 + Length.getNbBytes( initialSubstrings.getNbBytes() ) + initialSubstrings.getNbBytes();
}
-
+
if ( anySubstrings != null)
{
Iterator anyIterator = anySubstrings.iterator();
-
+
while ( anyIterator.hasNext() )
{
LdapString any = (LdapString)anyIterator.next();
substringsFilterSequenceLength += 1 + Length.getNbBytes( any.getNbBytes() ) + any.getNbBytes();
}
}
-
+
if ( finalSubstrings != null )
{
- substringsFilterSequenceLength += 1 + Length.getNbBytes( finalSubstrings.getNbBytes() ) + finalSubstrings.getNbBytes();
+ substringsFilterSequenceLength += 1 + Length.getNbBytes( finalSubstrings.getNbBytes() ) + finalSubstrings.getNbBytes();
}
-
+
substringsFilterLength += 1 + Length.getNbBytes( substringsFilterSequenceLength ) + substringsFilterSequenceLength;
-
+
return 1 + Length.getNbBytes( substringsFilterLength ) + substringsFilterLength;
}
-
+
/**
* Encode the Substrings Filter to a PDU.
*
@@ -248,40 +248,40 @@
throw new EncoderException("Cannot put a PDU in a null buffer !");
}
- try
+ try
{
// The SubstringFilter Tag
buffer.put( (byte)LdapConstants.SUBSTRINGS_FILTER_TAG );
buffer.put( Length.getBytes( substringsFilterLength ) );
-
+
// The type
Value.encode( buffer, type.getBytes() );
// The SubstringSequenceFilter Tag
buffer.put( UniversalTag.SEQUENCE_TAG );
buffer.put( Length.getBytes( substringsFilterSequenceLength ) );
-
- if ( ( initialSubstrings == null ) &&
+
+ if ( ( initialSubstrings == null ) &&
( ( anySubstrings == null ) || ( anySubstrings.size() == 0 ) ) &&
- ( finalSubstrings == null ) )
+ ( finalSubstrings == null ) )
{
throw new EncoderException("Cannot have a null initial, any and final substring");
}
-
+
// The initial substring
- if ( initialSubstrings != null )
+ if ( initialSubstrings != null )
{
buffer.put( (byte)LdapConstants.SEARCH_SUBSTRINGS_INITIAL_TAG );
buffer.put( Length.getBytes( initialSubstrings.getNbBytes() ) );
- buffer.put( initialSubstrings.getBytes() );
+ buffer.put( initialSubstrings.getBytes() );
}
-
+
// The any substrings
if ( anySubstrings != null)
{
Iterator anyIterator = anySubstrings.iterator();
-
+
while ( anyIterator.hasNext() )
{
LdapString any = (LdapString)anyIterator.next();
@@ -290,20 +290,20 @@
buffer.put( any.getBytes() );
}
}
-
+
// The final substring
- if ( finalSubstrings != null )
+ if ( finalSubstrings != null )
{
- buffer.put( (byte)LdapConstants.SEARCH_SUBSTRINGS_FINAL_TAG );
+ buffer.put( (byte) LdapConstants.SEARCH_SUBSTRINGS_FINAL_TAG );
buffer.put( Length.getBytes( finalSubstrings.getNbBytes() ) );
- buffer.put( finalSubstrings.getBytes() );
+ buffer.put( finalSubstrings.getBytes() );
}
}
catch ( BufferOverflowException boe )
{
- throw new EncoderException("The PDU buffer size is too small !");
+ throw new EncoderException("The PDU buffer size is too small !");
}
-
+
return buffer;
}
@@ -321,24 +321,24 @@
{
sb.append( initialSubstrings.toString() );
}
-
+
sb.append('*');
if ( anySubstrings != null )
{
Iterator anyIterator = anySubstrings.iterator();
-
+
while (anyIterator.hasNext())
{
- sb.append( (LdapString)anyIterator.next() ).append('*');
+ sb.append( ( LdapString )anyIterator.next() ).append('*');
}
}
-
+
if (finalSubstrings != null)
{
sb.append( finalSubstrings.toString() );
}
-
+
return sb.toString();
}
}
Propchange: directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/filters/SubstringFilter.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/message/spi/Provider.java
URL: http://svn.apache.org/viewcvs/directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/message/spi/Provider.java?rev=365584&r1=365583&r2=365584&view=diff
==============================================================================
--- directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/message/spi/Provider.java (original)
+++ directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/message/spi/Provider.java Tue Jan 3 01:02:13 2006
@@ -55,7 +55,7 @@
{
/** Default BER Library provider class name */
public static final String DEFAULT_PROVIDER =
- "org.apache.asn1new.ldap.TwixProvider" ;
+ "org.apache.ldap.common.TwixProvider" ;
/** BER Library provider class name property */
public static final String BERLIB_PROVIDER =
Copied: directory/trunk/ldap-common/src/test/java/org/apache/ldap/common/asn1/codec/AbandonRequestTest.java (from r365566, directory/trunk/ldap-common/src/test/java/org/apache/asn1new/ldap/codec/AbandonRequestTest.java)
URL: http://svn.apache.org/viewcvs/directory/trunk/ldap-common/src/test/java/org/apache/ldap/common/asn1/codec/AbandonRequestTest.java?p2=directory/trunk/ldap-common/src/test/java/org/apache/ldap/common/asn1/codec/AbandonRequestTest.java&p1=directory/trunk/ldap-common/src/test/java/org/apache/asn1new/ldap/codec/AbandonRequestTest.java&r1=365566&r2=365584&rev=365584&view=diff
==============================================================================
--- directory/trunk/ldap-common/src/test/java/org/apache/asn1new/ldap/codec/AbandonRequestTest.java (original)
+++ directory/trunk/ldap-common/src/test/java/org/apache/ldap/common/asn1/codec/AbandonRequestTest.java Tue Jan 3 01:02:13 2006
@@ -14,16 +14,16 @@
* limitations under the License.
*
*/
-package org.apache.asn1new.ldap.codec;
+package org.apache.ldap.common.asn1.codec;
import java.nio.ByteBuffer;
import org.apache.asn1.codec.DecoderException;
import org.apache.asn1.codec.EncoderException;
-import org.apache.asn1new.ber.Asn1Decoder;
-import org.apache.asn1new.ber.containers.IAsn1Container;
-import org.apache.asn1new.ldap.pojo.AbandonRequest;
-import org.apache.asn1new.ldap.pojo.LdapMessage;
+import org.apache.asn1.ber.Asn1Decoder;
+import org.apache.asn1.ber.IAsn1Container;
+import org.apache.ldap.common.asn1.pojo.AbandonRequest;
+import org.apache.ldap.common.asn1.pojo.LdapMessage;
import org.apache.ldap.common.util.StringTools;
import junit.framework.Assert;
Propchange: directory/trunk/ldap-common/src/test/java/org/apache/ldap/common/asn1/codec/AbandonRequestTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Copied: directory/trunk/ldap-common/src/test/java/org/apache/ldap/common/asn1/codec/AddRequestTest.java (from r365566, directory/trunk/ldap-common/src/test/java/org/apache/asn1new/ldap/codec/AddRequestTest.java)
URL: http://svn.apache.org/viewcvs/directory/trunk/ldap-common/src/test/java/org/apache/ldap/common/asn1/codec/AddRequestTest.java?p2=directory/trunk/ldap-common/src/test/java/org/apache/ldap/common/asn1/codec/AddRequestTest.java&p1=directory/trunk/ldap-common/src/test/java/org/apache/asn1new/ldap/codec/AddRequestTest.java&r1=365566&r2=365584&rev=365584&view=diff
==============================================================================
--- directory/trunk/ldap-common/src/test/java/org/apache/asn1new/ldap/codec/AddRequestTest.java (original)
+++ directory/trunk/ldap-common/src/test/java/org/apache/ldap/common/asn1/codec/AddRequestTest.java Tue Jan 3 01:02:13 2006
@@ -14,7 +14,7 @@
* limitations under the License.
*
*/
-package org.apache.asn1new.ldap.codec;
+package org.apache.ldap.common.asn1.codec;
import java.nio.ByteBuffer;
import java.util.HashMap;
@@ -27,10 +27,10 @@
import org.apache.asn1.codec.DecoderException;
import org.apache.asn1.codec.EncoderException;
-import org.apache.asn1new.ber.Asn1Decoder;
-import org.apache.asn1new.ber.containers.IAsn1Container;
-import org.apache.asn1new.ldap.pojo.AddRequest;
-import org.apache.asn1new.ldap.pojo.LdapMessage;
+import org.apache.asn1.ber.Asn1Decoder;
+import org.apache.asn1.ber.IAsn1Container;
+import org.apache.ldap.common.asn1.pojo.AddRequest;
+import org.apache.ldap.common.asn1.pojo.LdapMessage;
import org.apache.ldap.common.util.StringTools;
import junit.framework.Assert;
Propchange: directory/trunk/ldap-common/src/test/java/org/apache/ldap/common/asn1/codec/AddRequestTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Copied: directory/trunk/ldap-common/src/test/java/org/apache/ldap/common/asn1/codec/AddResponseTest.java (from r365566, directory/trunk/ldap-common/src/test/java/org/apache/asn1new/ldap/codec/AddResponseTest.java)
URL: http://svn.apache.org/viewcvs/directory/trunk/ldap-common/src/test/java/org/apache/ldap/common/asn1/codec/AddResponseTest.java?p2=directory/trunk/ldap-common/src/test/java/org/apache/ldap/common/asn1/codec/AddResponseTest.java&p1=directory/trunk/ldap-common/src/test/java/org/apache/asn1new/ldap/codec/AddResponseTest.java&r1=365566&r2=365584&rev=365584&view=diff
==============================================================================
--- directory/trunk/ldap-common/src/test/java/org/apache/asn1new/ldap/codec/AddResponseTest.java (original)
+++ directory/trunk/ldap-common/src/test/java/org/apache/ldap/common/asn1/codec/AddResponseTest.java Tue Jan 3 01:02:13 2006
@@ -14,16 +14,16 @@
* limitations under the License.
*
*/
-package org.apache.asn1new.ldap.codec;
+package org.apache.ldap.common.asn1.codec;
import java.nio.ByteBuffer;
import org.apache.asn1.codec.DecoderException;
import org.apache.asn1.codec.EncoderException;
-import org.apache.asn1new.ber.Asn1Decoder;
-import org.apache.asn1new.ber.containers.IAsn1Container;
-import org.apache.asn1new.ldap.pojo.AddResponse;
-import org.apache.asn1new.ldap.pojo.LdapMessage;
+import org.apache.asn1.ber.Asn1Decoder;
+import org.apache.asn1.ber.IAsn1Container;
+import org.apache.ldap.common.asn1.pojo.AddResponse;
+import org.apache.ldap.common.asn1.pojo.LdapMessage;
import org.apache.ldap.common.util.StringTools;
import junit.framework.Assert;
Propchange: directory/trunk/ldap-common/src/test/java/org/apache/ldap/common/asn1/codec/AddResponseTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Copied: directory/trunk/ldap-common/src/test/java/org/apache/ldap/common/asn1/codec/BindRequestTest.java (from r365566, directory/trunk/ldap-common/src/test/java/org/apache/asn1new/ldap/codec/BindRequestTest.java)
URL: http://svn.apache.org/viewcvs/directory/trunk/ldap-common/src/test/java/org/apache/ldap/common/asn1/codec/BindRequestTest.java?p2=directory/trunk/ldap-common/src/test/java/org/apache/ldap/common/asn1/codec/BindRequestTest.java&p1=directory/trunk/ldap-common/src/test/java/org/apache/asn1new/ldap/codec/BindRequestTest.java&r1=365566&r2=365584&rev=365584&view=diff
==============================================================================
--- directory/trunk/ldap-common/src/test/java/org/apache/asn1new/ldap/codec/BindRequestTest.java (original)
+++ directory/trunk/ldap-common/src/test/java/org/apache/ldap/common/asn1/codec/BindRequestTest.java Tue Jan 3 01:02:13 2006
@@ -14,18 +14,18 @@
* limitations under the License.
*
*/
-package org.apache.asn1new.ldap.codec;
+package org.apache.ldap.common.asn1.codec;
import java.nio.ByteBuffer;
import org.apache.asn1.codec.DecoderException;
import org.apache.asn1.codec.EncoderException;
-import org.apache.asn1new.ber.Asn1Decoder;
-import org.apache.asn1new.ber.containers.IAsn1Container;
-import org.apache.asn1new.ldap.pojo.BindRequest;
-import org.apache.asn1new.ldap.pojo.LdapMessage;
-import org.apache.asn1new.ldap.pojo.SaslCredentials;
-import org.apache.asn1new.ldap.pojo.SimpleAuthentication;
+import org.apache.asn1.ber.Asn1Decoder;
+import org.apache.asn1.ber.IAsn1Container;
+import org.apache.ldap.common.asn1.pojo.BindRequest;
+import org.apache.ldap.common.asn1.pojo.LdapMessage;
+import org.apache.ldap.common.asn1.pojo.SaslCredentials;
+import org.apache.ldap.common.asn1.pojo.SimpleAuthentication;
import org.apache.ldap.common.util.StringTools;
import junit.framework.Assert;
Propchange: directory/trunk/ldap-common/src/test/java/org/apache/ldap/common/asn1/codec/BindRequestTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Copied: directory/trunk/ldap-common/src/test/java/org/apache/ldap/common/asn1/codec/BindResponseTest.java (from r365566, directory/trunk/ldap-common/src/test/java/org/apache/asn1new/ldap/codec/BindResponseTest.java)
URL: http://svn.apache.org/viewcvs/directory/trunk/ldap-common/src/test/java/org/apache/ldap/common/asn1/codec/BindResponseTest.java?p2=directory/trunk/ldap-common/src/test/java/org/apache/ldap/common/asn1/codec/BindResponseTest.java&p1=directory/trunk/ldap-common/src/test/java/org/apache/asn1new/ldap/codec/BindResponseTest.java&r1=365566&r2=365584&rev=365584&view=diff
==============================================================================
--- directory/trunk/ldap-common/src/test/java/org/apache/asn1new/ldap/codec/BindResponseTest.java (original)
+++ directory/trunk/ldap-common/src/test/java/org/apache/ldap/common/asn1/codec/BindResponseTest.java Tue Jan 3 01:02:13 2006
@@ -14,16 +14,16 @@
* limitations under the License.
*
*/
-package org.apache.asn1new.ldap.codec;
+package org.apache.ldap.common.asn1.codec;
import java.nio.ByteBuffer;
import org.apache.asn1.codec.DecoderException;
import org.apache.asn1.codec.EncoderException;
-import org.apache.asn1new.ber.Asn1Decoder;
-import org.apache.asn1new.ber.containers.IAsn1Container;
-import org.apache.asn1new.ldap.pojo.BindResponse;
-import org.apache.asn1new.ldap.pojo.LdapMessage;
+import org.apache.asn1.ber.Asn1Decoder;
+import org.apache.asn1.ber.IAsn1Container;
+import org.apache.ldap.common.asn1.pojo.BindResponse;
+import org.apache.ldap.common.asn1.pojo.LdapMessage;
import org.apache.ldap.common.util.StringTools;
import junit.framework.Assert;
Propchange: directory/trunk/ldap-common/src/test/java/org/apache/ldap/common/asn1/codec/BindResponseTest.java
------------------------------------------------------------------------------
svn:eol-style = native