You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@manifoldcf.apache.org by pi...@apache.org on 2012/02/06 20:06:19 UTC
svn commit: r1241114 - in /incubator/lcf/branches/CONNECTORS-288/connectors:
./ elasticsearch/
elasticsearch/connector/src/main/java/org/apache/manifoldcf/agents/output/elasticsearch/
elasticsearch/connector/src/main/resources/org/apache/manifoldcf/age...
Author: piergiorgio
Date: Mon Feb 6 19:06:19 2012
New Revision: 1241114
URL: http://svn.apache.org/viewvc?rev=1241114&view=rev
Log:
some stuff on the ElasticSearch:
- updated the connectors pom, added the elasticsearch module
- upgraded to Apache Velocity the rendering of templates
- updated the configuration templates with all the needed parameters
Modified:
incubator/lcf/branches/CONNECTORS-288/connectors/elasticsearch/connector/src/main/java/org/apache/manifoldcf/agents/output/elasticsearch/Messages.java
incubator/lcf/branches/CONNECTORS-288/connectors/elasticsearch/connector/src/main/resources/org/apache/manifoldcf/agents/output/elasticsearch/editConfiguration_en_US.html
incubator/lcf/branches/CONNECTORS-288/connectors/elasticsearch/connector/src/main/resources/org/apache/manifoldcf/agents/output/elasticsearch/editConfiguration_en_US.js
incubator/lcf/branches/CONNECTORS-288/connectors/elasticsearch/pom.xml
incubator/lcf/branches/CONNECTORS-288/connectors/pom.xml
Modified: incubator/lcf/branches/CONNECTORS-288/connectors/elasticsearch/connector/src/main/java/org/apache/manifoldcf/agents/output/elasticsearch/Messages.java
URL: http://svn.apache.org/viewvc/incubator/lcf/branches/CONNECTORS-288/connectors/elasticsearch/connector/src/main/java/org/apache/manifoldcf/agents/output/elasticsearch/Messages.java?rev=1241114&r1=1241113&r2=1241114&view=diff
==============================================================================
--- incubator/lcf/branches/CONNECTORS-288/connectors/elasticsearch/connector/src/main/java/org/apache/manifoldcf/agents/output/elasticsearch/Messages.java (original)
+++ incubator/lcf/branches/CONNECTORS-288/connectors/elasticsearch/connector/src/main/java/org/apache/manifoldcf/agents/output/elasticsearch/Messages.java Mon Feb 6 19:06:19 2012
@@ -119,5 +119,13 @@ public class Messages extends org.apache
substitutionParameters,mapToUpperCase);
}
+ public static void outputResourceWithVelocity(IHTTPOutput output, Locale locale, String resourceKey,
+ Map<String,String> substitutionParameters, boolean mapToUpperCase)
+ throws ManifoldCFException
+ {
+ outputResourceWithVelocity(output,createVelocityEngine(Messages.class),DEFAULT_PATH_NAME,locale,resourceKey,
+ substitutionParameters,mapToUpperCase);
+ }
+
}
Modified: incubator/lcf/branches/CONNECTORS-288/connectors/elasticsearch/connector/src/main/resources/org/apache/manifoldcf/agents/output/elasticsearch/editConfiguration_en_US.html
URL: http://svn.apache.org/viewvc/incubator/lcf/branches/CONNECTORS-288/connectors/elasticsearch/connector/src/main/resources/org/apache/manifoldcf/agents/output/elasticsearch/editConfiguration_en_US.html?rev=1241114&r1=1241113&r2=1241114&view=diff
==============================================================================
--- incubator/lcf/branches/CONNECTORS-288/connectors/elasticsearch/connector/src/main/resources/org/apache/manifoldcf/agents/output/elasticsearch/editConfiguration_en_US.html (original)
+++ incubator/lcf/branches/CONNECTORS-288/connectors/elasticsearch/connector/src/main/resources/org/apache/manifoldcf/agents/output/elasticsearch/editConfiguration_en_US.html Mon Feb 6 19:06:19 2012
@@ -17,24 +17,49 @@
<table class="displaytable">
<tr>
- <td class="description"><nobr>Server Location</nobr> (URL):</td>
- <td class="value"><input name="serverlocation"
- value="${SERVERLOCATION:A}" size="48" />
- </td>
- </tr>
- <tr>
- <td class="description"><nobr>Index name:</nobr></td>
- <td class="value"><input name="indexname" value="${INDEXNAME:A}"
- size="24" /></td>
- </tr>
+ <td class="description">
+ <nobr>
+ Protocol:
+ </nobr>
+ </td>
+ <td class="value">
+ <select id="protocol" name="protocol">
+ #if($PROTOCOL_BJ == "https")
+ <option value="http">http</option>
+ <option value="https" selected="selected">https</option>
+ #else
+ <option value="http" selected="selected">http</option>
+ <option value="https">https</option>
+ #end
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td class="description">
+ <nobr>
+ Server:
+ </nobr>
+ </td>
+ <td class="value">
+ <input id="server" name="server" type="text" size="32" value="$SERVER_A"/>
+ </td>
+ </tr>
+ <tr>
+ <td class="description">
+ <nobr>
+ Port:
+ </nobr>
+ </td>
+ <td class="value">
+ <input id="port" name="port" type="text" size="5" value="$PORT_A" />
+ </td>
+ </tr>
<tr>
- <td class="description"><nobr>User name:</nobr></td>
- <td class="value"><input name="username" value="${USERNAME:A}"
- size="24" /></td>
- </tr>
- <tr>
- <td class="description"><nobr>API Key:</nobr></td>
- <td class="value"><input name="apikey" value="${APIKEY:A}"
- size="40" /></td>
+ <td class="description">
+ <nobr>Cluster name:</nobr>
+ </td>
+ <td class="value">
+ <input name="clusterName" value="$CLUSTERNAME:A" size="24" />
+ </td>
</tr>
</table>
\ No newline at end of file
Modified: incubator/lcf/branches/CONNECTORS-288/connectors/elasticsearch/connector/src/main/resources/org/apache/manifoldcf/agents/output/elasticsearch/editConfiguration_en_US.js
URL: http://svn.apache.org/viewvc/incubator/lcf/branches/CONNECTORS-288/connectors/elasticsearch/connector/src/main/resources/org/apache/manifoldcf/agents/output/elasticsearch/editConfiguration_en_US.js?rev=1241114&r1=1241113&r2=1241114&view=diff
==============================================================================
--- incubator/lcf/branches/CONNECTORS-288/connectors/elasticsearch/connector/src/main/resources/org/apache/manifoldcf/agents/output/elasticsearch/editConfiguration_en_US.js (original)
+++ incubator/lcf/branches/CONNECTORS-288/connectors/elasticsearch/connector/src/main/resources/org/apache/manifoldcf/agents/output/elasticsearch/editConfiguration_en_US.js Mon Feb 6 19:06:19 2012
@@ -18,21 +18,36 @@
<script type="text/javascript">
<!--
function checkConfig() {
- if (editconnection.serverlocation) {
- if (editconnection.serverlocation.value == "") {
- alert("Please supply a valid ElasticSearch server location");
- editconnection.serverlocation.focus();
- return false;
- }
- }
- if (editconnection.indexname) {
- if (editconnection.indexname.value == "") {
- alert("Please supply a valid index name");
- editconnection.indexname.focus();
- return false;
- }
- }
- return true;
+ if (editconnection.server.value =="") {
+ alert("Server name must be not null");
+ SelectTab("Server");
+ editconnection.server.focus();
+ return false;
+ } else if(!editconnection.server.value.indexOf('/')==-1) {
+ alert("Server name can't contain the character '/'");
+ SelectTab("Server");
+ editconnection.server.focus();
+ return false;
+ }
+ if (editconnection.port.value == "")
+ {
+ alert("The port must be not null");
+ SelectTab("Server");
+ editconnection.port.focus();
+ return false;
+ } else if (!isInteger(editconnection.port.value)){
+ alert("The server port must be a valid integer");
+ SelectTab("Server");
+ editconnection.port.focus();
+ return false;
+ }
+ if(editconnection.path.value == ""){
+ alert("Path must be not null");
+ SelectTab("Server");
+ editconnection.path.focus();
+ return false;
+ }
+ return true;
}
function checkConfigForSave() {
Modified: incubator/lcf/branches/CONNECTORS-288/connectors/elasticsearch/pom.xml
URL: http://svn.apache.org/viewvc/incubator/lcf/branches/CONNECTORS-288/connectors/elasticsearch/pom.xml?rev=1241114&r1=1241113&r2=1241114&view=diff
==============================================================================
--- incubator/lcf/branches/CONNECTORS-288/connectors/elasticsearch/pom.xml (original)
+++ incubator/lcf/branches/CONNECTORS-288/connectors/elasticsearch/pom.xml Mon Feb 6 19:06:19 2012
@@ -34,6 +34,13 @@
</developer>
</developers>
+ <repositories>
+ <repository>
+ <id>sonatype</id>
+ <url>https://oss.sonatype.org/content/repositories/releases</url>
+ </repository>
+ </repositories>
+
<artifactId>mcf-elasticsearch-connector</artifactId>
<name>ManifoldCF - Connectors - ElasticSearch</name>
@@ -72,6 +79,11 @@
<dependencies>
<dependency>
+ <groupId>org.elasticsearch</groupId>
+ <artifactId>elasticsearch</artifactId>
+ <version>0.18.7</version>
+ </dependency>
+ <dependency>
<groupId>${project.groupId}</groupId>
<artifactId>mcf-core</artifactId>
<version>${project.version}</version>
Modified: incubator/lcf/branches/CONNECTORS-288/connectors/pom.xml
URL: http://svn.apache.org/viewvc/incubator/lcf/branches/CONNECTORS-288/connectors/pom.xml?rev=1241114&r1=1241113&r2=1241114&view=diff
==============================================================================
--- incubator/lcf/branches/CONNECTORS-288/connectors/pom.xml (original)
+++ incubator/lcf/branches/CONNECTORS-288/connectors/pom.xml Mon Feb 6 19:06:19 2012
@@ -48,6 +48,7 @@
<module>opensearchserver</module>
<module>wiki</module>
<module>alfresco</module>
+ <module>elasticsearch</module>
</modules>
</project>