directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r586526 - in /directory/shared/branches/bigbang/ldap-constants/src/main/java/org/apache/directory/shared/ldap/constants: AuthenticationLevel.java SaslQoP.java SupportedSASLMechanisms.java
Date Fri, 19 Oct 2007 16:44:19 GMT
Author: elecharny
Date: Fri Oct 19 09:44:16 2007
New Revision: 586526

URL: http://svn.apache.org/viewvc?rev=586526&view=rev
Log:
Moved some generic Ldap constants from apacheds-constants to shared-ldap

Added:
    directory/shared/branches/bigbang/ldap-constants/src/main/java/org/apache/directory/shared/ldap/constants/AuthenticationLevel.java
      - copied, changed from r586355, directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/aci/AuthenticationLevel.java
    directory/shared/branches/bigbang/ldap-constants/src/main/java/org/apache/directory/shared/ldap/constants/SaslQoP.java
      - copied, changed from r586355, directory/apacheds/branches/bigbang/constants/src/main/java/org/apache/directory/server/ldap/constants/SaslQoP.java
    directory/shared/branches/bigbang/ldap-constants/src/main/java/org/apache/directory/shared/ldap/constants/SupportedSASLMechanisms.java
      - copied, changed from r586355, directory/apacheds/branches/bigbang/constants/src/main/java/org/apache/directory/server/ldap/constants/SupportedSASLMechanisms.java

Copied: directory/shared/branches/bigbang/ldap-constants/src/main/java/org/apache/directory/shared/ldap/constants/AuthenticationLevel.java
(from r586355, directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/aci/AuthenticationLevel.java)
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap-constants/src/main/java/org/apache/directory/shared/ldap/constants/AuthenticationLevel.java?p2=directory/shared/branches/bigbang/ldap-constants/src/main/java/org/apache/directory/shared/ldap/constants/AuthenticationLevel.java&p1=directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/aci/AuthenticationLevel.java&r1=586355&r2=586526&rev=586526&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/aci/AuthenticationLevel.java
(original)
+++ directory/shared/branches/bigbang/ldap-constants/src/main/java/org/apache/directory/shared/ldap/constants/AuthenticationLevel.java
Fri Oct 19 09:44:16 2007
@@ -17,10 +17,7 @@
  *  under the License. 
  *  
  */
-package org.apache.directory.shared.ldap.aci;
-
-
-import java.io.Serializable;
+package org.apache.directory.shared.ldap.constants;
 
 
 /**
@@ -29,39 +26,35 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
-public class AuthenticationLevel implements Comparable, Serializable
+public enum AuthenticationLevel
 {
-    private static final long serialVersionUID = -6757937682267073130L;
-
     /**
      * No authentication (anonymous access)
      */
-    public static final AuthenticationLevel NONE = new AuthenticationLevel( 0, "none" );
+    NONE( 0, "none" ),
 
     /**
      * Simple authentication (bound with plain-text credentials)
      */
-    public static final AuthenticationLevel SIMPLE = new AuthenticationLevel( 1, "simple"
);
+    SIMPLE( 1, "simple" ),
 
     /**
      * Strong authentication (bound with encrypted cerdentials)
      */
-    public static final AuthenticationLevel STRONG = new AuthenticationLevel( 2, "strong"
);
-
-    private final int level;
-
+    STRONG( 2, "string" );
+    
+    private int level;
+    
     private final String name;
 
-
-    private AuthenticationLevel(int level, String name)
+    private AuthenticationLevel( int level, String name )
     {
         this.level = level;
         this.name = name;
     }
 
-
     /**
-     * Returns the integet value of this level (greater value, stronger level).
+     * Returns the integer value of this level (greater value, stronger level).
      */
     public int getLevel()
     {
@@ -81,29 +74,5 @@
     public String toString()
     {
         return name;
-    }
-
-
-    public boolean equals( Object o )
-    {
-        if ( this == o )
-        {
-            return true;
-        }
-
-        if ( o instanceof AuthenticationLevel )
-        {
-            AuthenticationLevel that = ( AuthenticationLevel ) o;
-            return this.level == that.level;
-        }
-
-        return false;
-    }
-
-
-    public int compareTo( Object o )
-    {
-        AuthenticationLevel that = ( AuthenticationLevel ) o;
-        return this.level - that.level;
     }
 }

Copied: directory/shared/branches/bigbang/ldap-constants/src/main/java/org/apache/directory/shared/ldap/constants/SaslQoP.java
(from r586355, directory/apacheds/branches/bigbang/constants/src/main/java/org/apache/directory/server/ldap/constants/SaslQoP.java)
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap-constants/src/main/java/org/apache/directory/shared/ldap/constants/SaslQoP.java?p2=directory/shared/branches/bigbang/ldap-constants/src/main/java/org/apache/directory/shared/ldap/constants/SaslQoP.java&p1=directory/apacheds/branches/bigbang/constants/src/main/java/org/apache/directory/server/ldap/constants/SaslQoP.java&r1=586355&r2=586526&rev=586526&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/constants/src/main/java/org/apache/directory/server/ldap/constants/SaslQoP.java
(original)
+++ directory/shared/branches/bigbang/ldap-constants/src/main/java/org/apache/directory/shared/ldap/constants/SaslQoP.java
Fri Oct 19 09:44:16 2007
@@ -17,7 +17,7 @@
  *  under the License. 
  *  
  */
-package org.apache.directory.server.ldap.constants;
+package org.apache.directory.shared.ldap.constants;
 
 /**
  * Contains constants used for populating the SASL QoP 

Copied: directory/shared/branches/bigbang/ldap-constants/src/main/java/org/apache/directory/shared/ldap/constants/SupportedSASLMechanisms.java
(from r586355, directory/apacheds/branches/bigbang/constants/src/main/java/org/apache/directory/server/ldap/constants/SupportedSASLMechanisms.java)
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap-constants/src/main/java/org/apache/directory/shared/ldap/constants/SupportedSASLMechanisms.java?p2=directory/shared/branches/bigbang/ldap-constants/src/main/java/org/apache/directory/shared/ldap/constants/SupportedSASLMechanisms.java&p1=directory/apacheds/branches/bigbang/constants/src/main/java/org/apache/directory/server/ldap/constants/SupportedSASLMechanisms.java&r1=586355&r2=586526&rev=586526&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/constants/src/main/java/org/apache/directory/server/ldap/constants/SupportedSASLMechanisms.java
(original)
+++ directory/shared/branches/bigbang/ldap-constants/src/main/java/org/apache/directory/shared/ldap/constants/SupportedSASLMechanisms.java
Fri Oct 19 09:44:16 2007
@@ -17,7 +17,7 @@
  *  under the License. 
  *  
  */
-package org.apache.directory.server.ldap.constants;
+package org.apache.directory.shared.ldap.constants;
 
 /**
  * Contains constants used for populating the supportedSASLMechanisms 



Mime
View raw message