directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r1064259 - in /directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap: codec/decorators/ model/message/
Date Thu, 27 Jan 2011 19:13:46 GMT
Author: akarasulu
Date: Thu Jan 27 19:13:45 2011
New Revision: 1064259

URL: http://svn.apache.org/viewvc?rev=1064259&view=rev
Log:
working on the decorator containment tree making it mirror the model

Added:
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/decorators/AbandonableRequestDecorator.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/decorators/AbandonableResultResponseRequestDecorator.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/decorators/ResultResponseRequestDecorator.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/decorators/SingleReplyRequestDecorator.java
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
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/decorators/DeleteRequestDecorator.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/model/message/AbstractMessage.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/model/message/Message.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/model/message/MessageTypeEnum.java

Added: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/decorators/AbandonableRequestDecorator.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/decorators/AbandonableRequestDecorator.java?rev=1064259&view=auto
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/decorators/AbandonableRequestDecorator.java
(added)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/decorators/AbandonableRequestDecorator.java
Thu Jan 27 19:13:45 2011
@@ -0,0 +1,82 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *  
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *  
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License. 
+ *  
+ */
+package org.apache.directory.shared.ldap.codec.decorators;
+
+
+import org.apache.directory.shared.ldap.model.message.AbandonListener;
+import org.apache.directory.shared.ldap.model.message.AbandonableRequest;
+import org.apache.directory.shared.ldap.model.message.Message;
+
+
+/**
+ * A decorator for the LdapResultResponse message
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public class AbandonableRequestDecorator extends RequestDecorator implements AbandonableRequest
+{
+    /**
+     * Makes Request a MessageDecorator.
+     *
+     * @param decoratedMessage the decorated message
+     */
+    public AbandonableRequestDecorator( Message decoratedMessage )
+    {
+        super( decoratedMessage );
+    }
+
+    
+    /**
+     * Gets the decorated AbandonableRequest.
+     *
+     * @return The decorated {@link AbandonableRequest}
+     */
+    public AbandonableRequest getAbandonableRequest()
+    {
+        return ( AbandonableRequest ) getDecoratedMessage();
+    }
+    
+    
+    /**
+     * {@inheritDoc}
+     */
+    public void abandon()
+    {
+        getAbandonableRequest().abandon();
+    }
+
+    
+    /**
+     * {@inheritDoc}
+     */
+    public boolean isAbandoned()
+    {
+        return getAbandonableRequest().isAbandoned();
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public void addAbandonListener( AbandonListener listener )
+    {
+        getAbandonableRequest().addAbandonListener( listener );
+    }
+}

Added: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/decorators/AbandonableResultResponseRequestDecorator.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/decorators/AbandonableResultResponseRequestDecorator.java?rev=1064259&view=auto
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/decorators/AbandonableResultResponseRequestDecorator.java
(added)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/decorators/AbandonableResultResponseRequestDecorator.java
Thu Jan 27 19:13:45 2011
@@ -0,0 +1,63 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *  
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *  
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License. 
+ *  
+ */
+package org.apache.directory.shared.ldap.codec.decorators;
+
+
+import org.apache.directory.shared.ldap.model.message.Message;
+import org.apache.directory.shared.ldap.model.message.Request;
+import org.apache.directory.shared.ldap.model.message.ResultResponse;
+import org.apache.directory.shared.ldap.model.message.ResultResponseRequest;
+
+
+/**
+ * A decorator for the LdapResultResponse message
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public class AbandonableResultResponseRequestDecorator extends AbandonableRequestDecorator
implements ResultResponseRequest
+{
+    /**
+     * Makes Request a MessageDecorator.
+     *
+     * @param decoratedMessage the decorated message
+     */
+    public AbandonableResultResponseRequestDecorator( Message decoratedMessage )
+    {
+        super( decoratedMessage );
+    }
+    
+
+    /**
+     * {@inheritDoc}
+     */
+    public boolean hasResponse()
+    {
+        return ( ( Request ) getDecoratedMessage() ).hasResponse();
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public ResultResponse getResultResponse()
+    {
+        return ( ( ResultResponseRequest ) getDecoratedMessage() ).getResultResponse();
+    }
+}

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=1064259&r1=1064258&r2=1064259&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 19:13:45 2011
@@ -25,10 +25,7 @@ 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.MessageTypeEnum;
-import org.apache.directory.shared.ldap.model.message.ResultResponse;
 import org.apache.directory.shared.ldap.model.name.Dn;
 
 
@@ -37,7 +34,7 @@ import org.apache.directory.shared.ldap.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class AddRequestDecorator extends RequestDecorator implements AddRequest
+public class AddRequestDecorator extends SingleReplyRequestDecorator implements AddRequest
 {
     /** The add request length */
     private int addRequestLength;
@@ -147,55 +144,7 @@ public class AddRequestDecorator extends
         return valuesLength;
     }
 
-
-    //-------------------------------------------------------------------------
-    // The AddRequest methods
-    //-------------------------------------------------------------------------
-    /**
-     * {@inheritDoc}
-     */
-    public MessageTypeEnum getResponseType()
-    {
-        return getAddRequest().getResponseType();
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
-    public ResultResponse getResultResponse()
-    {
-        return getAddRequest().getResultResponse();
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
-    public void abandon()
-    {
-        getAddRequest().abandon();
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
-    public boolean isAbandoned()
-    {
-        return getAddRequest().isAbandoned();
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
-    public void addAbandonListener( AbandonListener listener )
-    {
-        getAddRequest().addAbandonListener( listener );
-    }
-
-
+    
     /**
      * {@inheritDoc}
      */
@@ -231,57 +180,40 @@ public class AddRequestDecorator extends
         getAddRequest().setEntry( entry );
     }
 
+    
+    // TODO all these must go
 
-    /**
-     * {@inheritDoc}
-     */
     public void addAttributeType( String type ) throws LdapException
     {
-        getAddRequest().addAttributeType( type );
+        // TODO Auto-generated method stub
+        
     }
 
 
-    /**
-     * {@inheritDoc}
-     */
     public String getCurrentAttributeType()
     {
-        return getAddRequest().getCurrentAttributeType();
+        // TODO Auto-generated method stub
+        return null;
     }
 
 
-    /**
-     * {@inheritDoc}
-     */
     public void addAttributeValue( String value )
     {
-        getAddRequest().addAttributeValue( value );
+        // TODO Auto-generated method stub
+        
     }
 
 
-    /**
-     * {@inheritDoc}
-     */
     public void addAttributeValue( Value<?> value )
     {
-        getAddRequest().addAttributeValue( value );
+        // TODO Auto-generated method stub
+        
     }
 
 
-    /**
-     * {@inheritDoc}
-     */
     public void addAttributeValue( byte[] value )
     {
-        getAddRequest().addAttributeValue( value );
-    }
-    
-    
-    /**
-     * {@inheritDoc}
-     */
-    public String toString()
-    {
-        return getAddRequest().toString();
+        // TODO Auto-generated method stub
+        
     }
 }

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=1064259&r1=1064258&r2=1064259&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 19:13:45 2011
@@ -71,16 +71,4 @@ public class AddResponseDecorator extend
     {
         return addResponseLength;
     }
-
-
-    //-------------------------------------------------------------------------
-    // The AddResponse methods
-    //-------------------------------------------------------------------------
-    /**
-     * {@inheritDoc}
-     */
-    public String toString()
-    {
-        return getAddResponse().toString();
-    }
 }

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/decorators/DeleteRequestDecorator.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/decorators/DeleteRequestDecorator.java?rev=1064259&r1=1064258&r2=1064259&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/decorators/DeleteRequestDecorator.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/decorators/DeleteRequestDecorator.java
Thu Jan 27 19:13:45 2011
@@ -20,10 +20,7 @@
 package org.apache.directory.shared.ldap.codec.decorators;
 
 
-import org.apache.directory.shared.ldap.model.message.AbandonListener;
 import org.apache.directory.shared.ldap.model.message.DeleteRequest;
-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;
 
 
@@ -32,7 +29,7 @@ import org.apache.directory.shared.ldap.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class DeleteRequestDecorator extends RequestDecorator implements DeleteRequest
+public class DeleteRequestDecorator extends SingleReplyRequestDecorator implements DeleteRequest
 {
     /**
      * Makes a DeleteRequest a MessageDecorator.
@@ -57,51 +54,8 @@ public class DeleteRequestDecorator exte
     //-------------------------------------------------------------------------
     // The DeleteRequest methods
     //-------------------------------------------------------------------------
-    /**
-     * {@inheritDoc}
-     */
-    public MessageTypeEnum getResponseType()
-    {
-        return getDeleteRequest().getResponseType();
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
-    public ResultResponse getResultResponse()
-    {
-        return getDeleteRequest().getResultResponse();
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
-    public void abandon()
-    {
-        getDeleteRequest().abandon();
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
-    public boolean isAbandoned()
-    {
-        return getDeleteRequest().isAbandoned();
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
-    public void addAbandonListener( AbandonListener listener )
-    {
-        getDeleteRequest().addAbandonListener( listener );
-    }
-
 
+    
     /**
      * {@inheritDoc}
      */
@@ -118,13 +72,4 @@ public class DeleteRequestDecorator exte
     {
         getDeleteRequest().setName( name );
     }
-
-
-    /**
-     * {@inheritDoc}
-     */
-    public String toString()
-    {
-        return getDeleteRequest().toString();
-    }
 }

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=1064259&r1=1064258&r2=1064259&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 19:13:45 2011
@@ -63,6 +63,9 @@ public class MessageDecorator implements
     /** The length of the controls */
     private int controlsLength;
 
+    /** The current control */
+    private Control currentControl;
+
     
     public static MessageDecorator getDecorator( Message decoratedMessage )
     {
@@ -211,9 +214,14 @@ public class MessageDecorator implements
     }
 
 
+    /**
+     * Get the current Control Object
+     * 
+     * @return The current Control Object
+     */
     public Control getCurrentControl()
     {
-        return decoratedMessage.getCurrentControl();
+        return currentControl;
     }
 
 
@@ -226,6 +234,7 @@ public class MessageDecorator implements
     public void addControl( Control control ) throws MessageException
     {
         decoratedMessage.addControl( control );
+        currentControl = control;
     }
 
 
@@ -263,4 +272,10 @@ public class MessageDecorator implements
     {
         decoratedMessage.setMessageId( messageId );
     }
+
+
+    public String toString()
+    {
+        return decoratedMessage.toString();
+    }
 }

Added: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/decorators/ResultResponseRequestDecorator.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/decorators/ResultResponseRequestDecorator.java?rev=1064259&view=auto
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/decorators/ResultResponseRequestDecorator.java
(added)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/decorators/ResultResponseRequestDecorator.java
Thu Jan 27 19:13:45 2011
@@ -0,0 +1,63 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *  
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *  
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License. 
+ *  
+ */
+package org.apache.directory.shared.ldap.codec.decorators;
+
+
+import org.apache.directory.shared.ldap.model.message.Message;
+import org.apache.directory.shared.ldap.model.message.Request;
+import org.apache.directory.shared.ldap.model.message.ResultResponse;
+import org.apache.directory.shared.ldap.model.message.ResultResponseRequest;
+
+
+/**
+ * A decorator for the LdapResultResponse message
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public class ResultResponseRequestDecorator extends RequestDecorator implements ResultResponseRequest
+{
+    /**
+     * Makes Request a MessageDecorator.
+     *
+     * @param decoratedMessage the decorated message
+     */
+    public ResultResponseRequestDecorator( Message decoratedMessage )
+    {
+        super( decoratedMessage );
+    }
+    
+
+    /**
+     * {@inheritDoc}
+     */
+    public boolean hasResponse()
+    {
+        return ( ( Request ) getDecoratedMessage() ).hasResponse();
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public ResultResponse getResultResponse()
+    {
+        return ( ( ResultResponseRequest ) getDecoratedMessage() ).getResultResponse();
+    }
+}

Added: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/decorators/SingleReplyRequestDecorator.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/decorators/SingleReplyRequestDecorator.java?rev=1064259&view=auto
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/decorators/SingleReplyRequestDecorator.java
(added)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/decorators/SingleReplyRequestDecorator.java
Thu Jan 27 19:13:45 2011
@@ -0,0 +1,53 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *  
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *  
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License. 
+ *  
+ */
+package org.apache.directory.shared.ldap.codec.decorators;
+
+
+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.SingleReplyRequest;
+
+
+/**
+ * A decorator for the LdapResultResponse message
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public class SingleReplyRequestDecorator extends AbandonableResultResponseRequestDecorator
implements SingleReplyRequest
+{
+    /**
+     * Makes Request a MessageDecorator.
+     *
+     * @param decoratedMessage the decorated message
+     */
+    public SingleReplyRequestDecorator( Message decoratedMessage )
+    {
+        super( decoratedMessage );
+    }
+
+    
+    /**
+     * {@inheritDoc}
+     */
+    public MessageTypeEnum getResponseType()
+    {
+        return ( ( SingleReplyRequest ) getDecoratedMessage() ).getResponseType();
+    }
+}

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/model/message/AbstractMessage.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/model/message/AbstractMessage.java?rev=1064259&r1=1064258&r2=1064259&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/model/message/AbstractMessage.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/model/message/AbstractMessage.java
Thu Jan 27 19:13:45 2011
@@ -34,7 +34,7 @@ import org.apache.directory.shared.ldap.
  */
 public abstract class AbstractMessage implements Message
 {
-    static final long serialVersionUID = 7601738291101182094L;
+    private static final long serialVersionUID = 7601738291101182094L;
 
     /** Map of message controls using OID Strings for keys and Control values */
     protected final Map<String, Control> controls;
@@ -48,9 +48,6 @@ public abstract class AbstractMessage im
     /** Transient Message Parameter Hash */
     private final Map<Object, Object> parameters;
 
-    /** The current control */
-    private Control currentControl;
-
 
     /**
      * Completes the instantiation of a Message.
@@ -106,17 +103,6 @@ public abstract class AbstractMessage im
 
 
     /**
-     * Get the current Control Object
-     * 
-     * @return The current Control Object
-     */
-    public Control getCurrentControl()
-    {
-        return currentControl;
-    }
-
-
-    /**
      * {@inheritDoc}
      */
     public boolean hasControl( String oid )
@@ -131,7 +117,6 @@ public abstract class AbstractMessage im
     public void addControl( Control control ) throws MessageException
     {
         controls.put( control.getOid(), control );
-        currentControl = control;
     }
 
 
@@ -165,7 +150,7 @@ public abstract class AbstractMessage im
      * Gets a message scope parameter. Message scope parameters are temporary
      * variables associated with a message and are set locally to be used to
      * associate housekeeping information with a request or its processing.
-     * These parameters are never transmitted nor recieved, think of them as
+     * These parameters are never transmitted nor received, think of them as
      * transient data associated with the message or its processing. These
      * transient parameters are not locked down so modifications can occur
      * without firing LockExceptions even when this Lockable is in the locked

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/model/message/Message.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/model/message/Message.java?rev=1064259&r1=1064258&r2=1064259&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/model/message/Message.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/model/message/Message.java
Thu Jan 27 19:13:45 2011
@@ -54,20 +54,12 @@ public interface Message
      * Gets the control associated with the given OID.
      * 
      * @param oid The Cntrol's OID we are looking for
-     * @return The Control object instance with ths OID.
+     * @return The Control object instance with the OID.
      */
     Control getControl( String oid );
 
 
     /**
-     * Get the current Control Object
-     * 
-     * @return The current Control Object
-     */
-    Control getCurrentControl();
-
-
-    /**
      * Checks whether or not this message has the specified control.
      *
      * @param oid the OID of the control

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/model/message/MessageTypeEnum.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/model/message/MessageTypeEnum.java?rev=1064259&r1=1064258&r2=1064259&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/model/message/MessageTypeEnum.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/model/message/MessageTypeEnum.java
Thu Jan 27 19:13:45 2011
@@ -19,6 +19,7 @@
  */
 package org.apache.directory.shared.ldap.model.message;
 
+
 /**
  * An enum to store the Ldap message type.
  *
@@ -49,10 +50,9 @@ public enum MessageTypeEnum
     INTERMEDIATE_RESPONSE(20);
 
     /** The internal value */
+    @SuppressWarnings("unused")
     private int value;
-    
-    /** The message Type name */
-    private String name;
+
     
     private MessageTypeEnum( int value )
     {



Mime
View raw message