directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r440129 - /directory/sandbox/akarasulu/apacheds-2.0/shared/ldap/src/main/java/org/apache/directory/shared/ldap/messages/bind/
Date Mon, 04 Sep 2006 17:32:46 GMT
Author: elecharny
Date: Mon Sep  4 10:32:45 2006
New Revision: 440129

URL: http://svn.apache.org/viewvc?view=rev&rev=440129
Log:
Added the decorators and various interfaces. 
Fixed some doco issues

Added:
    directory/sandbox/akarasulu/apacheds-2.0/shared/ldap/src/main/java/org/apache/directory/shared/ldap/messages/bind/AuthenticationDecorator.java
    directory/sandbox/akarasulu/apacheds-2.0/shared/ldap/src/main/java/org/apache/directory/shared/ldap/messages/bind/AuthenticationOperation.java
      - copied, changed from r440116, directory/sandbox/akarasulu/apacheds-2.0/shared/ldap/src/main/java/org/apache/directory/shared/ldap/messages/bind/Authentication.java
    directory/sandbox/akarasulu/apacheds-2.0/shared/ldap/src/main/java/org/apache/directory/shared/ldap/messages/bind/BindRequestDecorator.java
    directory/sandbox/akarasulu/apacheds-2.0/shared/ldap/src/main/java/org/apache/directory/shared/ldap/messages/bind/BindRequestOperation.java
    directory/sandbox/akarasulu/apacheds-2.0/shared/ldap/src/main/java/org/apache/directory/shared/ldap/messages/bind/SaslCredentialsDecorator.java
    directory/sandbox/akarasulu/apacheds-2.0/shared/ldap/src/main/java/org/apache/directory/shared/ldap/messages/bind/SaslCredentialsOperation.java
    directory/sandbox/akarasulu/apacheds-2.0/shared/ldap/src/main/java/org/apache/directory/shared/ldap/messages/bind/SimpleAuthenticationDecorator.java
    directory/sandbox/akarasulu/apacheds-2.0/shared/ldap/src/main/java/org/apache/directory/shared/ldap/messages/bind/SimpleAuthenticationOperation.java
Removed:
    directory/sandbox/akarasulu/apacheds-2.0/shared/ldap/src/main/java/org/apache/directory/shared/ldap/messages/bind/Authentication.java
Modified:
    directory/sandbox/akarasulu/apacheds-2.0/shared/ldap/src/main/java/org/apache/directory/shared/ldap/messages/bind/AbstractAuthentication.java
    directory/sandbox/akarasulu/apacheds-2.0/shared/ldap/src/main/java/org/apache/directory/shared/ldap/messages/bind/BindRequest.java
    directory/sandbox/akarasulu/apacheds-2.0/shared/ldap/src/main/java/org/apache/directory/shared/ldap/messages/bind/SaslCredentials.java
    directory/sandbox/akarasulu/apacheds-2.0/shared/ldap/src/main/java/org/apache/directory/shared/ldap/messages/bind/SimpleAuthentication.java

Modified: directory/sandbox/akarasulu/apacheds-2.0/shared/ldap/src/main/java/org/apache/directory/shared/ldap/messages/bind/AbstractAuthentication.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/AbstractAuthentication.java?view=diff&rev=440129&r1=440128&r2=440129
==============================================================================
--- directory/sandbox/akarasulu/apacheds-2.0/shared/ldap/src/main/java/org/apache/directory/shared/ldap/messages/bind/AbstractAuthentication.java
(original)
+++ directory/sandbox/akarasulu/apacheds-2.0/shared/ldap/src/main/java/org/apache/directory/shared/ldap/messages/bind/AbstractAuthentication.java
Mon Sep  4 10:32:45 2006
@@ -27,14 +27,14 @@
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class AbstractAuthentication implements Authentication
+public class AbstractAuthentication implements AuthenticationOperation
 {
     /**
      * @return Returns <code>true</code> if the authentication scheme is Simple

      */
     public boolean isSimple() 
     {
-        return (Authentication)this instanceof SimpleAuthentication;
+        return (AuthenticationOperation)this instanceof SimpleAuthentication;
     }
     
     /**
@@ -42,6 +42,6 @@
      */
     public boolean isSasl()
     {
-        return (Authentication)this instanceof SaslCredentials;
+        return (AuthenticationOperation)this instanceof SaslCredentials;
     }
 }

Added: directory/sandbox/akarasulu/apacheds-2.0/shared/ldap/src/main/java/org/apache/directory/shared/ldap/messages/bind/AuthenticationDecorator.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/AuthenticationDecorator.java?view=auto&rev=440129
==============================================================================
--- directory/sandbox/akarasulu/apacheds-2.0/shared/ldap/src/main/java/org/apache/directory/shared/ldap/messages/bind/AuthenticationDecorator.java
(added)
+++ directory/sandbox/akarasulu/apacheds-2.0/shared/ldap/src/main/java/org/apache/directory/shared/ldap/messages/bind/AuthenticationDecorator.java
Mon Sep  4 10:32:45 2006
@@ -0,0 +1,65 @@
+/*
+ *  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.messages.bind;
+
+/**
+ * The base abstract class of SimpleAuthenticationDecorator and SaslCredentialsDecorator
+ * abstract class. As those two classes have specific operations, common ones
+ * have been put here. 
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public abstract class AuthenticationDecorator implements AuthenticationOperation
+{
+    /** A reference to the decorated object */
+    protected AuthenticationOperation authentication;
+
+    /**
+     * @return The decorated object
+     */
+    public AuthenticationOperation getAuthentication()
+    {
+        return authentication;
+    }
+
+    /**
+     * @return Returns <code>true</code> if the authentication scheme is Simple

+     */
+    public boolean isSimple()
+    {
+        return ( authentication instanceof SimpleAuthenticationDecorator );
+    }
+
+    /**
+     * @return Returns <code>true</code> if the authentication scheme is Sasl

+     */
+    public boolean isSasl()
+    {
+        return ( authentication instanceof SaslCredentialsDecorator );
+    }
+    
+    /**
+     * Returns a String representation of the authentication
+     */
+    public String toString()
+    {
+        return authentication.toString();
+    }
+}
\ No newline at end of file

Copied: directory/sandbox/akarasulu/apacheds-2.0/shared/ldap/src/main/java/org/apache/directory/shared/ldap/messages/bind/AuthenticationOperation.java
(from r440116, directory/sandbox/akarasulu/apacheds-2.0/shared/ldap/src/main/java/org/apache/directory/shared/ldap/messages/bind/Authentication.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/AuthenticationOperation.java?view=diff&rev=440129&p1=directory/sandbox/akarasulu/apacheds-2.0/shared/ldap/src/main/java/org/apache/directory/shared/ldap/messages/bind/Authentication.java&r1=440116&p2=directory/sandbox/akarasulu/apacheds-2.0/shared/ldap/src/main/java/org/apache/directory/shared/ldap/messages/bind/AuthenticationOperation.java&r2=440129
==============================================================================
--- directory/sandbox/akarasulu/apacheds-2.0/shared/ldap/src/main/java/org/apache/directory/shared/ldap/messages/bind/Authentication.java
(original)
+++ directory/sandbox/akarasulu/apacheds-2.0/shared/ldap/src/main/java/org/apache/directory/shared/ldap/messages/bind/AuthenticationOperation.java
Mon Sep  4 10:32:45 2006
@@ -26,7 +26,7 @@
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public interface Authentication
+public interface AuthenticationOperation
 {
     /**
      * @return Returns <code>true</code> if the authentication scheme is Simple


Modified: directory/sandbox/akarasulu/apacheds-2.0/shared/ldap/src/main/java/org/apache/directory/shared/ldap/messages/bind/BindRequest.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/BindRequest.java?view=diff&rev=440129&r1=440128&r2=440129
==============================================================================
--- directory/sandbox/akarasulu/apacheds-2.0/shared/ldap/src/main/java/org/apache/directory/shared/ldap/messages/bind/BindRequest.java
(original)
+++ directory/sandbox/akarasulu/apacheds-2.0/shared/ldap/src/main/java/org/apache/directory/shared/ldap/messages/bind/BindRequest.java
Mon Sep  4 10:32:45 2006
@@ -19,9 +19,9 @@
  */
 package org.apache.directory.shared.ldap.messages.bind;
 
+import javax.naming.Name;
+
 import org.apache.directory.shared.ldap.messages.AbstractRequest;
-import org.apache.directory.shared.ldap.messages.Request;
-import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.utils.StringTools;
 
 /**
@@ -47,7 +47,7 @@
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class BindRequest extends AbstractRequest implements Request
+public class BindRequest extends AbstractRequest implements BindRequestOperation
 {
     /**
      * Declares the Serial Version Uid.
@@ -62,10 +62,10 @@
     private int version;
 
     /** The name of the user requesting a bind */
-    private LdapDN name;
+    private Name name;
 
     /** The authentication used to bind the user */
-    private Authentication authentication;
+    private AuthenticationOperation authentication;
 
     /**
      * Creates a new BindRequest object.
@@ -82,7 +82,7 @@
      * 
      * @return The user authentication
      */
-    public Authentication getAuthentication()
+    public AuthenticationOperation getAuthentication()
     {
         return authentication;
     }
@@ -92,7 +92,7 @@
      * 
      * @param authentication The user authentication
      */
-    public void setAuthentication( Authentication authentication )
+    public void setAuthentication( AuthenticationOperation authentication )
     {
         this.authentication = authentication;
     }
@@ -102,7 +102,7 @@
      * 
      * @return The user name
      */
-    public LdapDN getName()
+    public Name getName()
     {
         return name;
     }
@@ -111,10 +111,9 @@
     /**
      * Set the user name
      * 
-     * @param name
-     *            The user name
+     * @param name The user name
      */
-    public void setName( LdapDN name )
+    public void setName( Name name )
     {
         this.name = name;
     }

Added: 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=auto&rev=440129
==============================================================================
--- directory/sandbox/akarasulu/apacheds-2.0/shared/ldap/src/main/java/org/apache/directory/shared/ldap/messages/bind/BindRequestDecorator.java
(added)
+++ directory/sandbox/akarasulu/apacheds-2.0/shared/ldap/src/main/java/org/apache/directory/shared/ldap/messages/bind/BindRequestDecorator.java
Mon Sep  4 10:32:45 2006
@@ -0,0 +1,130 @@
+/*
+ *  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.messages.bind;
+
+import javax.naming.Name;
+
+/**
+ * A abstract decorator for the BindRequest object. Implements
+ * all methods from the BindRequest real object, rerouting them
+ * to the initial object.
+ * 
+ *  The user of a BindRequestDecorator will be able to work
+ *  with it as if it was using the real BindRequest object.
+ *  
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ *
+ */
+public abstract class BindRequestDecorator implements BindRequestOperation 
+{
+    /** A reference to the decorated object */
+	private BindRequestOperation bindRequest;
+	
+    /**
+     * Creates a new BindRequestDecorator object.
+     * 
+     * @param the associated BindRequest object
+     */
+    public BindRequestDecorator( BindRequestOperation bindRequest )
+    {
+        this.bindRequest = bindRequest;
+    }
+
+    /**
+     * Get the associated decorated object 
+     * @return The associated BindRequest object
+     */
+	public BindRequestOperation getBindRequest() 
+	{
+		return bindRequest;
+	}
+
+	/**
+     * Get the user authentication
+     * 
+     * @return The user authentication
+     */
+    public AuthenticationOperation getAuthentication()
+    {
+    	return bindRequest.getAuthentication();
+    }
+
+    /**
+     * Set the user authentication
+     * 
+     * @param authentication The user authentication
+     */
+    public void setAuthentication( AuthenticationOperation authentication )
+    {
+    	bindRequest.setAuthentication( authentication );
+    }
+    
+    /**
+     * Get the user name
+     * 
+     * @return The user name
+     */
+    public Name getName()
+    {
+    	return bindRequest.getName();
+    }
+
+
+    /**
+     * Set the user name
+     * 
+     * @param name
+     *            The user name
+     */
+    public void setName( Name name )
+    {
+    	bindRequest.setName( name );
+    }
+
+    /**
+     * Get the protocol version
+     * 
+     * @return The protocol version
+     */
+    public int getVersion()
+    {
+    	return bindRequest.getVersion();
+    }
+
+    /**
+     * Check if the Ldap version in use is 3
+     * 
+     * @return true if the ldap version is 3
+     */
+    public boolean isLdapV3()
+    {
+    	return bindRequest.isLdapV3();
+    }
+
+    /**
+     * Set the protocol version
+     * 
+     * @param version The protocol version
+     */
+    public void setVersion( int version )
+    {
+    	bindRequest.setVersion( version );
+    }
+}

Added: directory/sandbox/akarasulu/apacheds-2.0/shared/ldap/src/main/java/org/apache/directory/shared/ldap/messages/bind/BindRequestOperation.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/BindRequestOperation.java?view=auto&rev=440129
==============================================================================
--- directory/sandbox/akarasulu/apacheds-2.0/shared/ldap/src/main/java/org/apache/directory/shared/ldap/messages/bind/BindRequestOperation.java
(added)
+++ directory/sandbox/akarasulu/apacheds-2.0/shared/ldap/src/main/java/org/apache/directory/shared/ldap/messages/bind/BindRequestOperation.java
Mon Sep  4 10:32:45 2006
@@ -0,0 +1,84 @@
+/*
+ *  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.messages.bind;
+
+import javax.naming.Name;
+
+import org.apache.directory.shared.ldap.messages.Request;
+
+/**
+ * This interface declares all the methods which must be implemented
+ * on the BindRequest and BindRequestDecorator classes.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ *
+ */
+public interface BindRequestOperation extends Request {
+    /**
+     * Get the user authentication
+     * 
+     * @return The user authentication
+     */
+    public AuthenticationOperation getAuthentication();
+
+    /**
+     * Set the user authentication
+     * 
+     * @param authentication The user authentication
+     */
+    public void setAuthentication( AuthenticationOperation authentication );
+    
+    /**
+     * Get the user name
+     * 
+     * @return The user name
+     */
+    public Name getName();
+
+
+    /**
+     * Set the user name
+     * 
+     * @param name
+     *            The user name
+     */
+    public void setName( Name name );
+
+    /**
+     * Get the protocol version
+     * 
+     * @return The protocol version
+     */
+    public int getVersion();
+
+    /**
+     * Check if the Ldap version in use is 3
+     * 
+     * @return true if the ldap version is 3
+     */
+    public boolean isLdapV3();
+
+    /**
+     * Set the protocol version
+     * 
+     * @param version The protocol version
+     */
+    public void setVersion( int version );
+}

Modified: directory/sandbox/akarasulu/apacheds-2.0/shared/ldap/src/main/java/org/apache/directory/shared/ldap/messages/bind/SaslCredentials.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/SaslCredentials.java?view=diff&rev=440129&r1=440128&r2=440129
==============================================================================
--- directory/sandbox/akarasulu/apacheds-2.0/shared/ldap/src/main/java/org/apache/directory/shared/ldap/messages/bind/SaslCredentials.java
(original)
+++ directory/sandbox/akarasulu/apacheds-2.0/shared/ldap/src/main/java/org/apache/directory/shared/ldap/messages/bind/SaslCredentials.java
Mon Sep  4 10:32:45 2006
@@ -26,7 +26,7 @@
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class SaslCredentials extends AbstractAuthentication
+public class SaslCredentials extends AbstractAuthentication implements SaslCredentialsOperation
 {
     /**
      * Declares the Serial Version Uid.

Added: directory/sandbox/akarasulu/apacheds-2.0/shared/ldap/src/main/java/org/apache/directory/shared/ldap/messages/bind/SaslCredentialsDecorator.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/SaslCredentialsDecorator.java?view=auto&rev=440129
==============================================================================
--- directory/sandbox/akarasulu/apacheds-2.0/shared/ldap/src/main/java/org/apache/directory/shared/ldap/messages/bind/SaslCredentialsDecorator.java
(added)
+++ directory/sandbox/akarasulu/apacheds-2.0/shared/ldap/src/main/java/org/apache/directory/shared/ldap/messages/bind/SaslCredentialsDecorator.java
Mon Sep  4 10:32:45 2006
@@ -0,0 +1,68 @@
+/*
+ *  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.messages.bind;
+
+/**
+ * A class which stores the Simple authentication for a BindRequest.
+ * 
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public class SaslCredentialsDecorator extends AuthenticationDecorator implements SaslCredentialsOperation
+{
+    /**
+     * Get the credentials
+     * 
+     * @return The credentials
+     */
+    public byte[] getCredentials()
+    {
+        return ((SaslCredentials)authentication).getCredentials();
+    }
+
+    /**
+     * Set the credentials
+     * 
+     * @param credentials The credentials
+     */
+    public void setCredentials( byte[] credentials )
+    {
+        ((SaslCredentials)authentication).setCredentials( credentials );
+    }
+
+    /**
+     * Get the mechanism
+     * 
+     * @return The mechanism
+     */
+    public String getMechanism()
+    {
+        return ((SaslCredentials)authentication).getMechanism();
+    }
+
+    /**
+     * Set the mechanism
+     * 
+     * @param mechanism The mechanism
+     */
+    public void setMechanism( String mechanism )
+    {
+        ((SaslCredentials)authentication).setMechanism( mechanism );
+    }
+}

Added: directory/sandbox/akarasulu/apacheds-2.0/shared/ldap/src/main/java/org/apache/directory/shared/ldap/messages/bind/SaslCredentialsOperation.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/SaslCredentialsOperation.java?view=auto&rev=440129
==============================================================================
--- directory/sandbox/akarasulu/apacheds-2.0/shared/ldap/src/main/java/org/apache/directory/shared/ldap/messages/bind/SaslCredentialsOperation.java
(added)
+++ directory/sandbox/akarasulu/apacheds-2.0/shared/ldap/src/main/java/org/apache/directory/shared/ldap/messages/bind/SaslCredentialsOperation.java
Mon Sep  4 10:32:45 2006
@@ -0,0 +1,57 @@
+/*
+ *  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.messages.bind;
+
+/**
+ * An interface which declares all the method implemented into
+ * the SaslCredential class
+ * 
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public interface SaslCredentialsOperation extends AuthenticationOperation
+{
+    /**
+     * Get the credentials
+     * 
+     * @return The credentials
+     */
+    public byte[] getCredentials();
+
+    /**
+     * Set the credentials
+     * 
+     * @param credentials The credentials
+     */
+    public void setCredentials( byte[] credentials );
+
+    /**
+     * Get the mechanism
+     * 
+     * @return The mechanism
+     */
+    public String getMechanism();
+
+    /**
+     * Set the mechanism
+     * 
+     * @param mechanism The mechanism
+     */
+    public void setMechanism( String mechanism );
+}

Modified: directory/sandbox/akarasulu/apacheds-2.0/shared/ldap/src/main/java/org/apache/directory/shared/ldap/messages/bind/SimpleAuthentication.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/SimpleAuthentication.java?view=diff&rev=440129&r1=440128&r2=440129
==============================================================================
--- directory/sandbox/akarasulu/apacheds-2.0/shared/ldap/src/main/java/org/apache/directory/shared/ldap/messages/bind/SimpleAuthentication.java
(original)
+++ directory/sandbox/akarasulu/apacheds-2.0/shared/ldap/src/main/java/org/apache/directory/shared/ldap/messages/bind/SimpleAuthentication.java
Mon Sep  4 10:32:45 2006
@@ -26,7 +26,7 @@
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class SimpleAuthentication extends AbstractAuthentication
+public class SimpleAuthentication extends AbstractAuthentication implements SimpleAuthenticationOperation
 {
     /**
      * Declares the Serial Version Uid.
@@ -54,8 +54,7 @@
     /**
      * Set the simple password
      * 
-     * @param simple
-     *            The simple password
+     * @param simple The simple password
      */
     public void setSimple( byte[] simple )
     {

Added: directory/sandbox/akarasulu/apacheds-2.0/shared/ldap/src/main/java/org/apache/directory/shared/ldap/messages/bind/SimpleAuthenticationDecorator.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/SimpleAuthenticationDecorator.java?view=auto&rev=440129
==============================================================================
--- directory/sandbox/akarasulu/apacheds-2.0/shared/ldap/src/main/java/org/apache/directory/shared/ldap/messages/bind/SimpleAuthenticationDecorator.java
(added)
+++ directory/sandbox/akarasulu/apacheds-2.0/shared/ldap/src/main/java/org/apache/directory/shared/ldap/messages/bind/SimpleAuthenticationDecorator.java
Mon Sep  4 10:32:45 2006
@@ -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.messages.bind;
+
+/**
+ * A abstract decorator for the SimpleAuthentication object. Implements
+ * all methods from the SimpleAuthentication real object, rerouting them
+ * to the initial object.
+ * 
+ * The authentication initial object is created in the Authenticate
+ * abstract class.
+ * 
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public class SimpleAuthenticationDecorator extends AuthenticationDecorator implements SimpleAuthenticationOperation
+{
+    /**
+     * Get the simple password
+     * 
+     * @return The password
+     */
+    public byte[] getSimple()
+    {
+        return ((SimpleAuthentication)authentication).getSimple();
+    }
+
+    /**
+     * Set the simple password
+     * 
+     * @param simple The simple password
+     */
+    public void setSimple( byte[] simple )
+    {
+        ((SimpleAuthentication)authentication).setSimple( simple );
+    }
+}

Added: directory/sandbox/akarasulu/apacheds-2.0/shared/ldap/src/main/java/org/apache/directory/shared/ldap/messages/bind/SimpleAuthenticationOperation.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/SimpleAuthenticationOperation.java?view=auto&rev=440129
==============================================================================
--- directory/sandbox/akarasulu/apacheds-2.0/shared/ldap/src/main/java/org/apache/directory/shared/ldap/messages/bind/SimpleAuthenticationOperation.java
(added)
+++ directory/sandbox/akarasulu/apacheds-2.0/shared/ldap/src/main/java/org/apache/directory/shared/ldap/messages/bind/SimpleAuthenticationOperation.java
Mon Sep  4 10:32:45 2006
@@ -0,0 +1,44 @@
+/*
+ *  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.messages.bind;
+
+/**
+ * An interface which declares all the method implemented into =
+ * the SimpleAuthentication class
+ * 
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public interface SimpleAuthenticationOperation extends AuthenticationOperation
+{
+    /**
+     * Get the simple password
+     * 
+     * @return The password
+     */
+    public byte[] getSimple();
+
+
+    /**
+     * Set the simple password
+     * 
+     * @param simple The simple password
+     */
+    public void setSimple( byte[] simple );
+}



Mime
View raw message