incubator-connectors-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1226286 - in /incubator/lcf/trunk: ./ connectors/opensearchserver/connector/src/main/java/org/apache/manifoldcf/agents/output/opensearchserver/ connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/ope...
Date Sun, 01 Jan 2012 18:38:40 GMT
Author: kwright
Date: Sun Jan  1 18:38:39 2012
New Revision: 1226286

URL: http://svn.apache.org/viewvc?rev=1226286&view=rev
Log:
Fix for CONNECTORS-344.  Checked in on behalf of Emmanuel Keller.

Added:
    incubator/lcf/trunk/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/editConfiguration_en_US.html
      - copied unchanged from r1226280, incubator/lcf/trunk/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/configuration_en_US.html
    incubator/lcf/trunk/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/editConfiguration_en_US.js
      - copied unchanged from r1226280, incubator/lcf/trunk/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/configuration_en_US.js
    incubator/lcf/trunk/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/editConfiguration_ja_JP.html
      - copied unchanged from r1226280, incubator/lcf/trunk/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/configuration_ja_JP.html
    incubator/lcf/trunk/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/editConfiguration_ja_JP.js
      - copied unchanged from r1226280, incubator/lcf/trunk/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/configuration_ja_JP.js
    incubator/lcf/trunk/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/editSpecification_en_US.html
      - copied unchanged from r1226280, incubator/lcf/trunk/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/specifications_en_US.html
    incubator/lcf/trunk/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/editSpecification_en_US.js
      - copied unchanged from r1226280, incubator/lcf/trunk/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/specifications_en_US.js
    incubator/lcf/trunk/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/editSpecification_ja_JP.html
      - copied unchanged from r1226280, incubator/lcf/trunk/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/specifications_ja_JP.html
    incubator/lcf/trunk/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/editSpecification_ja_JP.js
      - copied unchanged from r1226280, incubator/lcf/trunk/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/specifications_ja_JP.js
    incubator/lcf/trunk/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/hiddenConfiguration_en_US.html
  (with props)
    incubator/lcf/trunk/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/hiddenConfiguration_ja_JP.html
  (with props)
    incubator/lcf/trunk/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/hiddenSpecification_en_US.html
  (with props)
    incubator/lcf/trunk/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/hiddenSpecification_ja_JP.html
  (with props)
    incubator/lcf/trunk/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/viewConfiguration_en_US.html
      - copied unchanged from r1226280, incubator/lcf/trunk/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/view_en_US.html
    incubator/lcf/trunk/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/viewConfiguration_ja_JP.html
      - copied unchanged from r1226280, incubator/lcf/trunk/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/view_ja_JP.html
    incubator/lcf/trunk/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/viewSpecification_en_US.html
      - copied unchanged from r1226280, incubator/lcf/trunk/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/viewSpec_en_US.html
    incubator/lcf/trunk/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/viewSpecification_ja_JP.html
      - copied unchanged from r1226280, incubator/lcf/trunk/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/viewSpec_ja_JP.html
Removed:
    incubator/lcf/trunk/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/configuration_en_US.html
    incubator/lcf/trunk/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/configuration_en_US.js
    incubator/lcf/trunk/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/configuration_ja_JP.html
    incubator/lcf/trunk/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/configuration_ja_JP.js
    incubator/lcf/trunk/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/specifications_en_US.html
    incubator/lcf/trunk/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/specifications_en_US.js
    incubator/lcf/trunk/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/specifications_ja_JP.html
    incubator/lcf/trunk/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/specifications_ja_JP.js
    incubator/lcf/trunk/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/viewSpec_en_US.html
    incubator/lcf/trunk/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/viewSpec_ja_JP.html
    incubator/lcf/trunk/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/view_en_US.html
    incubator/lcf/trunk/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/view_ja_JP.html
Modified:
    incubator/lcf/trunk/CHANGES.txt
    incubator/lcf/trunk/connectors/opensearchserver/connector/src/main/java/org/apache/manifoldcf/agents/output/opensearchserver/OpenSearchServerConnector.java

Modified: incubator/lcf/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/CHANGES.txt?rev=1226286&r1=1226285&r2=1226286&view=diff
==============================================================================
--- incubator/lcf/trunk/CHANGES.txt (original)
+++ incubator/lcf/trunk/CHANGES.txt Sun Jan  1 18:38:39 2012
@@ -3,6 +3,9 @@ $Id$
 
 ======================= 0.5-dev =====================
 
+CONNECTORS-344: Fix OpenSearchServer UI so that data is not lost between posts.
+(Emmanuel Keller, Karl Wright)
+
 CONNECTORS-346: Reorganize test class hierarchy, and main ant
 build targets, to reduce duplication of code and make more sense.
 (Karl Wright)

Modified: incubator/lcf/trunk/connectors/opensearchserver/connector/src/main/java/org/apache/manifoldcf/agents/output/opensearchserver/OpenSearchServerConnector.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/connectors/opensearchserver/connector/src/main/java/org/apache/manifoldcf/agents/output/opensearchserver/OpenSearchServerConnector.java?rev=1226286&r1=1226285&r2=1226286&view=diff
==============================================================================
--- incubator/lcf/trunk/connectors/opensearchserver/connector/src/main/java/org/apache/manifoldcf/agents/output/opensearchserver/OpenSearchServerConnector.java
(original)
+++ incubator/lcf/trunk/connectors/opensearchserver/connector/src/main/java/org/apache/manifoldcf/agents/output/opensearchserver/OpenSearchServerConnector.java
Sun Jan  1 18:38:39 2012
@@ -62,6 +62,30 @@ public class OpenSearchServerConnector e
 
   private final static String OPENSEARCHSERVER_TAB_OPENSEARCHSERVER = "OpenSearchServer";
 
+  /** Forward to the HTML template for rendering hidden fields when the Server tab is not
selected */
+  private static final String HIDDEN_CONFIG_FORWARD = "hiddenConfiguration.html";
+  
+  /** Forward to the HTML template for rendering hidden fields when the CMIS Query tab is
not selected */
+  private static final String HIDDEN_SPEC_FORWARD = "hiddenSpecification.html";
+  
+  /** Forward to the HTML template to edit the configuration parameters */
+  private static final String EDIT_CONFIG_FORWARD = "editConfiguration.html";
+  
+  /** Forward to the HTML template to view the configuration parameters */
+  private static final String VIEW_CONFIG_FORWARD = "viewConfiguration.html";
+ 
+  /** Forward to the javascript to check the configuration parameters */
+  private static final String EDIT_CONFIG_HEADER_FORWARD = "editConfiguration.js";
+
+  /** Forward to the template to view the specification parameters for the job */
+  private static final String VIEW_SPEC_FORWARD = "viewSpecification.html";
+  
+  /** Forward to the template to edit the configuration parameters for the job */
+  private static final String EDIT_SPEC_FORWARD = "editSpecification.html";
+
+  /** Forward to the javascript to check the specification parameters for the job */
+  private static final String EDIT_SPEC_HEADER_FORWARD = "editSpecification.js";
+
   private String specsCacheOutpuDescription;
   private OpenSearchServerSpecs specsCache;
 
@@ -94,7 +118,7 @@ public class OpenSearchServerConnector e
       throws ManifoldCFException, IOException {
     super.outputConfigurationHeader(threadContext, out, locale, parameters, tabsArray);
     tabsArray.add(Messages.getString(locale,"OpenSearchServerConnector.Parameters"));
-    outputResource("configuration.js", out, locale, null);
+    outputResource(EDIT_CONFIG_HEADER_FORWARD, out, locale, null);
   }
 
   @Override
@@ -102,8 +126,11 @@ public class OpenSearchServerConnector e
       IHTTPOutput out, Locale locale, ConfigParams parameters, String tabName)
       throws ManifoldCFException, IOException {
     super.outputConfigurationBody(threadContext, out, locale, parameters, tabName);
+    OpenSearchServerConfig config = this.getConfigParameters(parameters);
     if (Messages.getString(locale,"OpenSearchServerConnector.Parameters").equals(tabName))
{
-      outputResource("configuration.html", out, locale, getConfigParameters(parameters));
+      outputResource(EDIT_CONFIG_FORWARD, out, locale, config);
+    } else {
+      outputResource(HIDDEN_CONFIG_FORWARD, out, locale, config);
     }
   }
 
@@ -113,7 +140,7 @@ public class OpenSearchServerConnector e
       throws ManifoldCFException, IOException {
     super.outputSpecificationHeader(out, locale, os, tabsArray);
     tabsArray.add(OPENSEARCHSERVER_TAB_OPENSEARCHSERVER);
-    outputResource("specifications.js", out, locale, null);
+    outputResource(EDIT_SPEC_HEADER_FORWARD, out, locale, null);
   }
 
   final private SpecificationNode getSpecNode(OutputSpecification os) {
@@ -132,8 +159,11 @@ public class OpenSearchServerConnector e
   public void outputSpecificationBody(IHTTPOutput out, Locale locale, OutputSpecification
os,
       String tabName) throws ManifoldCFException, IOException {
     super.outputSpecificationBody(out, locale, os, tabName);
+    OpenSearchServerSpecs specs = getSpecParameters(os);
     if (OPENSEARCHSERVER_TAB_OPENSEARCHSERVER.equals(tabName)) {
-      outputResource("specifications.html", out, locale, getSpecParameters(os));
+      outputResource(EDIT_SPEC_FORWARD, out, locale, specs);
+    } else {
+      outputResource(HIDDEN_SPEC_FORWARD, out, locale, specs);
     }
   }
 
@@ -223,13 +253,13 @@ public class OpenSearchServerConnector e
   @Override
   public void viewConfiguration(IThreadContext threadContext, IHTTPOutput out,
       Locale locale, ConfigParams parameters) throws ManifoldCFException, IOException {
-    outputResource("view.html", out, locale, getConfigParameters(parameters));
+    outputResource(VIEW_CONFIG_FORWARD, out, locale, getConfigParameters(parameters));
   }
 
   @Override
   public void viewSpecification(IHTTPOutput out, Locale locale, OutputSpecification os)
       throws ManifoldCFException, IOException {
-    outputResource("viewSpec.html", out, locale, getSpecParameters(os));
+    outputResource(VIEW_SPEC_FORWARD, out, locale, getSpecParameters(os));
   }
 
   @Override

Added: incubator/lcf/trunk/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/hiddenConfiguration_en_US.html
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/hiddenConfiguration_en_US.html?rev=1226286&view=auto
==============================================================================
--- incubator/lcf/trunk/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/hiddenConfiguration_en_US.html
(added)
+++ incubator/lcf/trunk/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/hiddenConfiguration_en_US.html
Sun Jan  1 18:38:39 2012
@@ -0,0 +1,20 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<input type="hidden" name="serverlocation" value="${SERVERLOCATION:A}" />
+<input type="hidden" name="indexname" value="${INDEXNAME:A}" />
+<input type="hidden" name="username" value="${USERNAME:A}" />
+<input type="hidden" name="apikey" value="${APIKEY:A}" />
\ No newline at end of file

Propchange: incubator/lcf/trunk/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/hiddenConfiguration_en_US.html
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/lcf/trunk/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/hiddenConfiguration_en_US.html
------------------------------------------------------------------------------
    svn:keywords = Id

Added: incubator/lcf/trunk/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/hiddenConfiguration_ja_JP.html
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/hiddenConfiguration_ja_JP.html?rev=1226286&view=auto
==============================================================================
--- incubator/lcf/trunk/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/hiddenConfiguration_ja_JP.html
(added)
+++ incubator/lcf/trunk/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/hiddenConfiguration_ja_JP.html
Sun Jan  1 18:38:39 2012
@@ -0,0 +1,20 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<input type="hidden" name="serverlocation" value="${SERVERLOCATION:A}" />
+<input type="hidden" name="indexname" value="${INDEXNAME:A}" />
+<input type="hidden" name="username" value="${USERNAME:A}" />
+<input type="hidden" name="apikey" value="${APIKEY:A}" />
\ No newline at end of file

Propchange: incubator/lcf/trunk/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/hiddenConfiguration_ja_JP.html
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/lcf/trunk/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/hiddenConfiguration_ja_JP.html
------------------------------------------------------------------------------
    svn:keywords = Id

Added: incubator/lcf/trunk/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/hiddenSpecification_en_US.html
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/hiddenSpecification_en_US.html?rev=1226286&view=auto
==============================================================================
--- incubator/lcf/trunk/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/hiddenSpecification_en_US.html
(added)
+++ incubator/lcf/trunk/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/hiddenSpecification_en_US.html
Sun Jan  1 18:38:39 2012
@@ -0,0 +1,19 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<input type="hidden" name="maxfilesize" value="${MAXFILESIZE:A}" />
+<input type="hidden" name="mimetypes" value="${MIMETYPES:B}" />
+<input type="hidden" name="extensions" value="${EXTENSIONS:B}" />
\ No newline at end of file

Propchange: incubator/lcf/trunk/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/hiddenSpecification_en_US.html
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/lcf/trunk/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/hiddenSpecification_en_US.html
------------------------------------------------------------------------------
    svn:keywords = Id

Added: incubator/lcf/trunk/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/hiddenSpecification_ja_JP.html
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/hiddenSpecification_ja_JP.html?rev=1226286&view=auto
==============================================================================
--- incubator/lcf/trunk/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/hiddenSpecification_ja_JP.html
(added)
+++ incubator/lcf/trunk/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/hiddenSpecification_ja_JP.html
Sun Jan  1 18:38:39 2012
@@ -0,0 +1,19 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<input type="hidden" name="maxfilesize" value="${MAXFILESIZE:A}" />
+<input type="hidden" name="mimetypes" value="${MIMETYPES:B}" />
+<input type="hidden" name="extensions" value="${EXTENSIONS:B}" />
\ No newline at end of file

Propchange: incubator/lcf/trunk/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/hiddenSpecification_ja_JP.html
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/lcf/trunk/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/hiddenSpecification_ja_JP.html
------------------------------------------------------------------------------
    svn:keywords = Id



Mime
View raw message