manifoldcf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From piergior...@apache.org
Subject svn commit: r1210562 - in /incubator/lcf/trunk: ./ connectors/cmis/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/cmis/ connectors/cmis/connector/src/main/resource/org/apache/manifoldcf/crawler/connectors/cmis/
Date Mon, 05 Dec 2011 18:30:44 GMT
Author: piergiorgio
Date: Mon Dec  5 18:30:43 2011
New Revision: 1210562

URL: http://svn.apache.org/viewvc?rev=1210562&view=rev
Log:
added a specific Server tab for CMIS-related configuration information (CONNECTORS-302)

Modified:
    incubator/lcf/trunk/CHANGES.txt
    incubator/lcf/trunk/connectors/cmis/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/cmis/CmisRepositoryConnector.java
    incubator/lcf/trunk/connectors/cmis/connector/src/main/resource/org/apache/manifoldcf/crawler/connectors/cmis/editConfiguration.js

Modified: incubator/lcf/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/CHANGES.txt?rev=1210562&r1=1210561&r2=1210562&view=diff
==============================================================================
--- incubator/lcf/trunk/CHANGES.txt (original)
+++ incubator/lcf/trunk/CHANGES.txt Mon Dec  5 18:30:43 2011
@@ -3,6 +3,9 @@ $Id$
 
 ======================= 0.4-dev =====================
 
+CONNECTORS-302: Add a specific Server tab for CMIS-related configuration information
+(Piergiorgio Lucidi)
+
 CONNECTORS-303: Maven build doesn't consider HTML and JS files for the connector
 (Piergiorgio Lucidi)
 

Modified: incubator/lcf/trunk/connectors/cmis/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/cmis/CmisRepositoryConnector.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/connectors/cmis/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/cmis/CmisRepositoryConnector.java?rev=1210562&r1=1210561&r2=1210562&view=diff
==============================================================================
--- incubator/lcf/trunk/connectors/cmis/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/cmis/CmisRepositoryConnector.java
(original)
+++ incubator/lcf/trunk/connectors/cmis/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/cmis/CmisRepositoryConnector.java
Mon Dec  5 18:30:43 2011
@@ -100,6 +100,8 @@ public class CmisRepositoryConnector ext
   private static final String VIEW_SPEC_FORWARD = "viewSpecification.html";
   private static final String EDIT_SPEC_FORWARD = "editSpecification.html";
   private static final String EDIT_SPEC_HEADER_FORWARD = "editSpecification.js";
+  
+  private static final String CMIS_SERVER_TAB_NAME = "Server";
 
   /**
    * CMIS Session handle
@@ -676,6 +678,7 @@ public class CmisRepositoryConnector ext
   public void outputConfigurationHeader(IThreadContext threadContext,
       IHTTPOutput out, ConfigParams parameters, List<String> tabsArray)
       throws ManifoldCFException, IOException {
+    tabsArray.add(CMIS_SERVER_TAB_NAME);
     outputResource(EDIT_CONFIG_HEADER_FORWARD, out, parameters);
   }
 
@@ -684,29 +687,31 @@ public class CmisRepositoryConnector ext
       IHTTPOutput out, ConfigParams parameters, String tabName)
       throws ManifoldCFException, IOException {
     
-    String username = parameters.getParameter(CONFIG_PARAM_USERNAME);
-    String password = parameters.getParameter(CONFIG_PARAM_PASSWORD);
-    String endpoint = parameters.getParameter(CONFIG_PARAM_ENDPOINT);
-    String repositoryId = parameters.getParameter(CONFIG_PARAM_REPOSITORY_ID);
-    String binding = parameters.getParameter(CONFIG_PARAM_BINDING);
-    
-    if(StringUtils.isEmpty(username))
-      username = StringUtils.EMPTY;
-    if(StringUtils.isEmpty(password))
-      password = StringUtils.EMPTY;
-    if(StringUtils.isEmpty(endpoint))
-      endpoint = StringUtils.EMPTY;
-    if(StringUtils.isEmpty(repositoryId))
-      repositoryId = StringUtils.EMPTY;
-    if(StringUtils.isEmpty(binding))
-      binding = BINDING_ATOM_VALUE;
-    
-    parameters.setParameter(CONFIG_PARAM_USERNAME, username);
-    parameters.setParameter(CONFIG_PARAM_PASSWORD, password);
-    parameters.setParameter(CONFIG_PARAM_ENDPOINT, endpoint);
-    parameters.setParameter(CONFIG_PARAM_REPOSITORY_ID, repositoryId);
-    parameters.setParameter(CONFIG_PARAM_BINDING, binding);
-    outputResource(EDIT_CONFIG_FORWARD, out, parameters);
+    if(CMIS_SERVER_TAB_NAME.equals(tabName)){
+      String username = parameters.getParameter(CONFIG_PARAM_USERNAME);
+      String password = parameters.getParameter(CONFIG_PARAM_PASSWORD);
+      String endpoint = parameters.getParameter(CONFIG_PARAM_ENDPOINT);
+      String repositoryId = parameters.getParameter(CONFIG_PARAM_REPOSITORY_ID);
+      String binding = parameters.getParameter(CONFIG_PARAM_BINDING);
+      
+      if(StringUtils.isEmpty(username))
+        username = StringUtils.EMPTY;
+      if(StringUtils.isEmpty(password))
+        password = StringUtils.EMPTY;
+      if(StringUtils.isEmpty(endpoint))
+        endpoint = StringUtils.EMPTY;
+      if(StringUtils.isEmpty(repositoryId))
+        repositoryId = StringUtils.EMPTY;
+      if(StringUtils.isEmpty(binding))
+        binding = BINDING_ATOM_VALUE;
+      
+      parameters.setParameter(CONFIG_PARAM_USERNAME, username);
+      parameters.setParameter(CONFIG_PARAM_PASSWORD, password);
+      parameters.setParameter(CONFIG_PARAM_ENDPOINT, endpoint);
+      parameters.setParameter(CONFIG_PARAM_REPOSITORY_ID, repositoryId);
+      parameters.setParameter(CONFIG_PARAM_BINDING, binding);
+      outputResource(EDIT_CONFIG_FORWARD, out, parameters);
+    }
   }
 
   /**

Modified: incubator/lcf/trunk/connectors/cmis/connector/src/main/resource/org/apache/manifoldcf/crawler/connectors/cmis/editConfiguration.js
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/connectors/cmis/connector/src/main/resource/org/apache/manifoldcf/crawler/connectors/cmis/editConfiguration.js?rev=1210562&r1=1210561&r2=1210562&view=diff
==============================================================================
--- incubator/lcf/trunk/connectors/cmis/connector/src/main/resource/org/apache/manifoldcf/crawler/connectors/cmis/editConfiguration.js
(original)
+++ incubator/lcf/trunk/connectors/cmis/connector/src/main/resource/org/apache/manifoldcf/crawler/connectors/cmis/editConfiguration.js
Mon Dec  5 18:30:43 2011
@@ -19,31 +19,6 @@
 <!--
 function checkConfig()
 {
-  if (editconnection.username.value == "")
-  {
-    alert("The username must be not null");
-    editconnection.username.focus();
-    return false;
-  }
-  if (editconnection.password.value == "")
-  {
-    alert("The password must be not null");
-    editconnection.password.focus();
-    return false;
-  }
-  if (editconnection.endpoint.value == "")
-  {
-    alert("The endpoint must be not null");
-    editconnection.endpoint.focus();
-    return false;
-  }
-  if (editconnection.binding.value == "")
-  {
-    alert("The binding must be not null");
-    editconnection.binding.focus();
-    return false;
-  }
- 
   return true;
 }
  



Mime
View raw message