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 [7/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/sharepoint/connector/org/apache/acf/crawler/connectors/sharepoint/SPSProxyHelper.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/connectors/sharepoint/connector/org/apache/acf/crawler/connectors/sharepoint/SPSProxyHelper.java?rev=988237&r1=988236&r2=988237&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/connectors/sharepoint/connector/org/apache/acf/crawler/connectors/sharepoint/SPSProxyHelper.java (original)
+++ incubator/lcf/trunk/modules/connectors/sharepoint/connector/org/apache/acf/crawler/connectors/sharepoint/SPSProxyHelper.java Mon Aug 23 18:08:32 2010
@@ -24,7 +24,7 @@ import java.util.Map;
 import javax.xml.soap.*;
 
 import org.apache.acf.core.common.XMLDoc;
-import org.apache.acf.core.interfaces.LCFException;
+import org.apache.acf.core.interfaces.ACFException;
 import org.apache.acf.agents.interfaces.ServiceInterruption;
 import org.apache.acf.crawler.system.Logging;
 
@@ -45,8 +45,8 @@ import org.apache.axis.configuration.Fil
 public class SPSProxyHelper {
 
 
-  public static final String PROTOCOL_FACTORY_PROPERTY = "LCF_Protocol_Factory";
-  public static final String CONNECTION_MANAGER_PROPERTY = "LCF_Connection_Manager";
+  public static final String PROTOCOL_FACTORY_PROPERTY = "ACF_Protocol_Factory";
+  public static final String CONNECTION_MANAGER_PROPERTY = "ACF_Connection_Manager";
 
   private String serverUrl;
   private String serverLocation;
@@ -88,7 +88,7 @@ public class SPSProxyHelper {
   * @throws Exception
   */
   public String[] getACLs(String site, String docLib )
-    throws LCFException, ServiceInterruption
+    throws ACFException, ServiceInterruption
   {
     long currentTime;
     try
@@ -109,18 +109,18 @@ public class SPSProxyHelper {
       doc.processPath(nodeList, "*", null);
       if (nodeList.size() != 1)
       {
-        throw new LCFException("Bad xml - missing outer 'ns1:GetPermissionCollection' node - there are "+Integer.toString(nodeList.size())+" nodes");
+        throw new ACFException("Bad xml - missing outer 'ns1:GetPermissionCollection' node - there are "+Integer.toString(nodeList.size())+" nodes");
       }
       Object parent = nodeList.get(0);
       if (!doc.getNodeName(parent).equals("ns1:GetPermissionCollection"))
-        throw new LCFException("Bad xml - outer node is not 'ns1:GetPermissionCollection'");
+        throw new ACFException("Bad xml - outer node is not 'ns1:GetPermissionCollection'");
 
       nodeList.clear();
       doc.processPath(nodeList, "*", parent);
 
       if ( nodeList.size() != 1 )
       {
-        throw new LCFException( " No results found." );
+        throw new ACFException( " No results found." );
       }
       parent = nodeList.get(0);
       nodeList.clear();
@@ -172,7 +172,7 @@ public class SPSProxyHelper {
     }
     catch (java.net.MalformedURLException e)
     {
-      throw new LCFException("Bad SharePoint url: "+e.getMessage(),e);
+      throw new ACFException("Bad SharePoint url: "+e.getMessage(),e);
     }
     catch (javax.xml.rpc.ServiceException e)
     {
@@ -207,11 +207,11 @@ public class SPSProxyHelper {
             return null;
           }
           else if (httpErrorCode.equals("403"))
-            throw new LCFException("Http error "+httpErrorCode+" while reading from "+baseUrl+site+" - check IIS and SharePoint security settings! "+e.getMessage(),e);
+            throw new ACFException("Http error "+httpErrorCode+" while reading from "+baseUrl+site+" - check IIS and SharePoint security settings! "+e.getMessage(),e);
           else
-            throw new LCFException("Unexpected http error code "+httpErrorCode+" accessing SharePoint at "+baseUrl+site+": "+e.getMessage(),e);
+            throw new ACFException("Unexpected http error code "+httpErrorCode+" accessing SharePoint at "+baseUrl+site+": "+e.getMessage(),e);
         }
-        throw new LCFException("Unknown http error occurred: "+e.getMessage(),e);
+        throw new ACFException("Unknown http error occurred: "+e.getMessage(),e);
       }
       else if (e.getFaultCode().equals(new javax.xml.namespace.QName("http://schemas.xmlsoap.org/soap/envelope/","Server")))
       {
@@ -252,7 +252,7 @@ public class SPSProxyHelper {
       {
         String exceptionName = e.getFaultString();
         if (exceptionName.equals("java.lang.InterruptedException"))
-          throw new LCFException("Interrupted",LCFException.INTERRUPTED);
+          throw new ACFException("Interrupted",ACFException.INTERRUPTED);
       }
 
       if (Logging.connectors.isDebugEnabled())
@@ -266,7 +266,7 @@ public class SPSProxyHelper {
       // So, fail hard if we see it.
       if (Logging.connectors.isDebugEnabled())
         Logging.connectors.debug("SharePoint: Got an unexpected remote exception getting the acls for site "+site+" library "+docLib,e);
-      throw new LCFException("Unexpected remote procedure exception: "+e.getMessage(), e);
+      throw new ACFException("Unexpected remote procedure exception: "+e.getMessage(), e);
     }
   }
 
@@ -276,11 +276,11 @@ public class SPSProxyHelper {
   * @param site is the encoded subsite path
   * @param file is the encoded file url (not including protocol or server or location, but including encoded subsite, library and folder/file path)
   * @return array of document SIDs
-  * @throws LCFException
+  * @throws ACFException
   * @throws ServiceInterruption
   */
   public String[] getDocumentACLs(String site, String file)
-    throws LCFException, ServiceInterruption
+    throws ACFException, ServiceInterruption
   {
     long currentTime;
     try
@@ -314,18 +314,18 @@ public class SPSProxyHelper {
       doc.processPath(nodeList, "*", null);
       if (nodeList.size() != 1)
       {
-        throw new LCFException("Bad xml - missing outer 'ns1:GetPermissionCollection' node - there are "+Integer.toString(nodeList.size())+" nodes");
+        throw new ACFException("Bad xml - missing outer 'ns1:GetPermissionCollection' node - there are "+Integer.toString(nodeList.size())+" nodes");
       }
       Object parent = nodeList.get(0);
       if (!doc.getNodeName(parent).equals("GetPermissionCollection"))
-        throw new LCFException("Bad xml - outer node is not 'GetPermissionCollection'");
+        throw new ACFException("Bad xml - outer node is not 'GetPermissionCollection'");
 
       nodeList.clear();
       doc.processPath(nodeList, "*", parent);
 
       if ( nodeList.size() != 1 )
       {
-        throw new LCFException( " No results found." );
+        throw new ACFException( " No results found." );
       }
       parent = nodeList.get(0);
       nodeList.clear();
@@ -377,7 +377,7 @@ public class SPSProxyHelper {
     }
     catch (java.net.MalformedURLException e)
     {
-      throw new LCFException("Bad SharePoint url: "+e.getMessage(),e);
+      throw new ACFException("Bad SharePoint url: "+e.getMessage(),e);
     }
     catch (javax.xml.rpc.ServiceException e)
     {
@@ -412,11 +412,11 @@ public class SPSProxyHelper {
             return null;
           }
           else if (httpErrorCode.equals("403"))
-            throw new LCFException("Http error "+httpErrorCode+" while reading from "+baseUrl+site+" - check IIS and SharePoint security settings! "+e.getMessage(),e);
+            throw new ACFException("Http error "+httpErrorCode+" while reading from "+baseUrl+site+" - check IIS and SharePoint security settings! "+e.getMessage(),e);
           else
-            throw new LCFException("Unexpected http error code "+httpErrorCode+" accessing SharePoint at "+baseUrl+site+": "+e.getMessage(),e);
+            throw new ACFException("Unexpected http error code "+httpErrorCode+" accessing SharePoint at "+baseUrl+site+": "+e.getMessage(),e);
         }
-        throw new LCFException("Unknown http error occurred: "+e.getMessage(),e);
+        throw new ACFException("Unknown http error occurred: "+e.getMessage(),e);
       }
       else if (e.getFaultCode().equals(new javax.xml.namespace.QName("http://schemas.xmlsoap.org/soap/envelope/","Server")))
       {
@@ -457,7 +457,7 @@ public class SPSProxyHelper {
       {
         String exceptionName = e.getFaultString();
         if (exceptionName.equals("java.lang.InterruptedException"))
-          throw new LCFException("Interrupted",LCFException.INTERRUPTED);
+          throw new ACFException("Interrupted",ACFException.INTERRUPTED);
       }
 
       if (Logging.connectors.isDebugEnabled())
@@ -471,7 +471,7 @@ public class SPSProxyHelper {
       // So, fail hard if we see it.
       if (Logging.connectors.isDebugEnabled())
         Logging.connectors.debug("SharePoint: Got an unexpected remote exception getting the acls for site "+site+" file "+file,e);
-      throw new LCFException("Unexpected remote procedure exception: "+e.getMessage(), e);
+      throw new ACFException("Unexpected remote procedure exception: "+e.getMessage(), e);
     }
   }
 
@@ -480,11 +480,11 @@ public class SPSProxyHelper {
   * @param site
   * @param docLibrary
   * @return an XML document
-  * @throws LCFException
+  * @throws ACFException
   * @throws ServiceInterruption
   */
   public XMLDoc getDocuments(String site, String docLibrary)
-    throws LCFException, ServiceInterruption
+    throws ACFException, ServiceInterruption
   {
     long currentTime;
     try
@@ -527,27 +527,27 @@ public class SPSProxyHelper {
       doc.processPath(nodeList, "*", null);
       if (nodeList.size() != 1)
       {
-        throw new LCFException("Bad xml - missing outer 'ns1:dsQueryResponse' node - there are "+Integer.toString(nodeList.size())+" nodes");
+        throw new ACFException("Bad xml - missing outer 'ns1:dsQueryResponse' node - there are "+Integer.toString(nodeList.size())+" nodes");
       }
 
       Object parent = nodeList.get(0);
       //System.out.println( "Outer NodeName = " + doc.getNodeName(parent) );
       if (!doc.getNodeName(parent).equals("ns1:dsQueryResponse"))
-        throw new LCFException("Bad xml - outer node is not 'ns1:dsQueryResponse'");
+        throw new ACFException("Bad xml - outer node is not 'ns1:dsQueryResponse'");
 
       nodeList.clear();
       doc.processPath(nodeList, "*", parent);
 
       if ( nodeList.size() != 2 )
       {
-        throw new LCFException( " No results found." );
+        throw new ACFException( " No results found." );
       }
 
       return doc;
     }
     catch (java.net.MalformedURLException e)
     {
-      throw new LCFException("Bad SharePoint url: "+e.getMessage(),e);
+      throw new ACFException("Bad SharePoint url: "+e.getMessage(),e);
     }
     catch (javax.xml.rpc.ServiceException e)
     {
@@ -582,11 +582,11 @@ public class SPSProxyHelper {
             return null;
           }
           else if (httpErrorCode.equals("403"))
-            throw new LCFException("Http error "+httpErrorCode+" while reading from "+baseUrl+site+" - check IIS and SharePoint security settings! "+e.getMessage(),e);
+            throw new ACFException("Http error "+httpErrorCode+" while reading from "+baseUrl+site+" - check IIS and SharePoint security settings! "+e.getMessage(),e);
           else
-            throw new LCFException("Unexpected http error code "+httpErrorCode+" accessing SharePoint at "+baseUrl+site+": "+e.getMessage(),e);
+            throw new ACFException("Unexpected http error code "+httpErrorCode+" accessing SharePoint at "+baseUrl+site+": "+e.getMessage(),e);
         }
-        throw new LCFException("Unknown http error occurred: "+e.getMessage(),e);
+        throw new ACFException("Unknown http error occurred: "+e.getMessage(),e);
       }
       else if (e.getFaultCode().equals(new javax.xml.namespace.QName("http://schemas.xmlsoap.org/soap/envelope/","Server")))
       {
@@ -627,7 +627,7 @@ public class SPSProxyHelper {
       {
         String exceptionName = e.getFaultString();
         if (exceptionName.equals("java.lang.InterruptedException"))
-          throw new LCFException("Interrupted",LCFException.INTERRUPTED);
+          throw new ACFException("Interrupted",ACFException.INTERRUPTED);
       }
 
       if (Logging.connectors.isDebugEnabled())
@@ -641,7 +641,7 @@ public class SPSProxyHelper {
       // So, fail hard if we see it.
       if (Logging.connectors.isDebugEnabled())
         Logging.connectors.debug("SharePoint: Got an unexpected remote exception getting child documents for site "+site+" library "+docLibrary,e);
-      throw new LCFException("Unexpected remote procedure exception: "+e.getMessage(), e);
+      throw new ACFException("Unexpected remote procedure exception: "+e.getMessage(), e);
     }
   }
 
@@ -650,11 +650,11 @@ public class SPSProxyHelper {
   * @param parentSite
   * @param docLibrary
   * @return document library ID
-  * @throws LCFException
+  * @throws ACFException
   * @throws ServiceInterruption
   */
   public String getDocLibID(String parentSite, String parentSiteDecoded, String docLibrary)
-    throws ServiceInterruption, LCFException
+    throws ServiceInterruption, ACFException
   {
     long currentTime;
     try
@@ -683,11 +683,11 @@ public class SPSProxyHelper {
       doc.processPath(nodeList, "*", null);
       if (nodeList.size() != 1)
       {
-        throw new LCFException("Bad xml - missing outer 'ns1:Lists' node - there are "+Integer.toString(nodeList.size())+" nodes");
+        throw new ACFException("Bad xml - missing outer 'ns1:Lists' node - there are "+Integer.toString(nodeList.size())+" nodes");
       }
       Object parent = nodeList.get(0);
       if (!doc.getNodeName(parent).equals("ns1:Lists"))
-        throw new LCFException("Bad xml - outer node is not 'ns1:Lists'");
+        throw new ACFException("Bad xml - outer node is not 'ns1:Lists'");
 
       nodeList.clear();
       doc.processPath(nodeList, "*", parent);  // <ns1:Lists>
@@ -711,14 +711,14 @@ public class SPSProxyHelper {
           if (urlPath != null && urlPath.length() > 0)
           {
             if (urlPath.length() < chuckIndex)
-              throw new LCFException("View url is not in the expected form: '"+urlPath+"'");
+              throw new ACFException("View url is not in the expected form: '"+urlPath+"'");
             urlPath = urlPath.substring(chuckIndex);
             if (!urlPath.startsWith("/"))
-              throw new LCFException("View url without site is not in the expected form: '"+urlPath+"'");
+              throw new ACFException("View url without site is not in the expected form: '"+urlPath+"'");
             // We're at the library name.  Figure out where the end of it is.
             int index = urlPath.indexOf("/",1);
             if (index == -1)
-              throw new LCFException("Bad view url without site: '"+urlPath+"'");
+              throw new ACFException("Bad view url without site: '"+urlPath+"'");
             String pathpart = urlPath.substring(1,index);
 
             if ( pathpart.equals(docLibrary) )
@@ -736,7 +736,7 @@ public class SPSProxyHelper {
     }
     catch (java.net.MalformedURLException e)
     {
-      throw new LCFException("Bad SharePoint url: "+e.getMessage(),e);
+      throw new ACFException("Bad SharePoint url: "+e.getMessage(),e);
     }
     catch (javax.xml.rpc.ServiceException e)
     {
@@ -771,11 +771,11 @@ public class SPSProxyHelper {
             return null;
           }
           else if (httpErrorCode.equals("403"))
-            throw new LCFException("Http error "+httpErrorCode+" while reading from "+baseUrl+parentSite+" - check IIS and SharePoint security settings! "+e.getMessage(),e);
+            throw new ACFException("Http error "+httpErrorCode+" while reading from "+baseUrl+parentSite+" - check IIS and SharePoint security settings! "+e.getMessage(),e);
           else
-            throw new LCFException("Unexpected http error code "+httpErrorCode+" accessing SharePoint at "+baseUrl+parentSite+": "+e.getMessage(),e);
+            throw new ACFException("Unexpected http error code "+httpErrorCode+" accessing SharePoint at "+baseUrl+parentSite+": "+e.getMessage(),e);
         }
-        throw new LCFException("Unknown http error occurred: "+e.getMessage(),e);
+        throw new ACFException("Unknown http error occurred: "+e.getMessage(),e);
       }
       else if (e.getFaultCode().equals(new javax.xml.namespace.QName("http://schemas.xmlsoap.org/soap/envelope/","Server")))
       {
@@ -816,7 +816,7 @@ public class SPSProxyHelper {
       {
         String exceptionName = e.getFaultString();
         if (exceptionName.equals("java.lang.InterruptedException"))
-          throw new LCFException("Interrupted",LCFException.INTERRUPTED);
+          throw new ACFException("Interrupted",ACFException.INTERRUPTED);
       }
 
       if (Logging.connectors.isDebugEnabled())
@@ -830,7 +830,7 @@ public class SPSProxyHelper {
       // So, fail hard if we see it.
       if (Logging.connectors.isDebugEnabled())
         Logging.connectors.debug("SharePoint: Got an unexpected remote exception getting library ID for site "+parentSite+" library "+docLibrary,e);
-      throw new LCFException("Unexpected remote procedure exception: "+e.getMessage(), e);
+      throw new ACFException("Unexpected remote procedure exception: "+e.getMessage(), e);
     }
   }
 
@@ -839,11 +839,11 @@ public class SPSProxyHelper {
   * @param site
   * @param docPath
   * @return an XML document
-  * @throws LCFException
+  * @throws ACFException
   * @throws ServiceInterruption
   */
   public XMLDoc getVersions( String site, String docPath)
-    throws ServiceInterruption, LCFException
+    throws ServiceInterruption, ACFException
   {
     long currentTime;
     try
@@ -863,18 +863,18 @@ public class SPSProxyHelper {
 
       if (nodeList.size() != 1)
       {
-        throw new LCFException("Bad xml - missing outer 'results' node - there are "+Integer.toString(nodeList.size())+" nodes");
+        throw new ACFException("Bad xml - missing outer 'results' node - there are "+Integer.toString(nodeList.size())+" nodes");
       }
 
       Object parent = nodeList.get(0);
       if (!doc.getNodeName(parent).equals("results"))
-        throw new LCFException("Bad xml - outer node is not 'results'");
+        throw new ACFException("Bad xml - outer node is not 'results'");
 
       return doc;
     }
     catch (java.net.MalformedURLException e)
     {
-      throw new LCFException("Bad SharePoint url: "+e.getMessage(),e);
+      throw new ACFException("Bad SharePoint url: "+e.getMessage(),e);
     }
     catch (javax.xml.rpc.ServiceException e)
     {
@@ -909,11 +909,11 @@ public class SPSProxyHelper {
             return null;
           }
           else if (httpErrorCode.equals("403"))
-            throw new LCFException("Http error "+httpErrorCode+" while reading from "+baseUrl+site+" - check IIS and SharePoint security settings! "+e.getMessage(),e);
+            throw new ACFException("Http error "+httpErrorCode+" while reading from "+baseUrl+site+" - check IIS and SharePoint security settings! "+e.getMessage(),e);
           else
-            throw new LCFException("Unexpected http error code "+httpErrorCode+" accessing SharePoint at "+baseUrl+site+": "+e.getMessage(),e);
+            throw new ACFException("Unexpected http error code "+httpErrorCode+" accessing SharePoint at "+baseUrl+site+": "+e.getMessage(),e);
         }
-        throw new LCFException("Unknown http error occurred: "+e.getMessage(),e);
+        throw new ACFException("Unknown http error occurred: "+e.getMessage(),e);
       }
       else if (e.getFaultCode().equals(new javax.xml.namespace.QName("http://schemas.xmlsoap.org/soap/envelope/","Server")))
       {
@@ -954,7 +954,7 @@ public class SPSProxyHelper {
       {
         String exceptionName = e.getFaultString();
         if (exceptionName.equals("java.lang.InterruptedException"))
-          throw new LCFException("Interrupted",LCFException.INTERRUPTED);
+          throw new ACFException("Interrupted",ACFException.INTERRUPTED);
       }
 
       if (Logging.connectors.isDebugEnabled())
@@ -968,7 +968,7 @@ public class SPSProxyHelper {
       // So, fail hard if we see it.
       if (Logging.connectors.isDebugEnabled())
         Logging.connectors.debug("SharePoint: Got an unexpected remote exception getting versions for site "+site+" docpath "+docPath,e);
-      throw new LCFException("Unexpected remote procedure exception: "+e.getMessage(), e);
+      throw new ACFException("Unexpected remote procedure exception: "+e.getMessage(), e);
     }
   }
 
@@ -980,7 +980,7 @@ public class SPSProxyHelper {
   * @throws Exception
   */
   private String getSidForUser(com.microsoft.schemas.sharepoint.soap.directory.UserGroupSoap userCall, String userLogin )
-  throws LCFException, java.net.MalformedURLException, javax.xml.rpc.ServiceException,
+  throws ACFException, java.net.MalformedURLException, javax.xml.rpc.ServiceException,
     java.rmi.RemoteException
   {
     com.microsoft.schemas.sharepoint.soap.directory.GetUserInfoResponseGetUserInfoResult userResp = userCall.getUserInfo( userLogin );
@@ -992,18 +992,18 @@ public class SPSProxyHelper {
     doc.processPath(nodeList, "*", null);
     if (nodeList.size() != 1)
     {
-      throw new LCFException("Bad xml - missing outer 'ns1:GetUserInfo' node - there are "+Integer.toString(nodeList.size())+" nodes");
+      throw new ACFException("Bad xml - missing outer 'ns1:GetUserInfo' node - there are "+Integer.toString(nodeList.size())+" nodes");
     }
     Object parent = nodeList.get(0);
     if (!doc.getNodeName(parent).equals("ns1:GetUserInfo"))
-      throw new LCFException("Bad xml - outer node is not 'ns1:GetUserInfo'");
+      throw new ACFException("Bad xml - outer node is not 'ns1:GetUserInfo'");
 
     nodeList.clear();
     doc.processPath(nodeList, "*", parent);  // ns1:User
 
     if ( nodeList.size() != 1 )
     {
-      throw new LCFException( " No User found." );
+      throw new ACFException( " No User found." );
     }
     parent = nodeList.get(0);
     nodeList.clear();
@@ -1019,7 +1019,7 @@ public class SPSProxyHelper {
   * @throws Exception
   */
   private String[] getSidsForGroup(com.microsoft.schemas.sharepoint.soap.directory.UserGroupSoap userCall, String groupName)
-    throws LCFException, java.net.MalformedURLException, javax.xml.rpc.ServiceException, java.rmi.RemoteException
+    throws ACFException, java.net.MalformedURLException, javax.xml.rpc.ServiceException, java.rmi.RemoteException
   {
     com.microsoft.schemas.sharepoint.soap.directory.GetUserCollectionFromGroupResponseGetUserCollectionFromGroupResult roleResp = userCall.getUserCollectionFromGroup(groupName);
     org.apache.axis.message.MessageElement[] roleList = roleResp.get_any();
@@ -1030,19 +1030,19 @@ public class SPSProxyHelper {
     doc.processPath(nodeList, "*", null);
     if (nodeList.size() != 1)
     {
-      throw new LCFException("Bad xml - missing outer 'ns1:GetUserCollectionFromGroup' node - there are "
+      throw new ACFException("Bad xml - missing outer 'ns1:GetUserCollectionFromGroup' node - there are "
       + Integer.toString(nodeList.size()) + " nodes");
     }
     Object parent = nodeList.get(0);
     if (!doc.getNodeName(parent).equals("ns1:GetUserCollectionFromGroup"))
-      throw new LCFException("Bad xml - outer node is not 'ns1:GetUserCollectionFromGroup'");
+      throw new ACFException("Bad xml - outer node is not 'ns1:GetUserCollectionFromGroup'");
 
     nodeList.clear();
     doc.processPath(nodeList, "*", parent); // <ns1:Users>
 
     if (nodeList.size() != 1)
     {
-      throw new LCFException(" No Users collection found.");
+      throw new ACFException(" No Users collection found.");
     }
     parent = nodeList.get(0);
     nodeList.clear();
@@ -1068,7 +1068,7 @@ public class SPSProxyHelper {
   * @throws Exception
   */
   private String[] getSidsForRole( com.microsoft.schemas.sharepoint.soap.directory.UserGroupSoap userCall, String roleName )
-  throws LCFException, java.net.MalformedURLException, javax.xml.rpc.ServiceException,
+  throws ACFException, java.net.MalformedURLException, javax.xml.rpc.ServiceException,
     java.rmi.RemoteException
   {
 
@@ -1081,18 +1081,18 @@ public class SPSProxyHelper {
     doc.processPath(nodeList, "*", null);
     if (nodeList.size() != 1)
     {
-      throw new LCFException("Bad xml - missing outer 'ns1:GetUserCollectionFromRole' node - there are "+Integer.toString(nodeList.size())+" nodes");
+      throw new ACFException("Bad xml - missing outer 'ns1:GetUserCollectionFromRole' node - there are "+Integer.toString(nodeList.size())+" nodes");
     }
     Object parent = nodeList.get(0);
     if (!doc.getNodeName(parent).equals("ns1:GetUserCollectionFromRole"))
-      throw new LCFException("Bad xml - outer node is not 'ns1:GetUserCollectionFromRole'");
+      throw new ACFException("Bad xml - outer node is not 'ns1:GetUserCollectionFromRole'");
 
     nodeList.clear();
     doc.processPath(nodeList, "*", parent);  // <ns1:Users>
 
     if ( nodeList.size() != 1 )
     {
-      throw new LCFException( " No Users collection found." );
+      throw new ACFException( " No Users collection found." );
     }
     parent = nodeList.get(0);
     nodeList.clear();
@@ -1118,7 +1118,7 @@ public class SPSProxyHelper {
   * @throws java.rmi.RemoteException
   */
   public boolean checkConnection( String site, boolean sps30 )
-    throws LCFException, ServiceInterruption
+    throws ACFException, ServiceInterruption
   {
     long currentTime;
     try
@@ -1151,7 +1151,7 @@ public class SPSProxyHelper {
     }
     catch (java.net.MalformedURLException e)
     {
-      throw new LCFException("Bad SharePoint url: "+e.getMessage(),e);
+      throw new ACFException("Bad SharePoint url: "+e.getMessage(),e);
     }
     catch (javax.xml.rpc.ServiceException e)
     {
@@ -1173,18 +1173,18 @@ public class SPSProxyHelper {
           if (httpErrorCode.equals("404"))
           {
             // Page did not exist
-            throw new LCFException("The site at "+baseUrl+site+" did not exist");
+            throw new ACFException("The site at "+baseUrl+site+" did not exist");
           }
           else if (httpErrorCode.equals("401"))
-            throw new LCFException("Crawl user did not authenticate properly, or has insufficient permissions to access "+baseUrl+site+": "+e.getMessage(),e);
+            throw new ACFException("Crawl user did not authenticate properly, or has insufficient permissions to access "+baseUrl+site+": "+e.getMessage(),e);
           else if (httpErrorCode.equals("403"))
-            throw new LCFException("Http error "+httpErrorCode+" while reading from "+baseUrl+site+" - check IIS and SharePoint security settings! "+e.getMessage(),e);
+            throw new ACFException("Http error "+httpErrorCode+" while reading from "+baseUrl+site+" - check IIS and SharePoint security settings! "+e.getMessage(),e);
 	  else if (httpErrorCode.equals("302"))
-	    throw new LCFException("LCF's MCPermissions web service may not be installed on the target SharePoint server.  MCPermissions service is needed for SharePoint repositories version 3.0 or higher, to allow access to security information for files and folders.  Consult your system administrator.");
+	    throw new ACFException("ACF's MCPermissions web service may not be installed on the target SharePoint server.  MCPermissions service is needed for SharePoint repositories version 3.0 or higher, to allow access to security information for files and folders.  Consult your system administrator.");
           else
-            throw new LCFException("Unexpected http error code "+httpErrorCode+" accessing SharePoint at "+baseUrl+site+": "+e.getMessage(),e);
+            throw new ACFException("Unexpected http error code "+httpErrorCode+" accessing SharePoint at "+baseUrl+site+": "+e.getMessage(),e);
         }
-        throw new LCFException("Unknown http error occurred: "+e.getMessage(),e);
+        throw new ACFException("Unknown http error occurred: "+e.getMessage(),e);
       }
       else if (e.getFaultCode().equals(new javax.xml.namespace.QName("http://schemas.xmlsoap.org/soap/envelope/","Server")))
       {
@@ -1198,25 +1198,25 @@ public class SPSProxyHelper {
           if (elem != null)
             errorString = elem2.getFirstChild().getNodeValue().trim();
 
-          throw new LCFException("Accessing site "+site+" failed with unexpected SharePoint error code "+sharepointErrorCode+": "+errorString,e);
+          throw new ACFException("Accessing site "+site+" failed with unexpected SharePoint error code "+sharepointErrorCode+": "+errorString,e);
         }
-        throw new LCFException("Unknown SharePoint server error accessing site "+site+" - axis fault = "+e.getFaultCode().getLocalPart()+", detail = "+e.getFaultString(),e);
+        throw new ACFException("Unknown SharePoint server error accessing site "+site+" - axis fault = "+e.getFaultCode().getLocalPart()+", detail = "+e.getFaultString(),e);
       }
 
       if (e.getFaultCode().equals(new javax.xml.namespace.QName("http://schemas.xmlsoap.org/soap/envelope/","Server.userException")))
       {
         String exceptionName = e.getFaultString();
         if (exceptionName.equals("java.lang.InterruptedException"))
-          throw new LCFException("Interrupted",LCFException.INTERRUPTED);
+          throw new ACFException("Interrupted",ACFException.INTERRUPTED);
       }
 
-      throw new LCFException("Got an unknown remote exception accessing site "+site+" - axis fault = "+e.getFaultCode().getLocalPart()+", detail = "+e.getFaultString(),e);
+      throw new ACFException("Got an unknown remote exception accessing site "+site+" - axis fault = "+e.getFaultCode().getLocalPart()+", detail = "+e.getFaultString(),e);
     }
     catch (java.rmi.RemoteException e)
     {
       // We expect the axis exception to be thrown, not this generic one!
       // So, fail hard if we see it.
-      throw new LCFException("Got an unexpected remote exception accessing site "+site+": "+e.getMessage(),e);
+      throw new ACFException("Got an unexpected remote exception accessing site "+site+": "+e.getMessage(),e);
     }
   }
 
@@ -1227,7 +1227,7 @@ public class SPSProxyHelper {
   * @return list of the fields
   */
   public Map getFieldList( String site, String docLibrary )
-    throws LCFException, ServiceInterruption
+    throws ACFException, ServiceInterruption
   {
     long currentTime;
     try
@@ -1252,19 +1252,19 @@ public class SPSProxyHelper {
       doc.processPath(nodeList, "*", null);
       if (nodeList.size() != 1)
       {
-        throw new LCFException("Bad xml - missing outer node - there are "+Integer.toString(nodeList.size())+" nodes");
+        throw new ACFException("Bad xml - missing outer node - there are "+Integer.toString(nodeList.size())+" nodes");
       }
 
       Object parent = nodeList.get(0);
       if (!doc.getNodeName(parent).equals("ns1:List"))
-        throw new LCFException("Bad xml - outer node is '" + doc.getNodeName(parent) + "' not 'ns1:List'");
+        throw new ACFException("Bad xml - outer node is '" + doc.getNodeName(parent) + "' not 'ns1:List'");
 
       nodeList.clear();
       doc.processPath(nodeList, "*", parent);  // <ns1:Fields>
 
       Object fields = nodeList.get(0);
       if ( !doc.getNodeName(fields).equals("ns1:Fields") )
-        throw new LCFException( "Bad xml - child node 0 '" + doc.getNodeName(fields) + "' is not 'ns1:Fields'");
+        throw new ACFException( "Bad xml - child node 0 '" + doc.getNodeName(fields) + "' is not 'ns1:Fields'");
 
       nodeList.clear();
       doc.processPath(nodeList, "*", fields);
@@ -1291,7 +1291,7 @@ public class SPSProxyHelper {
     }
     catch (java.net.MalformedURLException e)
     {
-      throw new LCFException("Bad SharePoint url: "+e.getMessage(),e);
+      throw new ACFException("Bad SharePoint url: "+e.getMessage(),e);
     }
     catch (javax.xml.rpc.ServiceException e)
     {
@@ -1313,23 +1313,23 @@ public class SPSProxyHelper {
           if (httpErrorCode.equals("404"))
             return null;
           else if (httpErrorCode.equals("403"))
-            throw new LCFException("Remote procedure exception: "+e.getMessage(),e);
+            throw new ACFException("Remote procedure exception: "+e.getMessage(),e);
           else if (httpErrorCode.equals("401"))
           {
             if (Logging.connectors.isDebugEnabled())
               Logging.connectors.debug("SharePoint: Crawl user does not have sufficient privileges to get field list for site "+site+" library "+docLibrary+" - skipping",e);
             return null;
           }
-          throw new LCFException("Unexpected http error code "+httpErrorCode+" accessing SharePoint at "+baseUrl+site+": "+e.getMessage(),e);
+          throw new ACFException("Unexpected http error code "+httpErrorCode+" accessing SharePoint at "+baseUrl+site+": "+e.getMessage(),e);
         }
-        throw new LCFException("Unknown http error occurred: "+e.getMessage(),e);
+        throw new ACFException("Unknown http error occurred: "+e.getMessage(),e);
       }
 
       if (e.getFaultCode().equals(new javax.xml.namespace.QName("http://schemas.xmlsoap.org/soap/envelope/","Server.userException")))
       {
         String exceptionName = e.getFaultString();
         if (exceptionName.equals("java.lang.InterruptedException"))
-          throw new LCFException("Interrupted",LCFException.INTERRUPTED);
+          throw new ACFException("Interrupted",ACFException.INTERRUPTED);
       }
 
       // I don't know if this is what you get when the library is missing, but here's hoping.
@@ -1344,7 +1344,7 @@ public class SPSProxyHelper {
     }
     catch (java.rmi.RemoteException e)
     {
-      throw new LCFException("Unexpected remote exception occurred: "+e.getMessage(),e);
+      throw new ACFException("Unexpected remote exception occurred: "+e.getMessage(),e);
     }
   }
 
@@ -1356,7 +1356,7 @@ public class SPSProxyHelper {
   * @return set of the field values
   */
   public Map getFieldValues( ArrayList fieldNames, String site, String docLibrary, String docId )
-    throws LCFException, ServiceInterruption
+    throws ACFException, ServiceInterruption
   {
     long currentTime;
     try
@@ -1445,13 +1445,13 @@ public class SPSProxyHelper {
       doc.processPath(nodeList, "*", null);
       if (nodeList.size() != 1)
       {
-        throw new LCFException("Bad xml - missing outer 'ns1:dsQueryResponse' node - there are "+Integer.toString(nodeList.size())+" nodes");
+        throw new ACFException("Bad xml - missing outer 'ns1:dsQueryResponse' node - there are "+Integer.toString(nodeList.size())+" nodes");
       }
 
       Object parent = nodeList.get(0);
       //System.out.println( "Outer NodeName = " + doc.getNodeName(parent) );
       if (!doc.getNodeName(parent).equals("ns1:dsQueryResponse"))
-        throw new LCFException("Bad xml - outer node is not 'ns1:dsQueryResponse'");
+        throw new ACFException("Bad xml - outer node is not 'ns1:dsQueryResponse'");
 
       nodeList.clear();
       doc.processPath(nodeList, "*", parent);
@@ -1485,11 +1485,11 @@ public class SPSProxyHelper {
     }
     catch (javax.xml.soap.SOAPException e)
     {
-      throw new LCFException("Soap exception: "+e.getMessage(),e);
+      throw new ACFException("Soap exception: "+e.getMessage(),e);
     }
     catch (java.net.MalformedURLException e)
     {
-      throw new LCFException("Bad SharePoint url: "+e.getMessage(),e);
+      throw new ACFException("Bad SharePoint url: "+e.getMessage(),e);
     }
     catch (javax.xml.rpc.ServiceException e)
     {
@@ -1511,23 +1511,23 @@ public class SPSProxyHelper {
           if (httpErrorCode.equals("404"))
             return null;
           else if (httpErrorCode.equals("403"))
-            throw new LCFException("Remote procedure exception: "+e.getMessage(),e);
+            throw new ACFException("Remote procedure exception: "+e.getMessage(),e);
           else if (httpErrorCode.equals("401"))
           {
             if (Logging.connectors.isDebugEnabled())
               Logging.connectors.debug("SharePoint: Crawl user does not have sufficient privileges to get field values for site "+site+" library "+docLibrary+" - skipping",e);
             return null;
           }
-          throw new LCFException("Unexpected http error code "+httpErrorCode+" accessing SharePoint at "+baseUrl+site+": "+e.getMessage(),e);
+          throw new ACFException("Unexpected http error code "+httpErrorCode+" accessing SharePoint at "+baseUrl+site+": "+e.getMessage(),e);
         }
-        throw new LCFException("Unknown http error occurred: "+e.getMessage(),e);
+        throw new ACFException("Unknown http error occurred: "+e.getMessage(),e);
       }
 
       if (e.getFaultCode().equals(new javax.xml.namespace.QName("http://schemas.xmlsoap.org/soap/envelope/","Server.userException")))
       {
         String exceptionName = e.getFaultString();
         if (exceptionName.equals("java.lang.InterruptedException"))
-          throw new LCFException("Interrupted",LCFException.INTERRUPTED);
+          throw new ACFException("Interrupted",ACFException.INTERRUPTED);
       }
 
       // I don't know if this is what you get when the library is missing, but here's hoping.
@@ -1542,7 +1542,7 @@ public class SPSProxyHelper {
     }
     catch (java.rmi.RemoteException e)
     {
-      throw new LCFException("Unexpected remote exception occurred: "+e.getMessage(),e);
+      throw new ACFException("Unexpected remote exception occurred: "+e.getMessage(),e);
     }
   }
 
@@ -1552,7 +1552,7 @@ public class SPSProxyHelper {
   * @return lists of sites as an arraylist of NameValue objects
   */
   public ArrayList getSites( String parentSite )
-    throws LCFException, ServiceInterruption
+    throws ACFException, ServiceInterruption
   {
     long currentTime;
     try
@@ -1572,11 +1572,11 @@ public class SPSProxyHelper {
       doc.processPath(nodeList, "*", null);
       if (nodeList.size() != 1)
       {
-        throw new LCFException("Bad xml - missing outer 'ns1:Webs' node - there are "+Integer.toString(nodeList.size())+" nodes");
+        throw new ACFException("Bad xml - missing outer 'ns1:Webs' node - there are "+Integer.toString(nodeList.size())+" nodes");
       }
       Object parent = nodeList.get(0);
       if (!doc.getNodeName(parent).equals("ns1:Webs"))
-        throw new LCFException("Bad xml - outer node is not 'ns1:Webs'");
+        throw new ACFException("Bad xml - outer node is not 'ns1:Webs'");
 
       nodeList.clear();
       doc.processPath(nodeList, "*", parent);  // <ns1:Webs>
@@ -1616,7 +1616,7 @@ public class SPSProxyHelper {
     }
     catch (java.net.MalformedURLException e)
     {
-      throw new LCFException("Bad SharePoint url: "+e.getMessage(),e);
+      throw new ACFException("Bad SharePoint url: "+e.getMessage(),e);
     }
     catch (javax.xml.rpc.ServiceException e)
     {
@@ -1638,23 +1638,23 @@ public class SPSProxyHelper {
           if (httpErrorCode.equals("404"))
             return null;
           else if (httpErrorCode.equals("403"))
-            throw new LCFException("Remote procedure exception: "+e.getMessage(),e);
+            throw new ACFException("Remote procedure exception: "+e.getMessage(),e);
           else if (httpErrorCode.equals("401"))
           {
             if (Logging.connectors.isDebugEnabled())
               Logging.connectors.debug("SharePoint: Crawl user does not have sufficient privileges to get subsites of site "+parentSite+" - skipping",e);
             return null;
           }
-          throw new LCFException("Unexpected http error code "+httpErrorCode+" accessing SharePoint at "+baseUrl+parentSite+": "+e.getMessage(),e);
+          throw new ACFException("Unexpected http error code "+httpErrorCode+" accessing SharePoint at "+baseUrl+parentSite+": "+e.getMessage(),e);
         }
-        throw new LCFException("Unknown http error occurred: "+e.getMessage(),e);
+        throw new ACFException("Unknown http error occurred: "+e.getMessage(),e);
       }
 
       if (e.getFaultCode().equals(new javax.xml.namespace.QName("http://schemas.xmlsoap.org/soap/envelope/","Server.userException")))
       {
         String exceptionName = e.getFaultString();
         if (exceptionName.equals("java.lang.InterruptedException"))
-          throw new LCFException("Interrupted",LCFException.INTERRUPTED);
+          throw new ACFException("Interrupted",ACFException.INTERRUPTED);
       }
 
       if (Logging.connectors.isDebugEnabled())
@@ -1665,7 +1665,7 @@ public class SPSProxyHelper {
     }
     catch (java.rmi.RemoteException e)
     {
-      throw new LCFException("Unexpected remote exception occurred: "+e.getMessage(),e);
+      throw new ACFException("Unexpected remote exception occurred: "+e.getMessage(),e);
     }
 
   }
@@ -1676,7 +1676,7 @@ public class SPSProxyHelper {
   * @return lists of NameValue objects, representing document libraries
   */
   public ArrayList getDocumentLibraries( String parentSite, String parentSiteDecoded )
-    throws LCFException, ServiceInterruption
+    throws ACFException, ServiceInterruption
   {
     long currentTime;
     try
@@ -1705,11 +1705,11 @@ public class SPSProxyHelper {
       doc.processPath(nodeList, "*", null);
       if (nodeList.size() != 1)
       {
-        throw new LCFException("Bad xml - missing outer 'ns1:Lists' node - there are "+Integer.toString(nodeList.size())+" nodes");
+        throw new ACFException("Bad xml - missing outer 'ns1:Lists' node - there are "+Integer.toString(nodeList.size())+" nodes");
       }
       Object parent = nodeList.get(0);
       if (!doc.getNodeName(parent).equals("ns1:Lists"))
-        throw new LCFException("Bad xml - outer node is not 'ns1:Lists'");
+        throw new ACFException("Bad xml - outer node is not 'ns1:Lists'");
 
       nodeList.clear();
       doc.processPath(nodeList, "*", parent);  // <ns1:Lists>
@@ -1739,14 +1739,14 @@ public class SPSProxyHelper {
           if (urlPath != null && urlPath.length() > 0)
           {
             if (urlPath.length() < chuckIndex)
-              throw new LCFException("View url is not in the expected form: '"+urlPath+"'");
+              throw new ACFException("View url is not in the expected form: '"+urlPath+"'");
             urlPath = urlPath.substring(chuckIndex);
             if (!urlPath.startsWith("/"))
-              throw new LCFException("View url without site is not in the expected form: '"+urlPath+"'");
+              throw new ACFException("View url without site is not in the expected form: '"+urlPath+"'");
             // We're at the library name.  Figure out where the end of it is.
             int index = urlPath.indexOf("/",1);
             if (index == -1)
-              throw new LCFException("Bad view url without site: '"+urlPath+"'");
+              throw new ACFException("Bad view url without site: '"+urlPath+"'");
             String pathpart = urlPath.substring(1,index);
 
             if ( pathpart.length() != 0 && !pathpart.equals("_catalogs"))
@@ -1763,7 +1763,7 @@ public class SPSProxyHelper {
     }
     catch (java.net.MalformedURLException e)
     {
-      throw new LCFException("Bad SharePoint url: "+e.getMessage(),e);
+      throw new ACFException("Bad SharePoint url: "+e.getMessage(),e);
     }
     catch (javax.xml.rpc.ServiceException e)
     {
@@ -1785,22 +1785,22 @@ public class SPSProxyHelper {
           if (httpErrorCode.equals("404"))
             return null;
           else if (httpErrorCode.equals("403"))
-            throw new LCFException("Remote procedure exception: "+e.getMessage(),e);
+            throw new ACFException("Remote procedure exception: "+e.getMessage(),e);
           else if (httpErrorCode.equals("401"))
           {
             if (Logging.connectors.isDebugEnabled())
               Logging.connectors.debug("SharePoint: Crawl user does not have sufficient privileges to read document libraries for site "+parentSite+" - skipping",e);
             return null;
           }
-          throw new LCFException("Unexpected http error code "+httpErrorCode+" accessing SharePoint at "+baseUrl+parentSite+": "+e.getMessage(),e);
+          throw new ACFException("Unexpected http error code "+httpErrorCode+" accessing SharePoint at "+baseUrl+parentSite+": "+e.getMessage(),e);
         }
-        throw new LCFException("Unknown http error occurred: "+e.getMessage(),e);
+        throw new ACFException("Unknown http error occurred: "+e.getMessage(),e);
       }
       if (e.getFaultCode().equals(new javax.xml.namespace.QName("http://schemas.xmlsoap.org/soap/envelope/","Server.userException")))
       {
         String exceptionName = e.getFaultString();
         if (exceptionName.equals("java.lang.InterruptedException"))
-          throw new LCFException("Interrupted",LCFException.INTERRUPTED);
+          throw new ACFException("Interrupted",ACFException.INTERRUPTED);
       }
       if (Logging.connectors.isDebugEnabled())
         Logging.connectors.debug("SharePoint: Got a remote exception reading document libraries for site "+parentSite+" - retrying",e);
@@ -1810,7 +1810,7 @@ public class SPSProxyHelper {
     }
     catch (java.rmi.RemoteException e)
     {
-      throw new LCFException("Unexpected remote exception occurred: "+e.getMessage(),e);
+      throw new ACFException("Unexpected remote exception occurred: "+e.getMessage(),e);
     }
   }
 

Modified: incubator/lcf/trunk/modules/connectors/sharepoint/connector/org/apache/acf/crawler/connectors/sharepoint/SharePointRepository.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/connectors/sharepoint/connector/org/apache/acf/crawler/connectors/sharepoint/SharePointRepository.java?rev=988237&r1=988236&r2=988237&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/connectors/sharepoint/connector/org/apache/acf/crawler/connectors/sharepoint/SharePointRepository.java (original)
+++ incubator/lcf/trunk/modules/connectors/sharepoint/connector/org/apache/acf/crawler/connectors/sharepoint/SharePointRepository.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;
 import org.apache.acf.core.common.*;
 
 import java.io.*;
@@ -108,7 +108,7 @@ public class SharePointRepository extend
 
   /** Set up a session */
   protected void getSession()
-    throws LCFException
+    throws ACFException
   {
     if (proxy == null)
     {
@@ -135,7 +135,7 @@ public class SharePointRepository extend
       }
       catch (NumberFormatException e)
       {
-        throw new LCFException(e.getMessage(),e);
+        throw new ACFException(e.getMessage(),e);
       }
       serverLocation = params.getParameter("serverLocation");
       if (serverLocation == null)
@@ -156,7 +156,7 @@ public class SharePointRepository extend
         ntlmDomain = userName.substring(0,index);
       }
       else
-        throw new LCFException("Invalid user name - need <domain>\\<name>");
+        throw new ACFException("Invalid user name - need <domain>\\<name>");
 
       serverUrl = serverProtocol + "://" + serverName;
       if (serverProtocol.equals("https"))
@@ -187,9 +187,9 @@ public class SharePointRepository extend
 
       fileBaseUrl = serverUrl + encodedServerLocation;
 
-      File sharepointWSDDLocation = LCF.getFileProperty(wsddPathProperty);
+      File sharepointWSDDLocation = ACF.getFileProperty(wsddPathProperty);
       if (sharepointWSDDLocation == null)
-        throw new LCFException("SharePoint wsdd location path (property "+wsddPathProperty+") must be specified!");
+        throw new ACFException("SharePoint wsdd location path (property "+wsddPathProperty+") must be specified!");
 
       proxy = new SPSProxyHelper( serverUrl, encodedServerLocation, serverLocation, userName, password, myFactory, sharepointWSDDLocation.toString(),
         connectionManager );
@@ -230,7 +230,7 @@ public class SharePointRepository extend
   /** Close the connection.  Call this before discarding the repository connector.
   */
   public void disconnect()
-    throws LCFException
+    throws ACFException
   {
     serverUrl = null;
     fileBaseUrl = null;
@@ -283,7 +283,7 @@ public class SharePointRepository extend
   *@return the connection's status as a displayable string.
   */
   public String check()
-    throws LCFException
+    throws ACFException
   {
     getSession();
     try
@@ -303,7 +303,7 @@ public class SharePointRepository extend
     {
       return "SharePoint temporarily unavailable: "+e.getMessage();
     }
-    catch (LCFException e)
+    catch (ACFException e)
     {
       return e.getMessage();
     }
@@ -315,7 +315,7 @@ public class SharePointRepository extend
   * in active use.
   */
   public void poll()
-    throws LCFException
+    throws ACFException
   {
     if (connectionManager != null)
       connectionManager.closeIdleConnections(60000L);
@@ -330,16 +330,16 @@ public class SharePointRepository extend
   *@param input is the request object.
   */
   public void executeCommand(Configuration output, String command, Configuration input)
-    throws LCFException
+    throws ACFException
   {
     if (command.equals("field/list"))
     {
-      String sitePath = LCF.getRootArgument(input,"site_path");
+      String sitePath = ACF.getRootArgument(input,"site_path");
       if (sitePath == null)
-        throw new LCFException("Missing required argument 'site_path'");
-      String library = LCF.getRootArgument(input,"library");
+        throw new ACFException("Missing required argument 'site_path'");
+      String library = ACF.getRootArgument(input,"library");
       if (library == null)
-        throw new LCFException("Missing required argument 'library'");
+        throw new ACFException("Missing required argument 'library'");
       
       try
       {
@@ -362,18 +362,18 @@ public class SharePointRepository extend
       }
       catch (ServiceInterruption e)
       {
-        LCF.createServiceInterruptionNode(output,e);
+        ACF.createServiceInterruptionNode(output,e);
       }
-      catch (LCFException e)
+      catch (ACFException e)
       {
-        LCF.createErrorNode(output,e);
+        ACF.createErrorNode(output,e);
       }
     }
     else if (command.equals("site/list"))
     {
-      String sitePath = LCF.getRootArgument(input,"site_path");
+      String sitePath = ACF.getRootArgument(input,"site_path");
       if (sitePath == null)
-        throw new LCFException("Missing required argument 'site_path'");
+        throw new ACFException("Missing required argument 'site_path'");
 
       try
       {
@@ -389,18 +389,18 @@ public class SharePointRepository extend
       }
       catch (ServiceInterruption e)
       {
-        LCF.createServiceInterruptionNode(output,e);
+        ACF.createServiceInterruptionNode(output,e);
       }
-      catch (LCFException e)
+      catch (ACFException e)
       {
-        LCF.createErrorNode(output,e);
+        ACF.createErrorNode(output,e);
       }
     }
     else if (command.equals("library/list"))
     {
-      String sitePath = LCF.getRootArgument(input,"site_path");
+      String sitePath = ACF.getRootArgument(input,"site_path");
       if (sitePath == null)
-        throw new LCFException("Missing required argument 'site_path'");
+        throw new ACFException("Missing required argument 'site_path'");
 
       try
       {
@@ -416,11 +416,11 @@ public class SharePointRepository extend
       }
       catch (ServiceInterruption e)
       {
-        LCF.createServiceInterruptionNode(output,e);
+        ACF.createServiceInterruptionNode(output,e);
       }
-      catch (LCFException e)
+      catch (ACFException e)
       {
-        LCF.createErrorNode(output,e);
+        ACF.createErrorNode(output,e);
       }
     }
     else
@@ -455,7 +455,7 @@ public class SharePointRepository extend
   */
   public void addSeedDocuments(ISeedingActivity activities, DocumentSpecification spec,
     long startTime, long endTime, int jobMode)
-    throws LCFException, ServiceInterruption
+    throws ACFException, ServiceInterruption
   {
     // Check the session
     getSession();
@@ -483,7 +483,7 @@ public class SharePointRepository extend
   */
   public String[] getDocumentVersions(String[] documentIdentifiers, String[] oldVersions, IVersionActivity activities,
     DocumentSpecification spec, int jobMode, boolean usesDefaultAuthority)
-    throws LCFException, ServiceInterruption
+    throws ACFException, ServiceInterruption
   {
     getSession();
 
@@ -789,7 +789,7 @@ public class SharePointRepository extend
         }
       }
       else
-        throw new LCFException("Invalid document identifier discovered: '"+documentIdentifier+"'");
+        throw new ACFException("Invalid document identifier discovered: '"+documentIdentifier+"'");
       i++;
     }
     return rval;
@@ -807,7 +807,7 @@ public class SharePointRepository extend
   * 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();
 
@@ -926,7 +926,7 @@ public class SharePointRepository extend
                 {
                   // Unexpected processing error; the path to the folder or document did not start with the location
                   // offset, so throw up.
-                  throw new LCFException("Internal error: Relative path '"+relPath+"' was expected to start with '"+
+                  throw new ACFException("Internal error: Relative path '"+relPath+"' was expected to start with '"+
                     serverLocation+"'");
                 }
 
@@ -1068,7 +1068,7 @@ public class SharePointRepository extend
                       {
                         activities.recordActivity(new Long(startFetchTime),ACTIVITY_FETCH,
                           null,documentIdentifier,"Error","Http status "+Integer.toString(returnCode),null);
-                        throw new LCFException("Error fetching document '"+fileUrl+"': "+Integer.toString(returnCode));
+                        throw new ACFException("Error fetching document '"+fileUrl+"': "+Integer.toString(returnCode));
                       }
 
                       // int contentSize = (int)method.getResponseContentLength();
@@ -1100,7 +1100,7 @@ public class SharePointRepository 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)
                         {
@@ -1120,7 +1120,7 @@ public class SharePointRepository extend
                   }
                   catch (InterruptedException e)
                   {
-                    throw new LCFException("Interrupted: "+e.getMessage(),e,LCFException.INTERRUPTED);
+                    throw new ACFException("Interrupted: "+e.getMessage(),e,ACFException.INTERRUPTED);
                   }
                   catch (java.net.SocketTimeoutException e)
                   {
@@ -1142,14 +1142,14 @@ public class SharePointRepository extend
                   }
                   catch (InterruptedIOException e)
                   {
-                    throw new LCFException("Interrupted: "+e.getMessage(),e,LCFException.INTERRUPTED);
+                    throw new ACFException("Interrupted: "+e.getMessage(),e,ACFException.INTERRUPTED);
                   }
                   catch (IllegalArgumentException e)
                   {
                     Logging.connectors.error("SharePoint: Illegal argument", e);
                     activities.recordActivity(new Long(startFetchTime),ACTIVITY_FETCH,
                       new Long(tempFile.length()),documentIdentifier,"Error",e.getMessage(),null);
-                    throw new LCFException("SharePoint: Illegal argument: "+e.getMessage(),e);
+                    throw new ACFException("SharePoint: Illegal argument: "+e.getMessage(),e);
                   }
                   catch (HttpException e)
                   {
@@ -1289,7 +1289,7 @@ public class SharePointRepository 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)
                   {
@@ -1305,25 +1305,25 @@ public class SharePointRepository extend
             }
             catch (java.net.SocketTimeoutException e)
             {
-              throw new LCFException("Socket timeout error writing '"+fileUrl+"' to temporary file: "+e.getMessage(),e);
+              throw new ACFException("Socket timeout error writing '"+fileUrl+"' to temporary file: "+e.getMessage(),e);
             }
             catch (org.apache.commons.httpclient.ConnectTimeoutException e)
             {
-              throw new LCFException("Connect timeout error writing '"+fileUrl+"' to temporary file: "+e.getMessage(),e);
+              throw new ACFException("Connect timeout error writing '"+fileUrl+"' to temporary file: "+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("IO error writing '"+fileUrl+"' to temporary file: "+e.getMessage(),e);
+              throw new ACFException("IO error writing '"+fileUrl+"' to temporary file: "+e.getMessage(),e);
             }
           }
         }
       }
       else
-        throw new LCFException("Found illegal document identifier in processDocuments: '"+documentIdentifier+"'");
+        throw new ACFException("Found illegal document identifier in processDocuments: '"+documentIdentifier+"'");
 
       i++;
     }
@@ -1346,7 +1346,7 @@ public class SharePointRepository 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(
@@ -1472,7 +1472,7 @@ public class SharePointRepository 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 serverVersion = parameters.getParameter("serverVersion");
     if (serverVersion == null)
@@ -1629,7 +1629,7 @@ public class SharePointRepository 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 serverVersion = variableContext.getParameter("serverVersion");
     if (serverVersion != null)
@@ -1729,7 +1729,7 @@ public class SharePointRepository 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"+
@@ -1777,7 +1777,7 @@ public class SharePointRepository 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");
@@ -1953,7 +1953,7 @@ public class SharePointRepository 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;
@@ -2224,7 +2224,7 @@ public class SharePointRepository extend
             pathLibrary = null;
           }
         }
-        catch (LCFException e)
+        catch (ACFException e)
         {
           e.printStackTrace();
           message = e.getMessage();
@@ -2851,7 +2851,7 @@ public class SharePointRepository extend
         {
           metaFieldList = getFieldList(site,lib);
         }
-        catch (LCFException e)
+        catch (ACFException e)
         {
           e.printStackTrace();
           message = e.getMessage();
@@ -2897,7 +2897,7 @@ public class SharePointRepository extend
             metaPathState = "unknown";
           }
         }
-        catch (LCFException e)
+        catch (ACFException e)
         {
           e.printStackTrace();
           message = e.getMessage();
@@ -3228,7 +3228,7 @@ public class SharePointRepository 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
   {
     // Remove old-style rules, but only if the information would not be lost
     if (variableContext.getParameter("specpathcount") != null && variableContext.getParameter("metapathcount") != null)
@@ -3744,7 +3744,7 @@ public class SharePointRepository extend
   *@param ds is the current document specification for this job.
   */
   public void viewSpecification(IHTTPOutput out, DocumentSpecification ds)
-    throws LCFException, IOException
+    throws ACFException, IOException
   {
     // Display path rules
     out.print(
@@ -4195,7 +4195,7 @@ public class SharePointRepository extend
   * @return list of the fields
   */
   public Map getFieldList( String parentSite, String docLibrary )
-    throws ServiceInterruption, LCFException
+    throws ServiceInterruption, ACFException
   {
     getSession();
     return proxy.getFieldList( encodePath(parentSite), proxy.getDocLibID( encodePath(parentSite), parentSite, docLibrary) );
@@ -4207,7 +4207,7 @@ public class SharePointRepository extend
   * @return list of the sites
   */
   public ArrayList getSites( String parentSite )
-    throws ServiceInterruption, LCFException
+    throws ServiceInterruption, ACFException
   {
     getSession();
     return proxy.getSites( encodePath(parentSite) );
@@ -4219,7 +4219,7 @@ public class SharePointRepository extend
   * @return list of the libraries
   */
   public ArrayList getDocLibsBySite( String parentSite )
-    throws LCFException, ServiceInterruption
+    throws ACFException, ServiceInterruption
   {
     getSession();
     return proxy.getDocumentLibraries( encodePath(parentSite), parentSite );
@@ -5058,7 +5058,7 @@ public class SharePointRepository extend
 
     /** Constructor */
     public SystemMetadataDescription(DocumentSpecification spec)
-      throws LCFException
+      throws ACFException
     {
       pathAttributeName = null;
       int i = 0;
@@ -5087,7 +5087,7 @@ public class SharePointRepository extend
     /** Given an identifier, get the translated string that goes into the metadata.
     */
     public String getPathAttributeValue(String documentIdentifier)
-      throws LCFException
+      throws ACFException
     {
       String path = getPathString(documentIdentifier);
       return matchMap.translate(path);
@@ -5098,7 +5098,7 @@ public class SharePointRepository extend
     * is easy to calculate.
     */
     public String getPathString(String documentIdentifier)
-      throws LCFException
+      throws ACFException
     {
       // There will be a "//" somewhere in the string.  Remove it!
       int dslashIndex = documentIdentifier.indexOf("//");
@@ -5118,7 +5118,7 @@ public class SharePointRepository extend
     /** Constructor.  Pass the keystore.
     */
     public MySSLSocketFactory(IKeystoreManager keystore)
-      throws LCFException
+      throws ACFException
     {
       this.keystore = keystore;
       thisSocketFactory = keystore.getSecureSocketFactory();
@@ -5199,7 +5199,7 @@ public class SharePointRepository extend
       {
         return keystore.getString().equals(other.keystore.getString());
       }
-      catch (LCFException e)
+      catch (ACFException e)
       {
         return false;
       }
@@ -5211,7 +5211,7 @@ public class SharePointRepository extend
       {
         return keystore.getString().hashCode();
       }
-      catch (LCFException e)
+      catch (ACFException e)
       {
         return 0;
       }

Modified: incubator/lcf/trunk/modules/connectors/solr/connector/org/apache/acf/agents/output/solr/HttpPoster.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/connectors/solr/connector/org/apache/acf/agents/output/solr/HttpPoster.java?rev=988237&r1=988236&r2=988237&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/connectors/solr/connector/org/apache/acf/agents/output/solr/HttpPoster.java (original)
+++ incubator/lcf/trunk/modules/connectors/solr/connector/org/apache/acf/agents/output/solr/HttpPoster.java Mon Aug 23 18:08:32 2010
@@ -111,7 +111,7 @@ public class HttpPoster
     {
       secureSocketFactory = getSecureSocketFactory();
     }
-    catch (LCFException e)
+    catch (ACFException e)
     {
       // If we can't create, print and fail
       e.printStackTrace();
@@ -128,7 +128,7 @@ public class HttpPoster
     String updatePath, String removePath, String statusPath,
     String realm, String userID, String password,
     String allowAttributeName, String denyAttributeName, String idAttributeName)
-    throws LCFException
+    throws ACFException
   {
     this.allowAttributeName = allowAttributeName;
     this.denyAttributeName = denyAttributeName;
@@ -146,7 +146,7 @@ public class HttpPoster
       }
       catch (java.io.UnsupportedEncodingException e)
       {
-        throw new LCFException("Couldn't convert to utf-8 bytes: "+e.getMessage(),e);
+        throw new ACFException("Couldn't convert to utf-8 bytes: "+e.getMessage(),e);
       }
       this.realm = realm;
     }
@@ -162,16 +162,16 @@ public class HttpPoster
     postRemoveAction = webappName + removePath;
     postStatusAction = webappName + statusPath;
 
-    String x = LCF.getProperty(ingestBufferSizeProperty);
+    String x = ACF.getProperty(ingestBufferSizeProperty);
     if (x != null && x.length() > 0)
       buffersize = new Integer(x).intValue();
-    x = LCF.getProperty(ingestResponseRetryCount);
+    x = ACF.getProperty(ingestResponseRetryCount);
     if (x != null && x.length() > 0)
       responseRetries = new Integer(x).intValue();
-    x = LCF.getProperty(ingestResponseRetryInterval);
+    x = ACF.getProperty(ingestResponseRetryInterval);
     if (x != null && x.length() > 0)
       responseRetryWait = new Long(x).longValue();
-    x = LCF.getProperty(ingestRescheduleInterval);
+    x = ACF.getProperty(ingestRescheduleInterval);
     if (x != null && x.length() > 0)
       interruptionRetryTime = new Long(x).longValue();
   }
@@ -185,12 +185,12 @@ public class HttpPoster
   * @param authorityNameString is the name of the governing authority for this document's acls, or null if none.
   * @param activities is the activities object, so we can report what's happening.
   * @return true if the ingestion was successful, or false if the ingestion is illegal.
-  * @throws LCFException, ServiceInterruption
+  * @throws ACFException, ServiceInterruption
   */
   public boolean indexPost(String documentURI,
     RepositoryDocument document, Map arguments, Map sourceTargets,
     String authorityNameString, IOutputAddActivity activities)
-    throws LCFException, ServiceInterruption
+    throws ACFException, ServiceInterruption
   {
     if (Logging.ingest.isDebugEnabled())
       Logging.ingest.debug("indexPost(): '" + documentURI + "'");
@@ -227,8 +227,8 @@ public class HttpPoster
           {
             if (thr instanceof ServiceInterruption)
               throw (ServiceInterruption)thr;
-            if (thr instanceof LCFException)
-              throw (LCFException)thr;
+            if (thr instanceof ACFException)
+              throw (ACFException)thr;
             if (thr instanceof IOException)
               throw (IOException)thr;
             if (thr instanceof RuntimeException)
@@ -241,7 +241,7 @@ public class HttpPoster
         catch (InterruptedException e)
         {
           t.interrupt();
-          throw new LCFException("Interrupted: "+e.getMessage(),LCFException.INTERRUPTED);
+          throw new ACFException("Interrupted: "+e.getMessage(),ACFException.INTERRUPTED);
         }
       }
       catch (java.net.SocketTimeoutException ioe)
@@ -276,11 +276,11 @@ public class HttpPoster
       // Sleep for a time, and retry
       try
       {
-        LCF.sleep(10000L);
+        ACF.sleep(10000L);
       }
       catch (InterruptedException e)
       {
-        throw new LCFException("Interrupted: "+e.getMessage(),LCFException.INTERRUPTED);
+        throw new ACFException("Interrupted: "+e.getMessage(),ACFException.INTERRUPTED);
       }
       ioErrorRetry--;
 
@@ -293,7 +293,7 @@ public class HttpPoster
   /** Post a check request.
   */
   public void checkPost()
-    throws LCFException, ServiceInterruption
+    throws ACFException, ServiceInterruption
   {
     if (Logging.ingest.isDebugEnabled())
       Logging.ingest.debug("checkPost()");
@@ -315,8 +315,8 @@ public class HttpPoster
           {
             if (thr instanceof ServiceInterruption)
               throw (ServiceInterruption)thr;
-            if (thr instanceof LCFException)
-              throw (LCFException)thr;
+            if (thr instanceof ACFException)
+              throw (ACFException)thr;
             if (thr instanceof IOException)
               throw (IOException)thr;
             if (thr instanceof RuntimeException)
@@ -329,7 +329,7 @@ public class HttpPoster
         catch (InterruptedException e)
         {
           t.interrupt();
-          throw new LCFException("Interrupted: "+e.getMessage(),LCFException.INTERRUPTED);
+          throw new ACFException("Interrupted: "+e.getMessage(),ACFException.INTERRUPTED);
         }
       }
       catch (IOException ioe)
@@ -350,11 +350,11 @@ public class HttpPoster
       // Sleep for a time, and retry
       try
       {
-        LCF.sleep(10000L);
+        ACF.sleep(10000L);
       }
       catch (InterruptedException e)
       {
-        throw new LCFException("Interrupted",LCFException.INTERRUPTED);
+        throw new ACFException("Interrupted",ACFException.INTERRUPTED);
       }
       ioErrorRetry--;
 
@@ -366,7 +366,7 @@ public class HttpPoster
   *@param documentURI is the document's URI.
   */
   public void deletePost(String documentURI, IOutputRemoveActivity activities)
-    throws LCFException, ServiceInterruption
+    throws ACFException, ServiceInterruption
   {
     if (Logging.ingest.isDebugEnabled())
       Logging.ingest.debug("deletePost(): '" + documentURI + "'");
@@ -391,8 +391,8 @@ public class HttpPoster
           {
             if (thr instanceof ServiceInterruption)
               throw (ServiceInterruption)thr;
-            if (thr instanceof LCFException)
-              throw (LCFException)thr;
+            if (thr instanceof ACFException)
+              throw (ACFException)thr;
             if (thr instanceof IOException)
               throw (IOException)thr;
             if (thr instanceof RuntimeException)
@@ -405,7 +405,7 @@ public class HttpPoster
         catch (InterruptedException e)
         {
           t.interrupt();
-          throw new LCFException("Interrupted: "+e.getMessage(),LCFException.INTERRUPTED);
+          throw new ACFException("Interrupted: "+e.getMessage(),ACFException.INTERRUPTED);
         }
       }
       catch (IOException ioe)
@@ -427,11 +427,11 @@ public class HttpPoster
       // Sleep for a time, and retry
       try
       {
-        LCF.sleep(10000L);
+        ACF.sleep(10000L);
       }
       catch (InterruptedException e)
       {
-        throw new LCFException("Interrupted",LCFException.INTERRUPTED);
+        throw new ACFException("Interrupted",ACFException.INTERRUPTED);
       }
 
       ioErrorRetry--;
@@ -447,7 +447,7 @@ public class HttpPoster
   * @return the modified ACL.
   */
   protected static String[] convertACL(String[] acl, String authorityNameString, IOutputAddActivity activities)
-    throws LCFException
+    throws ACFException
   {
     if (acl != null)
     {
@@ -489,9 +489,9 @@ public class HttpPoster
   * Get the response code of the post
   * @param in the stream the response is going to come from
   * @return the response details.
-  * @throws LCFException
+  * @throws ACFException
   */
-  protected CodeDetails getResponse(InputStream in) throws LCFException, ServiceInterruption
+  protected CodeDetails getResponse(InputStream in) throws ACFException, ServiceInterruption
   {
     Logging.ingest.debug("Waiting for response stream");
 
@@ -536,7 +536,7 @@ public class HttpPoster
       {
         doc = new XMLDoc(in);
       }
-      catch (LCFException e)
+      catch (ACFException e)
       {
         // Syntax errors should be eaten; we'll just return a null doc in that case.
         e.printStackTrace();
@@ -558,7 +558,7 @@ public class HttpPoster
     }
     catch (InterruptedIOException e)
     {
-      throw new LCFException("Interrupted",LCFException.INTERRUPTED);
+      throw new ACFException("Interrupted",ACFException.INTERRUPTED);
     }
     catch (java.net.ConnectException e)
     {
@@ -611,7 +611,7 @@ public class HttpPoster
   /** Build a secure socket factory based on no keystore and a lax trust manager.
   * This allows use of SSL for privacy but not identification. */
   protected static javax.net.ssl.SSLSocketFactory getSecureSocketFactory()
-    throws LCFException
+    throws ACFException
   {
     try
     {
@@ -624,18 +624,18 @@ public class HttpPoster
     }
     catch (java.security.NoSuchAlgorithmException e)
     {
-      throw new LCFException("No such algorithm: "+e.getMessage(),e);
+      throw new ACFException("No such algorithm: "+e.getMessage(),e);
     }
     catch (java.security.KeyManagementException e)
     {
-      throw new LCFException("Key management exception: "+e.getMessage(),e);
+      throw new ACFException("Key management exception: "+e.getMessage(),e);
     }
   }
 
   /** Create a socket in a manner consistent with all of our specified parameters.
   */
   protected Socket createSocket(long responseRetryCount)
-    throws IOException, LCFException
+    throws IOException, ACFException
   {
     Socket socket;
     if (protocol.equals("https"))
@@ -651,7 +651,7 @@ public class HttpPoster
       }
       catch (IOException e)
       {
-        throw new LCFException("Couldn't set up SSL connection to ingestion API: "+e.getMessage(),e);
+        throw new ACFException("Couldn't set up SSL connection to ingestion API: "+e.getMessage(),e);
       }
     }
     else
@@ -1193,7 +1193,7 @@ public class HttpPoster
 
                 // A negative number means http error of some kind.
                 if (codeValue < 0)
-                  throw new LCFException("Http protocol error");
+                  throw new ACFException("Http protocol error");
 
                 // 200 means we got a status document back
                 if (codeValue == 200)
@@ -1211,11 +1211,11 @@ public class HttpPoster
                 //    If the situation is (2), then we CAN'T retry if we already read any of the stream; therefore
                 //    we are forced to throw a "service interrupted" exception, and let the caller reschedule
                 //    the ingestion.
-                // 3) Something is wrong with the setup, e.g. bad credentials.  In this case we chuck a LCFException,
+                // 3) Something is wrong with the setup, e.g. bad credentials.  In this case we chuck a ACFException,
                 //    since this will abort the current activity entirely.
 
                 if (codeValue == 401)
-                  throw new LCFException("Bad credentials for ingestion",LCFException.SETUP_ERROR);
+                  throw new ACFException("Bad credentials for ingestion",ACFException.SETUP_ERROR);
 
                 if (codeValue >= 400 && codeValue < 500)
                 {
@@ -1226,7 +1226,7 @@ public class HttpPoster
                 // If this continues, we should indeed abort the job.  Retries should not go on indefinitely either; 2 hours is plenty
                 long currentTime = System.currentTimeMillis();
                 throw new ServiceInterruption("Error "+Integer.toString(codeValue)+" from ingestion request; ingestion will be retried again later",
-                  new LCFException("Ingestion HTTP error code "+Integer.toString(codeValue)),
+                  new ACFException("Ingestion HTTP error code "+Integer.toString(codeValue)),
                   currentTime + interruptionRetryTime,
                   currentTime + 2L * 60L * 60000L,
                   -1,
@@ -1261,7 +1261,7 @@ public class HttpPoster
         }
         catch (UnsupportedEncodingException ioe)
         {
-          throw new LCFException("Fatal ingestion error: "+ioe.getMessage(),ioe);
+          throw new ACFException("Fatal ingestion error: "+ioe.getMessage(),ioe);
         }
         catch (java.net.SocketTimeoutException ioe)
         {
@@ -1431,7 +1431,7 @@ public class HttpPoster
                 int codeValue = cd.getCodeValue();
 
                 if (codeValue < 0)
-                  throw new LCFException("Http protocol error");
+                  throw new ACFException("Http protocol error");
 
                 // 200 means we got an xml document back
                 if (codeValue == 200)
@@ -1443,13 +1443,13 @@ public class HttpPoster
 
                 // We ignore everything in the range from 400-500 now
                 if (codeValue == 401)
-                  throw new LCFException("Bad credentials for ingestion",LCFException.SETUP_ERROR);
+                  throw new ACFException("Bad credentials for ingestion",ACFException.SETUP_ERROR);
 
                 if (codeValue >= 400 && codeValue < 500)
                   return;
 
                 // Anything else means the document didn't delete.  Throw the error.
-                throw new LCFException("Error deleting document: '"+cd.getDescription()+"'");
+                throw new ACFException("Error deleting document: '"+cd.getDescription()+"'");
               }
               finally
               {
@@ -1480,7 +1480,7 @@ public class HttpPoster
         }
         catch (UnsupportedEncodingException ioe)
         {
-          throw new LCFException("Fatal ingestion error: "+ioe.getMessage(),ioe);
+          throw new ACFException("Fatal ingestion error: "+ioe.getMessage(),ioe);
         }
         catch (InterruptedIOException ioe)
         {
@@ -1577,7 +1577,7 @@ public class HttpPoster
 
                 int codeValue = cd.getCodeValue();
                 if (codeValue < 0)
-                  throw new LCFException("Http protocol error");
+                  throw new ACFException("Http protocol error");
 
                 // 200 means everything went OK
                 if (codeValue == 200)
@@ -1588,10 +1588,10 @@ public class HttpPoster
 
                 // We ignore everything in the range from 400-500 now
                 if (codeValue == 401)
-                  throw new LCFException("Bad credentials for ingestion",LCFException.SETUP_ERROR);
+                  throw new ACFException("Bad credentials for ingestion",ACFException.SETUP_ERROR);
 
                 // Anything else means the info request failed.
-                throw new LCFException("Error connecting to ingestion API: '"+cd.getDescription()+"'");
+                throw new ACFException("Error connecting to ingestion API: '"+cd.getDescription()+"'");
               }
               finally
               {
@@ -1622,7 +1622,7 @@ public class HttpPoster
         }
         catch (UnsupportedEncodingException ioe)
         {
-          throw new LCFException("Fatal ingestion error: "+ioe.getMessage(),ioe);
+          throw new ACFException("Fatal ingestion error: "+ioe.getMessage(),ioe);
         }
         catch (InterruptedIOException ioe)
         {
@@ -1708,13 +1708,13 @@ public class HttpPoster
     }
 
     public String getDescription()
-      throws LCFException
+      throws ACFException
     {
       return res + "\r\n" + ((returnDoc!=null)?returnDoc.getXML():"");
     }
 
     public void parseIngestionResponse()
-      throws LCFException
+      throws ACFException
     {
       // Look at response XML
       String statusValue = "unknown";
@@ -1763,20 +1763,20 @@ public class HttpPoster
         if (statusValue.equals("0"))
           return;
 
-        throw new LCFException("Ingestion returned error: "+statusValue);
+        throw new ACFException("Ingestion returned error: "+statusValue);
       }
       else
-        throw new LCFException("XML parsing error on response");
+        throw new ACFException("XML parsing error on response");
     }
 
     public void parseRemovalResponse()
-      throws LCFException
+      throws ACFException
     {
       parseIngestionResponse();
     }
 
     public void parseStatusResponse()
-      throws LCFException
+      throws ACFException
     {
       // Look at response XML
       String statusValue = "unknown";
@@ -1812,10 +1812,10 @@ public class HttpPoster
         if (statusValue.equals("OK"))
           return;
 
-        throw new LCFException("Status error: "+statusValue);
+        throw new ACFException("Status error: "+statusValue);
       }
       else
-        throw new LCFException("XML parsing error on response");
+        throw new ACFException("XML parsing error on response");
     }
   }
 



Mime
View raw message