incubator-connectors-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From piergior...@apache.org
Subject svn commit: r1186917 - /incubator/lcf/trunk/connectors/cmis/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/cmis/CmisRepositoryConnector.java
Date Thu, 20 Oct 2011 16:48:43 GMT
Author: piergiorgio
Date: Thu Oct 20 16:48:42 2011
New Revision: 1186917

URL: http://svn.apache.org/viewvc?rev=1186917&view=rev
Log:
fixed the wrong default parameters values for CMIS Connector in a clean installation (CONNECTORS-278)

Modified:
    incubator/lcf/trunk/connectors/cmis/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/cmis/CmisRepositoryConnector.java

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=1186917&r1=1186916&r2=1186917&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
Thu Oct 20 16:48:42 2011
@@ -683,10 +683,29 @@ public class CmisRepositoryConnector ext
   public void outputConfigurationBody(IThreadContext threadContext,
       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);
   }
 



Mime
View raw message