directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1064192 - in /directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/decorators: AddRequestDecorator.java AddResponseDecorator.java
Date Thu, 27 Jan 2011 16:47:53 GMT
Author: elecharny
Date: Thu Jan 27 16:47:53 2011
New Revision: 1064192

URL: http://svn.apache.org/viewvc?rev=1064192&view=rev
Log:
Implementig the AddRequest/AddResponse interfaces

Modified:
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/decorators/AddRequestDecorator.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/decorators/AddResponseDecorator.java

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/decorators/AddRequestDecorator.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/decorators/AddRequestDecorator.java?rev=1064192&r1=1064191&r2=1064192&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/decorators/AddRequestDecorator.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/decorators/AddRequestDecorator.java
Thu Jan 27 16:47:53 2011
@@ -22,7 +22,15 @@ package org.apache.directory.shared.ldap
 
 import java.util.List;
 
+import org.apache.directory.shared.ldap.model.entry.Entry;
+import org.apache.directory.shared.ldap.model.entry.Value;
+import org.apache.directory.shared.ldap.model.exception.LdapException;
+import org.apache.directory.shared.ldap.model.message.AbandonListener;
 import org.apache.directory.shared.ldap.model.message.AddRequest;
+import org.apache.directory.shared.ldap.model.message.AddRequestImpl;
+import org.apache.directory.shared.ldap.model.message.MessageTypeEnum;
+import org.apache.directory.shared.ldap.model.message.ResultResponse;
+import org.apache.directory.shared.ldap.model.name.Dn;
 
 
 /**
@@ -30,7 +38,7 @@ import org.apache.directory.shared.ldap.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class AddRequestDecorator extends MessageDecorator
+public class AddRequestDecorator extends MessageDecorator implements AddRequest
 {
     /** The add request length */
     private int addRequestLength;
@@ -139,4 +147,151 @@ public class AddRequestDecorator extends
     {
         return valuesLength;
     }
+
+
+    //-------------------------------------------------------------------------
+    // The AddRequest methods
+    //-------------------------------------------------------------------------
+    /**
+     * {@inheritDoc}
+     */
+    public MessageTypeEnum getResponseType()
+    {
+        return ((AddRequestImpl)decoratedMessage).getResponseType();
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public ResultResponse getResultResponse()
+    {
+        return ((AddRequestImpl)decoratedMessage).getResultResponse();
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public boolean hasResponse()
+    {
+        return ((AddRequestImpl)decoratedMessage).hasResponse();
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public void abandon()
+    {
+        ((AddRequestImpl)decoratedMessage).abandon();
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public boolean isAbandoned()
+    {
+        return ((AddRequestImpl)decoratedMessage).isAbandoned();
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public void addAbandonListener( AbandonListener listener )
+    {
+        ((AddRequestImpl)decoratedMessage).addAbandonListener( listener );
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public Dn getEntryDn()
+    {
+        return ((AddRequestImpl)decoratedMessage).getEntryDn();
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public void setEntryDn( Dn entry )
+    {
+        ((AddRequestImpl)decoratedMessage).setEntryDn( entry );
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public Entry getEntry()
+    {
+        return ((AddRequestImpl)decoratedMessage).getEntry();
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public void setEntry( Entry entry )
+    {
+        ((AddRequestImpl)decoratedMessage).setEntry( entry );
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public void addAttributeType( String type ) throws LdapException
+    {
+        ((AddRequestImpl)decoratedMessage).addAttributeType( type );
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public String getCurrentAttributeType()
+    {
+        return ((AddRequestImpl)decoratedMessage).getCurrentAttributeType();
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public void addAttributeValue( String value )
+    {
+        ((AddRequestImpl)decoratedMessage).addAttributeValue( value );
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public void addAttributeValue( Value<?> value )
+    {
+        ((AddRequestImpl)decoratedMessage).addAttributeValue( value );
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public void addAttributeValue( byte[] value )
+    {
+        ((AddRequestImpl)decoratedMessage).addAttributeValue( value );
+    }
+    
+    
+    /**
+     * {@inheritDoc}
+     */
+    public String toString()
+    {
+        return ((AddRequestImpl)decoratedMessage).toString();
+    }
 }

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/decorators/AddResponseDecorator.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/decorators/AddResponseDecorator.java?rev=1064192&r1=1064191&r2=1064192&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/decorators/AddResponseDecorator.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/decorators/AddResponseDecorator.java
Thu Jan 27 16:47:53 2011
@@ -21,6 +21,8 @@ package org.apache.directory.shared.ldap
 
 
 import org.apache.directory.shared.ldap.model.message.AddResponse;
+import org.apache.directory.shared.ldap.model.message.AddResponseImpl;
+import org.apache.directory.shared.ldap.model.message.LdapResult;
 
 
 /**
@@ -28,7 +30,7 @@ import org.apache.directory.shared.ldap.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class AddResponseDecorator extends ResponseDecorator
+public class AddResponseDecorator extends ResponseDecorator implements AddResponse
 {
     /** The encoded addResponse length */
     private int addResponseLength;
@@ -71,4 +73,25 @@ public class AddResponseDecorator extend
     {
         return addResponseLength;
     }
+
+
+    //-------------------------------------------------------------------------
+    // The AddResponse methods
+    //-------------------------------------------------------------------------
+    /**
+     * {@inheritDoc}
+     */
+    public LdapResult getLdapResult()
+    {
+        return ((AddResponseImpl)decoratedMessage).getLdapResult();
+    }
+    
+    
+    /**
+     * {@inheritDoc}
+     */
+    public String toString()
+    {
+        return ((AddResponseImpl)decoratedMessage).toString();
+    }
 }



Mime
View raw message