From eb4855e3f510e32c6034710868ef87e67081f921 Mon Sep 17 00:00:00 2001
From: Gaetan Boismal <gaetan.boismal@forgerock.com>
Date: Fri, 17 Apr 2015 08:54:33 +0000
Subject: [PATCH] OPENDJ-1714 Change FIXME comment to annotation

---
 opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/util/ConfigFromDirContext.java         |    3 ++-
 opendj-server-legacy/src/main/java/org/opends/server/tools/ConfigureDS.java                                |    4 ++--
 opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/datamodel/IndexTypeDescriptor.java     |    6 ++----
 opendj-server-legacy/src/main/java/org/opends/server/backends/jeb/RemoveOnceLocalDBBackendIsPluggable.java |   39 +++++++++++++++++++++++++++++++++++++++
 opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/datamodel/VLVIndexDescriptor.java      |    5 +++--
 5 files changed, 48 insertions(+), 9 deletions(-)

diff --git a/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/datamodel/IndexTypeDescriptor.java b/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/datamodel/IndexTypeDescriptor.java
index 03d170a..972f700 100644
--- a/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/datamodel/IndexTypeDescriptor.java
+++ b/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/datamodel/IndexTypeDescriptor.java
@@ -31,8 +31,10 @@
 
 import org.opends.server.admin.std.meta.BackendIndexCfgDefn;
 import org.opends.server.admin.std.meta.LocalDBIndexCfgDefn;
+import org.opends.server.backends.jeb.RemoveOnceLocalDBBackendIsPluggable;
 
 /** Defines the set of values for the index type. */
+@RemoveOnceLocalDBBackendIsPluggable
 public enum IndexTypeDescriptor
 {
   /**
@@ -112,7 +114,6 @@
     }
   }
 
-  // FIXME: Remove once local-db backend will be pluggable.
   /**
    * Convert the index type to the equivalent
    * {@code LocalDBIndexCfgDefn.IndexType}.
@@ -162,7 +163,6 @@
     }
   }
 
-  // FIXME: Remove once local-db backend will be pluggable.
   private static IndexTypeDescriptor fromLocalDBIndexType(final LocalDBIndexCfgDefn.IndexType indexType)
   {
     switch (indexType)
@@ -203,7 +203,6 @@
     return indexTypeDescriptors;
   }
 
-  // FIXME: Remove once local-db backend will be pluggable.
   /**
    * Convert the provided {@code Set<LocalDBIndexCfgDefn.IndexType} to a
    * {@code Set<IndexTypeDescriptor>}.
@@ -243,7 +242,6 @@
     return indexTypes;
   }
 
-  // FIXME: Remove once local-db backend will be pluggable.
   /**
    * Convert the provided {@code Set<IndexTypeDescriptor>} to a
    * {@code Set<LocalDBIndexCfgDefn.IndexType>}.
diff --git a/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/datamodel/VLVIndexDescriptor.java b/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/datamodel/VLVIndexDescriptor.java
index 5337dcf..5af397c 100644
--- a/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/datamodel/VLVIndexDescriptor.java
+++ b/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/datamodel/VLVIndexDescriptor.java
@@ -33,6 +33,7 @@
 import org.forgerock.opendj.ldap.SearchScope;
 import org.opends.server.admin.std.meta.BackendVLVIndexCfgDefn;
 import org.opends.server.admin.std.meta.LocalDBVLVIndexCfgDefn;
+import org.opends.server.backends.jeb.RemoveOnceLocalDBBackendIsPluggable;
 import org.opends.server.types.DN;
 
 /**
@@ -199,7 +200,6 @@
     }
   }
 
-  // FIXME: Remove once local-db backend will be pluggable.
   /**
    * Returns the equivalent {@code LocalDBVLVIndexCfgDefn.Scope} to the provided
    * search scope.
@@ -209,6 +209,7 @@
    * @return the equivalent {@code LocalDBVLVIndexCfgDefn.Scope} to the provided
    *         search scope.
    */
+  @RemoveOnceLocalDBBackendIsPluggable
   public static LocalDBVLVIndexCfgDefn.Scope getLocalDBVLVIndexScope(final SearchScope scope)
   {
     switch (scope.asEnum())
@@ -253,7 +254,6 @@
     }
   }
 
-  // FIXME: Remove once local-db backend will be pluggable.
   /**
    * Convert the provided {@code LocalDBVLVIndexCfgDefn.Scope} to
    * {@code SearchScope}.
@@ -263,6 +263,7 @@
    * @return the provided {@code LocalDBVLVIndexCfgDefn.Scope} to
    *         {@code SearchScope}
    */
+  @RemoveOnceLocalDBBackendIsPluggable
   public static SearchScope toSearchScope(final LocalDBVLVIndexCfgDefn.Scope scope)
   {
     switch (scope)
diff --git a/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/util/ConfigFromDirContext.java b/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/util/ConfigFromDirContext.java
index 9314fb7..6caa325 100644
--- a/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/util/ConfigFromDirContext.java
+++ b/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/util/ConfigFromDirContext.java
@@ -95,6 +95,7 @@
 import org.opends.server.admin.std.client.RootDNUserCfgClient;
 import org.opends.server.admin.std.client.SNMPConnectionHandlerCfgClient;
 import org.opends.server.admin.std.client.TaskBackendCfgClient;
+import org.opends.server.backends.jeb.RemoveOnceLocalDBBackendIsPluggable;
 import org.opends.server.backends.pluggable.SuffixContainer;
 import org.opends.server.config.ConfigConstants;
 import org.opends.server.core.DirectoryServer;
@@ -534,7 +535,7 @@
     }
   }
 
-  // FIXME: Remove once local-db backend will be pluggable.
+  @RemoveOnceLocalDBBackendIsPluggable
   private void refreshLocalDBBackendConfig(final Set<IndexDescriptor> indexes,
       final Set<VLVIndexDescriptor> vlvIndexes, final BackendCfgClient backend, final List<OpenDsException> errors)
   {
diff --git a/opendj-server-legacy/src/main/java/org/opends/server/backends/jeb/RemoveOnceLocalDBBackendIsPluggable.java b/opendj-server-legacy/src/main/java/org/opends/server/backends/jeb/RemoveOnceLocalDBBackendIsPluggable.java
new file mode 100644
index 0000000..74c1266
--- /dev/null
+++ b/opendj-server-legacy/src/main/java/org/opends/server/backends/jeb/RemoveOnceLocalDBBackendIsPluggable.java
@@ -0,0 +1,39 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License").  You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
+ * or http://forgerock.org/license/CDDLv1.0.html.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at legal-notices/CDDLv1_0.txt.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information:
+ *      Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ *
+ *
+ *      Copyright 2015 ForgeRock AS
+ */
+package org.opends.server.backends.jeb;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+
+/**
+ * Temporary annotation to remind that annotated code could be removed once the
+ * JE backend will be converted to pluggable backend.
+ */
+@Retention(RetentionPolicy.SOURCE)
+public @interface RemoveOnceLocalDBBackendIsPluggable
+{
+
+}
diff --git a/opendj-server-legacy/src/main/java/org/opends/server/tools/ConfigureDS.java b/opendj-server-legacy/src/main/java/org/opends/server/tools/ConfigureDS.java
index 7b19471..2779e9e 100644
--- a/opendj-server-legacy/src/main/java/org/opends/server/tools/ConfigureDS.java
+++ b/opendj-server-legacy/src/main/java/org/opends/server/tools/ConfigureDS.java
@@ -77,6 +77,7 @@
 import org.opends.server.admin.StringPropertyDefinition;
 import org.opends.server.admin.std.meta.CryptoManagerCfgDefn;
 import org.opends.server.api.ConfigHandler;
+import org.opends.server.backends.jeb.RemoveOnceLocalDBBackendIsPluggable;
 import org.opends.server.config.BooleanConfigAttribute;
 import org.opends.server.config.ConfigEntry;
 import org.opends.server.config.DNConfigAttribute;
@@ -834,7 +835,6 @@
       backendCfgClient.setWritabilityMode(WritabilityMode.ENABLED);
       backendCfgClient.commit();
 
-      //FIXME: Remove once local-db backend will be pluggable.
       if (backend instanceof LocalDBBackendCfgDefn)
       {
         addJEIndexes((LocalDBBackendCfgClient) backendCfgClient);
@@ -864,7 +864,7 @@
     }
   }
 
-  // FIXME: Remove once local-db backend will be pluggable.
+  @RemoveOnceLocalDBBackendIsPluggable
   private void addJEIndexes(final LocalDBBackendCfgClient jeBackendCfgClient) throws Exception
   {
     for (DefaultIndex defaultIndex : DEFAULT_INDEXES)

--
Gitblit v1.10.0