directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1686387 - in /directory/studio/trunk/plugins/openldap.common.ui/src/main/java/org/apache/directory/studio/openldap/common/ui/model: AllowFeatureEnum.java PasswordHashEnum.java
Date Fri, 19 Jun 2015 11:18:39 GMT
Author: elecharny
Date: Fri Jun 19 11:18:38 2015
New Revision: 1686387

URL: http://svn.apache.org/r1686387
Log:
o Added the olcRequires feature enum
o Added a missing AL 2.0 header

Added:
    directory/studio/trunk/plugins/openldap.common.ui/src/main/java/org/apache/directory/studio/openldap/common/ui/model/AllowFeatureEnum.java
Modified:
    directory/studio/trunk/plugins/openldap.common.ui/src/main/java/org/apache/directory/studio/openldap/common/ui/model/PasswordHashEnum.java

Added: directory/studio/trunk/plugins/openldap.common.ui/src/main/java/org/apache/directory/studio/openldap/common/ui/model/AllowFeatureEnum.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/openldap.common.ui/src/main/java/org/apache/directory/studio/openldap/common/ui/model/AllowFeatureEnum.java?rev=1686387&view=auto
==============================================================================
--- directory/studio/trunk/plugins/openldap.common.ui/src/main/java/org/apache/directory/studio/openldap/common/ui/model/AllowFeatureEnum.java
(added)
+++ directory/studio/trunk/plugins/openldap.common.ui/src/main/java/org/apache/directory/studio/openldap/common/ui/model/AllowFeatureEnum.java
Fri Jun 19 11:18:38 2015
@@ -0,0 +1,93 @@
+/*
+ *  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.studio.openldap.common.ui.model;
+
+/**
+ * An enum for the various possible value of the olcRequires parameter. One of
+ * <ul>
+ * <li>bind_v2</li>
+ * <li>bind_anon_cred</li>
+ * <li>bind_anon_dn</li>
+ * <li>update_anon</li>
+ * <li>proxy_authz_anon</li>
+ * </ul>
+ * 
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public enum AllowFeatureEnum
+{
+    BIND_V2( "bind_v2" ),
+    BIND_ANON_CRED( "bind_anon_cred" ),
+    BIND_ANON_DN( "bind_anon_dn" ),
+    UPDATE_ANON( "update_anon" ),
+    PROXY_AUTHZ_ANON( "proxy_authz_anon" ),
+    UNKNOWN( "---" );
+    
+    /** The interned name */
+    private String name;
+    
+    /**
+     * A private constructor for this enum
+     */
+    private AllowFeatureEnum( String name )
+    {
+        this.name = name;
+    }
+
+    
+    public static AllowFeatureEnum getFlag( String name )
+    {
+        if ( BIND_V2.name.equalsIgnoreCase( name ) )
+        {
+            return BIND_V2;
+        }
+        
+        if ( BIND_ANON_CRED.name.equalsIgnoreCase( name ) )
+        {
+            return BIND_ANON_CRED;
+        }
+        
+        if ( BIND_ANON_DN.name.equalsIgnoreCase( name ) )
+        {
+            return BIND_ANON_DN;
+        }
+        
+        if ( UPDATE_ANON.name.equalsIgnoreCase( name ) )
+        {
+            return UPDATE_ANON;
+        }
+        
+        if ( PROXY_AUTHZ_ANON.name.equalsIgnoreCase( name ) )
+        {
+            return PROXY_AUTHZ_ANON;
+        }
+        
+        return UNKNOWN;
+    }
+    
+    
+    /**
+     * @return the name
+     */
+    public String getName()
+    {
+        return name;
+    }
+}

Modified: directory/studio/trunk/plugins/openldap.common.ui/src/main/java/org/apache/directory/studio/openldap/common/ui/model/PasswordHashEnum.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/openldap.common.ui/src/main/java/org/apache/directory/studio/openldap/common/ui/model/PasswordHashEnum.java?rev=1686387&r1=1686386&r2=1686387&view=diff
==============================================================================
--- directory/studio/trunk/plugins/openldap.common.ui/src/main/java/org/apache/directory/studio/openldap/common/ui/model/PasswordHashEnum.java
(original)
+++ directory/studio/trunk/plugins/openldap.common.ui/src/main/java/org/apache/directory/studio/openldap/common/ui/model/PasswordHashEnum.java
Fri Jun 19 11:18:38 2015
@@ -1,3 +1,22 @@
+/*
+ *  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.studio.openldap.common.ui.model;
 
 /**
@@ -41,6 +60,15 @@ public enum PasswordHashEnum
     }
     
     
+    /**
+     * @return The Password Hash number
+     */
+    public int getNumber()
+    {
+        return number;
+    }
+    
+    
     /**
      * Get the PasswordHashEnum instance from its number
      * 



Mime
View raw message