directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1064244 - in /directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/decorators: AddRequestDecorator.java BindRequestDecorator.java CompareRequestDecorator.java DeleteRequestDecorator.java RequestDecorator.java
Date Thu, 27 Jan 2011 18:30:34 GMT
Author: elecharny
Date: Thu Jan 27 18:30:33 2011
New Revision: 1064244

URL: http://svn.apache.org/viewvc?rev=1064244&view=rev
Log:
Added an intermediary RequestDecorator, and used it in the refactored decorators

Added:
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/decorators/RequestDecorator.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/BindRequestDecorator.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/decorators/CompareRequestDecorator.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/decorators/DeleteRequestDecorator.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=1064244&r1=1064243&r2=1064244&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 18:30:33 2011
@@ -37,7 +37,7 @@ import org.apache.directory.shared.ldap.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class AddRequestDecorator extends MessageDecorator implements AddRequest
+public class AddRequestDecorator extends RequestDecorator implements AddRequest
 {
     /** The add request length */
     private int addRequestLength;
@@ -172,15 +172,6 @@ public class AddRequestDecorator extends
     /**
      * {@inheritDoc}
      */
-    public boolean hasResponse()
-    {
-        return getAddRequest().hasResponse();
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
     public void abandon()
     {
         getAddRequest().abandon();

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/decorators/BindRequestDecorator.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/decorators/BindRequestDecorator.java?rev=1064244&r1=1064243&r2=1064244&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/decorators/BindRequestDecorator.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/decorators/BindRequestDecorator.java
Thu Jan 27 18:30:33 2011
@@ -32,7 +32,7 @@ import org.apache.directory.shared.ldap.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class BindRequestDecorator extends MessageDecorator implements BindRequest
+public class BindRequestDecorator extends RequestDecorator implements BindRequest
 {
     /** The bind request length */
     private int bindRequestLength;
@@ -145,15 +145,6 @@ public class BindRequestDecorator extend
     /**
      * {@inheritDoc}
      */
-    public boolean hasResponse()
-    {
-        return getBindRequest().hasResponse();
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
     public void abandon()
     {
         getBindRequest().abandon();

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/decorators/CompareRequestDecorator.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/decorators/CompareRequestDecorator.java?rev=1064244&r1=1064243&r2=1064244&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/decorators/CompareRequestDecorator.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/decorators/CompareRequestDecorator.java
Thu Jan 27 18:30:33 2011
@@ -33,7 +33,7 @@ import org.apache.directory.shared.ldap.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class CompareRequestDecorator extends MessageDecorator implements CompareRequest
+public class CompareRequestDecorator extends RequestDecorator implements CompareRequest
 {
     /** The bytes of the attribute id used in the comparison */
     private byte[] attrIdBytes;
@@ -174,15 +174,6 @@ public class CompareRequestDecorator ext
     /**
      * {@inheritDoc}
      */
-    public boolean hasResponse()
-    {
-        return getCompareRequest().hasResponse();
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
     public void abandon()
     {
         getCompareRequest().abandon();

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=1064244&r1=1064243&r2=1064244&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 18:30:33 2011
@@ -32,7 +32,7 @@ import org.apache.directory.shared.ldap.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class DeleteRequestDecorator extends MessageDecorator implements DeleteRequest
+public class DeleteRequestDecorator extends RequestDecorator implements DeleteRequest
 {
     /**
      * Makes a DeleteRequest a MessageDecorator.
@@ -78,15 +78,6 @@ public class DeleteRequestDecorator exte
     /**
      * {@inheritDoc}
      */
-    public boolean hasResponse()
-    {
-        return getDeleteRequest().hasResponse();
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
     public void abandon()
     {
         getDeleteRequest().abandon();

Added: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/decorators/RequestDecorator.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/decorators/RequestDecorator.java?rev=1064244&view=auto
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/decorators/RequestDecorator.java
(added)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/decorators/RequestDecorator.java
Thu Jan 27 18:30:33 2011
@@ -0,0 +1,52 @@
+/*
+ *  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;
+
+
+/**
+ * A decorator for the LdapResultResponse message
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public class RequestDecorator extends MessageDecorator implements Request
+{
+    /**
+     * Makes Request a MessageDecorator.
+     *
+     * @param decoratedMessage the decorated message
+     */
+    public RequestDecorator( Message decoratedMessage )
+    {
+        super( decoratedMessage );
+    }
+    
+
+    /**
+     * {@inheritDoc}
+     */
+    public boolean hasResponse()
+    {
+        return ((Request)getDecoratedMessage()).hasResponse();
+    }
+}



Mime
View raw message