directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r440776 - /directory/sandbox/akarasulu/apacheds-2.0/shared/ldap/src/main/java/org/apache/directory/shared/ldap/messages/bind/BindRequestDecorator.java
Date Wed, 06 Sep 2006 16:37:39 GMT
Author: elecharny
Date: Wed Sep  6 09:37:38 2006
New Revision: 440776

URL: http://svn.apache.org/viewvc?view=rev&rev=440776
Log:
Modified the inheritence scheme : we now inherit from MessageDecorator.

Modified:
    directory/sandbox/akarasulu/apacheds-2.0/shared/ldap/src/main/java/org/apache/directory/shared/ldap/messages/bind/BindRequestDecorator.java

Modified: directory/sandbox/akarasulu/apacheds-2.0/shared/ldap/src/main/java/org/apache/directory/shared/ldap/messages/bind/BindRequestDecorator.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/apacheds-2.0/shared/ldap/src/main/java/org/apache/directory/shared/ldap/messages/bind/BindRequestDecorator.java?view=diff&rev=440776&r1=440775&r2=440776
==============================================================================
--- directory/sandbox/akarasulu/apacheds-2.0/shared/ldap/src/main/java/org/apache/directory/shared/ldap/messages/bind/BindRequestDecorator.java
(original)
+++ directory/sandbox/akarasulu/apacheds-2.0/shared/ldap/src/main/java/org/apache/directory/shared/ldap/messages/bind/BindRequestDecorator.java
Wed Sep  6 09:37:38 2006
@@ -21,6 +21,9 @@
 
 import javax.naming.Name;
 
+import org.apache.directory.shared.ldap.messages.Message;
+import org.apache.directory.shared.ldap.messages.MessageDecorator;
+
 /**
  * A abstract decorator for the BindRequest object. Implements
  * all methods from the BindRequest real object, rerouting them
@@ -32,19 +35,17 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  *
  */
-public abstract class BindRequestDecorator implements BindRequest 
+public abstract class BindRequestDecorator extends MessageDecorator implements BindRequest

 {
-    /** A reference to the decorated object */
-	private BindRequest bindRequest;
-	
     /**
-     * Creates a new BindRequestDecorator object.
+     * Creates a new BindRequestDecorator object. The storage
+     * of the decorated object is delegated to the super class
      * 
      * @param the associated BindRequest object
      */
-    public BindRequestDecorator( BindRequest bindRequest )
+    public BindRequestDecorator( Message message )
     {
-        this.bindRequest = bindRequest;
+        super( message );
     }
 
     /**
@@ -53,7 +54,7 @@
      */
 	public BindRequest getBindRequest() 
 	{
-		return bindRequest;
+		return (BindRequest)message;
 	}
 
 	/**
@@ -61,9 +62,9 @@
      * 
      * @return The user authentication
      */
-    public AuthenticationOperation getAuthentication()
+    public Authentication getAuthentication()
     {
-    	return bindRequest.getAuthentication();
+    	return ((BindRequest)message).getAuthentication();
     }
 
     /**
@@ -71,9 +72,9 @@
      * 
      * @param authentication The user authentication
      */
-    public void setAuthentication( AuthenticationOperation authentication )
+    public void setAuthentication( Authentication authentication )
     {
-    	bindRequest.setAuthentication( authentication );
+        ((BindRequest)message).setAuthentication( authentication );
     }
     
     /**
@@ -83,7 +84,7 @@
      */
     public Name getName()
     {
-    	return bindRequest.getName();
+    	return ((BindRequest)message).getName();
     }
 
 
@@ -95,7 +96,7 @@
      */
     public void setName( Name name )
     {
-    	bindRequest.setName( name );
+        ((BindRequest)message).setName( name );
     }
 
     /**
@@ -105,7 +106,7 @@
      */
     public int getVersion()
     {
-    	return bindRequest.getVersion();
+    	return ((BindRequest)message).getVersion();
     }
 
     /**
@@ -115,7 +116,7 @@
      */
     public boolean isLdapV3()
     {
-    	return bindRequest.isLdapV3();
+    	return ((BindRequest)message).isLdapV3();
     }
 
     /**
@@ -125,6 +126,6 @@
      */
     public void setVersion( int version )
     {
-    	bindRequest.setVersion( version );
+        ((BindRequest)message).setVersion( version );
     }
 }



Mime
View raw message