Author: sshafroi
Date: 2008-06-09 10:33:23 +0200 (Mon, 09 Jun 2008)
New Revision: 6679
Removed:
trunk/util/
Modified:
trunk/pom.xml
trunk/search-command-config-spi/pom.xml
trunk/view-config-spi/src/main/java/no/sesat/search/view/SearchTabFactory.java
Log:
Interpreter moved to sesat-commons
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2008-06-08 18:01:33 UTC (rev 6678)
+++ trunk/pom.xml 2008-06-09 08:33:23 UTC (rev 6679)
@@ -136,7 +136,6 @@
<!-- sitemap-generator must be after
generic.sesam-search-command-control because they both use assembly -->
<module>sitemap-generator</module>
<module>war</module>
- <module>util</module>
</modules>
<build>
@@ -574,6 +573,11 @@
<scope>test</scope>
<classifier>jdk15</classifier>
</dependency>
+ <dependency>
+ <groupId>sesat</groupId>
+ <artifactId>commons-interpreter</artifactId>
+ <version>1.0</version>
+ </dependency>
</dependencies>
<reporting>
<plugins>
Modified: trunk/search-command-config-spi/pom.xml
===================================================================
--- trunk/search-command-config-spi/pom.xml 2008-06-08 18:01:33 UTC (rev
6678)
+++ trunk/search-command-config-spi/pom.xml 2008-06-09 08:33:23 UTC (rev
6679)
@@ -65,11 +65,6 @@
<artifactId>sesat-run-transform-config-spi</artifactId>
<version>${sesat.version}</version>
</dependency>
- <dependency>
- <groupId>sesat</groupId>
- <artifactId>sesat-util</artifactId>
- <version>${sesat.version}</version>
- </dependency>
</dependencies>
</project>
Modified:
trunk/view-config-spi/src/main/java/no/sesat/search/view/SearchTabFactory.java
===================================================================
---
trunk/view-config-spi/src/main/java/no/sesat/search/view/SearchTabFactory.java
2008-06-08 18:01:33 UTC (rev 6678)
+++
trunk/view-config-spi/src/main/java/no/sesat/search/view/SearchTabFactory.java
2008-06-09 08:33:23 UTC (rev 6679)
@@ -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
@@ -34,6 +34,7 @@
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import no.schibstedsok.commons.ioc.ContextWrapper;
+import no.sesat.Interpreter;
import no.sesat.search.site.config.AbstractConfigFactory;
import no.sesat.search.view.navigation.NavigationConfig;
import no.sesat.search.site.config.DocumentLoader;
@@ -120,6 +121,7 @@
} catch (ParserConfigurationException ex) {
LOG.error(ERR_DOC_BUILDER_CREATION,ex);
}
+ instance.addInterpreterFunctions();
}
return instance;
}
@@ -602,4 +604,21 @@
}
}
+ private void addInterpreterFunctions() {
+ Interpreter.addFunction("tabs", new Interpreter.Function() {
+ public String execute(Interpreter.Context ctx) {
+ String res = "";
+ for (String s : tabsByKey.keySet()) {
+ res += "View: " + s + "\n";
+ res += tabsByKey.get(s).toString();
+ res += "\n";
+ }
+ return res;
+
+ }
+ public String describe() {
+ return "Print out the tabs in tabsByKey.";
+ }
+ });
+ }
}
\ No newline at end of file
_______________________________________________
Kernel-commits mailing list
[email protected]
http://sesat.no/mailman/listinfo/kernel-commits