From f0a048d41a13eca4cba405da9403c2469ca3d1ea Mon Sep 17 00:00:00 2001
From: Fabio Pistolesi <fabio.pistolesi@forgerock.com>
Date: Tue, 05 May 2015 14:18:24 +0000
Subject: [PATCH] OPENDJ-1849 CR-6835 Remove references to JE from pluggable backend
---
opendj-server-legacy/src/main/java/org/opends/server/backends/jeb/IndexQueryFactoryImpl.java | 23 ++++++++++++++---------
1 files changed, 14 insertions(+), 9 deletions(-)
diff --git a/opendj-server-legacy/src/main/java/org/opends/server/backends/jeb/IndexQueryFactoryImpl.java b/opendj-server-legacy/src/main/java/org/opends/server/backends/jeb/IndexQueryFactoryImpl.java
index d9054e2..eae7dd1 100644
--- a/opendj-server-legacy/src/main/java/org/opends/server/backends/jeb/IndexQueryFactoryImpl.java
+++ b/opendj-server-legacy/src/main/java/org/opends/server/backends/jeb/IndexQueryFactoryImpl.java
@@ -22,7 +22,7 @@
*
*
* Copyright 2009-2010 Sun Microsystems, Inc.
- * Portions Copyright 2014 ForgeRock AS
+ * Portions Copyright 2014-2015 ForgeRock AS
*/
package org.opends.server.backends.jeb;
@@ -33,11 +33,12 @@
import org.forgerock.opendj.ldap.ByteSequence;
import org.forgerock.opendj.ldap.spi.IndexQueryFactory;
import org.forgerock.opendj.ldap.spi.IndexingOptions;
+import org.opends.server.types.AttributeType;
import com.sleepycat.je.DatabaseEntry;
import com.sleepycat.je.LockMode;
-import static org.opends.messages.JebMessages.*;
+import static org.opends.messages.BackendMessages.*;
/**
* This class is an implementation of IndexQueryFactory which creates
@@ -54,6 +55,7 @@
*/
private final Map<String, Index> indexMap;
private final IndexingOptions indexingOptions;
+ private final AttributeType attribute;
/**
* Creates a new IndexQueryFactoryImpl object.
@@ -62,11 +64,14 @@
* A map containing the index id and the corresponding index.
* @param indexingOptions
* The options to use for indexing
+ * @param attribute
+ * The Attribute type of this index, for error messages
*/
- public IndexQueryFactoryImpl(Map<String, Index> indexMap, IndexingOptions indexingOptions)
+ public IndexQueryFactoryImpl(Map<String, Index> indexMap, IndexingOptions indexingOptions, AttributeType attribute)
{
this.indexMap = indexMap;
this.indexingOptions = indexingOptions;
+ this.attribute = attribute;
}
@@ -90,7 +95,7 @@
{
if(debugMessage != null)
{
- debugMessage.append(INFO_JEB_INDEX_FILTER_INDEX_TYPE_DISABLED.get(indexID, ""));
+ debugMessage.append(INFO_INDEX_FILTER_INDEX_TYPE_DISABLED.get(indexID, attribute.getNameOrOID()));
}
return createMatchAllQuery().evaluate(debugMessage);
}
@@ -124,7 +129,7 @@
{
if(debugMessage != null)
{
- debugMessage.append(INFO_JEB_INDEX_FILTER_INDEX_TYPE_DISABLED.get(indexID, ""));
+ debugMessage.append(INFO_INDEX_FILTER_INDEX_TYPE_DISABLED.get(indexID, attribute.getNameOrOID()));
}
return createMatchAllQuery().evaluate(debugMessage);
}
@@ -179,7 +184,7 @@
{
if(debugMessage != null)
{
- debugMessage.append(INFO_JEB_INDEX_FILTER_INDEX_TYPE_DISABLED.get(indexID, ""));
+ debugMessage.append(INFO_INDEX_FILTER_INDEX_TYPE_DISABLED.get(indexID, attribute.getNameOrOID()));
}
return new EntryIDSet();
}
@@ -198,15 +203,15 @@
{
if (!index.isTrusted())
{
- debugMessage.append(INFO_JEB_INDEX_FILTER_INDEX_NOT_TRUSTED.get(index.getName()));
+ debugMessage.append(INFO_INDEX_FILTER_INDEX_NOT_TRUSTED.get(index.getName()));
}
else if (index.isRebuildRunning())
{
- debugMessage.append(INFO_JEB_INDEX_FILTER_INDEX_REBUILD_IN_PROGRESS.get(index.getName()));
+ debugMessage.append(INFO_INDEX_FILTER_INDEX_REBUILD_IN_PROGRESS.get(index.getName()));
}
else
{
- debugMessage.append(INFO_JEB_INDEX_FILTER_INDEX_LIMIT_EXCEEDED.get(index.getName()));
+ debugMessage.append(INFO_INDEX_FILTER_INDEX_LIMIT_EXCEEDED.get(index.getName()));
}
}
--
Gitblit v1.10.0