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 2011/01/27 22:27:37 UTC
svn commit: r1064319 - in
/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/decorators:
ModifyRequestDecorator.java ModifyResponseDecorator.java
SearchResultEntryDecorator.java
Author: akarasulu
Date: Thu Jan 27 21:27:37 2011
New Revision: 1064319
URL: http://svn.apache.org/viewvc?rev=1064319&view=rev
Log:
Finished decorator for modify requests and responses.
Modified:
directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/decorators/ModifyRequestDecorator.java
directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/decorators/ModifyResponseDecorator.java
directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/decorators/SearchResultEntryDecorator.java
Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/decorators/ModifyRequestDecorator.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/decorators/ModifyRequestDecorator.java?rev=1064319&r1=1064318&r2=1064319&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/decorators/ModifyRequestDecorator.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/decorators/ModifyRequestDecorator.java Thu Jan 27 21:27:37 2011
@@ -20,6 +20,7 @@
package org.apache.directory.shared.ldap.codec.decorators;
+import java.util.Collection;
import java.util.LinkedList;
import java.util.List;
@@ -29,6 +30,7 @@ import org.apache.directory.shared.ldap.
import org.apache.directory.shared.ldap.model.entry.Modification;
import org.apache.directory.shared.ldap.model.entry.ModificationOperation;
import org.apache.directory.shared.ldap.model.message.ModifyRequest;
+import org.apache.directory.shared.ldap.model.name.Dn;
/**
@@ -36,7 +38,7 @@ import org.apache.directory.shared.ldap.
*
* @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
*/
-public class ModifyRequestDecorator extends MessageDecorator
+public class ModifyRequestDecorator extends SingleReplyRequestDecorator implements ModifyRequest
{
/** The modify request length */
private int modifyRequestLength;
@@ -225,4 +227,153 @@ public class ModifyRequestDecorator exte
{
currentAttribute.add( value );
}
+
+
+ //-------------------------------------------------------------------------
+ // The SearchResultReference methods
+ //-------------------------------------------------------------------------
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public Dn getName()
+ {
+ return getModifyRequest().getName();
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public void setName( Dn name )
+ {
+ getModifyRequest().setName( name );
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public Collection<Modification> getModifications()
+ {
+ return getModifyRequest().getModifications();
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public void addModification( Modification mod )
+ {
+ getModifyRequest().addModification( mod );
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public void removeModification( Modification mod )
+ {
+ getModifyRequest().removeModification( mod );
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public void remove( String attributeName, String... attributeValue )
+ {
+ getModifyRequest().remove( attributeName, attributeValue );
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public void remove( String attributeName, byte[]... attributeValue )
+ {
+ getModifyRequest().remove( attributeName, attributeValue );
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public void remove( EntryAttribute attr )
+ {
+ getModifyRequest().remove( attr );
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public void addModification( EntryAttribute attr, ModificationOperation modOp )
+ {
+ getModifyRequest().addModification( attr, modOp );
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public void add( String attributeName, String... attributeValue )
+ {
+ getModifyRequest().add( attributeName, attributeValue );
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public void add( String attributeName, byte[]... attributeValue )
+ {
+ getModifyRequest().add( attributeName, attributeValue );
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public void add( EntryAttribute attr )
+ {
+ getModifyRequest().add( attr );
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public void replace( String attributeName )
+ {
+ getModifyRequest().replace( attributeName );
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public void replace( String attributeName, String... attributeValue )
+ {
+ getModifyRequest().replace( attributeName, attributeValue );
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public void replace( String attributeName, byte[]... attributeValue )
+ {
+ getModifyRequest().replace( attributeName, attributeValue );
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public void replace( EntryAttribute attr )
+ {
+ getModifyRequest().replace( attr );
+ }
}
Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/decorators/ModifyResponseDecorator.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/decorators/ModifyResponseDecorator.java?rev=1064319&r1=1064318&r2=1064319&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/decorators/ModifyResponseDecorator.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/decorators/ModifyResponseDecorator.java Thu Jan 27 21:27:37 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 ModifyResponseDecorator extends ResponseDecorator
+public class ModifyResponseDecorator extends ResponseDecorator implements ModifyResponse
{
/** The encoded modifyResponse length */
private int modifyResponseLength;
Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/decorators/SearchResultEntryDecorator.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/decorators/SearchResultEntryDecorator.java?rev=1064319&r1=1064318&r2=1064319&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/decorators/SearchResultEntryDecorator.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/decorators/SearchResultEntryDecorator.java Thu Jan 27 21:27:37 2011
@@ -228,9 +228,6 @@ public class SearchResultEntryDecorator
}
- /**
- * {@inheritDoc}
- */
public void addAttributeValue( Object value )
{
getSearchResultEntry().addAttributeValue( value );