From 0d1e067665e556b1f2b13a0d9febdafc6b50feaa Mon Sep 17 00:00:00 2001
From: fguigues <fguigues@localhost>
Date: Wed, 04 Jun 2008 16:26:47 +0000
Subject: [PATCH] 

---
 opends/src/snmp/src/org/opends/server/snmp/SNMPConnectionHandlerDefinitions.java |  240 +++++++++++++++++++++++++++++------------------------------
 1 files changed, 118 insertions(+), 122 deletions(-)

diff --git a/opends/src/snmp/src/org/opends/server/snmp/SNMPConnectionHandlerDefinitions.java b/opends/src/snmp/src/org/opends/server/snmp/SNMPConnectionHandlerDefinitions.java
index 1d5f2a2..1052371 100644
--- a/opends/src/snmp/src/org/opends/server/snmp/SNMPConnectionHandlerDefinitions.java
+++ b/opends/src/snmp/src/org/opends/server/snmp/SNMPConnectionHandlerDefinitions.java
@@ -27,6 +27,7 @@
 package org.opends.server.snmp;
 
 import java.util.HashSet;
+import java.util.Hashtable;
 import java.util.Set;
 
 /**
@@ -34,128 +35,123 @@
  */
 public class SNMPConnectionHandlerDefinitions {
 
-  /**
-  * SNMP V1 supported.
-  */
-  public static String SNMP_VERSION_V1 = "v1";
+    /**
+     * SNMP V1 supported.
+     */
+    public static String SNMP_VERSION_V1 = "v1";
+    /**
+     * SNMP V2 supported.
+     */
+    public static String SNMP_VERSION_V2 = "v2";
+    /**
+     * SNMP V3 supported.
+     */
+    public static String SNMP_VERSION_V3 = "v3";
+    /**
+     * List of Supported SNMP Version.
+     */
+    public static Set<String> SUPPORTED_SNMP_VERSION = new HashSet<String>();
 
-  /**
-   * SNMP V2 supported.
-   */
-  public static String SNMP_VERSION_V2 = "v2";
+    static {
+        SUPPORTED_SNMP_VERSION.add(SNMP_VERSION_V1);
+        SUPPORTED_SNMP_VERSION.add(SNMP_VERSION_V2);
+        SUPPORTED_SNMP_VERSION.add(SNMP_VERSION_V3);
+    }
+    /**
+     * List of Supported Security levels.
+     */
+    public static Hashtable<String, Integer> SECURITY_LEVELS =
+            new Hashtable<String, Integer>();
 
-  /**
-   * SNMP V3 supported.
-   */
-  public static String SNMP_VERSION_V3 = "v3";
-
-  /**
-   * List of Supported SNMP Version.
-   */
-  public static Set<String> SUPPORTED_SNMP_VERSION=new HashSet<String>();
-  static {
-    SUPPORTED_SNMP_VERSION.add(SNMP_VERSION_V1);
-    SUPPORTED_SNMP_VERSION.add(SNMP_VERSION_V2);
-    SUPPORTED_SNMP_VERSION.add(SNMP_VERSION_V3);
-  }
-
-  /**
-   * Domain for SNMP MBeans.
-   */
-  public static final String SNMP_DOMAIN =
-          "org.opends.server.snmp:";
-  /**
-   * Domain for Monitor MBeans.
-   */
-  public static final String JMX_DOMAIN =
-          "org.opends.server:";
-
-  /**
-   * Name of MONITOR_CLIENT_CONNECTIONS_OBJECTNAME monitor Mbean.
-   */
-  public static final String MONITOR_CLIENT_CONNECTIONS_OBJECTNAME =
-          "rootDSE,Rdn1=cn-monitor,Rdn2=cn-Client_Connections";
-  /**
-   * Name of MONITOR_ENTRY_CACHES_OBJECTNANE monitor Mbean.
-   */
-  public static final String MONITOR_ENTRY_CACHES_OBJECTNANE =
-          "rootDSE,Rdn1=cn-monitor,Rdn2=cn-Entry_Caches";
-
-  /**
-   * Name of MONITOR_JVM_MEMORY_USAGE_OBJECTNAME monitor Mbean.
-   */
-  public static final String MONITOR_JVM_MEMORY_USAGE_OBJECTNAME =
-          "RootDSE,Rdn1=cn-monitor,Rdn2=cn-JVM_Memory_Usage";
-
-  /**
-   * Name of MONITOR_JVM_STACK_TRACE_OBJECTNAME monitor Mbean.
-   */
-  public static final String MONITOR_JVM_STACK_TRACE_OBJECTNAME = "" +
-          "rootDSE,Rdn1=cn-monitor,Rdn2=cn-JVM_Stack_Trace";
-
-  /**
-   * Name of MONITOR_SYSTEM_INFORMATION_OBJECTNAME monitor Mbean.
-   */
-  public static final String MONITOR_SYSTEM_INFORMATION_OBJECTNAME =
-          "rootDSE,Rdn1=cn-monitor,Rdn2=cn-System_Information";
-
-  /**
-   * Name of MONITOR_VERSION_OBJECTNAME monitor Mbean.
-   */
-  public static final String MONITOR_VERSION_OBJECTNAME =
-          "rootDSE,Rdn1=cn-monitor,Rdn2=cn-Version";
-
-  /**
-   * Name of MONITOR_WORK_QUEUE_OBJECTNAME monitor Mbean.
-   */
-  public static final String MONITOR_WORK_QUEUE_OBJECTNAME =
-          "rootDSE,Rdn1=cn-monitor,Rdn2=cn-Work_Queue";
-
-  /**
-   * Name of MONITOR_ADMIN_ROOT_BACKEND_OBJECTNAME monitor Mbean.
-   */
-  public static final String MONITOR_ADMIN_ROOT_BACKEND_OBJECTNAME =
-          "rootDSE,Rdn1=cn-monitor,Rdn2=cn-adminRoot_Backend";
-
-  /**
-   * Name of MONITOR_ADSTRUSTSTORE_BACKEND_OBJECTNAME monitor Mbean.
-   */
-  public static final String MONITOR_ADSTRUSTSTORE_BACKEND_OBJECTNAME =
-          "rootDSE,Rdn1=cn-monitor,Rdn2=cn-adstruststore_Backend";
-
-  /**
-   * Name of MONITOR_BACKUP_BACKEND_OBJECTNAME monitor Mbean.
-   */
-  public static final String MONITOR_BACKUP_BACKEND_OBJECTNAME =
-          "rootDSE,Rdn1=cn-monitor,Rdn2=cn-backup_Backend";
-
-  /**
-   * Name of MONITOR_MONITOR_BACKEND_OBJECTNAME monitor Mbean.
-   */
-  public static final String MONITOR_MONITOR_BACKEND_OBJECTNAME =
-          "rootDSE,Rdn1=cn-monitor,Rdn2=cn-monitor_Backend";
-
-  /**
-   * Name of MONITOR_SCHEMA_BACKEND_OBJECTNAME monitor Mbean.
-   */
-  public static final String MONITOR_SCHEMA_BACKEND_OBJECTNAME =
-          "rootDSE,Rdn1=cn-monitor,Rdn2=cn-schema_Backend";
-
-  /**
-   * Name of MONITOR_TASKS_BACKEND_OBJECTNAME monitor Mbean.
-   */
-  public static final String MONITOR_TASKS_BACKEND_OBJECTNAME =
-          "rootDSE,Rdn1=cn-monitor,Rdn2=cn-tasks_Backend";
-
-  /**
-   * Name of MONITOR_USERROOT_BACKEND_OBJECTNAME monitor Mbean.
-   */
-  public static final String MONITOR_USERROOT_BACKEND_OBJECTNAME =
-          "rootDSE,Rdn1=cn-monitor,Rdn2=cn-userRoot_Backend";
-
-  /**
-   * Name of MONITOR_USERROOT_DATABASE_ENVIRONMENT_OBJECTNAME monitor Mbean.
-   */
-  public static final String MONITOR_USERROOT_DATABASE_ENVIRONMENT_OBJECTNAME =
-          "rootDSE,Rdn1=cn-monitor,Rdn2=cn-userRoot_Database_Environment";
+    static {
+        SECURITY_LEVELS.put("noauthnopriv", 0);
+        SECURITY_LEVELS.put("authnopriv", 1);
+        SECURITY_LEVELS.put("authpriv", 2);
+    }
+    /**
+     * Domain for SNMP MBeans.
+     */
+    public static final String SNMP_DOMAIN =
+            "org.opends.server.snmp:";
+    /**
+     * Domain for Monitor MBeans.
+     */
+    public static final String JMX_DOMAIN =
+            "org.opends.server:";
+    /**
+     * Name of MONITOR_CLIENT_CONNECTIONS_OBJECTNAME monitor Mbean.
+     */
+    public static final String MONITOR_CLIENT_CONNECTIONS_OBJECTNAME =
+            "rootDSE,Rdn1=cn-monitor,Rdn2=cn-Client_Connections";
+    /**
+     * Name of MONITOR_ENTRY_CACHES_OBJECTNANE monitor Mbean.
+     */
+    public static final String MONITOR_ENTRY_CACHES_OBJECTNANE =
+            "rootDSE,Rdn1=cn-monitor,Rdn2=cn-Entry_Caches";
+    /**
+     * Name of MONITOR_JVM_MEMORY_USAGE_OBJECTNAME monitor Mbean.
+     */
+    public static final String MONITOR_JVM_MEMORY_USAGE_OBJECTNAME =
+            "RootDSE,Rdn1=cn-monitor,Rdn2=cn-JVM_Memory_Usage";
+    /**
+     * Name of MONITOR_JVM_STACK_TRACE_OBJECTNAME monitor Mbean.
+     */
+    public static final String MONITOR_JVM_STACK_TRACE_OBJECTNAME = "" +
+            "rootDSE,Rdn1=cn-monitor,Rdn2=cn-JVM_Stack_Trace";
+    /**
+     * Name of MONITOR_SYSTEM_INFORMATION_OBJECTNAME monitor Mbean.
+     */
+    public static final String MONITOR_SYSTEM_INFORMATION_OBJECTNAME =
+            "rootDSE,Rdn1=cn-monitor,Rdn2=cn-System_Information";
+    /**
+     * Name of MONITOR_VERSION_OBJECTNAME monitor Mbean.
+     */
+    public static final String MONITOR_VERSION_OBJECTNAME =
+            "rootDSE,Rdn1=cn-monitor,Rdn2=cn-Version";
+    /**
+     * Name of MONITOR_WORK_QUEUE_OBJECTNAME monitor Mbean.
+     */
+    public static final String MONITOR_WORK_QUEUE_OBJECTNAME =
+            "rootDSE,Rdn1=cn-monitor,Rdn2=cn-Work_Queue";
+    /**
+     * Name of MONITOR_ADMIN_ROOT_BACKEND_OBJECTNAME monitor Mbean.
+     */
+    public static final String MONITOR_ADMIN_ROOT_BACKEND_OBJECTNAME =
+            "rootDSE,Rdn1=cn-monitor,Rdn2=cn-adminRoot_Backend";
+    /**
+     * Name of MONITOR_ADSTRUSTSTORE_BACKEND_OBJECTNAME monitor Mbean.
+     */
+    public static final String MONITOR_ADSTRUSTSTORE_BACKEND_OBJECTNAME =
+            "rootDSE,Rdn1=cn-monitor,Rdn2=cn-adstruststore_Backend";
+    /**
+     * Name of MONITOR_BACKUP_BACKEND_OBJECTNAME monitor Mbean.
+     */
+    public static final String MONITOR_BACKUP_BACKEND_OBJECTNAME =
+            "rootDSE,Rdn1=cn-monitor,Rdn2=cn-backup_Backend";
+    /**
+     * Name of MONITOR_MONITOR_BACKEND_OBJECTNAME monitor Mbean.
+     */
+    public static final String MONITOR_MONITOR_BACKEND_OBJECTNAME =
+            "rootDSE,Rdn1=cn-monitor,Rdn2=cn-monitor_Backend";
+    /**
+     * Name of MONITOR_SCHEMA_BACKEND_OBJECTNAME monitor Mbean.
+     */
+    public static final String MONITOR_SCHEMA_BACKEND_OBJECTNAME =
+            "rootDSE,Rdn1=cn-monitor,Rdn2=cn-schema_Backend";
+    /**
+     * Name of MONITOR_TASKS_BACKEND_OBJECTNAME monitor Mbean.
+     */
+    public static final String MONITOR_TASKS_BACKEND_OBJECTNAME =
+            "rootDSE,Rdn1=cn-monitor,Rdn2=cn-tasks_Backend";
+    /**
+     * Name of MONITOR_USERROOT_BACKEND_OBJECTNAME monitor Mbean.
+     */
+    public static final String MONITOR_USERROOT_BACKEND_OBJECTNAME =
+            "rootDSE,Rdn1=cn-monitor,Rdn2=cn-userRoot_Backend";
+    /**
+     * Name of MONITOR_USERROOT_DATABASE_ENVIRONMENT_OBJECTNAME monitor Mbean.
+     */
+    public static final String
+            MONITOR_USERROOT_DATABASE_ENVIRONMENT_OBJECTNAME =
+            "rootDSE,Rdn1=cn-monitor,Rdn2=cn-userRoot_Database_Environment";
 }

--
Gitblit v1.10.0