directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r1064289 - /directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/decorators/
Date Thu, 27 Jan 2011 20:19:02 GMT
Author: akarasulu
Date: Thu Jan 27 20:19:02 2011
New Revision: 1064289

URL: http://svn.apache.org/viewvc?rev=1064289&view=rev
Log:
Implementations for ModifyDn (Req/Resp) and IntermediateResponse done.

Modified:
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/decorators/IntermediateResponseDecorator.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/decorators/LdapResultDecorator.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/decorators/MessageDecorator.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/decorators/ModifyDnRequestDecorator.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/decorators/ModifyDnResponseDecorator.java

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/decorators/IntermediateResponseDecorator.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/decorators/IntermediateResponseDecorator.java?rev=1064289&r1=1064288&r2=1064289&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/decorators/IntermediateResponseDecorator.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/decorators/IntermediateResponseDecorator.java
Thu Jan 27 20:19:02 2011
@@ -28,7 +28,7 @@ import org.apache.directory.shared.ldap.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class IntermediateResponseDecorator extends ResponseDecorator
+public class IntermediateResponseDecorator extends ResponseDecorator implements IntermediateResponse
 {
     /** The response name as a byte[] */
     private byte[] responseNameBytes;
@@ -97,4 +97,45 @@ public class IntermediateResponseDecorat
     {
         this.responseNameBytes = responseNameBytes;
     }
+
+    
+    //-------------------------------------------------------------------------
+    // The IntermediateResponse methods
+    //-------------------------------------------------------------------------
+    
+    
+    /**
+     * {@inheritDoc}
+     */
+    public String getResponseName()
+    {
+        return getIntermediateResponse().getResponseName();
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public void setResponseName( String oid )
+    {
+        getIntermediateResponse().setResponseName( oid );
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public byte[] getResponseValue()
+    {
+        return getIntermediateResponse().getResponseValue();
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public void setResponseValue( byte[] value )
+    {
+        getIntermediateResponse().setResponseValue( value );
+    }
 }

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/decorators/LdapResultDecorator.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/decorators/LdapResultDecorator.java?rev=1064289&r1=1064288&r2=1064289&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/decorators/LdapResultDecorator.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/decorators/LdapResultDecorator.java
Thu Jan 27 20:19:02 2011
@@ -105,6 +105,8 @@ public class LdapResultDecorator impleme
     //-------------------------------------------------------------------------
     // The LdapResult methods
     //-------------------------------------------------------------------------
+    
+    
     /**
      * {@inheritDoc}
      */

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/decorators/MessageDecorator.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/decorators/MessageDecorator.java?rev=1064289&r1=1064288&r2=1064289&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/decorators/MessageDecorator.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/decorators/MessageDecorator.java
Thu Jan 27 20:19:02 2011
@@ -196,18 +196,43 @@ public class MessageDecorator implements
     }
 
 
+    /**
+     * Get the current Control Object
+     * 
+     * @return The current Control Object
+     */
+    public Control getCurrentControl()
+    {
+        return currentControl;
+    }
+
+    
+    //-------------------------------------------------------------------------
+    // The Message methods
+    //-------------------------------------------------------------------------
+    
+    
+    /**
+     * {@inheritDoc}
+     */
     public MessageTypeEnum getType()
     {
         return decoratedMessage.getType();
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public Map<String, Control> getControls()
     {
         return decoratedMessage.getControls();
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public Control getControl( String oid )
     {
         return decoratedMessage.getControl( oid );
@@ -215,22 +240,17 @@ public class MessageDecorator implements
 
 
     /**
-     * Get the current Control Object
-     * 
-     * @return The current Control Object
+     * {@inheritDoc}
      */
-    public Control getCurrentControl()
-    {
-        return currentControl;
-    }
-
-
     public boolean hasControl( String oid )
     {
         return decoratedMessage.hasControl( oid );
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public void addControl( Control control ) throws MessageException
     {
         decoratedMessage.addControl( control );
@@ -238,42 +258,63 @@ public class MessageDecorator implements
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public void addAllControls( Control[] controls ) throws MessageException
     {
         decoratedMessage.addAllControls( controls );
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public void removeControl( Control control ) throws MessageException
     {
         decoratedMessage.removeControl( control );
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public int getMessageId()
     {
         return decoratedMessage.getMessageId();
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public Object get( Object key )
     {
         return decoratedMessage.get( key );
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public Object put( Object key, Object value )
     {
         return decoratedMessage.put( key, value );
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public void setMessageId( int messageId )
     {
         decoratedMessage.setMessageId( messageId );
     }
 
 
+    /**
+     * Delegates to the toString() method of the decorated Message.
+     */
     public String toString()
     {
         return decoratedMessage.toString();

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/decorators/ModifyDnRequestDecorator.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/decorators/ModifyDnRequestDecorator.java?rev=1064289&r1=1064288&r2=1064289&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/decorators/ModifyDnRequestDecorator.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/decorators/ModifyDnRequestDecorator.java
Thu Jan 27 20:19:02 2011
@@ -21,6 +21,8 @@ package org.apache.directory.shared.ldap
 
 
 import org.apache.directory.shared.ldap.model.message.ModifyDnRequest;
+import org.apache.directory.shared.ldap.model.name.Dn;
+import org.apache.directory.shared.ldap.model.name.Rdn;
 
 
 /**
@@ -28,7 +30,7 @@ import org.apache.directory.shared.ldap.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class ModifyDnRequestDecorator extends MessageDecorator
+public class ModifyDnRequestDecorator extends SingleReplyRequestDecorator implements ModifyDnRequest
 {
     /** The modify Dn request length */
     private int modifyDnRequestLength;
@@ -71,4 +73,90 @@ public class ModifyDnRequestDecorator ex
     {
         return modifyDnRequestLength;
     }
+
+
+    //-------------------------------------------------------------------------
+    // The ModifyDnResponse methods
+    //-------------------------------------------------------------------------
+    
+    
+    /**
+     * {@inheritDoc}
+     */
+    public Dn getName()
+    {
+        return getModifyDnRequest().getName();
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public void setName( Dn name )
+    {
+        getModifyDnRequest().setName( name );
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public Rdn getNewRdn()
+    {
+        return getModifyDnRequest().getNewRdn();
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public void setNewRdn( Rdn newRdn )
+    {
+        getModifyDnRequest().setNewRdn( newRdn );
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public boolean getDeleteOldRdn()
+    {
+        return getModifyDnRequest().getDeleteOldRdn();
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public void setDeleteOldRdn( boolean deleteOldRdn )
+    {
+        getModifyDnRequest().setDeleteOldRdn( deleteOldRdn );
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public Dn getNewSuperior()
+    {
+        return getModifyDnRequest().getNewSuperior();
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public void setNewSuperior( Dn newSuperior )
+    {
+        getModifyDnRequest().setNewSuperior( newSuperior );
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public boolean isMove()
+    {
+        return getModifyDnRequest().isMove();
+    }
 }

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/decorators/ModifyDnResponseDecorator.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/decorators/ModifyDnResponseDecorator.java?rev=1064289&r1=1064288&r2=1064289&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/decorators/ModifyDnResponseDecorator.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/decorators/ModifyDnResponseDecorator.java
Thu Jan 27 20:19:02 2011
@@ -28,7 +28,7 @@ import org.apache.directory.shared.ldap.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class ModifyDnResponseDecorator extends ResponseDecorator
+public class ModifyDnResponseDecorator extends ResponseDecorator implements ModifyDnResponse
 {
     /** The encoded modifyDnResponse length */
     private int modifyDnResponseLength;



Mime
View raw message