incubator-connectors-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r988237 [3/24] - in /incubator/lcf/trunk: modules/connectors/activedirectory/connector/org/apache/acf/authorities/authorities/activedirectory/ modules/connectors/documentum/connector/org/apache/acf/crawler/authorities/DCTM/ modules/connecto...
Date Mon, 23 Aug 2010 18:08:42 GMT
Modified: incubator/lcf/trunk/modules/connectors/jcifs/connector/org/apache/acf/crawler/connectors/sharedrive/SharedDriveConnector.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/connectors/jcifs/connector/org/apache/acf/crawler/connectors/sharedrive/SharedDriveConnector.java?rev=988237&r1=988236&r2=988237&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/connectors/jcifs/connector/org/apache/acf/crawler/connectors/sharedrive/SharedDriveConnector.java (original)
+++ incubator/lcf/trunk/modules/connectors/jcifs/connector/org/apache/acf/crawler/connectors/sharedrive/SharedDriveConnector.java Mon Aug 23 18:08:32 2010
@@ -16,7 +16,7 @@
 */
 package org.apache.acf.crawler.connectors.sharedrive;
 
-import org.apache.acf.crawler.system.LCF;
+import org.apache.acf.crawler.system.ACF;
 import java.io.FileOutputStream;
 import java.io.FileInputStream;
 import java.io.File;
@@ -45,7 +45,7 @@ import org.apache.acf.core.interfaces.IT
 import org.apache.acf.core.interfaces.IHTTPOutput;
 import org.apache.acf.core.interfaces.IPostParameters;
 import org.apache.acf.core.interfaces.ConfigParams;
-import org.apache.acf.core.interfaces.LCFException;
+import org.apache.acf.core.interfaces.ACFException;
 import org.apache.acf.core.interfaces.IKeystoreManager;
 import org.apache.acf.core.interfaces.KeystoreManagerFactory;
 import org.apache.acf.core.interfaces.Configuration;
@@ -57,7 +57,7 @@ import org.apache.acf.crawler.interfaces
 import org.apache.acf.core.interfaces.SpecificationNode;
 import org.apache.acf.crawler.interfaces.IVersionActivity;
 import org.apache.acf.crawler.system.Logging;
-import org.apache.acf.crawler.system.LCF;
+import org.apache.acf.crawler.system.ACF;
 
 /** This is the "repository connector" for a smb/cifs shared drive file system.  It's a relative of the share crawler, and should have
 * comparable basic functionality.
@@ -123,7 +123,7 @@ public class SharedDriveConnector extend
   public SharedDriveConnector()
   {
     // We need to know whether to operate in NTLMv2 mode, or in NTLM mode.
-    String value = LCF.getProperty(PROPERTY_JCIFS_USE_NTLM_V1);
+    String value = ACF.getProperty(PROPERTY_JCIFS_USE_NTLM_V1);
     if (value == null || value.toLowerCase().equals("false"))
     {
       System.setProperty("jcifs.smb.lmCompatibility","3");
@@ -138,13 +138,13 @@ public class SharedDriveConnector extend
 
   /** Establish a "session".  In the case of the jcifs connector, this just builds the appropriate smbconnectionPath string, and does the necessary checks. */
   protected void getSession()
-    throws LCFException
+    throws ACFException
   {
     if (smbconnectionPath == null)
     {
       // Get the server
       if (server == null || server.length() == 0)
-        throw new LCFException("Missing parameter '"+SharedDriveParameters.server+"'");
+        throw new ACFException("Missing parameter '"+SharedDriveParameters.server+"'");
 
       // make the smb connection to the server
       String authenticationString;
@@ -164,7 +164,7 @@ public class SharedDriveConnector extend
       catch (MalformedURLException e)
       {
         Logging.connectors.error("Unable to access SMB/CIFS share: "+"smb://" + ((domain==null)?"":domain)+";"+username+":<password>@"+ server + "/\n" + e);
-        throw new LCFException("Unable to access SMB/CIFS share: "+server, e, LCFException.REPOSITORY_CONNECTION_ERROR);
+        throw new ACFException("Unable to access SMB/CIFS share: "+server, e, ACFException.REPOSITORY_CONNECTION_ERROR);
       }
     }
   }
@@ -192,7 +192,7 @@ public class SharedDriveConnector extend
   /** Close the connection.  Call this before discarding the repository connector.
   */
   public void disconnect()
-    throws LCFException
+    throws ACFException
   {
     server = null;
     domain = null;
@@ -266,7 +266,7 @@ public class SharedDriveConnector extend
   * @return the document uri.
   */
   protected static String convertToURI(String documentIdentifier, MatchMap fileMap, MatchMap uriMap)
-    throws LCFException
+    throws ACFException
   {
     //
     // Note well: This MUST be a legal URI!!
@@ -313,7 +313,7 @@ public class SharedDriveConnector extend
       catch (java.io.UnsupportedEncodingException e)
       {
         // Should not happen...
-        throw new LCFException(e.getMessage(),e);
+        throw new ACFException(e.getMessage(),e);
       }
     }
     else
@@ -365,7 +365,7 @@ public class SharedDriveConnector extend
       catch (java.io.UnsupportedEncodingException e)
       {
         // Should not happen...
-        throw new LCFException(e.getMessage(),e);
+        throw new ACFException(e.getMessage(),e);
       }
     }
   }
@@ -379,13 +379,13 @@ public class SharedDriveConnector extend
   *@param input is the request object.
   */
   public void executeCommand(Configuration output, String command, Configuration input)
-    throws LCFException
+    throws ACFException
   {
     if (command.equals("folder/list"))
     {
-      String parentFolder = LCF.getRootArgument(input,"parent_folder");
+      String parentFolder = ACF.getRootArgument(input,"parent_folder");
       if (parentFolder == null)
-        throw new LCFException("Missing required field 'parent_folder'");
+        throw new ACFException("Missing required field 'parent_folder'");
       
       try
       {
@@ -399,16 +399,16 @@ public class SharedDriveConnector extend
           output.addChild(output.getChildCount(),node);
         }
       }
-      catch (LCFException e)
+      catch (ACFException e)
       {
-        LCF.createErrorNode(output,e);
+        ACF.createErrorNode(output,e);
       }
     }
     else if (command.equals("folder/validate"))
     {
-      String folder = LCF.getRootArgument(input,"folder");
+      String folder = ACF.getRootArgument(input,"folder");
       if (folder == null)
-        throw new LCFException("Missing required field 'folder'");
+        throw new ACFException("Missing required field 'folder'");
       
       try
       {
@@ -420,9 +420,9 @@ public class SharedDriveConnector extend
           output.addChild(output.getChildCount(),node);
         }
       }
-      catch (LCFException e)
+      catch (ACFException e)
       {
-        LCF.createErrorNode(output,e);
+        ACF.createErrorNode(output,e);
       }
     }
     else
@@ -443,7 +443,7 @@ public class SharedDriveConnector extend
   *@return the stream of local document identifiers that should be added to the queue.
   */
   public IDocumentIdentifierStream getDocumentIdentifiers(DocumentSpecification spec, long startTime, long endTime)
-    throws LCFException, ServiceInterruption
+    throws ACFException, ServiceInterruption
   {
     getSession();
     return new IdentifierStream(spec);
@@ -469,7 +469,7 @@ public class SharedDriveConnector extend
   */
   public String[] getDocumentVersions(String[] documentIdentifiers, String[] oldVersions, IVersionActivity activities,
     DocumentSpecification spec, int jobMode, boolean usesDefaultAuthority)
-    throws LCFException, ServiceInterruption
+    throws ACFException, ServiceInterruption
   {
     getSession();
     // Read the forced acls.  A null return indicates that security is disabled!!!
@@ -616,7 +616,7 @@ public class SharedDriveConnector extend
       catch (MalformedURLException mue)
       {
         Logging.connectors.error("JCIFS: MalformedURLException thrown: "+mue.getMessage(),mue);
-        throw new LCFException("MalformedURLException thrown: "+mue.getMessage(),mue);
+        throw new ACFException("MalformedURLException thrown: "+mue.getMessage(),mue);
       }
       catch (SmbException se)
       {
@@ -632,7 +632,7 @@ public class SharedDriveConnector extend
       }
       catch (InterruptedIOException e)
       {
-        throw new LCFException("Interrupted: "+e.getMessage(),e,LCFException.INTERRUPTED);
+        throw new ACFException("Interrupted: "+e.getMessage(),e,ACFException.INTERRUPTED);
       }
       catch (IOException e)
       {
@@ -668,7 +668,7 @@ public class SharedDriveConnector extend
   *            methods.
   */
   public void processDocuments(String[] documentIdentifiers, String[] versions, IProcessActivity activities,
-    DocumentSpecification spec, boolean[] scanOnly) throws LCFException, ServiceInterruption
+    DocumentSpecification spec, boolean[] scanOnly) throws ACFException, ServiceInterruption
   {
     getSession();
 
@@ -861,7 +861,7 @@ public class SharedDriveConnector extend
         Logging.connectors.error("MalformedURLException tossed",mue);
         activities.recordActivity(null,ACTIVITY_ACCESS,
           null,documentIdentifier,"Error","Malformed URL: "+mue.getMessage(),null);
-        throw new LCFException("MalformedURLException tossed: "+mue.getMessage(),mue);
+        throw new ACFException("MalformedURLException tossed: "+mue.getMessage(),mue);
       }
       catch (jcifs.smb.SmbAuthException e)
       {
@@ -882,7 +882,7 @@ public class SharedDriveConnector extend
           // See if it's an interruption
           jcifs.util.transport.TransportException te = (jcifs.util.transport.TransportException)cause;
           if (te.getRootCause() != null && te.getRootCause() instanceof java.lang.InterruptedException)
-            throw new LCFException(te.getRootCause().getMessage(),te.getRootCause(),LCFException.INTERRUPTED);
+            throw new ACFException(te.getRootCause().getMessage(),te.getRootCause(),ACFException.INTERRUPTED);
 
           Logging.connectors.warn("JCIFS: Timeout processing document/directory "+documentIdentifier+": retrying...",se);
           activities.recordActivity(null,ACTIVITY_ACCESS,
@@ -943,7 +943,7 @@ public class SharedDriveConnector extend
           Logging.connectors.error("JCIFS: SmbException tossed processing "+documentIdentifier,se);
           activities.recordActivity(null,ACTIVITY_ACCESS,
             null,documentIdentifier,"Error","Unknown: "+se.getMessage(),null);
-          throw new LCFException("SmbException tossed: "+se.getMessage(),se);
+          throw new ACFException("SmbException tossed: "+se.getMessage(),se);
         }
       }
       catch (java.net.SocketTimeoutException e)
@@ -957,7 +957,7 @@ public class SharedDriveConnector extend
       }
       catch (InterruptedIOException e)
       {
-        throw new LCFException("Interrupted: "+e.getMessage(),e,LCFException.INTERRUPTED);
+        throw new ACFException("Interrupted: "+e.getMessage(),e,ACFException.INTERRUPTED);
       }
       catch (IOException e)
       {
@@ -981,7 +981,7 @@ public class SharedDriveConnector extend
   */
   protected void describeDocumentSecurity(StringBuffer description, SmbFile file, String[] forcedacls,
     String[] forcedShareAcls)
-    throws LCFException, IOException
+    throws ACFException, IOException
   {
     String[] shareAllowAcls;
     String[] shareDenyAcls;
@@ -1154,7 +1154,7 @@ public class SharedDriveConnector extend
 
 
   protected static void processSMBException(SmbException se, String documentIdentifier, String activity, String operation)
-    throws LCFException, ServiceInterruption
+    throws ACFException, ServiceInterruption
   {
     // At least some of these are transport errors, and should be treated as service
     // interruptions.
@@ -1165,7 +1165,7 @@ public class SharedDriveConnector extend
       // See if it's an interruption
       jcifs.util.transport.TransportException te = (jcifs.util.transport.TransportException)cause;
       if (te.getRootCause() != null && te.getRootCause() instanceof java.lang.InterruptedException)
-        throw new LCFException(te.getRootCause().getMessage(),te.getRootCause(),LCFException.INTERRUPTED);
+        throw new ACFException(te.getRootCause().getMessage(),te.getRootCause(),ACFException.INTERRUPTED);
       Logging.connectors.warn("JCIFS: Timeout "+activity+" for "+documentIdentifier+": retrying...",se);
       // Transport exceptions no longer abort when they give up, so we can't get notified that there is a problem.
 
@@ -1212,12 +1212,12 @@ public class SharedDriveConnector extend
     else if (se.getMessage().indexOf("Incorrect function") != -1)
     {
       Logging.connectors.error("JCIFS: Server does not support a required operation ("+operation+"?) for "+documentIdentifier);
-      throw new LCFException("Server does not support a required operation ("+operation+", possibly?) accessing document "+documentIdentifier,se);
+      throw new ACFException("Server does not support a required operation ("+operation+", possibly?) accessing document "+documentIdentifier,se);
     }
     else
     {
       Logging.connectors.error("SmbException thrown "+activity+" for "+documentIdentifier,se);
-      throw new LCFException("SmbException thrown: "+se.getMessage(),se);
+      throw new ACFException("SmbException thrown: "+se.getMessage(),se);
     }
   }
 
@@ -1279,7 +1279,7 @@ public class SharedDriveConnector extend
   }
 
   protected static int setPathMetadata(RepositoryDocument rd, String version, int index)
-    throws LCFException
+    throws ACFException
   {
     if (version.length() > index && version.charAt(index++) == '+')
     {
@@ -1303,7 +1303,7 @@ public class SharedDriveConnector extend
   /** Check status of connection.
   */
   public String check()
-    throws LCFException
+    throws ACFException
   {
     getSession();
     String serverURI = smbconnectionPath;
@@ -1335,7 +1335,7 @@ public class SharedDriveConnector extend
         }
         catch (InterruptedIOException e)
         {
-          throw new LCFException("Interrupted: "+e.getMessage(),e,LCFException.INTERRUPTED);
+          throw new ACFException("Interrupted: "+e.getMessage(),e,ACFException.INTERRUPTED);
         }
         catch (IOException e)
         {
@@ -1361,7 +1361,7 @@ public class SharedDriveConnector extend
   *@return true if it should be included.
   */
   protected boolean checkInclude(SmbFile file, String fileName, DocumentSpecification documentSpecification)
-    throws LCFException, ServiceInterruption
+    throws ACFException, ServiceInterruption
   {
     if (Logging.connectors.isDebugEnabled())
       Logging.connectors.debug("JCIFS: In checkInclude for '"+fileName+"'");
@@ -1416,7 +1416,7 @@ public class SharedDriveConnector extend
             }
             catch (NumberFormatException e)
             {
-              throw new LCFException("Bad number",e);
+              throw new ACFException("Bad number",e);
             }
           }
         }
@@ -1546,15 +1546,15 @@ public class SharedDriveConnector extend
     }
     catch (java.net.SocketTimeoutException e)
     {
-      throw new LCFException("Couldn't map to canonical path: "+e.getMessage(),e);
+      throw new ACFException("Couldn't map to canonical path: "+e.getMessage(),e);
     }
     catch (InterruptedIOException e)
     {
-      throw new LCFException("Interrupted: "+e.getMessage(),e,LCFException.INTERRUPTED);
+      throw new ACFException("Interrupted: "+e.getMessage(),e,ACFException.INTERRUPTED);
     }
     catch (IOException e)
     {
-      throw new LCFException("Couldn't map to canonical path: "+e.getMessage(),e);
+      throw new ACFException("Couldn't map to canonical path: "+e.getMessage(),e);
     }
     finally
     {
@@ -1574,7 +1574,7 @@ public class SharedDriveConnector extend
   */
   protected boolean wouldFileBeIncluded(String fileName, DocumentSpecification documentSpecification,
     boolean pretendIndexable)
-    throws LCFException
+    throws ACFException
   {
     if (Logging.connectors.isDebugEnabled())
       Logging.connectors.debug("JCIFS: In wouldFileBeIncluded for '"+fileName+"', pretendIndexable="+(pretendIndexable?"true":"false"));
@@ -1683,15 +1683,15 @@ public class SharedDriveConnector extend
     }
     catch (java.net.SocketTimeoutException e)
     {
-      throw new LCFException("Couldn't map to canonical path: "+e.getMessage(),e);
+      throw new ACFException("Couldn't map to canonical path: "+e.getMessage(),e);
     }
     catch (InterruptedIOException e)
     {
-      throw new LCFException("Interrupted: "+e.getMessage(),e,LCFException.INTERRUPTED);
+      throw new ACFException("Interrupted: "+e.getMessage(),e,ACFException.INTERRUPTED);
     }
     catch (IOException e)
     {
-      throw new LCFException("Couldn't map to canonical path: "+e.getMessage(),e);
+      throw new ACFException("Couldn't map to canonical path: "+e.getMessage(),e);
     }
     finally
     {
@@ -1707,7 +1707,7 @@ public class SharedDriveConnector extend
   *@return true if the file needs to be fingerprinted.
   */
   protected boolean checkNeedFileData(String fileName, DocumentSpecification documentSpecification)
-    throws LCFException
+    throws ACFException
   {
     return wouldFileBeIncluded(fileName,documentSpecification,true) != wouldFileBeIncluded(fileName,documentSpecification,false);
   }
@@ -1722,7 +1722,7 @@ public class SharedDriveConnector extend
   *@return true if the file should be ingested.
   */
   protected boolean checkIngest(File localFile, String fileName, DocumentSpecification documentSpecification, IFingerprintActivity activities)
-    throws LCFException, ServiceInterruption
+    throws ACFException, ServiceInterruption
   {
     if (Logging.connectors.isDebugEnabled())
       Logging.connectors.debug("JCIFS: In checkIngest for '"+fileName+"'");
@@ -1841,15 +1841,15 @@ public class SharedDriveConnector extend
     }
     catch (java.net.SocketTimeoutException e)
     {
-      throw new LCFException("Couldn't map to canonical path: "+e.getMessage(),e);
+      throw new ACFException("Couldn't map to canonical path: "+e.getMessage(),e);
     }
     catch (InterruptedIOException e)
     {
-      throw new LCFException("Interrupted: "+e.getMessage(),e,LCFException.INTERRUPTED);
+      throw new ACFException("Interrupted: "+e.getMessage(),e,ACFException.INTERRUPTED);
     }
     catch (IOException e)
     {
-      throw new LCFException("Couldn't map to canonical path: "+e.getMessage(),e);
+      throw new ACFException("Couldn't map to canonical path: "+e.getMessage(),e);
     }
     finally
     {
@@ -2550,7 +2550,7 @@ public class SharedDriveConnector extend
     protected int currentIndex = 0;
 
     public IdentifierStream(DocumentSpecification spec)
-      throws LCFException
+      throws ACFException
     {
       try
       {
@@ -2587,15 +2587,15 @@ public class SharedDriveConnector extend
       }
       catch (java.net.SocketTimeoutException e)
       {
-        throw new LCFException("Couldn't map to canonical path: "+e.getMessage(),e);
+        throw new ACFException("Couldn't map to canonical path: "+e.getMessage(),e);
       }
       catch (InterruptedIOException e)
       {
-        throw new LCFException("Interrupted: "+e.getMessage(),e,LCFException.INTERRUPTED);
+        throw new ACFException("Interrupted: "+e.getMessage(),e,ACFException.INTERRUPTED);
       }
       catch (IOException e)
       {
-        throw new LCFException("Could not get a canonical path: "+e.getMessage(),e);
+        throw new ACFException("Could not get a canonical path: "+e.getMessage(),e);
       }
     }
 
@@ -2603,7 +2603,7 @@ public class SharedDriveConnector extend
     *@return the next document identifier, or null if there are no more.
     */
     public String getNextIdentifier()
-      throws LCFException, ServiceInterruption
+      throws ACFException, ServiceInterruption
     {
       if (currentIndex == ids.length)
         return null;
@@ -2613,7 +2613,7 @@ public class SharedDriveConnector extend
     /** Close the stream.
     */
     public void close()
-      throws LCFException
+      throws ACFException
     {
       ids = null;
     }
@@ -2637,7 +2637,7 @@ public class SharedDriveConnector extend
   *@param tabsArray is an array of tab names.  Add to this array any tab names that are specific to the connector.
   */
   public void outputConfigurationHeader(IThreadContext threadContext, IHTTPOutput out, ConfigParams parameters, ArrayList tabsArray)
-    throws LCFException, IOException
+    throws ACFException, IOException
   {
     tabsArray.add("Server");
     out.print(
@@ -2687,7 +2687,7 @@ public class SharedDriveConnector extend
   *@param tabName is the current tab name.
   */
   public void outputConfigurationBody(IThreadContext threadContext, IHTTPOutput out, ConfigParams parameters, String tabName)
-    throws LCFException, IOException
+    throws ACFException, IOException
   {
     String server   = parameters.getParameter(org.apache.acf.crawler.connectors.sharedrive.SharedDriveParameters.server);
     if (server==null) server = "";
@@ -2744,7 +2744,7 @@ public class SharedDriveConnector extend
   *@return null if all is well, or a string error message if there is an error that should prevent saving of the connection (and cause a redirection to an error page).
   */
   public String processConfigurationPost(IThreadContext threadContext, IPostParameters variableContext, ConfigParams parameters)
-    throws LCFException
+    throws ACFException
   {
     String server = variableContext.getParameter("server");
     if (server != null)
@@ -2772,7 +2772,7 @@ public class SharedDriveConnector extend
   *@param parameters are the configuration parameters, as they currently exist, for this connection being configured.
   */
   public void viewConfiguration(IThreadContext threadContext, IHTTPOutput out, ConfigParams parameters)
-    throws LCFException, IOException
+    throws ACFException, IOException
   {
     out.print(
 "<table class=\"displaytable\">\n"+
@@ -2820,7 +2820,7 @@ public class SharedDriveConnector extend
   *@param tabsArray is an array of tab names.  Add to this array any tab names that are specific to the connector.
   */
   public void outputSpecificationHeader(IHTTPOutput out, DocumentSpecification ds, ArrayList tabsArray)
-    throws LCFException, IOException
+    throws ACFException, IOException
   {
     tabsArray.add("Paths");
     tabsArray.add("Security");
@@ -2964,7 +2964,7 @@ public class SharedDriveConnector extend
   *@param tabName is the current tab name.
   */
   public void outputSpecificationBody(IHTTPOutput out, DocumentSpecification ds, String tabName)
-    throws LCFException, IOException
+    throws ACFException, IOException
   {
     int i;
     int k;
@@ -3174,7 +3174,7 @@ public class SharedDriveConnector extend
           pathSoFar = "";
           childList = getChildFolderNames("");
           if (childList == null)
-            throw new LCFException("Can't find any children for root folder");
+            throw new ACFException("Can't find any children for root folder");
         }
         out.print(
 "          <input type=\"hidden\" name=\"specpath\" value=\""+org.apache.acf.ui.util.Encoder.attributeEscape(pathSoFar)+"\"/>\n"+
@@ -3212,7 +3212,7 @@ public class SharedDriveConnector extend
           );
         }
       }
-      catch (LCFException e)
+      catch (ACFException e)
       {
         e.printStackTrace();
         out.println(org.apache.acf.ui.util.Encoder.bodyEscape(e.getMessage()));
@@ -3693,7 +3693,7 @@ public class SharedDriveConnector extend
   *@return null if all is well, or a string error message if there is an error that should prevent saving of the job (and cause a redirection to an error page).
   */
   public String processSpecificationPost(IPostParameters variableContext, DocumentSpecification ds)
-    throws LCFException
+    throws ACFException
   {
     String x = variableContext.getParameter("pathcount");
     if (x != null)
@@ -3884,7 +3884,7 @@ public class SharedDriveConnector extend
             if (trialPath != null)
               path = trialPath;
           }
-          catch (LCFException e)
+          catch (ACFException e)
           {
             // Effectively, this just means we can't add a typein to the path right now.
           }
@@ -4188,7 +4188,7 @@ public class SharedDriveConnector extend
   *@param ds is the current document specification for this job.
   */
   public void viewSpecification(IHTTPOutput out, DocumentSpecification ds)
-    throws LCFException, IOException
+    throws ACFException, IOException
   {
     out.print(
 "<table class=\"displaytable\">\n"
@@ -4564,7 +4564,7 @@ public class SharedDriveConnector extend
   * @return an array of SmbFile
   */
   public SmbFile[] getShareNames(String serverURI)
-    throws LCFException
+    throws ACFException
   {
     getSession();
     SmbFile server = null;
@@ -4574,7 +4574,7 @@ public class SharedDriveConnector extend
     }
     catch (MalformedURLException e1)
     {
-      throw new LCFException("MalformedURLException tossed",e1);
+      throw new ACFException("MalformedURLException tossed",e1);
     }
     SmbFile[] shares = null;
     try
@@ -4587,7 +4587,7 @@ public class SharedDriveConnector extend
     }
     catch (SmbException e)
     {
-      throw new LCFException("SmbException tossed: "+e.getMessage(),e);
+      throw new ACFException("SmbException tossed: "+e.getMessage(),e);
     }
     return shares;
   }
@@ -4596,9 +4596,9 @@ public class SharedDriveConnector extend
   * Given a folder path, determine if the folder is in fact legal and accessible (and is a folder).
   * @param folder is the relative folder from the network root
   * @return the canonical folder name if valid, or null if not.
-  * @throws LCFException
+  * @throws ACFException
   */
-  public String validateFolderName(String folder) throws LCFException
+  public String validateFolderName(String folder) throws ACFException
   {
     getSession();
     //create new connection by appending to the old connection
@@ -4615,7 +4615,7 @@ public class SharedDriveConnector extend
     }
     catch (MalformedURLException e1)
     {
-      throw new LCFException("validateFolderName: Can't get parent file: " + uri,e1);
+      throw new ACFException("validateFolderName: Can't get parent file: " + uri,e1);
     }
 
     try
@@ -4638,24 +4638,24 @@ public class SharedDriveConnector extend
       }
       catch (ServiceInterruption si)
       {
-        throw new LCFException("Service interruption: "+si.getMessage(),si);
+        throw new ACFException("Service interruption: "+si.getMessage(),si);
       }
     }
     catch (MalformedURLException e)
     {
-      throw new LCFException("MalformedURLException tossed: "+e.getMessage(),e);
+      throw new ACFException("MalformedURLException tossed: "+e.getMessage(),e);
     }
     catch (java.net.SocketTimeoutException e)
     {
-      throw new LCFException("IOException tossed: "+e.getMessage(),e);
+      throw new ACFException("IOException tossed: "+e.getMessage(),e);
     }
     catch (InterruptedIOException e)
     {
-      throw new LCFException("Interrupted: "+e.getMessage(),e,LCFException.INTERRUPTED);
+      throw new ACFException("Interrupted: "+e.getMessage(),e,ACFException.INTERRUPTED);
     }
     catch (IOException e)
     {
-      throw new LCFException("IOException tossed: "+e.getMessage(),e);
+      throw new ACFException("IOException tossed: "+e.getMessage(),e);
     }
 
   }
@@ -4665,9 +4665,9 @@ public class SharedDriveConnector extend
   *
   * @param folder is the relative folder from the network root
   * @return array of child folder names
-  * @throws LCFException
+  * @throws ACFException
   */
-  public String[] getChildFolderNames(String folder) throws LCFException
+  public String[] getChildFolderNames(String folder) throws ACFException
   {
     getSession();
     //create new connection by appending to the old connection
@@ -4684,7 +4684,7 @@ public class SharedDriveConnector extend
     }
     catch (MalformedURLException e1)
     {
-      throw new LCFException("getChildFolderNames: Can't get parent file: " + uri,e1);
+      throw new ACFException("getChildFolderNames: Can't get parent file: " + uri,e1);
     }
 
     // add DFS support
@@ -4703,24 +4703,24 @@ public class SharedDriveConnector extend
       }
       catch (ServiceInterruption si)
       {
-        throw new LCFException("Service interruption: "+si.getMessage(),si);
+        throw new ACFException("Service interruption: "+si.getMessage(),si);
       }
     }
     catch (MalformedURLException e)
     {
-      throw new LCFException("MalformedURLException tossed: "+e.getMessage(),e);
+      throw new ACFException("MalformedURLException tossed: "+e.getMessage(),e);
     }
     catch (java.net.SocketTimeoutException e)
     {
-      throw new LCFException("IOException tossed: "+e.getMessage(),e);
+      throw new ACFException("IOException tossed: "+e.getMessage(),e);
     }
     catch (InterruptedIOException e)
     {
-      throw new LCFException("Interrupted: "+e.getMessage(),e,LCFException.INTERRUPTED);
+      throw new ACFException("Interrupted: "+e.getMessage(),e,ACFException.INTERRUPTED);
     }
     catch (IOException e)
     {
-      throw new LCFException("IOException tossed: "+e.getMessage(),e);
+      throw new ACFException("IOException tossed: "+e.getMessage(),e);
     }
 
     // populate a String array
@@ -4789,7 +4789,7 @@ public class SharedDriveConnector extend
     /** Document specification */
     protected DocumentSpecification spec;
     /** Exceptions that we saw.  These are saved here so that they can be rethrown when done */
-    protected LCFException lcfException = null;
+    protected ACFException lcfException = null;
     protected ServiceInterruption serviceInterruption = null;
 
     /** Constructor */
@@ -4839,7 +4839,7 @@ public class SharedDriveConnector extend
 
         return false;
       }
-      catch (LCFException e)
+      catch (ACFException e)
       {
         if (lcfException == null)
           lcfException = e;
@@ -4855,7 +4855,7 @@ public class SharedDriveConnector extend
 
     /** Check for exception, and throw if there is one */
     public void checkAndThrow()
-      throws ServiceInterruption, LCFException
+      throws ServiceInterruption, ACFException
     {
       if (lcfException != null)
         throw lcfException;

Modified: incubator/lcf/trunk/modules/connectors/jcifs/connector/org/apache/acf/crawler/connectors/sharedrive/SharedDriveHelpers.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/connectors/jcifs/connector/org/apache/acf/crawler/connectors/sharedrive/SharedDriveHelpers.java?rev=988237&r1=988236&r2=988237&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/connectors/jcifs/connector/org/apache/acf/crawler/connectors/sharedrive/SharedDriveHelpers.java (original)
+++ incubator/lcf/trunk/modules/connectors/jcifs/connector/org/apache/acf/crawler/connectors/sharedrive/SharedDriveHelpers.java Mon Aug 23 18:08:32 2010
@@ -16,7 +16,7 @@
 */
 package org.apache.acf.crawler.connectors.sharedrive;
 
-import org.apache.acf.core.interfaces.LCFException;
+import org.apache.acf.core.interfaces.ACFException;
 
 import java.io.FileOutputStream;
 import java.io.FileInputStream;
@@ -54,7 +54,7 @@ public class SharedDriveHelpers
   *@param password is the password.
   */
   public SharedDriveHelpers(String serverName, String userName, String password)
-    throws LCFException
+    throws ACFException
   {
     try
     {
@@ -65,14 +65,14 @@ public class SharedDriveHelpers
     }
     catch (MalformedURLException e)
     {
-      throw new LCFException("Unable to access SMB/CIFS share: "+serverName, e, LCFException.SETUP_ERROR);
+      throw new ACFException("Unable to access SMB/CIFS share: "+serverName, e, ACFException.SETUP_ERROR);
     }
   }
 
   /** Close the connection.
   */
   public void close()
-    throws LCFException
+    throws ACFException
   {
     // Just let stuff go
     pa = null;
@@ -85,7 +85,7 @@ public class SharedDriveHelpers
   *@return the target path if the document is found, or "" if it is not.
   */
   public String lookupDocument(String targetPath)
-    throws LCFException
+    throws ACFException
   {
     try
     {
@@ -97,7 +97,7 @@ public class SharedDriveHelpers
     }
     catch (IOException e)
     {
-      throw new LCFException("IO exception: "+e.getMessage(),e);
+      throw new ACFException("IO exception: "+e.getMessage(),e);
     }
   }
 
@@ -108,7 +108,7 @@ public class SharedDriveHelpers
   *@return the target path.
   */
   public String addDocument(String targetPath, String sourceFile)
-    throws LCFException
+    throws ACFException
   {
     try
     {
@@ -150,7 +150,7 @@ public class SharedDriveHelpers
     }
     catch (IOException e)
     {
-      throw new LCFException("IO exception: "+e.getMessage(),e);
+      throw new ACFException("IO exception: "+e.getMessage(),e);
     }
   }
 
@@ -159,7 +159,7 @@ public class SharedDriveHelpers
   *       separated by "/" characters.
   */
   public void deleteDocument(String targetPath)
-    throws LCFException
+    throws ACFException
   {
     try
     {
@@ -169,7 +169,7 @@ public class SharedDriveHelpers
     }
     catch (IOException e)
     {
-      throw new LCFException("IO exception: "+e.getMessage(),e);
+      throw new ACFException("IO exception: "+e.getMessage(),e);
     }
   }
 
@@ -179,7 +179,7 @@ public class SharedDriveHelpers
   *@param userName is the user to add.
   */
   public void addUserToFolder(String targetPath, String userName)
-    throws LCFException
+    throws ACFException
   {
     // MHL
   }
@@ -190,7 +190,7 @@ public class SharedDriveHelpers
   *@param userName is the user to remove.
   */
   public void removeUserFromFolder(String targetPath, String userName)
-    throws LCFException
+    throws ACFException
   {
     // MHL
   }

Modified: incubator/lcf/trunk/modules/connectors/jdbc/connector/org/apache/acf/crawler/connectors/jdbc/IDynamicResultSet.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/connectors/jdbc/connector/org/apache/acf/crawler/connectors/jdbc/IDynamicResultSet.java?rev=988237&r1=988236&r2=988237&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/connectors/jdbc/connector/org/apache/acf/crawler/connectors/jdbc/IDynamicResultSet.java (original)
+++ incubator/lcf/trunk/modules/connectors/jdbc/connector/org/apache/acf/crawler/connectors/jdbc/IDynamicResultSet.java Mon Aug 23 18:08:32 2010
@@ -34,10 +34,10 @@ public interface IDynamicResultSet
   *@return the immutable row description, or null if there is no such row.
   */
   public IResultRow getNextRow()
-    throws LCFException, ServiceInterruption;
+    throws ACFException, ServiceInterruption;
 
   /** Close this resultset.
   */
   public void close()
-    throws LCFException, ServiceInterruption;
+    throws ACFException, ServiceInterruption;
 }

Modified: incubator/lcf/trunk/modules/connectors/jdbc/connector/org/apache/acf/crawler/connectors/jdbc/JDBCConnection.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/connectors/jdbc/connector/org/apache/acf/crawler/connectors/jdbc/JDBCConnection.java?rev=988237&r1=988236&r2=988237&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/connectors/jdbc/connector/org/apache/acf/crawler/connectors/jdbc/JDBCConnection.java (original)
+++ incubator/lcf/trunk/modules/connectors/jdbc/connector/org/apache/acf/crawler/connectors/jdbc/JDBCConnection.java Mon Aug 23 18:08:32 2010
@@ -55,7 +55,7 @@ public class JDBCConnection
   }
 
   protected static IResultRow readNextResultRowViaThread(ResultSet rs, ResultSetMetaData rsmd, String[] resultCols)
-    throws LCFException, ServiceInterruption
+    throws ACFException, ServiceInterruption
   {
     NextResultRowThread t = new NextResultRowThread(rs,rsmd,resultCols);
     try
@@ -66,9 +66,9 @@ public class JDBCConnection
       if (thr != null)
       {
         if (thr instanceof java.sql.SQLException)
-          throw new LCFException("Error fetching next JDBC result row: "+thr.getMessage(),thr);
-        else if (thr instanceof LCFException)
-          throw (LCFException)thr;
+          throw new ACFException("Error fetching next JDBC result row: "+thr.getMessage(),thr);
+        else if (thr instanceof ACFException)
+          throw (ACFException)thr;
         else if (thr instanceof ServiceInterruption)
           throw (ServiceInterruption)thr;
         else if (thr instanceof RuntimeException)
@@ -81,7 +81,7 @@ public class JDBCConnection
     catch (InterruptedException e)
     {
       t.interrupt();
-      throw new LCFException("Interrupted: "+e.getMessage(),e,LCFException.INTERRUPTED);
+      throw new ACFException("Interrupted: "+e.getMessage(),e,ACFException.INTERRUPTED);
     }
   }
 
@@ -127,7 +127,7 @@ public class JDBCConnection
   }
 
   protected static IResultRow readNextResultRow(ResultSet rs, ResultSetMetaData rsmd, String[] resultCols)
-    throws LCFException, ServiceInterruption
+    throws ACFException, ServiceInterruption
   {
     try
     {
@@ -139,12 +139,12 @@ public class JDBCConnection
     }
     catch (java.sql.SQLException e)
     {
-      throw new LCFException("Result set error: "+e.getMessage(),e);
+      throw new ACFException("Result set error: "+e.getMessage(),e);
     }
   }
 
   protected static void closeResultset(ResultSet rs)
-    throws LCFException, ServiceInterruption
+    throws ACFException, ServiceInterruption
   {
     try
     {
@@ -152,12 +152,12 @@ public class JDBCConnection
     }
     catch (java.sql.SQLException e)
     {
-      throw new LCFException("Exception closing resultset: "+e.getMessage(),e);
+      throw new ACFException("Exception closing resultset: "+e.getMessage(),e);
     }
   }
 
   protected static void closeStmt(Statement stmt)
-    throws LCFException, ServiceInterruption
+    throws ACFException, ServiceInterruption
   {
     try
     {
@@ -165,12 +165,12 @@ public class JDBCConnection
     }
     catch (java.sql.SQLException e)
     {
-      throw new LCFException("Exception closing statement: "+e.getMessage(),e);
+      throw new ACFException("Exception closing statement: "+e.getMessage(),e);
     }
   }
 
   protected static void closePS(PreparedStatement ps)
-    throws LCFException, ServiceInterruption
+    throws ACFException, ServiceInterruption
   {
     try
     {
@@ -178,7 +178,7 @@ public class JDBCConnection
     }
     catch (java.sql.SQLException e)
     {
-      throw new LCFException("Exception closing statement: "+e.getMessage(),e);
+      throw new ACFException("Exception closing statement: "+e.getMessage(),e);
     }
   }
 
@@ -186,7 +186,7 @@ public class JDBCConnection
   /** Test connection.
   */
   public void testConnection()
-    throws LCFException, ServiceInterruption
+    throws ACFException, ServiceInterruption
   {
     TestConnectionThread t = new TestConnectionThread();
     try
@@ -197,9 +197,9 @@ public class JDBCConnection
       if (thr != null)
       {
         if (thr instanceof java.sql.SQLException)
-          throw new LCFException("Error doing JDBC connection test: "+thr.getMessage(),thr);
-        else if (thr instanceof LCFException)
-          throw (LCFException)thr;
+          throw new ACFException("Error doing JDBC connection test: "+thr.getMessage(),thr);
+        else if (thr instanceof ACFException)
+          throw (ACFException)thr;
         else if (thr instanceof ServiceInterruption)
           throw (ServiceInterruption)thr;
         else if (thr instanceof RuntimeException)
@@ -211,7 +211,7 @@ public class JDBCConnection
     catch (InterruptedException e)
     {
       t.interrupt();
-      throw new LCFException("Interrupted: "+e.getMessage(),e,LCFException.INTERRUPTED);
+      throw new ACFException("Interrupted: "+e.getMessage(),e,ACFException.INTERRUPTED);
     }
   }
 
@@ -247,7 +247,7 @@ public class JDBCConnection
   /** Execute query.
   */
   public IDynamicResultSet executeUncachedQuery(String query, ArrayList params, int maxResults)
-    throws LCFException, ServiceInterruption
+    throws ACFException, ServiceInterruption
   {
     if (params == null)
       return new JDBCResultSet(query,maxResults);
@@ -258,7 +258,7 @@ public class JDBCConnection
   /** Execute operation.
   */
   public void executeOperation(String query, ArrayList params)
-    throws LCFException, ServiceInterruption
+    throws ACFException, ServiceInterruption
   {
     ExecuteOperationThread t = new ExecuteOperationThread(query,params);
     try
@@ -269,9 +269,9 @@ public class JDBCConnection
       if (thr != null)
       {
         if (thr instanceof java.sql.SQLException)
-          throw new LCFException("Exception doing connector query '"+query+"': "+thr.getMessage(),thr);
-        else if (thr instanceof LCFException)
-          throw (LCFException)thr;
+          throw new ACFException("Exception doing connector query '"+query+"': "+thr.getMessage(),thr);
+        else if (thr instanceof ACFException)
+          throw (ACFException)thr;
         else if (thr instanceof ServiceInterruption)
           throw (ServiceInterruption)thr;
         else if (thr instanceof RuntimeException)
@@ -283,7 +283,7 @@ public class JDBCConnection
     catch (InterruptedException e)
     {
       t.interrupt();
-      throw new LCFException("Interrupted: "+e.getMessage(),e,LCFException.INTERRUPTED);
+      throw new ACFException("Interrupted: "+e.getMessage(),e,ACFException.INTERRUPTED);
     }
   }
 
@@ -334,7 +334,7 @@ public class JDBCConnection
   * @param params ArrayList if params !=null, use preparedStatement
   */
   protected static IResultSet execute(Connection connection, String query, ArrayList params, boolean bResults, int maxResults)
-    throws LCFException, ServiceInterruption
+    throws ACFException, ServiceInterruption
   {
 
     ResultSet rs;
@@ -404,19 +404,19 @@ public class JDBCConnection
       }
 
     }
-    catch (LCFException e)
+    catch (ACFException e)
     {
       throw e;
     }
     catch (java.sql.SQLException e)
     {
-      throw new LCFException("Exception doing connector query '"+query+"': "+e.getMessage(),e);
+      throw new ACFException("Exception doing connector query '"+query+"': "+e.getMessage(),e);
     }
   }
 
   /** Read the current row from the resultset */
   protected static IResultRow readResultRow(ResultSet rs, ResultSetMetaData rsmd, String[] resultCols)
-    throws LCFException, ServiceInterruption
+    throws ACFException, ServiceInterruption
   {
     try
     {
@@ -468,12 +468,12 @@ public class JDBCConnection
     }
     catch (java.sql.SQLException e)
     {
-      throw new LCFException("Resultset error: "+e.getMessage(),e);
+      throw new ACFException("Resultset error: "+e.getMessage(),e);
     }
   }
 
   protected static String[] readColumnNames(ResultSetMetaData rsmd)
-    throws LCFException, ServiceInterruption
+    throws ACFException, ServiceInterruption
   {
     try
     {
@@ -493,13 +493,13 @@ public class JDBCConnection
     }
     catch (java.sql.SQLException e)
     {
-      throw new LCFException("Sql exception reading column names: "+e.getMessage(),e);
+      throw new ACFException("Sql exception reading column names: "+e.getMessage(),e);
     }
   }
 
   // Read data from a resultset
   protected static IResultSet getData(ResultSet rs, int maxResults)
-    throws LCFException, ServiceInterruption
+    throws ACFException, ServiceInterruption
   {
     try
     {
@@ -516,7 +516,7 @@ public class JDBCConnection
         {
           // This is an error situation; if a result with no columns is
           // necessary, bResults must be false!!!
-          throw new LCFException("Empty query, no columns returned",LCFException.GENERAL_ERROR);
+          throw new ACFException("Empty query, no columns returned",ACFException.GENERAL_ERROR);
         }
 
         while (rs.next() && (maxResults == -1 || maxResults > 0))
@@ -531,13 +531,13 @@ public class JDBCConnection
     }
     catch (java.sql.SQLException e)
     {
-      throw new LCFException("Resultset error: "+e.getMessage(),e);
+      throw new ACFException("Resultset error: "+e.getMessage(),e);
     }
   }
 
   // pass params to preparedStatement
   protected static void loadPS(PreparedStatement ps, ArrayList data)
-    throws java.sql.SQLException, LCFException
+    throws java.sql.SQLException, ACFException
   {
     if (data!=null)
     {
@@ -595,7 +595,7 @@ public class JDBCConnection
   /** Clean up parameters after query has been triggered.
   */
   protected static void cleanupParameters(ArrayList data)
-    throws LCFException
+    throws ACFException
   {
     if (data != null)
     {
@@ -614,7 +614,7 @@ public class JDBCConnection
   }
 
   protected static int findColumn(ResultSet rs, String name)
-    throws LCFException, ServiceInterruption
+    throws ACFException, ServiceInterruption
   {
     try
     {
@@ -627,7 +627,7 @@ public class JDBCConnection
   }
 
   protected static Blob getBLOB(ResultSet rs, int col)
-    throws LCFException, ServiceInterruption
+    throws ACFException, ServiceInterruption
   {
     try
     {
@@ -635,12 +635,12 @@ public class JDBCConnection
     }
     catch (java.sql.SQLException sqle)
     {
-      throw new LCFException("Error in getBlob("+col+"): "+sqle.getMessage(),sqle,LCFException.DATABASE_ERROR);
+      throw new ACFException("Error in getBlob("+col+"): "+sqle.getMessage(),sqle,ACFException.DATABASE_ERROR);
     }
   }
 
   protected static Clob getCLOB(ResultSet rs, int col)
-    throws LCFException, ServiceInterruption
+    throws ACFException, ServiceInterruption
   {
     try
     {
@@ -648,12 +648,12 @@ public class JDBCConnection
     }
     catch (java.sql.SQLException sqle)
     {
-      throw new LCFException("Error in getClob("+col+"): "+sqle.getMessage(),sqle,LCFException.DATABASE_ERROR);
+      throw new ACFException("Error in getClob("+col+"): "+sqle.getMessage(),sqle,ACFException.DATABASE_ERROR);
     }
   }
 
   protected static boolean isBLOB(ResultSetMetaData rsmd, int col)
-    throws LCFException, ServiceInterruption
+    throws ACFException, ServiceInterruption
   {
     try
     {
@@ -662,12 +662,12 @@ public class JDBCConnection
     }
     catch (java.sql.SQLException sqle)
     {
-      throw new LCFException("Error in isBlob("+col+"): "+sqle.getMessage(),sqle,LCFException.DATABASE_ERROR);
+      throw new ACFException("Error in isBlob("+col+"): "+sqle.getMessage(),sqle,ACFException.DATABASE_ERROR);
     }
   }
 
   protected static boolean isBinaryData(ResultSetMetaData rsmd, int col)
-    throws LCFException, ServiceInterruption
+    throws ACFException, ServiceInterruption
   {
     try
     {
@@ -677,12 +677,12 @@ public class JDBCConnection
     }
     catch (java.sql.SQLException sqle)
     {
-      throw new LCFException("Error in isBinaryData("+col+"): "+sqle.getMessage(),sqle,LCFException.DATABASE_ERROR);
+      throw new ACFException("Error in isBinaryData("+col+"): "+sqle.getMessage(),sqle,ACFException.DATABASE_ERROR);
     }
   }
 
   protected static boolean isCLOB(ResultSetMetaData rsmd, int col)
-    throws LCFException, ServiceInterruption
+    throws ACFException, ServiceInterruption
   {
     try
     {
@@ -691,12 +691,12 @@ public class JDBCConnection
     }
     catch (java.sql.SQLException sqle)
     {
-      throw new LCFException("Error in isClob("+col+"): "+sqle.getMessage(),sqle,LCFException.DATABASE_ERROR);
+      throw new ACFException("Error in isClob("+col+"): "+sqle.getMessage(),sqle,ACFException.DATABASE_ERROR);
     }
   }
 
   protected static Object getObject(ResultSet rs, ResultSetMetaData rsmd, int col)
-    throws LCFException, ServiceInterruption
+    throws ACFException, ServiceInterruption
   {
     Object result = null;
 
@@ -770,7 +770,7 @@ public class JDBCConnection
       case java.sql.Types.VARBINARY:
       case java.sql.Types.BINARY:
       case java.sql.Types.LONGVARBINARY:
-        throw new LCFException("Binary type is not a string, column = " + col,LCFException.GENERAL_ERROR);
+        throw new ACFException("Binary type is not a string, column = " + col,ACFException.GENERAL_ERROR);
         //break
 
       default :
@@ -784,7 +784,7 @@ public class JDBCConnection
     }
     catch (java.sql.SQLException e)
     {
-      throw new LCFException("Exception in getString(): "+e.getMessage(),e,LCFException.DATABASE_ERROR);
+      throw new ACFException("Exception in getString(): "+e.getMessage(),e,ACFException.DATABASE_ERROR);
     }
     return result;
   }
@@ -800,7 +800,7 @@ public class JDBCConnection
 
     /** Constructor */
     public JDBCResultSet(String query, int maxResults)
-      throws LCFException, ServiceInterruption
+      throws ACFException, ServiceInterruption
     {
       this.maxResults = maxResults;
       StatementQueryThread t = new StatementQueryThread(query);
@@ -812,9 +812,9 @@ public class JDBCConnection
         if (thr != null)
         {
           if (thr instanceof java.sql.SQLException)
-            throw new LCFException("Exception doing connector query '"+query+"': "+thr.getMessage(),thr);
-          else if (thr instanceof LCFException)
-            throw (LCFException)thr;
+            throw new ACFException("Exception doing connector query '"+query+"': "+thr.getMessage(),thr);
+          else if (thr instanceof ACFException)
+            throw (ACFException)thr;
           else if (thr instanceof ServiceInterruption)
             throw (ServiceInterruption)thr;
           else if (thr instanceof RuntimeException)
@@ -831,7 +831,7 @@ public class JDBCConnection
       catch (InterruptedException e)
       {
         t.interrupt();
-        throw new LCFException("Interrupted: "+e.getMessage(),e,LCFException.INTERRUPTED);
+        throw new ACFException("Interrupted: "+e.getMessage(),e,ACFException.INTERRUPTED);
       }
     }
 
@@ -839,7 +839,7 @@ public class JDBCConnection
     *@return the immutable row description, or null if there is no such row.
     */
     public IResultRow getNextRow()
-      throws LCFException, ServiceInterruption
+      throws ACFException, ServiceInterruption
     {
       if (maxResults == -1 || maxResults > 0)
       {
@@ -854,9 +854,9 @@ public class JDBCConnection
     /** Close this resultset.
     */
     public void close()
-      throws LCFException, ServiceInterruption
+      throws ACFException, ServiceInterruption
     {
-      LCFException rval = null;
+      ACFException rval = null;
       if (rs != null)
       {
         try
@@ -864,9 +864,9 @@ public class JDBCConnection
           closeResultset(rs);
           rs = null;
         }
-        catch (LCFException e)
+        catch (ACFException e)
         {
-          if (rval == null || e.getErrorCode() == LCFException.INTERRUPTED)
+          if (rval == null || e.getErrorCode() == ACFException.INTERRUPTED)
             rval = e;
         }
       }
@@ -877,9 +877,9 @@ public class JDBCConnection
           closeStmt(stmt);
           stmt = null;
         }
-        catch (LCFException e)
+        catch (ACFException e)
         {
-          if (rval == null || e.getErrorCode() == LCFException.INTERRUPTED)
+          if (rval == null || e.getErrorCode() == ACFException.INTERRUPTED)
             rval = e;
         }
       }
@@ -890,9 +890,9 @@ public class JDBCConnection
           JDBCConnectionFactory.releaseConnection(connection);
           connection = null;
         }
-        catch (LCFException e)
+        catch (ACFException e)
         {
-          if (rval == null || e.getErrorCode() == LCFException.INTERRUPTED)
+          if (rval == null || e.getErrorCode() == ACFException.INTERRUPTED)
             rval = e;
         }
       }
@@ -944,9 +944,9 @@ public class JDBCConnection
           catch (ServiceInterruption e2)
           {
           }
-          catch (LCFException e2)
+          catch (ACFException e2)
           {
-            if (e2.getErrorCode() == LCFException.INTERRUPTED)
+            if (e2.getErrorCode() == ACFException.INTERRUPTED)
               this.exception = e2;
             // Ignore
           }
@@ -964,9 +964,9 @@ public class JDBCConnection
           catch (ServiceInterruption e2)
           {
           }
-          catch (LCFException e2)
+          catch (ACFException e2)
           {
-            if (e2.getErrorCode() == LCFException.INTERRUPTED)
+            if (e2.getErrorCode() == ACFException.INTERRUPTED)
               this.exception = e2;
             // Ignore
           }
@@ -984,9 +984,9 @@ public class JDBCConnection
           catch (ServiceInterruption e2)
           {
           }
-          catch (LCFException e2)
+          catch (ACFException e2)
           {
-            if (e2.getErrorCode() == LCFException.INTERRUPTED)
+            if (e2.getErrorCode() == ACFException.INTERRUPTED)
               this.exception = e2;
             // Otherwise, ignore
           }
@@ -1041,7 +1041,7 @@ public class JDBCConnection
 
     /** Constructor */
     public JDBCPSResultSet(String query, ArrayList params, int maxResults)
-      throws LCFException, ServiceInterruption
+      throws ACFException, ServiceInterruption
     {
       this.maxResults = maxResults;
       this.params = params;
@@ -1056,9 +1056,9 @@ public class JDBCConnection
           // Cleanup of parameters happens even if exception doing query
           cleanupParameters(params);
           if (thr instanceof java.sql.SQLException)
-            throw new LCFException("Exception doing connector query '"+query+"': "+thr.getMessage(),thr);
-          else if (thr instanceof LCFException)
-            throw (LCFException)thr;
+            throw new ACFException("Exception doing connector query '"+query+"': "+thr.getMessage(),thr);
+          else if (thr instanceof ACFException)
+            throw (ACFException)thr;
           else if (thr instanceof ServiceInterruption)
             throw (ServiceInterruption)thr;
           else if (thr instanceof RuntimeException)
@@ -1076,7 +1076,7 @@ public class JDBCConnection
       {
         cleanupParameters(params);
         t.interrupt();
-        throw new LCFException("Interrupted: "+e.getMessage(),e,LCFException.INTERRUPTED);
+        throw new ACFException("Interrupted: "+e.getMessage(),e,ACFException.INTERRUPTED);
       }
     }
 
@@ -1084,7 +1084,7 @@ public class JDBCConnection
     *@return the immutable row description, or null if there is no such row.
     */
     public IResultRow getNextRow()
-      throws LCFException, ServiceInterruption
+      throws ACFException, ServiceInterruption
     {
       if (maxResults == -1 || maxResults > 0)
       {
@@ -1099,9 +1099,9 @@ public class JDBCConnection
     /** Close this resultset.
     */
     public void close()
-      throws LCFException, ServiceInterruption
+      throws ACFException, ServiceInterruption
     {
-      LCFException rval = null;
+      ACFException rval = null;
       if (rs != null)
       {
         try
@@ -1111,9 +1111,9 @@ public class JDBCConnection
         catch (ServiceInterruption e)
         {
         }
-        catch (LCFException e)
+        catch (ACFException e)
         {
-          if (rval == null || e.getErrorCode() == LCFException.INTERRUPTED)
+          if (rval == null || e.getErrorCode() == ACFException.INTERRUPTED)
             rval = e;
         }
         finally
@@ -1130,9 +1130,9 @@ public class JDBCConnection
         catch (ServiceInterruption e)
         {
         }
-        catch (LCFException e)
+        catch (ACFException e)
         {
-          if (rval == null || e.getErrorCode() == LCFException.INTERRUPTED)
+          if (rval == null || e.getErrorCode() == ACFException.INTERRUPTED)
             rval = e;
         }
         finally
@@ -1149,9 +1149,9 @@ public class JDBCConnection
         catch (ServiceInterruption e)
         {
         }
-        catch (LCFException e)
+        catch (ACFException e)
         {
-          if (rval == null || e.getErrorCode() == LCFException.INTERRUPTED)
+          if (rval == null || e.getErrorCode() == ACFException.INTERRUPTED)
             rval = e;
         }
         finally
@@ -1166,9 +1166,9 @@ public class JDBCConnection
           cleanupParameters(params);
           params = null;
         }
-        catch (LCFException e)
+        catch (ACFException e)
         {
-          if (rval == null || e.getErrorCode() == LCFException.INTERRUPTED)
+          if (rval == null || e.getErrorCode() == ACFException.INTERRUPTED)
             rval = e;
         }
       }
@@ -1222,9 +1222,9 @@ public class JDBCConnection
           catch (ServiceInterruption e2)
           {
           }
-          catch (LCFException e2)
+          catch (ACFException e2)
           {
-            if (e2.getErrorCode() == LCFException.INTERRUPTED)
+            if (e2.getErrorCode() == ACFException.INTERRUPTED)
               this.exception = e2;
           }
           finally
@@ -1241,9 +1241,9 @@ public class JDBCConnection
           catch (ServiceInterruption e2)
           {
           }
-          catch (LCFException e2)
+          catch (ACFException e2)
           {
-            if (e2.getErrorCode() == LCFException.INTERRUPTED)
+            if (e2.getErrorCode() == ACFException.INTERRUPTED)
               this.exception = e2;
           }
           finally
@@ -1260,9 +1260,9 @@ public class JDBCConnection
           catch (ServiceInterruption e2)
           {
           }
-          catch (LCFException e2)
+          catch (ACFException e2)
           {
-            if (e2.getErrorCode() == LCFException.INTERRUPTED)
+            if (e2.getErrorCode() == ACFException.INTERRUPTED)
               this.exception = e2;
           }
           finally

Modified: incubator/lcf/trunk/modules/connectors/jdbc/connector/org/apache/acf/crawler/connectors/jdbc/JDBCConnectionFactory.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/connectors/jdbc/connector/org/apache/acf/crawler/connectors/jdbc/JDBCConnectionFactory.java?rev=988237&r1=988236&r2=988237&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/connectors/jdbc/connector/org/apache/acf/crawler/connectors/jdbc/JDBCConnectionFactory.java (original)
+++ incubator/lcf/trunk/modules/connectors/jdbc/connector/org/apache/acf/crawler/connectors/jdbc/JDBCConnectionFactory.java Mon Aug 23 18:08:32 2010
@@ -21,7 +21,7 @@ package org.apache.acf.crawler.connector
 import org.apache.acf.core.interfaces.*;
 import org.apache.acf.agents.interfaces.*;
 import org.apache.acf.crawler.system.Logging;
-import org.apache.acf.crawler.system.LCF;
+import org.apache.acf.crawler.system.ACF;
 
 import java.util.*;
 import java.sql.*;
@@ -66,14 +66,14 @@ public class JDBCConnectionFactory
 
 
   public static Connection getConnection(String providerName, String host, String database, String userName, String password)
-    throws LCFException, ServiceInterruption
+    throws ACFException, ServiceInterruption
   {
     if (database.length() == 0)
       database = "_root_";
 
     String driverClassName = (String)driverMap.get(providerName);
     if (driverClassName == null)
-      throw new LCFException("Unrecognized jdbc provider: '"+providerName+"'");
+      throw new ACFException("Unrecognized jdbc provider: '"+providerName+"'");
 
     String instanceName = null;
     // Special for MSSQL: Allow database spec to contain an instance name too, in form:
@@ -111,7 +111,7 @@ public class JDBCConnectionFactory
         // Better include the credentials on the pool key, or we won't be able to change those and have it build new connections
         // The password value is SHA-1 hashed, because the pool driver reports the password in many exceptions and we don't want it
         // to be displayed.
-        poolKey += "/" + userName + "/" + LCF.hash(password);
+        poolKey += "/" + userName + "/" + ACF.hash(password);
 
         synchronized (_pool)
         {
@@ -134,7 +134,7 @@ public class JDBCConnectionFactory
           ConnectionPoolManager.URL_PREFIX + poolKey, null, null);
       }
       else
-        throw new LCFException("Can't get connection since pool driver did not initialize properly");
+        throw new ACFException("Can't get connection since pool driver did not initialize properly");
     }
     catch (java.sql.SQLException e)
     {
@@ -153,7 +153,7 @@ public class JDBCConnectionFactory
       }
       catch (java.sql.SQLException e2)
       {
-        throw new LCFException("Error getting connection: "+e2.getMessage(),e2,LCFException.SETUP_ERROR);
+        throw new ACFException("Error getting connection: "+e2.getMessage(),e2,ACFException.SETUP_ERROR);
       }
       // By definition, this must be a service interruption, because the direct route in setting up the connection succeeded.
       long currentTime = System.currentTimeMillis();
@@ -161,20 +161,20 @@ public class JDBCConnectionFactory
     }
     catch (java.lang.ClassNotFoundException e)
     {
-      throw new LCFException("Driver class not found: "+e.getMessage(),e,LCFException.SETUP_ERROR);
+      throw new ACFException("Driver class not found: "+e.getMessage(),e,ACFException.SETUP_ERROR);
     }
     catch (java.lang.InstantiationException e)
     {
-      throw new LCFException("Driver class not instantiable: "+e.getMessage(),e,LCFException.SETUP_ERROR);
+      throw new ACFException("Driver class not instantiable: "+e.getMessage(),e,ACFException.SETUP_ERROR);
     }
     catch (java.lang.IllegalAccessException e)
     {
-      throw new LCFException("Driver class not accessible: "+e.getMessage(),e,LCFException.SETUP_ERROR);
+      throw new ACFException("Driver class not accessible: "+e.getMessage(),e,ACFException.SETUP_ERROR);
     }
   }
 
   public static void releaseConnection(Connection c)
-    throws LCFException, ServiceInterruption
+    throws ACFException, ServiceInterruption
   {
     try
     {
@@ -182,7 +182,7 @@ public class JDBCConnectionFactory
     }
     catch (java.sql.SQLException e)
     {
-      throw new LCFException("Error releasing connection: "+e.getMessage(),e);
+      throw new ACFException("Error releasing connection: "+e.getMessage(),e);
     }
   }
 

Modified: incubator/lcf/trunk/modules/connectors/jdbc/connector/org/apache/acf/crawler/connectors/jdbc/JDBCConnector.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/connectors/jdbc/connector/org/apache/acf/crawler/connectors/jdbc/JDBCConnector.java?rev=988237&r1=988236&r2=988237&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/connectors/jdbc/connector/org/apache/acf/crawler/connectors/jdbc/JDBCConnector.java (original)
+++ incubator/lcf/trunk/modules/connectors/jdbc/connector/org/apache/acf/crawler/connectors/jdbc/JDBCConnector.java Mon Aug 23 18:08:32 2010
@@ -31,7 +31,7 @@ import javax.sql.*;
 import java.io.*;
 import java.util.*;
 
-/** This interface describes an instance of a connection between a repository and LCF's
+/** This interface describes an instance of a connection between a repository and ACF's
 * standard "pull" ingestion agent.
 *
 * Each instance of this interface is used in only one thread at a time.  Connection Pooling
@@ -90,14 +90,14 @@ public class JDBCConnector extends org.a
 
   /** Set up a session */
   protected void getSession()
-    throws LCFException
+    throws ACFException
   {
     if (connection == null)
     {
       if (jdbcProvider == null || jdbcProvider.length() == 0)
-        throw new LCFException("Missing parameter '"+JDBCConstants.providerParameter+"'");
+        throw new ACFException("Missing parameter '"+JDBCConstants.providerParameter+"'");
       if (host == null || host.length() == 0)
-        throw new LCFException("Missing parameter '"+JDBCConstants.hostParameter+"'");
+        throw new ACFException("Missing parameter '"+JDBCConstants.hostParameter+"'");
 
       connection = new JDBCConnection(jdbcProvider,host,databaseName,userName,password);
     }
@@ -149,7 +149,7 @@ public class JDBCConnector extends org.a
   /** Check status of connection.
   */
   public String check()
-    throws LCFException
+    throws ACFException
   {
     try
     {
@@ -169,7 +169,7 @@ public class JDBCConnector extends org.a
   /** Close the connection.  Call this before discarding the repository connector.
   */
   public void disconnect()
-    throws LCFException
+    throws ACFException
   {
     connection = null;
     host = null;
@@ -223,7 +223,7 @@ public class JDBCConnector extends org.a
   */
   public void addSeedDocuments(ISeedingActivity activities, DocumentSpecification spec,
     long startTime, long endTime, int jobMode)
-    throws LCFException, ServiceInterruption
+    throws ACFException, ServiceInterruption
   {
     getSession();
 
@@ -255,7 +255,7 @@ public class JDBCConnector extends org.a
         createQueryString(queryText,paramList), "ERROR", e.getMessage(), null);
       throw e;
     }
-    catch (LCFException e)
+    catch (ACFException e)
     {
       // If failure, record the failure.
       activities.recordActivity(new Long(startQueryTime), ACTIVITY_EXTERNAL_QUERY, null,
@@ -276,7 +276,7 @@ public class JDBCConnector extends org.a
           break;
         Object o = row.getValue(JDBCConstants.idReturnColumnName);
         if (o == null)
-          throw new LCFException("Bad seed query; doesn't return $(IDCOLUMN) column.  Try using quotes around $(IDCOLUMN) variable, e.g. \"$(IDCOLUMN)\".");
+          throw new ACFException("Bad seed query; doesn't return $(IDCOLUMN) column.  Try using quotes around $(IDCOLUMN) variable, e.g. \"$(IDCOLUMN)\".");
         String idValue = o.toString();
         activities.addSeedDocument(idValue);
       }
@@ -306,7 +306,7 @@ public class JDBCConnector extends org.a
   */
   public String[] getDocumentVersions(String[] documentIdentifiers, String[] oldVersions, IVersionActivity activities,
     DocumentSpecification spec, int jobMode, boolean usesDefaultAuthority)
-    throws LCFException, ServiceInterruption
+    throws ACFException, ServiceInterruption
   {
     getSession();
     TableSpec ts = new TableSpec(spec);
@@ -363,7 +363,7 @@ public class JDBCConnector extends org.a
     {
       result = connection.executeUncachedQuery(queryText,paramList,-1);
     }
-    catch (LCFException e)
+    catch (ACFException e)
     {
       // If failure, record the failure.
       activities.recordActivity(new Long(startTime), ACTIVITY_EXTERNAL_QUERY, null,
@@ -383,7 +383,7 @@ public class JDBCConnector extends org.a
           break;
         Object o = row.getValue(JDBCConstants.idReturnColumnName);
         if (o == null)
-          throw new LCFException("Bad version query; doesn't return $(IDCOLUMN) column.  Try using quotes around $(IDCOLUMN) variable, e.g. \"$(IDCOLUMN)\".");
+          throw new ACFException("Bad version query; doesn't return $(IDCOLUMN) column.  Try using quotes around $(IDCOLUMN) variable, e.g. \"$(IDCOLUMN)\".");
         String idValue = o.toString();
         o = row.getValue(JDBCConstants.versionReturnColumnName);
         String versionValue;
@@ -432,7 +432,7 @@ public class JDBCConnector extends org.a
   * should only find other references, and should not actually call the ingestion methods.
   */
   public void processDocuments(String[] documentIdentifiers, String[] versions, IProcessActivity activities, DocumentSpecification spec, boolean[] scanOnly)
-    throws LCFException, ServiceInterruption
+    throws ACFException, ServiceInterruption
   {
     getSession();
     TableSpec ts = new TableSpec(spec);
@@ -475,7 +475,7 @@ public class JDBCConnector extends org.a
     {
       result = connection.executeUncachedQuery(queryText,paramList,-1);
     }
-    catch (LCFException e)
+    catch (ACFException e)
     {
       // If failure, record the failure.
       activities.recordActivity(new Long(startTime), ACTIVITY_EXTERNAL_QUERY, null,
@@ -495,7 +495,7 @@ public class JDBCConnector extends org.a
           break;
         Object o = row.getValue(JDBCConstants.idReturnColumnName);
         if (o == null)
-          throw new LCFException("Bad document query; doesn't return $(IDCOLUMN) column.  Try using quotes around $(IDCOLUMN) variable, e.g. \"$(IDCOLUMN)\".");
+          throw new ACFException("Bad document query; doesn't return $(IDCOLUMN) column.  Try using quotes around $(IDCOLUMN) variable, e.g. \"$(IDCOLUMN)\".");
         String id = readAsString(o);
         String version = (String)map.get(id);
         if (version != null)
@@ -555,15 +555,15 @@ public class JDBCConnector extends org.a
                   }
                   catch (java.net.SocketTimeoutException e)
                   {
-                    throw new LCFException("Socket timeout reading database data: "+e.getMessage(),e);
+                    throw new ACFException("Socket timeout reading database data: "+e.getMessage(),e);
                   }
                   catch (InterruptedIOException e)
                   {
-                    throw new LCFException("Interrupted: "+e.getMessage(),e,LCFException.INTERRUPTED);
+                    throw new ACFException("Interrupted: "+e.getMessage(),e,ACFException.INTERRUPTED);
                   }
                   catch (IOException e)
                   {
-                    throw new LCFException("Error reading database data: "+e.getMessage(),e);
+                    throw new ACFException("Error reading database data: "+e.getMessage(),e);
                   }
                   finally
                   {
@@ -595,11 +595,11 @@ public class JDBCConnector extends org.a
                   }
                   catch (InterruptedIOException e)
                   {
-                    throw new LCFException("Interrupted: "+e.getMessage(),e,LCFException.INTERRUPTED);
+                    throw new ACFException("Interrupted: "+e.getMessage(),e,ACFException.INTERRUPTED);
                   }
                   catch (IOException e)
                   {
-                    throw new LCFException("Error reading database data: "+e.getMessage(),e);
+                    throw new ACFException("Error reading database data: "+e.getMessage(),e);
                   }
                 }
               }
@@ -654,7 +654,7 @@ public class JDBCConnector extends org.a
   *@param tabsArray is an array of tab names.  Add to this array any tab names that are specific to the connector.
   */
   public void outputConfigurationHeader(IThreadContext threadContext, IHTTPOutput out, ConfigParams parameters, ArrayList tabsArray)
-    throws LCFException, IOException
+    throws ACFException, IOException
   {
     tabsArray.add("Database Type");
     tabsArray.add("Server");
@@ -704,7 +704,7 @@ public class JDBCConnector extends org.a
   *@param tabName is the current tab name.
   */
   public void outputConfigurationBody(IThreadContext threadContext, IHTTPOutput out, ConfigParams parameters, String tabName)
-    throws LCFException, IOException
+    throws ACFException, IOException
   {
     String jdbcProvider = parameters.getParameter(org.apache.acf.crawler.connectors.jdbc.JDBCConstants.providerParameter);
     if (jdbcProvider == null)
@@ -805,7 +805,7 @@ public class JDBCConnector extends org.a
   *@return null if all is well, or a string error message if there is an error that should prevent saving of the connection (and cause a redirection to an error page).
   */
   public String processConfigurationPost(IThreadContext threadContext, IPostParameters variableContext, ConfigParams parameters)
-    throws LCFException
+    throws ACFException
   {
     String type = variableContext.getParameter("databasetype");
     if (type != null)
@@ -838,7 +838,7 @@ public class JDBCConnector extends org.a
   *@param parameters are the configuration parameters, as they currently exist, for this connection being configured.
   */
   public void viewConfiguration(IThreadContext threadContext, IHTTPOutput out, ConfigParams parameters)
-    throws LCFException, IOException
+    throws ACFException, IOException
   {
     out.print(
 "<table class=\"displaytable\">\n"+
@@ -886,7 +886,7 @@ public class JDBCConnector extends org.a
   *@param tabsArray is an array of tab names.  Add to this array any tab names that are specific to the connector.
   */
   public void outputSpecificationHeader(IHTTPOutput out, DocumentSpecification ds, ArrayList tabsArray)
-    throws LCFException, IOException
+    throws ACFException, IOException
   {
     tabsArray.add("Queries");
     tabsArray.add("Security");
@@ -995,7 +995,7 @@ public class JDBCConnector extends org.a
   *@param tabName is the current tab name.
   */
   public void outputSpecificationBody(IHTTPOutput out, DocumentSpecification ds, String tabName)
-    throws LCFException, IOException
+    throws ACFException, IOException
   {
     String idQuery = "SELECT idfield AS $(IDCOLUMN) FROM documenttable WHERE modifydatefield > $(STARTTIME) AND modifydatefield <= $(ENDTIME)";
     String versionQuery = "SELECT idfield AS $(IDCOLUMN), versionfield AS $(VERSIONCOLUMN) FROM documenttable WHERE idfield IN $(IDLIST)";
@@ -1152,7 +1152,7 @@ public class JDBCConnector extends org.a
   *@return null if all is well, or a string error message if there is an error that should prevent saving of the job (and cause a redirection to an error page).
   */
   public String processSpecificationPost(IPostParameters variableContext, DocumentSpecification ds)
-    throws LCFException
+    throws ACFException
   {
     String idQuery = variableContext.getParameter("idquery");
     String versionQuery = variableContext.getParameter("versionquery");
@@ -1256,7 +1256,7 @@ public class JDBCConnector extends org.a
   *@param ds is the current document specification for this job.
   */
   public void viewSpecification(IHTTPOutput out, DocumentSpecification ds)
-    throws LCFException, IOException
+    throws ACFException, IOException
   {
     String idQuery = "";
     String versionQuery = "";
@@ -1360,7 +1360,7 @@ public class JDBCConnector extends org.a
   *@param row is the resultset row to use to get the metadata.  All non-special columns from this row will be considered to be metadata.
   */
   protected void applyMetadata(RepositoryDocument rd, IResultRow row)
-    throws LCFException
+    throws ACFException
   {
     // Cycle through the row's columns
     Iterator iter = row.getColumns();
@@ -1373,7 +1373,7 @@ public class JDBCConnector extends org.a
         // We can only accept non-binary metadata at this time.
         Object metadata = row.getValue(columnName);
         if (metadata instanceof BinaryInput)
-          throw new LCFException("Metadata column '"+columnName+"' must be convertible to a string, and cannot be binary");
+          throw new ACFException("Metadata column '"+columnName+"' must be convertible to a string, and cannot be binary");
         rd.addField(columnName,metadata.toString());
       }
     }
@@ -1385,7 +1385,7 @@ public class JDBCConnector extends org.a
   *@param spec is the document specification.
   */
   protected void applyAccessTokens(RepositoryDocument rd, String version, DocumentSpecification spec)
-    throws LCFException
+    throws ACFException
   {
     // Set up any acls
     String[] accessAcls = null;
@@ -1500,7 +1500,7 @@ public class JDBCConnector extends org.a
   * Each variable substitutes the string, and it also substitutes zero or more query parameters.
   */
   protected static void substituteQuery(String inputString, VariableMap inputMap, StringBuffer outputQuery, ArrayList outputParams)
-    throws LCFException
+    throws ACFException
   {
     // We are looking for strings that look like this: $(something)
     // Right at the moment we don't care even about quotes, so we just want to look for $(.
@@ -1522,7 +1522,7 @@ public class JDBCConnector extends org.a
       String variableName = inputString.substring(nextIndex+2,endIndex);
       VariableMapItem item = inputMap.getVariable(variableName);
       if (item == null)
-        throw new LCFException("No such substitution variable: $("+variableName+")");
+        throw new ACFException("No such substitution variable: $("+variableName+")");
       outputQuery.append(inputString.substring(startIndex,nextIndex));
       outputQuery.append(item.getValue());
       ArrayList inputParams = item.getParameters();
@@ -1717,7 +1717,7 @@ public class JDBCConnector extends org.a
 
   /** Make sure we read this field as a string */
   protected static String readAsString(Object o)
-    throws LCFException
+    throws ACFException
   {
     if (o instanceof BinaryInput)
     {
@@ -1746,7 +1746,7 @@ public class JDBCConnector extends org.a
       }
       catch (IOException e)
       {
-        throw new LCFException(e.getMessage(),e);
+        throw new ACFException(e.getMessage(),e);
       }
       finally
       {

Modified: incubator/lcf/trunk/modules/connectors/livelink/connector/org/apache/acf/crawler/connectors/livelink/GetConnectionInfo.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/connectors/livelink/connector/org/apache/acf/crawler/connectors/livelink/GetConnectionInfo.java?rev=988237&r1=988236&r2=988237&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/connectors/livelink/connector/org/apache/acf/crawler/connectors/livelink/GetConnectionInfo.java (original)
+++ incubator/lcf/trunk/modules/connectors/livelink/connector/org/apache/acf/crawler/connectors/livelink/GetConnectionInfo.java Mon Aug 23 18:08:32 2010
@@ -22,7 +22,7 @@ import org.apache.acf.core.interfaces.*;
 import org.apache.acf.agents.interfaces.*;
 import org.apache.acf.crawler.interfaces.*;
 import org.apache.acf.crawler.system.Logging;
-import org.apache.acf.crawler.system.LCF;
+import org.apache.acf.crawler.system.ACF;
 
 
 /** Get a livelink connection's information in printed form.
@@ -50,15 +50,15 @@ public class GetConnectionInfo
 
     try
     {
-      LCF.initializeEnvironment();
+      ACF.initializeEnvironment();
       IThreadContext tc = ThreadContextFactory.make();
       IRepositoryConnectionManager connectionManager = RepositoryConnectionManagerFactory.make(tc);
       IRepositoryConnection connection = connectionManager.load(connectionName);
       if (connection == null)
-        throw new LCFException("Connection "+connectionName+" does not exist");
+        throw new ACFException("Connection "+connectionName+" does not exist");
 
       if (connection.getClassName() == null || !connection.getClassName().equals("org.apache.acf.crawler.connectors.livelink.LivelinkConnector"))
-        throw new LCFException("Command can only be used on working Livelink connections.");
+        throw new ACFException("Command can only be used on working Livelink connections.");
 
       ConfigParams cfg = connection.getConfigParams();
 

Modified: incubator/lcf/trunk/modules/connectors/livelink/connector/org/apache/acf/crawler/connectors/livelink/LivelinkAuthority.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/connectors/livelink/connector/org/apache/acf/crawler/connectors/livelink/LivelinkAuthority.java?rev=988237&r1=988236&r2=988237&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/connectors/livelink/connector/org/apache/acf/crawler/connectors/livelink/LivelinkAuthority.java (original)
+++ incubator/lcf/trunk/modules/connectors/livelink/connector/org/apache/acf/crawler/connectors/livelink/LivelinkAuthority.java Mon Aug 23 18:08:32 2010
@@ -22,7 +22,7 @@ import org.apache.acf.core.interfaces.*;
 import org.apache.acf.agents.interfaces.*;
 import org.apache.acf.authorities.interfaces.*;
 import org.apache.acf.authorities.system.Logging;
-import org.apache.acf.authorities.system.LCF;
+import org.apache.acf.authorities.system.ACF;
 
 import java.io.*;
 import java.util.*;
@@ -135,7 +135,7 @@ public class LivelinkAuthority extends o
   }
 
   protected void attemptToConnect()
-    throws LCFException, ServiceInterruption
+    throws ACFException, ServiceInterruption
   {
     if (LLUsers == null)
     {
@@ -174,7 +174,7 @@ public class LivelinkAuthority extends o
   /** Check connection for sanity.
   */
   public String check()
-    throws LCFException
+    throws ACFException
   {
     try
     {
@@ -203,7 +203,7 @@ public class LivelinkAuthority extends o
     {
       return "Temporary service interruption: "+e.getMessage();
     }
-    catch (LCFException e)
+    catch (ACFException e)
     {
       return "Connection failed: "+e.getMessage();
     }
@@ -212,7 +212,7 @@ public class LivelinkAuthority extends o
   /** Close the connection.  Call this before discarding the repository connector.
   */
   public void disconnect()
-    throws LCFException
+    throws ACFException
   {
     if (llServer != null)
     {
@@ -235,7 +235,7 @@ public class LivelinkAuthority extends o
   * (Should throws an exception only when a condition cannot be properly described within the authorization response object.)
   */
   public AuthorizationResponse getAuthorizationResponse(String userName)
-    throws LCFException
+    throws ACFException
   {
     // First, do what's necessary to map the user name that comes in to a reasonable
     // Livelink domain\\user combination.
@@ -405,7 +405,7 @@ public class LivelinkAuthority extends o
   *@param tabsArray is an array of tab names.  Add to this array any tab names that are specific to the connector.
   */
   public void outputConfigurationHeader(IThreadContext threadContext, IHTTPOutput out, ConfigParams parameters, ArrayList tabsArray)
-    throws LCFException, IOException
+    throws ACFException, IOException
   {
     tabsArray.add("Server");
     tabsArray.add("User Mapping");
@@ -470,7 +470,7 @@ public class LivelinkAuthority extends o
   *@param tabName is the current tab name.
   */
   public void outputConfigurationBody(IThreadContext threadContext, IHTTPOutput out, ConfigParams parameters, String tabName)
-    throws LCFException, IOException
+    throws ACFException, IOException
   {
     String serverName = parameters.getParameter(org.apache.acf.crawler.connectors.livelink.LiveLinkParameters.serverName);
     if (serverName == null)
@@ -578,7 +578,7 @@ public class LivelinkAuthority extends o
   *@return null if all is well, or a string error message if there is an error that should prevent saving of the connection (and cause a redirection to an error page).
   */
   public String processConfigurationPost(IThreadContext threadContext, IPostParameters variableContext, ConfigParams parameters)
-    throws LCFException
+    throws ACFException
   {
     String serverName = variableContext.getParameter("servername");
     if (serverName != null)
@@ -614,7 +614,7 @@ public class LivelinkAuthority extends o
   *@param parameters are the configuration parameters, as they currently exist, for this connection being configured.
   */
   public void viewConfiguration(IThreadContext threadContext, IHTTPOutput out, ConfigParams parameters)
-    throws LCFException, IOException
+    throws ACFException, IOException
   {
     out.print(
 "<table class=\"displaytable\">\n"+
@@ -660,7 +660,7 @@ public class LivelinkAuthority extends o
   *@param e is the RuntimeException caught
   */
   protected int handleLivelinkRuntimeException(RuntimeException e, int sanityRetryCount)
-    throws LCFException, ServiceInterruption
+    throws ACFException, ServiceInterruption
   {
     if (
       e instanceof com.opentext.api.LLHTTPAccessDeniedException ||
@@ -674,7 +674,7 @@ public class LivelinkAuthority extends o
     )
     {
       String details = llServer.getErrors();
-      throw new LCFException("Livelink API error: "+e.getMessage()+((details==null)?"":"; "+details),e,LCFException.REPOSITORY_CONNECTION_ERROR);
+      throw new ACFException("Livelink API error: "+e.getMessage()+((details==null)?"":"; "+details),e,ACFException.REPOSITORY_CONNECTION_ERROR);
     }
     else if (
       e instanceof com.opentext.api.LLBadServerCertificateException ||
@@ -688,14 +688,14 @@ public class LivelinkAuthority extends o
     )
     {
       String details = llServer.getErrors();
-      throw new LCFException("Livelink API error: "+e.getMessage()+((details==null)?"":"; "+details),e);
+      throw new ACFException("Livelink API error: "+e.getMessage()+((details==null)?"":"; "+details),e);
     }
     else if (e instanceof com.opentext.api.LLIllegalOperationException)
     {
       // This usually means that LAPI has had a minor communication difficulty but hasn't reported it accurately.
       // We *could* throw a ServiceInterruption, but OpenText recommends to just retry almost immediately.
       String details = llServer.getErrors();
-      return assessRetry(sanityRetryCount,new LCFException("Livelink API illegal operation error: "+e.getMessage()+((details==null)?"":"; "+details),e));
+      return assessRetry(sanityRetryCount,new ACFException("Livelink API illegal operation error: "+e.getMessage()+((details==null)?"":"; "+details),e));
     }
     else if (e instanceof com.opentext.api.LLIOException)
     {
@@ -707,7 +707,7 @@ public class LivelinkAuthority extends o
       }
       catch (UnknownHostException e2)
       {
-        throw new LCFException("Server name '"+serverName+"' cannot be resolved",e2);
+        throw new ACFException("Server name '"+serverName+"' cannot be resolved",e2);
       }
 
       throw new ServiceInterruption("Transient error: "+e.getMessage(),e,System.currentTimeMillis()+5*60000L,System.currentTimeMillis()+12*60*60000L,-1,true);
@@ -718,8 +718,8 @@ public class LivelinkAuthority extends o
 
   /** Do a retry, or throw an exception if the retry count has been exhausted
   */
-  protected static int assessRetry(int sanityRetryCount, LCFException e)
-    throws LCFException
+  protected static int assessRetry(int sanityRetryCount, ACFException e)
+    throws ACFException
   {
     if (sanityRetryCount == 0)
     {
@@ -730,11 +730,11 @@ public class LivelinkAuthority extends o
 
     try
     {
-      LCF.sleep(1000L);
+      ACF.sleep(1000L);
     }
     catch (InterruptedException e2)
     {
-      throw new LCFException(e2.getMessage(),e2,LCFException.INTERRUPTED);
+      throw new ACFException(e2.getMessage(),e2,ACFException.INTERRUPTED);
     }
     // Exit the method
     return sanityRetryCount;



Mime
View raw message