Author: sshafroi
Date: 2008-06-03 15:33:59 +0200 (Tue, 03 Jun 2008)
New Revision: 6650

Modified:
   
trunk/generic.sesam/search-command-config/src/main/java/no/sesat/search/mode/config/YahooWebCommandConfig.java
Log:
Use separate variable for appid, and apply it's value on setPartnerId in 
readSearchConfigurationAfter.


Modified: 
trunk/generic.sesam/search-command-config/src/main/java/no/sesat/search/mode/config/YahooWebCommandConfig.java
===================================================================
--- 
trunk/generic.sesam/search-command-config/src/main/java/no/sesat/search/mode/config/YahooWebCommandConfig.java
      2008-06-03 09:12:33 UTC (rev 6649)
+++ 
trunk/generic.sesam/search-command-config/src/main/java/no/sesat/search/mode/config/YahooWebCommandConfig.java
      2008-06-03 13:33:59 UTC (rev 6650)
@@ -1,4 +1,4 @@
-/* Copyright (2006-2007) Schibsted Søk AS
+/* Copyright (2006-2008) Schibsted Søk AS
  * This file is part of SESAT.
  *
  *   SESAT is free software: you can redistribute it and/or modify
@@ -31,6 +31,8 @@
 @Controller("YahooWebSearchCommand")
 public class YahooWebCommandConfig extends AbstractYahooSearchConfiguration {
 
+    private String appid = "YahooDemo";
+
     /**
      * Holds value of property similar.
      */
@@ -75,20 +77,23 @@
     }
 
     /**
-     * Getter for property appid. Delegates to getPartnerId().
+     * Getter for property appid.
      * @return Value of property appid.
      */
     public String getAppid() {
-        return getPartnerId();
+        return appid;
     }
 
     /**
-     * Setter for property appid. Delegates to setPartnerId(..).
+     * Setter for property appid.
+     *
+     * This value will be propagated to setPartnerId(..) in 
readSearchConfigurationAfter.
+     *
      * Apply for a application ID here 
http://developer.yahoo.com/faq/index.html#appid
      * @param appid New value of property appid.
      */
     public void setAppid(final String appid) {
-        setPartnerId(appid);
+        this.appid = appid;
     }
 
     /**
@@ -195,6 +200,10 @@
         return this;
     }
 
+    @Override
+    protected void readSearchConfigurationAfter(final Element element, final 
SearchConfiguration inherit) {
+        super.readSearchConfigurationAfter(element, inherit);
+        setPartnerId(getAppid());
+    }
 
-
 }

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

Reply via email to