lucene-solr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From no...@apache.org
Subject svn commit: r886724 - in /lucene/solr/trunk/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport: AbstractDataImportHandlerTest.java Context.java ContextImpl.java
Date Thu, 03 Dec 2009 09:49:31 GMT
Author: noble
Date: Thu Dec  3 09:49:25 2009
New Revision: 886724

URL: http://svn.apache.org/viewvc?rev=886724&view=rev
Log:
added resolve()/replcaeTokens to Context directly

Modified:
    lucene/solr/trunk/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/AbstractDataImportHandlerTest.java
    lucene/solr/trunk/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/Context.java
    lucene/solr/trunk/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/ContextImpl.java

Modified: lucene/solr/trunk/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/AbstractDataImportHandlerTest.java
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/AbstractDataImportHandlerTest.java?rev=886724&r1=886723&r2=886724&view=diff
==============================================================================
--- lucene/solr/trunk/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/AbstractDataImportHandlerTest.java
(original)
+++ lucene/solr/trunk/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/AbstractDataImportHandlerTest.java
Thu Dec  3 09:49:25 2009
@@ -233,5 +233,13 @@
     public void deleteDocByQuery(String query) {
 
     }
+
+    public Object resolve(String var) {
+      return delegate.resolve(var);
+    }
+
+    public String replaceTokens(String template) {
+      return delegate.replaceTokens(template);
+    }
   }
 }

Modified: lucene/solr/trunk/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/Context.java
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/Context.java?rev=886724&r1=886723&r2=886724&view=diff
==============================================================================
--- lucene/solr/trunk/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/Context.java
(original)
+++ lucene/solr/trunk/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/Context.java
Thu Dec  3 09:49:25 2009
@@ -208,5 +208,17 @@
    */
   public abstract void deleteDocByQuery(String query);
 
+  /**Use this directly to  resolve variable
+   * @param var the variable neme 
+   * @return the resolved value
+   */
+  public abstract Object resolve(String var);
+
+  /** Resolve variables in a template
+   * @param template
+   * @return The string w/ variables resolved
+   */
+  public abstract String replaceTokens(String template);
+
 
 }

Modified: lucene/solr/trunk/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/ContextImpl.java
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/ContextImpl.java?rev=886724&r1=886723&r2=886724&view=diff
==============================================================================
--- lucene/solr/trunk/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/ContextImpl.java
(original)
+++ lucene/solr/trunk/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/ContextImpl.java
Thu Dec  3 09:49:25 2009
@@ -214,4 +214,12 @@
       docBuilder.writer.deleteByQuery(query);
     } 
   }
+
+  public Object resolve(String var) {
+    return resolver.resolve(var);
+  }
+
+  public String replaceTokens(String template) {
+    return resolver.replaceTokens(template);
+  }
 }



Mime
View raw message