manifoldcf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1778622 - in /manifoldcf/trunk: ./ connectors/jcifs/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharedrive/ connectors/jcifs/connector/src/main/native2ascii/org/apache/manifoldcf/crawler/connectors/sharedrive/
Date Fri, 13 Jan 2017 15:49:30 GMT
Author: kwright
Date: Fri Jan 13 15:49:29 2017
New Revision: 1778622

URL: http://svn.apache.org/viewvc?rev=1778622&view=rev
Log:
Fix for CONNECTORS-1364.

Modified:
    manifoldcf/trunk/CHANGES.txt
    manifoldcf/trunk/connectors/jcifs/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharedrive/SharedDriveConnector.java
    manifoldcf/trunk/connectors/jcifs/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharedrive/SharedDriveParameters.java
    manifoldcf/trunk/connectors/jcifs/connector/src/main/native2ascii/org/apache/manifoldcf/crawler/connectors/sharedrive/common_en_US.properties
    manifoldcf/trunk/connectors/jcifs/connector/src/main/native2ascii/org/apache/manifoldcf/crawler/connectors/sharedrive/common_es_ES.properties
    manifoldcf/trunk/connectors/jcifs/connector/src/main/native2ascii/org/apache/manifoldcf/crawler/connectors/sharedrive/common_ja_JP.properties
    manifoldcf/trunk/connectors/jcifs/connector/src/main/native2ascii/org/apache/manifoldcf/crawler/connectors/sharedrive/common_zh_CN.properties

Modified: manifoldcf/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/CHANGES.txt?rev=1778622&r1=1778621&r2=1778622&view=diff
==============================================================================
--- manifoldcf/trunk/CHANGES.txt (original)
+++ manifoldcf/trunk/CHANGES.txt Fri Jan 13 15:49:29 2017
@@ -3,6 +3,11 @@ $Id$
 
 ======================= 2.7-dev =====================
 
+CONNECTORS-1364: Add support in the JCIFS connector for allowing user-
+settable bin names.  This allows for better resource balancing since it
+is not possible to discover the correct resource balancing empirically.
+(Aeham Abushwashi, Karl Wright)
+
 CONNECTORS-1365: Use zero seconds and milliseconds when evaluating
 DocumentFilter.
 (Furkan KAMACI)

Modified: manifoldcf/trunk/connectors/jcifs/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharedrive/SharedDriveConnector.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/jcifs/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharedrive/SharedDriveConnector.java?rev=1778622&r1=1778621&r2=1778622&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/jcifs/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharedrive/SharedDriveConnector.java
(original)
+++ manifoldcf/trunk/connectors/jcifs/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharedrive/SharedDriveConnector.java
Fri Jan 13 15:49:29 2017
@@ -117,7 +117,8 @@ public class SharedDriveConnector extend
   private String username = null;
   private String password = null;
   private boolean useSIDs = true;
-
+  private String binName = null;
+  
   private NtlmPasswordAuthentication pa;
   
   /** Deny access token for default authority */
@@ -206,6 +207,7 @@ public class SharedDriveConnector extend
     password = null;
     pa = null;
     smbconnectionPath = null;
+    binName = null;
     super.disconnect();
   }
 
@@ -232,6 +234,14 @@ public class SharedDriveConnector extend
       useSIDsString = "true";
     useSIDs = "true".equals(useSIDsString);
 
+    
+    String configBinName = configParameters.getParameter(SharedDriveParameters.binName);
+    
+    binName = (configBinName == null || configBinName.length() == 0) ? server : configBinName;
+
+    if (binName.length() > 255) // trim the bin name to fit in the database
+      binName = binName.substring(0, 255);
+
     // Rejigger the username/domain to be sure we PASS in a domain and we do not include
the domain attached to the user!
     // (This became essential at jcifs 1.3.0)
     int index = username.indexOf("@");
@@ -265,7 +275,7 @@ public class SharedDriveConnector extend
   @Override
   public String[] getBinNames(String documentIdentifier)
   {
-    return new String[]{server};
+    return new String[]{binName};
   }
 
   /**
@@ -2599,6 +2609,8 @@ public class SharedDriveConnector extend
       password = out.mapPasswordToKey(password);
     String resolvesids = parameters.getParameter(SharedDriveParameters.useSIDs);
     if (resolvesids==null) resolvesids = "true";
+    String binName = parameters.getParameter(SharedDriveParameters.binName);
+    if (binName == null) binName = "";
 
     // "Server" tab
     if (tabName.equals(Messages.getString(locale,"SharedDriveConnector.Server")))
@@ -2627,6 +2639,11 @@ public class SharedDriveConnector extend
 "    <td class=\"description\"><nobr>" + Messages.getBodyString(locale,"SharedDriveConnector.UseSIDSForSecurity")
+ "</nobr></td>\n"+
 "    <td class=\"value\"><input type=\"hidden\" name=\"resolvesidspresent\" value=\"true\"/><input
type=\"checkbox\" value=\"true\" name=\"resolvesids\" "+("true".equals(resolvesids)?"checked=\"true\"":"")+"/></td>\n"+
 "  </tr>\n"+
+"  <tr><td class=\"separator\" colspan=\"2\"><hr/></td></tr>\n"+
+"  <tr>\n"+
+"    <td class=\"description\"><nobr>" + Messages.getBodyString(locale,"SharedDriveConnector.BinName")
+ "</nobr></td>\n"+
+"    <td class=\"value\"><input type=\"text\" size=\"32\" name=\"binname\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(binName)+"\"/></td>\n"+
+"  </tr>\n"+
 "</table>\n"
       );
     }
@@ -2638,7 +2655,8 @@ public class SharedDriveConnector extend
 "<input type=\"hidden\" name=\"username\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(username)+"\"/>\n"+
 "<input type=\"hidden\" name=\"password\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(password)+"\"/>\n"+
 "<input type=\"hidden\" name=\"resolvesidspresent\" value=\"true\"/>\n"+
-"<input type=\"hidden\" name=\"resolvesids\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(resolvesids)+"\"/>\n"
+"<input type=\"hidden\" name=\"resolvesids\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(resolvesids)+"\"/>\n"+
+"<input type=\"hidden\" name=\"binname\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(binName)+"\"/>\n"
       );
     }
   }
@@ -2681,6 +2699,10 @@ public class SharedDriveConnector extend
       if (resolvesids != null)
         parameters.setParameter(SharedDriveParameters.useSIDs, resolvesids);
     }
+    String binName = variableContext.getParameter("binname");
+    if (binName != null)
+    	parameters.setParameter(SharedDriveParameters.binName, binName);
+
     return null;
   }
   

Modified: manifoldcf/trunk/connectors/jcifs/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharedrive/SharedDriveParameters.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/jcifs/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharedrive/SharedDriveParameters.java?rev=1778622&r1=1778621&r2=1778622&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/jcifs/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharedrive/SharedDriveParameters.java
(original)
+++ manifoldcf/trunk/connectors/jcifs/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharedrive/SharedDriveParameters.java
Fri Jan 13 15:49:29 2017
@@ -38,4 +38,6 @@ public class SharedDriveParameters
   /* SIDs handling */
   public final static String useSIDs = "Use SIDs";
 
+  /* User-settable bin name */
+  public final static String binName = "Bin Name";
 }

Modified: manifoldcf/trunk/connectors/jcifs/connector/src/main/native2ascii/org/apache/manifoldcf/crawler/connectors/sharedrive/common_en_US.properties
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/jcifs/connector/src/main/native2ascii/org/apache/manifoldcf/crawler/connectors/sharedrive/common_en_US.properties?rev=1778622&r1=1778621&r2=1778622&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/jcifs/connector/src/main/native2ascii/org/apache/manifoldcf/crawler/connectors/sharedrive/common_en_US.properties
(original)
+++ manifoldcf/trunk/connectors/jcifs/connector/src/main/native2ascii/org/apache/manifoldcf/crawler/connectors/sharedrive/common_en_US.properties
Fri Jan 13 15:49:29 2017
@@ -96,4 +96,4 @@ SharedDriveConnector.FileNameMapping=Fil
 SharedDriveConnector.NoFileNameMappingsSpecified=No file name mappings specified
 SharedDriveConnector.URLMappingColon=URL Mapping:
 SharedDriveConnector.MaximumDocumentLength=Maximum document length:
-
+SharedDriveConnector.BinName=Bin Name (optional):

Modified: manifoldcf/trunk/connectors/jcifs/connector/src/main/native2ascii/org/apache/manifoldcf/crawler/connectors/sharedrive/common_es_ES.properties
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/jcifs/connector/src/main/native2ascii/org/apache/manifoldcf/crawler/connectors/sharedrive/common_es_ES.properties?rev=1778622&r1=1778621&r2=1778622&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/jcifs/connector/src/main/native2ascii/org/apache/manifoldcf/crawler/connectors/sharedrive/common_es_ES.properties
(original)
+++ manifoldcf/trunk/connectors/jcifs/connector/src/main/native2ascii/org/apache/manifoldcf/crawler/connectors/sharedrive/common_es_ES.properties
Fri Jan 13 15:49:29 2017
@@ -24,27 +24,27 @@ SharedDriveConnector.NeedAServerName=Nec
 SharedDriveConnector.Server=Servidor
 SharedDriveConnector.UseSIDSForSecurity=Utilice SIDS para la seguridad:
 SharedDriveConnector.Server2=Servidor
-SharedDriveConnector.ServerNameCannotIncludePathInformation=Nombre del servidor no puede
incluir información de la ruta
+SharedDriveConnector.ServerNameCannotIncludePathInformation=Nombre del servidor no puede
incluir información de la ruta
 SharedDriveConnector.NeedAUserName=Necesita un nombre de usuario
 SharedDriveConnector.Server3=Servidor:
-SharedDriveConnector.AuthenticationDomain=dominio de autenticación (opcional):
+SharedDriveConnector.AuthenticationDomain=dominio de autenticación (opcional):
 SharedDriveConnector.UserName=Nombre de usuario:
-SharedDriveConnector.Password=Contraseña:
-SharedDriveConnector.Parameters=Paràmetros:
+SharedDriveConnector.Password=Contraseña:
+SharedDriveConnector.Parameters=Paràmetros:
 SharedDriveConnector.certificate= certificado( s )
-SharedDriveConnector.NeedAValidNumberForMaximumDocumentLength=Necesita un número válido
para la longitud máxima del documento
+SharedDriveConnector.NeedAValidNumberForMaximumDocumentLength=Necesita un número válido
para la longitud máxima del documento
 SharedDriveConnector.SelectAFolderOrTypeInAPathFirst=Seleccione una carpeta o escriba en
un camino primero
 SharedDriveConnector.EitherSelectAFolderORTypeInAPath=O bien seleccione una carpeta, o escriba
una ruta
-SharedDriveConnector.EnterAFileSpecificationFirst=Introduzca una especificación de archivo
primero
-SharedDriveConnector.EnterAFileSpecificationFirst=Introduzca una especificación de archivo
primero
+SharedDriveConnector.EnterAFileSpecificationFirst=Introduzca una especificación de archivo
primero
+SharedDriveConnector.EnterAFileSpecificationFirst=Introduzca una especificación de archivo
primero
 SharedDriveConnector.NullAccessTokensNotAllowed=Tokens de acceso nulos no permitidos
-SharedDriveConnector.MatchStringCannotBeEmpty=Cadena Partido no puede estar vacío
-SharedDriveConnector.MatchStringMustBeValidRegularExpression=Cadena de ajuste debe ser expresión
regular válida
-SharedDriveConnector.MatchStringCannotBeEmpty=Cadena Partido no puede estar vacío
-SharedDriveConnector.MatchStringMustBeValidRegularExpression=Cadena de ajuste debe ser expresión
regular válida
-SharedDriveConnector.MatchStringCannotBeEmpty=Cadena Partido no puede estar vacío
-SharedDriveConnector.MatchStringMustBeValidRegularExpression=Cadena de ajuste debe ser expresión
regular válida
-SharedDriveConnector.MaximumDocumentLength=Longitud máxima del documento:
+SharedDriveConnector.MatchStringCannotBeEmpty=Cadena Partido no puede estar vacío
+SharedDriveConnector.MatchStringMustBeValidRegularExpression=Cadena de ajuste debe ser expresión
regular válida
+SharedDriveConnector.MatchStringCannotBeEmpty=Cadena Partido no puede estar vacío
+SharedDriveConnector.MatchStringMustBeValidRegularExpression=Cadena de ajuste debe ser expresión
regular válida
+SharedDriveConnector.MatchStringCannotBeEmpty=Cadena Partido no puede estar vacío
+SharedDriveConnector.MatchStringMustBeValidRegularExpression=Cadena de ajuste debe ser expresión
regular válida
+SharedDriveConnector.MaximumDocumentLength=Longitud máxima del documento:
 SharedDriveConnector.DeletePath=eliminar ruta #
 SharedDriveConnector.InsertNewMatchForPath=Insertar nuevo partido para la ruta #
 SharedDriveConnector.Include=incluir
@@ -60,7 +60,7 @@ SharedDriveConnector.matchSpec=, partido
 SharedDriveConnector.NoRulesDefined=No rules defined
 SharedDriveConnector.AddNewMatchForPath=Escribir un partido para la ruta #
 SharedDriveConnector.NoStartingPointsDefined=No hay puntos de partida definidos
-SharedDriveConnector.AddPath=Añadir ruta
+SharedDriveConnector.AddPath=Añadir ruta
 SharedDriveConnector.RemoveFromPath=Eliminar de ruta
 SharedDriveConnector.PickAFolder=-- Elija una carpeta --
 SharedDriveConnector.orTypeAPath= o escriba una ruta:\n"
@@ -69,31 +69,31 @@ SharedDriveConnector.Enabled=Activado
 SharedDriveConnector.Disabled=Imposibilitado
 SharedDriveConnector.DeleteToken=eliminar token #
 SharedDriveConnector.NoFileAccessTokensPresent=No hay tokens de acceso de archivos presentes
-SharedDriveConnector.AddToken=Añadir token
+SharedDriveConnector.AddToken=Añadir token
 SharedDriveConnector.ShareSecurity=seguridad Compartir:
 SharedDriveConnector.ParentFolderSecurity=Seguridad de carpeta paternal:
 SharedDriveConnector.PathAttributeName=Nombre de atributo de camino:
 SharedDriveConnector.DeleteMapping=Suprima trazar un mapa #
-SharedDriveConnector.NoMappingsSpecified=Ningún trazado de mapa especificado
-SharedDriveConnector.AddToMappings=Añadir a asignaciones
+SharedDriveConnector.NoMappingsSpecified=Ningún trazado de mapa especificado
+SharedDriveConnector.AddToMappings=Añadir a asignaciones
 SharedDriveConnector.MatchRegexp=Correspondencia regexp:
 SharedDriveConnector.ReplaceString=Reemplazar cadena:
-SharedDriveConnector.DeleteFileMapping=Eliminar asignación de archivo #
+SharedDriveConnector.DeleteFileMapping=Eliminar asignación de archivo #
 SharedDriveConnector.NoFileMappingsSpecified=No hay asignaciones de archivo especificados
-SharedDriveConnector.AddToFileMappings=Añada al trazado un mapa de archivo
+SharedDriveConnector.AddToFileMappings=Añada al trazado un mapa de archivo
 SharedDriveConnector.DeleteUrlMapping=Suprima el trazado un mapa de url #
-SharedDriveConnector.NoURLMappingsSpecifiedWillProduceAFileIRI=No hay trazado del mapa de
URL especificado; producirá un archivo IRI
-SharedDriveConnector.AddToURLMappings=Añadir a asignaciones de URL
+SharedDriveConnector.NoURLMappingsSpecifiedWillProduceAFileIRI=No hay trazado del mapa de
URL especificado; producirá un archivo IRI
+SharedDriveConnector.AddToURLMappings=Añadir a asignaciones de URL
 SharedDriveConnector.NoDocumentsSpecified=No hay documentos especificados
 SharedDriveConnector.FileSecurity=Seguridad de archivo:
 SharedDriveConnector.FileAccessTokens=Tokens de acceso del archivo:
 SharedDriveConnector.NoFileAccessTokensSpecified=No hay tokens de acceso de archivos especificados
 SharedDriveConnector.ShareSecurity=seguridad Compartir:
 SharedDriveConnector.PathNameMetadataAttribute=Camino-atributo de nombre metadatos:
-SharedDriveConnector.NoPathNameMetadataAttributeSpecified=Ningún camino-atributo de nombre
de metadatos especificado
-SharedDriveConnector.PathValueMapping=Camino-asignación de valores:
+SharedDriveConnector.NoPathNameMetadataAttributeSpecified=Ningún camino-atributo de nombre
de metadatos especificado
+SharedDriveConnector.PathValueMapping=Camino-asignación de valores:
 SharedDriveConnector.FileNameMapping=Trazar un mapa de nombre del archivo:
 SharedDriveConnector.NoFileNameMappingsSpecified=No hay trazado de mapa de nombre del archivo
especificado
 SharedDriveConnector.URLMappingColon=URL Trazar un mapa:
-SharedDriveConnector.MaximumDocumentLength=Longitud máxima del documento:
-
+SharedDriveConnector.MaximumDocumentLength=Longitud máxima del documento:
+SharedDriveConnector.BinName=Bin Name (optional):

Modified: manifoldcf/trunk/connectors/jcifs/connector/src/main/native2ascii/org/apache/manifoldcf/crawler/connectors/sharedrive/common_ja_JP.properties
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/jcifs/connector/src/main/native2ascii/org/apache/manifoldcf/crawler/connectors/sharedrive/common_ja_JP.properties?rev=1778622&r1=1778621&r2=1778622&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/jcifs/connector/src/main/native2ascii/org/apache/manifoldcf/crawler/connectors/sharedrive/common_ja_JP.properties
(original)
+++ manifoldcf/trunk/connectors/jcifs/connector/src/main/native2ascii/org/apache/manifoldcf/crawler/connectors/sharedrive/common_ja_JP.properties
Fri Jan 13 15:49:29 2017
@@ -95,4 +95,4 @@ SharedDriveConnector.FileNameMapping=ã�
 SharedDriveConnector.NoFileNameMappingsSpecified=ファイル名パターンを指定してください
 SharedDriveConnector.URLMappingColon=URLパターン:
 SharedDriveConnector.MaximumDocumentLength=最大コンテンツ長:
-
+SharedDriveConnector.BinName=Bin Name (optional):

Modified: manifoldcf/trunk/connectors/jcifs/connector/src/main/native2ascii/org/apache/manifoldcf/crawler/connectors/sharedrive/common_zh_CN.properties
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/jcifs/connector/src/main/native2ascii/org/apache/manifoldcf/crawler/connectors/sharedrive/common_zh_CN.properties?rev=1778622&r1=1778621&r2=1778622&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/jcifs/connector/src/main/native2ascii/org/apache/manifoldcf/crawler/connectors/sharedrive/common_zh_CN.properties
(original)
+++ manifoldcf/trunk/connectors/jcifs/connector/src/main/native2ascii/org/apache/manifoldcf/crawler/connectors/sharedrive/common_zh_CN.properties
Fri Jan 13 15:49:29 2017
@@ -95,4 +95,4 @@ SharedDriveConnector.FileNameMapping=æ�
 SharedDriveConnector.NoFileNameMappingsSpecified=请指定文件名映射
 SharedDriveConnector.URLMappingColon=URL映射: 
 SharedDriveConnector.MaximumDocumentLength=最大文档长度: 
-
+SharedDriveConnector.BinName=Bin Name (optional):



Mime
View raw message