Author: magnuse
Date: 2006-04-26 12:53:48 +0200 (Wed, 26 Apr 2006)
New Revision: 2808

Added:
   trunk/src/main/conf/msearch-client-context.xml
Modified:
   trunk/pom.xml
   
trunk/src/java/no/schibstedsok/front/searchportal/command/impl/SearchCommandFactory.java
   
trunk/src/java/no/schibstedsok/front/searchportal/configuration/SearchModeFactory.java
Log:
Mobile search command added. 
Fast API updated (dsapi) upgraded to 2.0.70.



Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml       2006-04-26 08:33:38 UTC (rev 2807)
+++ trunk/pom.xml       2006-04-26 10:53:48 UTC (rev 2808)
@@ -385,9 +385,14 @@
     <dependency>
       <groupId>fast</groupId>
       <artifactId>dsapi</artifactId>
-      <version>2.0.45</version>
+      <version>2.0.70</version>
     </dependency>
     <dependency>
+      <groupId>fast</groupId>
+      <artifactId>msearch-client</artifactId>
+      <version>4.2</version>
+    </dependency>
+    <dependency>
       <groupId>junit</groupId>
       <artifactId>junit</artifactId>
       <version>3.8.1</version>
@@ -397,6 +402,11 @@
       <artifactId>jug</artifactId>
       <version>1.1.2</version>
     </dependency>
+    <dependency>
+      <groupId>org.springframework</groupId>
+      <artifactId>spring</artifactId>
+      <version>1.2.1</version>
+    </dependency>
   </dependencies>
   <reporting>
     <plugins>

Modified: 
trunk/src/java/no/schibstedsok/front/searchportal/command/impl/SearchCommandFactory.java
===================================================================
--- 
trunk/src/java/no/schibstedsok/front/searchportal/command/impl/SearchCommandFactory.java
    2006-04-26 08:33:38 UTC (rev 2807)
+++ 
trunk/src/java/no/schibstedsok/front/searchportal/command/impl/SearchCommandFactory.java
    2006-04-26 10:53:48 UTC (rev 2808)
@@ -11,6 +11,7 @@
 import java.util.Map;
 import no.schibstedsok.front.searchportal.command.FastSearchCommand;
 import no.schibstedsok.front.searchportal.command.MathExpressionCommand;
+import no.schibstedsok.front.searchportal.command.MobileSearchCommand;
 import no.schibstedsok.front.searchportal.command.NewsSearchCommand;
 import no.schibstedsok.front.searchportal.command.OverturePPCCommand;
 import no.schibstedsok.front.searchportal.command.PicSearchCommand;
@@ -21,6 +22,7 @@
 import no.schibstedsok.front.searchportal.command.YellowGeoSearch;
 import no.schibstedsok.front.searchportal.configuration.FastConfiguration;
 import 
no.schibstedsok.front.searchportal.configuration.MathExpressionConfiguration;
+import 
no.schibstedsok.front.searchportal.configuration.MobileSearchConfiguration;
 import 
no.schibstedsok.front.searchportal.configuration.NewsSearchConfiguration;
 import 
no.schibstedsok.front.searchportal.configuration.OverturePPCConfiguration;
 import no.schibstedsok.front.searchportal.configuration.PicSearchConfiguration;
@@ -65,15 +67,17 @@
             return new NewsSearchCommand(cxt, parameters);
         } else if (config instanceof FastConfiguration) {
             return new FastSearchCommand(cxt, parameters);
-        }  else if (config instanceof MathExpressionConfiguration) {
+        } else if (config instanceof MathExpressionConfiguration) {
             return new MathExpressionCommand(cxt, parameters);
-        }  else if (config instanceof OverturePPCConfiguration) {
+        } else if (config instanceof OverturePPCConfiguration) {
             return new OverturePPCCommand(cxt, parameters);
         } else if (config instanceof PicSearchConfiguration) {
             return new PicSearchCommand(cxt, parameters);
-        }  else if (config instanceof SensisSearchConfiguration) {
+        } else if (config instanceof SensisSearchConfiguration) {
             return new FastSearchCommand(cxt, parameters);
-        } 
+        } else if (config instanceof MobileSearchConfiguration)  {
+            return new MobileSearchCommand(cxt, parameters);
+        }
         throw new UnsupportedOperationException("Cannot find suitable command 
for " + config.getName());
     }
 }

Modified: 
trunk/src/java/no/schibstedsok/front/searchportal/configuration/SearchModeFactory.java
===================================================================
--- 
trunk/src/java/no/schibstedsok/front/searchportal/configuration/SearchModeFactory.java
      2006-04-26 08:33:38 UTC (rev 2807)
+++ 
trunk/src/java/no/schibstedsok/front/searchportal/configuration/SearchModeFactory.java
      2006-04-26 10:53:48 UTC (rev 2808)
@@ -613,8 +613,8 @@
                         break;
                     case TV:
                         final TvEnrichmentDateFormatHandler dh = 
(TvEnrichmentDateFormatHandler) handler;
+                        dh.setTargetField(rh.getAttribute("target"));
                         dh.setSourceField(rh.getAttribute("source"));
-                        dh.setTargetField(rh.getAttribute("target"));
                         break;
                 }
 

Added: trunk/src/main/conf/msearch-client-context.xml
===================================================================
--- trunk/src/main/conf/msearch-client-context.xml                              
(rev 0)
+++ trunk/src/main/conf/msearch-client-context.xml      2006-04-26 10:53:48 UTC 
(rev 2808)
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+
+<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" 
"http://www.springframework.org/dtd/spring-beans.dtd";>
+
+<beans>
+
+       <bean id="placeholderConfig" 
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer" >
+               <property name="location" 
value="classpath:msearch-client.properties" />
+       </bean>
+       
+       <!--
+          - The 'mSearchHttpInvoker' bean stores a local representation of the 
+          - client-side proxy in order to circumvent accessing the bean 
factory.
+          -->
+       <bean id="mSearchRemoteService" 
class="no.fast.msearch.search.http.HttpInvokerService" >
+               <constructor-arg ref="${msearch.remote.service}" />
+       </bean>
+       
+       <!--
+          - Spring defines a proxy for the target service, which is used by 
the client. The definition
+          - includes; the proxy factory class name, the HTTP URI ot the target 
service, and the exposed
+          - service interface.
+          -->
+       <bean id="mSearchHttpInvokerProxy" 
class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean" >
+               <!--
+                  - The URL comprises hostname:port/webapp-path/bean-id        
+                  -->
+               <property name="serviceUrl" 
value="http://${msearch.hostname}:${msearch.port}/${msearch.webApplicationPath}/msearchServiceHttpInvoker.esp";
 />
+               <property name="serviceInterface" 
value="no.fast.msearch.search.IMSearchEngine" />
+       </bean>
+
+</beans>

_______________________________________________
Kernel-commits mailing list
[email protected]
http://sesat.no/mailman/listinfo/kernel-commits

Reply via email to