directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1063471 - in /directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap: codec/ codec/actions/ codec/decorators/ model/message/
Date Tue, 25 Jan 2011 21:29:17 GMT
Author: elecharny
Date: Tue Jan 25 21:29:17 2011
New Revision: 1063471

URL: http://svn.apache.org/viewvc?rev=1063471&view=rev
Log:
Hide some decoding details from the ModifyRequestImpl class, and move them to the associated
decorator

Modified:
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapMessageContainer.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapMessageGrammar.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/ModifyAttributeValueAction.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/ModifyRequestDecorator.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/model/message/ModifyRequestImpl.java

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapMessageContainer.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapMessageContainer.java?rev=1063471&r1=1063470&r2=1063471&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapMessageContainer.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapMessageContainer.java
Tue Jan 25 21:29:17 2011
@@ -22,6 +22,8 @@ package org.apache.directory.shared.ldap
 
 import org.apache.directory.shared.asn1.ber.AbstractContainer;
 import org.apache.directory.shared.ldap.codec.controls.AbstractControl;
+import org.apache.directory.shared.ldap.codec.decorators.ModifyRequestDecorator;
+import org.apache.directory.shared.ldap.message.spi.BinaryAttributeDetector;
 import org.apache.directory.shared.ldap.model.message.AbandonRequest;
 import org.apache.directory.shared.ldap.model.message.AddRequest;
 import org.apache.directory.shared.ldap.model.message.AddResponse;
@@ -34,7 +36,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.model.message.ExtendedRequest;
 import org.apache.directory.shared.ldap.model.message.ExtendedResponse;
 import org.apache.directory.shared.ldap.model.message.IntermediateResponse;
-import org.apache.directory.shared.ldap.model.message.*;
+import org.apache.directory.shared.ldap.model.message.Message;
 import org.apache.directory.shared.ldap.model.message.ModifyDnRequest;
 import org.apache.directory.shared.ldap.model.message.ModifyDnResponse;
 import org.apache.directory.shared.ldap.model.message.ModifyRequest;
@@ -44,7 +46,6 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.model.message.SearchResultEntry;
 import org.apache.directory.shared.ldap.model.message.SearchResultReference;
 import org.apache.directory.shared.ldap.model.message.UnbindRequest;
-import org.apache.directory.shared.ldap.message.spi.BinaryAttributeDetector;
 
 
 /**
@@ -219,11 +220,20 @@ public class LdapMessageContainer extend
 
 
     /**
+     * @return Returns the ModifyRequestDecorator stored in the container
+     */
+    public ModifyRequestDecorator getModifyRequestDecorator()
+    {
+        return ( ModifyRequestDecorator ) message;
+    }
+
+
+    /**
      * @return Returns the ModifyRequest stored in the container
      */
     public ModifyRequest getModifyRequest()
     {
-        return ( ModifyRequest ) message;
+        return (ModifyRequest)(( ModifyRequestDecorator ) message).getMessage();
     }
 
 

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapMessageGrammar.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapMessageGrammar.java?rev=1063471&r1=1063470&r2=1063471&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapMessageGrammar.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapMessageGrammar.java
Tue Jan 25 21:29:17 2011
@@ -27,7 +27,15 @@ import org.apache.directory.shared.asn1.
 import org.apache.directory.shared.asn1.ber.grammar.Grammar;
 import org.apache.directory.shared.asn1.ber.grammar.GrammarAction;
 import org.apache.directory.shared.asn1.ber.grammar.GrammarTransition;
-import org.apache.directory.shared.asn1.ber.tlv.*;
+import org.apache.directory.shared.asn1.ber.tlv.BooleanDecoder;
+import org.apache.directory.shared.asn1.ber.tlv.BooleanDecoderException;
+import org.apache.directory.shared.asn1.ber.tlv.IntegerDecoder;
+import org.apache.directory.shared.asn1.ber.tlv.IntegerDecoderException;
+import org.apache.directory.shared.asn1.ber.tlv.LongDecoder;
+import org.apache.directory.shared.asn1.ber.tlv.LongDecoderException;
+import org.apache.directory.shared.asn1.ber.tlv.TLV;
+import org.apache.directory.shared.asn1.ber.tlv.UniversalTag;
+import org.apache.directory.shared.asn1.ber.tlv.Value;
 import org.apache.directory.shared.asn1.util.OID;
 import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.codec.actions.AttributeDescAction;
@@ -63,8 +71,10 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.codec.actions.StoreTypeMatchingRuleAction;
 import org.apache.directory.shared.ldap.codec.actions.ValueAction;
 import org.apache.directory.shared.ldap.codec.controls.ControlFactory;
+import org.apache.directory.shared.ldap.codec.decorators.ModifyRequestDecorator;
 import org.apache.directory.shared.ldap.codec.search.ExtensibleMatchFilter;
 import org.apache.directory.shared.ldap.codec.search.SubstringFilter;
+import org.apache.directory.shared.ldap.message.SearchRequestImpl;
 import org.apache.directory.shared.ldap.model.exception.LdapException;
 import org.apache.directory.shared.ldap.model.exception.LdapInvalidDnException;
 import org.apache.directory.shared.ldap.model.filter.SearchScope;
@@ -74,7 +84,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.model.message.AddRequestImpl;
 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.*;
+import org.apache.directory.shared.ldap.model.message.AliasDerefMode;
 import org.apache.directory.shared.ldap.model.message.BindRequest;
 import org.apache.directory.shared.ldap.model.message.BindRequestImpl;
 import org.apache.directory.shared.ldap.model.message.BindResponse;
@@ -83,6 +93,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.model.message.CompareRequestImpl;
 import org.apache.directory.shared.ldap.model.message.CompareResponse;
 import org.apache.directory.shared.ldap.model.message.CompareResponseImpl;
+import org.apache.directory.shared.ldap.model.message.Control;
 import org.apache.directory.shared.ldap.model.message.DeleteRequest;
 import org.apache.directory.shared.ldap.model.message.DeleteRequestImpl;
 import org.apache.directory.shared.ldap.model.message.DeleteResponse;
@@ -91,8 +102,10 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.model.message.ExtendedRequestImpl;
 import org.apache.directory.shared.ldap.model.message.ExtendedResponse;
 import org.apache.directory.shared.ldap.model.message.ExtendedResponseImpl;
+import org.apache.directory.shared.ldap.model.message.IntermediateResponse;
 import org.apache.directory.shared.ldap.model.message.IntermediateResponseImpl;
 import org.apache.directory.shared.ldap.model.message.LdapResult;
+import org.apache.directory.shared.ldap.model.message.Message;
 import org.apache.directory.shared.ldap.model.message.ModifyDnRequest;
 import org.apache.directory.shared.ldap.model.message.ModifyDnRequestImpl;
 import org.apache.directory.shared.ldap.model.message.ModifyDnResponse;
@@ -103,9 +116,9 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.model.message.ModifyResponseImpl;
 import org.apache.directory.shared.ldap.model.message.Referral;
 import org.apache.directory.shared.ldap.model.message.ReferralImpl;
+import org.apache.directory.shared.ldap.model.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.model.message.ResultResponse;
 import org.apache.directory.shared.ldap.model.message.SearchRequest;
-import org.apache.directory.shared.ldap.message.SearchRequestImpl;
 import org.apache.directory.shared.ldap.model.message.SearchResultDone;
 import org.apache.directory.shared.ldap.model.message.SearchResultDoneImpl;
 import org.apache.directory.shared.ldap.model.message.SearchResultEntry;
@@ -114,7 +127,6 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.model.message.SearchResultReferenceImpl;
 import org.apache.directory.shared.ldap.model.message.UnbindRequest;
 import org.apache.directory.shared.ldap.model.message.UnbindRequestImpl;
-import org.apache.directory.shared.ldap.model.message.Control;
 import org.apache.directory.shared.ldap.model.name.Dn;
 import org.apache.directory.shared.ldap.model.name.Rdn;
 import org.apache.directory.shared.util.StringConstants;
@@ -1408,7 +1420,8 @@ public final class LdapMessageGrammar ex
 
                     // Now, we can allocate the ModifyRequest Object
                     ModifyRequest modifyRequest = new ModifyRequestImpl( ldapMessageContainer.getMessageId()
);
-                    ldapMessageContainer.setMessage( modifyRequest );
+                    ModifyRequestDecorator modifyRequestDecorator = new ModifyRequestDecorator(
modifyRequest );
+                    ldapMessageContainer.setMessage( modifyRequestDecorator );
                 }
             } );
 
@@ -1428,7 +1441,8 @@ public final class LdapMessageGrammar ex
                 {
 
                     LdapMessageContainer ldapMessageContainer = ( LdapMessageContainer )
container;
-                    ModifyRequest modifyRequest = ldapMessageContainer.getModifyRequest();
+                    ModifyRequestDecorator modifyRequestDecorator = ldapMessageContainer.getModifyRequestDecorator();
+                    ModifyRequest modifyRequest = (ModifyRequest)modifyRequestDecorator.getMessage();
 
                     TLV tlv = ldapMessageContainer.getCurrentTLV();
 
@@ -1437,7 +1451,7 @@ public final class LdapMessageGrammar ex
                     // Store the value.
                     if ( tlv.getLength() == 0 )
                     {
-                        modifyRequest.setName( object );
+                        ((ModifyRequest)modifyRequestDecorator.getMessage()).setName( object
);
                     }
                     else
                     {
@@ -1511,7 +1525,7 @@ public final class LdapMessageGrammar ex
                 {
 
                     LdapMessageContainer ldapMessageContainer = ( LdapMessageContainer )
container;
-                    ModifyRequest modifyRequest = ldapMessageContainer.getModifyRequest();
+                    ModifyRequestDecorator modifyRequestDecorator = ldapMessageContainer.getModifyRequestDecorator();
 
                     TLV tlv = ldapMessageContainer.getCurrentTLV();
 
@@ -1532,7 +1546,7 @@ public final class LdapMessageGrammar ex
                     }
 
                     // Store the current operation.
-                    ( ( ModifyRequestImpl ) modifyRequest ).setCurrentOperation( operation
);
+                    modifyRequestDecorator.setCurrentOperation( operation );
 
                     if ( IS_DEBUG )
                     {
@@ -1593,7 +1607,8 @@ public final class LdapMessageGrammar ex
                 {
 
                     LdapMessageContainer ldapMessageContainer = ( LdapMessageContainer )
container;
-                    ModifyRequest modifyRequest = ldapMessageContainer.getModifyRequest();
+                    ModifyRequestDecorator modifyRequestDecorator = ldapMessageContainer.getModifyRequestDecorator();
+                    ModifyRequest modifyRequest = (ModifyRequest)modifyRequestDecorator.getMessage();
 
                     TLV tlv = ldapMessageContainer.getCurrentTLV();
 
@@ -1612,7 +1627,7 @@ public final class LdapMessageGrammar ex
                     else
                     {
                         type = getType(tlv.getValue().getData());
-                        ( ( ModifyRequestImpl ) modifyRequest ).addAttributeTypeAndValues(
type );
+                        modifyRequestDecorator.addAttributeTypeAndValues( type );
                     }
 
                     if ( IS_DEBUG )

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/ModifyAttributeValueAction.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/ModifyAttributeValueAction.java?rev=1063471&r1=1063470&r2=1063471&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/ModifyAttributeValueAction.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/ModifyAttributeValueAction.java
Tue Jan 25 21:29:17 2011
@@ -24,8 +24,7 @@ import org.apache.directory.shared.asn1.
 import org.apache.directory.shared.asn1.ber.grammar.GrammarAction;
 import org.apache.directory.shared.asn1.ber.tlv.TLV;
 import org.apache.directory.shared.ldap.codec.LdapMessageContainer;
-import org.apache.directory.shared.ldap.model.message.ModifyRequest;
-import org.apache.directory.shared.ldap.model.message.ModifyRequestImpl;
+import org.apache.directory.shared.ldap.codec.decorators.ModifyRequestDecorator;
 import org.apache.directory.shared.util.StringConstants;
 import org.apache.directory.shared.util.Strings;
 import org.slf4j.Logger;
@@ -61,7 +60,7 @@ public class ModifyAttributeValueAction 
     public void action( Asn1Container container )
     {
         LdapMessageContainer ldapMessageContainer = ( LdapMessageContainer ) container;
-        ModifyRequest modifyRequest = ldapMessageContainer.getModifyRequest();
+        ModifyRequestDecorator modifyRequestDecorator = ldapMessageContainer.getModifyRequestDecorator();
 
         TLV tlv = ldapMessageContainer.getCurrentTLV();
 
@@ -70,20 +69,19 @@ public class ModifyAttributeValueAction 
 
         if ( tlv.getLength() == 0 )
         {
-            ( (ModifyRequestImpl) modifyRequest ).addAttributeValue( "" );
+            modifyRequestDecorator.addAttributeValue( "" );
         }
         else
         {
             value = tlv.getValue().getData();
 
-            if ( ldapMessageContainer.isBinary( ( ( ModifyRequestImpl ) modifyRequest ).getCurrentAttributeType()
) )
+            if ( ldapMessageContainer.isBinary( modifyRequestDecorator.getCurrentAttributeType()
) )
             {
-                ( ( ModifyRequestImpl ) modifyRequest ).addAttributeValue( value );
+                modifyRequestDecorator.addAttributeValue( value );
             }
             else
             {
-                ( ( ModifyRequestImpl ) modifyRequest )
-                    .addAttributeValue( Strings.utf8ToString((byte[]) value) );
+                modifyRequestDecorator.addAttributeValue( Strings.utf8ToString((byte[]) value)
);
             }
         }
 

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=1063471&r1=1063470&r2=1063471&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
Tue Jan 25 21:29:17 2011
@@ -20,18 +20,23 @@
 package org.apache.directory.shared.ldap.codec.decorators;
 
 
+import java.util.Map;
+
 import org.apache.directory.shared.asn1.EncoderException;
+import org.apache.directory.shared.ldap.model.exception.MessageException;
 import org.apache.directory.shared.ldap.model.message.AddRequest;
 import org.apache.directory.shared.ldap.model.message.AddResponse;
 import org.apache.directory.shared.ldap.model.message.BindRequest;
 import org.apache.directory.shared.ldap.model.message.BindResponse;
 import org.apache.directory.shared.ldap.model.message.CompareRequest;
 import org.apache.directory.shared.ldap.model.message.CompareResponse;
+import org.apache.directory.shared.ldap.model.message.Control;
 import org.apache.directory.shared.ldap.model.message.DeleteResponse;
 import org.apache.directory.shared.ldap.model.message.ExtendedRequest;
 import org.apache.directory.shared.ldap.model.message.ExtendedResponse;
 import org.apache.directory.shared.ldap.model.message.IntermediateResponse;
 import org.apache.directory.shared.ldap.model.message.Message;
+import org.apache.directory.shared.ldap.model.message.MessageTypeEnum;
 import org.apache.directory.shared.ldap.model.message.ModifyDnRequest;
 import org.apache.directory.shared.ldap.model.message.ModifyDnResponse;
 import org.apache.directory.shared.ldap.model.message.ModifyRequest;
@@ -48,7 +53,7 @@ import org.apache.directory.shared.ldap.
  * @TODO make this class abstract, after finishing switch and all types and make default
blow an EncoderException
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class MessageDecorator
+public class MessageDecorator implements Message
 {
     /** The decorated Control */
     private final Message decoratedMessage;
@@ -187,4 +192,76 @@ public class MessageDecorator
     {
         return messageLength;
     }
+
+
+    public MessageTypeEnum getType()
+    {
+        return decoratedMessage.getType();
+    }
+
+
+    public Map<String, Control> getControls()
+    {
+        return decoratedMessage.getControls();
+    }
+
+
+    public Control getControl( String oid )
+    {
+        return decoratedMessage.getControl( oid );
+    }
+
+
+    public Control getCurrentControl()
+    {
+        return decoratedMessage.getCurrentControl();
+    }
+
+
+    public boolean hasControl( String oid )
+    {
+        return decoratedMessage.hasControl( oid );
+    }
+
+
+    public void addControl( Control control ) throws MessageException
+    {
+        decoratedMessage.addControl( control );
+    }
+
+
+    public void addAllControls( Control[] controls ) throws MessageException
+    {
+        decoratedMessage.addAllControls( controls );
+    }
+
+
+    public void removeControl( Control control ) throws MessageException
+    {
+        decoratedMessage.removeControl( control );
+    }
+
+
+    public int getMessageId()
+    {
+        return decoratedMessage.getMessageId();
+    }
+
+
+    public Object get( Object key )
+    {
+        return decoratedMessage.get( key );
+    }
+
+
+    public Object put( Object key, Object value )
+    {
+        return decoratedMessage.put( key, value );
+    }
+
+
+    public void setMessageId( int messageId )
+    {
+        decoratedMessage.setMessageId( messageId );
+    }
 }

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=1063471&r1=1063470&r2=1063471&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
Tue Jan 25 21:29:17 2011
@@ -23,6 +23,11 @@ package org.apache.directory.shared.ldap
 import java.util.LinkedList;
 import java.util.List;
 
+import org.apache.directory.shared.ldap.model.entry.DefaultEntryAttribute;
+import org.apache.directory.shared.ldap.model.entry.DefaultModification;
+import org.apache.directory.shared.ldap.model.entry.EntryAttribute;
+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;
 
 
@@ -48,6 +53,13 @@ public class ModifyRequestDecorator exte
     /** The list of all the value lengths */
     private List<Integer> valuesLength = new LinkedList<Integer>();
 
+    /** The current attribute being decoded */
+    private EntryAttribute currentAttribute;
+
+    /** A local storage for the operation */
+    private ModificationOperation currentOperation;
+
+
 
     /**
      * Makes a ModifyRequest encodable.
@@ -157,4 +169,60 @@ public class ModifyRequestDecorator exte
     {
         return valuesLength;
     }
+    
+    
+    /**
+     * Store the current operation
+     * 
+     * @param currentOperation The currentOperation to set.
+     */
+    public void setCurrentOperation( int currentOperation )
+    {
+        this.currentOperation = ModificationOperation.getOperation( currentOperation );
+    }
+
+
+    /**
+     * Add a new attributeTypeAndValue
+     * 
+     * @param type The attribute's name
+     */
+    public void addAttributeTypeAndValues( String type )
+    {
+        currentAttribute = new DefaultEntryAttribute( type );
+
+        Modification modification = new DefaultModification( currentOperation, currentAttribute
);
+        ((ModifyRequest)getMessage()).addModification( modification );
+    }
+
+
+    /**
+     * Return the current attribute's type
+     */
+    public String getCurrentAttributeType()
+    {
+        return currentAttribute.getId();
+    }
+
+
+    /**
+     * Add a new value to the current attribute
+     * 
+     * @param value The value to add
+     */
+    public void addAttributeValue( byte[] value )
+    {
+        currentAttribute.add( value );
+    }
+
+
+    /**
+     * Add a new value to the current attribute
+     * 
+     * @param value The value to add
+     */
+    public void addAttributeValue( String value )
+    {
+        currentAttribute.add( value );
+    }
 }

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/model/message/ModifyRequestImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/model/message/ModifyRequestImpl.java?rev=1063471&r1=1063470&r2=1063471&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/model/message/ModifyRequestImpl.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/model/message/ModifyRequestImpl.java
Tue Jan 25 21:29:17 2011
@@ -53,13 +53,6 @@ public class ModifyRequestImpl extends A
     /** The associated response */
     private ModifyResponse response;
 
-    /** The current attribute being decoded */
-    private EntryAttribute currentAttribute;
-
-    /** A local storage for the operation */
-    private ModificationOperation currentOperation;
-
-
     /**
      * Creates a ModifyRequest implementing object used to modify the
      * attributes of an entry.
@@ -85,8 +78,6 @@ public class ModifyRequestImpl extends A
     // ------------------------------------------------------------------------
     // ModifyRequest Interface Method Implementations
     // ------------------------------------------------------------------------
-
-
     /**
      * Gets an immutable Collection of modification items representing the
      * atomic changes to perform on the candidate entry to modify.
@@ -235,62 +226,6 @@ public class ModifyRequestImpl extends A
 
 
     /**
-     * Store the current operation
-     * 
-     * @param currentOperation The currentOperation to set.
-     */
-    public void setCurrentOperation( int currentOperation )
-    {
-        this.currentOperation = ModificationOperation.getOperation( currentOperation );
-    }
-
-
-    /**
-     * Add a new attributeTypeAndValue
-     * 
-     * @param type The attribute's name
-     */
-    public void addAttributeTypeAndValues( String type )
-    {
-        currentAttribute = new DefaultEntryAttribute( type );
-
-        Modification modification = new DefaultModification( currentOperation, currentAttribute
);
-        mods.add( modification );
-    }
-
-
-    /**
-     * Return the current attribute's type
-     */
-    public String getCurrentAttributeType()
-    {
-        return currentAttribute.getId();
-    }
-
-
-    /**
-     * Add a new value to the current attribute
-     * 
-     * @param value The value to add
-     */
-    public void addAttributeValue( byte[] value )
-    {
-        currentAttribute.add( value );
-    }
-
-
-    /**
-     * Add a new value to the current attribute
-     * 
-     * @param value The value to add
-     */
-    public void addAttributeValue( String value )
-    {
-        currentAttribute.add( value );
-    }
-
-
-    /**
      * Removes a Modification to the set of modifications composing this
      * modify request.
      * 



Mime
View raw message