[exo-jcr-commits] exo-jcr SVN: r4919 - in jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query: lucene and 1 other directory.
do-not-reply at jboss.org
do-not-reply at jboss.org
Fri Sep 16 03:51:00 EDT 2011
Author: nzamosenchuk
Date: 2011-09-16 03:50:59 -0400 (Fri, 16 Sep 2011)
New Revision: 4919
Modified:
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/SearchIndexConfigurationHelper.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/SearchIndex.java
Log:
EXOJCR-1505 : ConfigurationPropertyRecoveryFilter added.
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/SearchIndexConfigurationHelper.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/SearchIndexConfigurationHelper.java 2011-09-16 07:25:04 UTC (rev 4918)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/SearchIndexConfigurationHelper.java 2011-09-16 07:50:59 UTC (rev 4919)
@@ -206,5 +206,9 @@
{
searchIndex.addRecoveryFilterClass(value);
}
+ else
+ {
+ searchIndex.addOptionalParameter(name, value);
+ }
}
}
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/SearchIndex.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/SearchIndex.java 2011-09-16 07:25:04 UTC (rev 4918)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/SearchIndex.java 2011-09-16 07:50:59 UTC (rev 4919)
@@ -41,6 +41,7 @@
import org.exoplatform.container.configuration.ConfigurationManager;
import org.exoplatform.services.document.DocumentReaderService;
import org.exoplatform.services.jcr.config.QueryHandlerEntry;
+import org.exoplatform.services.jcr.config.QueryHandlerParams;
import org.exoplatform.services.jcr.config.RepositoryConfigurationException;
import org.exoplatform.services.jcr.dataflow.ItemDataConsumer;
import org.exoplatform.services.jcr.datamodel.ItemData;
@@ -81,6 +82,7 @@
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
+import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
@@ -527,6 +529,8 @@
protected List<AbstractRecoveryFilter> recoveryFilters = null;
+ protected Map<String, String> optionalParameters = new HashMap<String, String>();
+
/**
* Working constructor.
*
@@ -721,6 +725,30 @@
}
/**
+ * Puts optional parameter not listed in {@link QueryHandlerParams}. Usually used by
+ * extended plug-ins or services like RecoveryFilters.
+ *
+ * @param key
+ * @param value
+ */
+ public void addOptionalParameter(String key, String value)
+ {
+ optionalParameters.put(key, value);
+ }
+
+ /**
+ * Returns whole set of optional (additional) parameters from QueryHandlerEntry
+ * that are not listed in {@link QueryHandlerParams}. Can be used by extended
+ * services and plug-ins requirind additional configuration.
+ *
+ * @return unmodifiable map
+ */
+ public Map<String, String> getOptionalParameters()
+ {
+ return Collections.unmodifiableMap(optionalParameters);
+ }
+
+ /**
* Invokes all recovery filters from the set
* @return true if any filter requires reindexing
*/
More information about the exo-jcr-commits
mailing list