Browse files

upgrade to latest bobo for the lazy runtime facets.

  • Loading branch information...
1 parent 539ed55 commit cd4d603d40737dc2b9345ae130274fa3d5b4f53e @wonlay committed Mar 29, 2012
View
2 sensei-core/pom.xml
@@ -237,7 +237,7 @@
<dependency>
<groupId>com.browseengine.bobo</groupId>
<artifactId>bobo-browse</artifactId>
- <version>3.0.4-SNAPSHOT</version>
+ <version>3.0.5-SNAPSHOT</version>
<type>jar</type>
</dependency>
View
11 sensei-core/src/main/java/com/senseidb/conf/SenseiFacetHandlerBuilder.java
@@ -22,6 +22,7 @@
import com.browseengine.bobo.facets.FacetHandlerInitializerParam;
import com.browseengine.bobo.facets.RuntimeFacetHandler;
import com.browseengine.bobo.facets.RuntimeFacetHandlerFactory;
+import com.browseengine.bobo.facets.AbstractRuntimeFacetHandlerFactory;
import com.browseengine.bobo.facets.attribute.AttributesFacetHandler;
import com.browseengine.bobo.facets.data.PredefinedTermListFactory;
import com.browseengine.bobo.facets.data.TermListFactory;
@@ -273,7 +274,7 @@ else if ("double".equals(dataType))
final T end,
final T unit)
{
- return new RuntimeFacetHandlerFactory<FacetHandlerInitializerParam, RuntimeFacetHandler<FacetDataNone>>()
+ return new AbstractRuntimeFacetHandlerFactory<FacetHandlerInitializerParam, RuntimeFacetHandler<FacetDataNone>>()
{
@Override
public RuntimeFacetHandler<FacetDataNone> get(FacetHandlerInitializerParam params)
@@ -442,14 +443,20 @@ public static SenseiSystemInfo buildFacets(JSONObject schemaObj, SenseiPluginReg
final String depends = dependSet.iterator().next();
Assert.notEmpty(paramMap.get("range"), "Facet handler " + name + " should have at least one predefined range");
- return new RuntimeFacetHandlerFactory<FacetHandlerInitializerParam, RuntimeFacetHandler<?>>() {
+ return new AbstractRuntimeFacetHandlerFactory<FacetHandlerInitializerParam, RuntimeFacetHandler<?>>() {
@Override
public String getName() {
return name;
}
@Override
+ public boolean isEmptyParamsSupported()
+ {
+ return true;
+ }
+
+ @Override
public RuntimeFacetHandler<?> get(FacetHandlerInitializerParam params) {
long overrideNow = -1;
try {
View
4 sensei-core/src/test/java/com/senseidb/test/plugin/MockRuntimeFacetHandlerFactory.java
@@ -2,9 +2,9 @@
import com.browseengine.bobo.facets.FacetHandlerInitializerParam;
import com.browseengine.bobo.facets.RuntimeFacetHandler;
-import com.browseengine.bobo.facets.RuntimeFacetHandlerFactory;
+import com.browseengine.bobo.facets.AbstractRuntimeFacetHandlerFactory;
-public class MockRuntimeFacetHandlerFactory implements RuntimeFacetHandlerFactory<FacetHandlerInitializerParam, RuntimeFacetHandler<?>> {
+public class MockRuntimeFacetHandlerFactory extends AbstractRuntimeFacetHandlerFactory<FacetHandlerInitializerParam, RuntimeFacetHandler<?>> {
@Override
public String getName() {

0 comments on commit cd4d603

Please sign in to comment.