manifoldcf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1004255 [7/24] - in /incubator/lcf/trunk: modules/connectors/activedirectory/connector/src/main/java/org/apache/manifoldcf/authorities/authorities/activedirectory/ modules/connectors/documentum/connector/src/main/java/org/apache/manifoldcf...
Date Mon, 04 Oct 2010 14:32:28 GMT
Modified: incubator/lcf/trunk/modules/connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharepoint/SPSProxyHelper.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharepoint/SPSProxyHelper.java?rev=1004255&r1=1004254&r2=1004255&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharepoint/SPSProxyHelper.java (original)
+++ incubator/lcf/trunk/modules/connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharepoint/SPSProxyHelper.java Mon Oct  4 14:32:19 2010
@@ -24,7 +24,7 @@ import java.util.Map;
 import javax.xml.soap.*;
 
 import org.apache.manifoldcf.core.common.XMLDoc;
-import org.apache.manifoldcf.core.interfaces.ACFException;
+import org.apache.manifoldcf.core.interfaces.ManifoldCFException;
 import org.apache.manifoldcf.agents.interfaces.ServiceInterruption;
 import org.apache.manifoldcf.crawler.system.Logging;
 
@@ -45,8 +45,8 @@ import org.apache.axis.configuration.Fil
 public class SPSProxyHelper {
 
 
-  public static final String PROTOCOL_FACTORY_PROPERTY = "ACF_Protocol_Factory";
-  public static final String CONNECTION_MANAGER_PROPERTY = "ACF_Connection_Manager";
+  public static final String PROTOCOL_FACTORY_PROPERTY = "ManifoldCF_Protocol_Factory";
+  public static final String CONNECTION_MANAGER_PROPERTY = "ManifoldCF_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 ACFException, ServiceInterruption
+    throws ManifoldCFException, ServiceInterruption
   {
     long currentTime;
     try
@@ -109,18 +109,18 @@ public class SPSProxyHelper {
       doc.processPath(nodeList, "*", null);
       if (nodeList.size() != 1)
       {
-        throw new ACFException("Bad xml - missing outer 'ns1:GetPermissionCollection' node - there are "+Integer.toString(nodeList.size())+" nodes");
+        throw new ManifoldCFException("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 ACFException("Bad xml - outer node is not 'ns1:GetPermissionCollection'");
+        throw new ManifoldCFException("Bad xml - outer node is not 'ns1:GetPermissionCollection'");
 
       nodeList.clear();
       doc.processPath(nodeList, "*", parent);
 
       if ( nodeList.size() != 1 )
       {
-        throw new ACFException( " No results found." );
+        throw new ManifoldCFException( " No results found." );
       }
       parent = nodeList.get(0);
       nodeList.clear();
@@ -172,7 +172,7 @@ public class SPSProxyHelper {
     }
     catch (java.net.MalformedURLException e)
     {
-      throw new ACFException("Bad SharePoint url: "+e.getMessage(),e);
+      throw new ManifoldCFException("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 ACFException("Http error "+httpErrorCode+" while reading from "+baseUrl+site+" - check IIS and SharePoint security settings! "+e.getMessage(),e);
+            throw new ManifoldCFException("Http error "+httpErrorCode+" while reading from "+baseUrl+site+" - check IIS and SharePoint security settings! "+e.getMessage(),e);
           else
-            throw new ACFException("Unexpected http error code "+httpErrorCode+" accessing SharePoint at "+baseUrl+site+": "+e.getMessage(),e);
+            throw new ManifoldCFException("Unexpected http error code "+httpErrorCode+" accessing SharePoint at "+baseUrl+site+": "+e.getMessage(),e);
         }
-        throw new ACFException("Unknown http error occurred: "+e.getMessage(),e);
+        throw new ManifoldCFException("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 ACFException("Interrupted",ACFException.INTERRUPTED);
+          throw new ManifoldCFException("Interrupted",ManifoldCFException.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 ACFException("Unexpected remote procedure exception: "+e.getMessage(), e);
+      throw new ManifoldCFException("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 ACFException
+  * @throws ManifoldCFException
   * @throws ServiceInterruption
   */
   public String[] getDocumentACLs(String site, String file)
-    throws ACFException, ServiceInterruption
+    throws ManifoldCFException, ServiceInterruption
   {
     long currentTime;
     try
@@ -314,18 +314,18 @@ public class SPSProxyHelper {
       doc.processPath(nodeList, "*", null);
       if (nodeList.size() != 1)
       {
-        throw new ACFException("Bad xml - missing outer 'ns1:GetPermissionCollection' node - there are "+Integer.toString(nodeList.size())+" nodes");
+        throw new ManifoldCFException("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 ACFException("Bad xml - outer node is not 'GetPermissionCollection'");
+        throw new ManifoldCFException("Bad xml - outer node is not 'GetPermissionCollection'");
 
       nodeList.clear();
       doc.processPath(nodeList, "*", parent);
 
       if ( nodeList.size() != 1 )
       {
-        throw new ACFException( " No results found." );
+        throw new ManifoldCFException( " No results found." );
       }
       parent = nodeList.get(0);
       nodeList.clear();
@@ -377,7 +377,7 @@ public class SPSProxyHelper {
     }
     catch (java.net.MalformedURLException e)
     {
-      throw new ACFException("Bad SharePoint url: "+e.getMessage(),e);
+      throw new ManifoldCFException("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 ACFException("Http error "+httpErrorCode+" while reading from "+baseUrl+site+" - check IIS and SharePoint security settings! "+e.getMessage(),e);
+            throw new ManifoldCFException("Http error "+httpErrorCode+" while reading from "+baseUrl+site+" - check IIS and SharePoint security settings! "+e.getMessage(),e);
           else
-            throw new ACFException("Unexpected http error code "+httpErrorCode+" accessing SharePoint at "+baseUrl+site+": "+e.getMessage(),e);
+            throw new ManifoldCFException("Unexpected http error code "+httpErrorCode+" accessing SharePoint at "+baseUrl+site+": "+e.getMessage(),e);
         }
-        throw new ACFException("Unknown http error occurred: "+e.getMessage(),e);
+        throw new ManifoldCFException("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 ACFException("Interrupted",ACFException.INTERRUPTED);
+          throw new ManifoldCFException("Interrupted",ManifoldCFException.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 ACFException("Unexpected remote procedure exception: "+e.getMessage(), e);
+      throw new ManifoldCFException("Unexpected remote procedure exception: "+e.getMessage(), e);
     }
   }
 
@@ -480,11 +480,11 @@ public class SPSProxyHelper {
   * @param site
   * @param docLibrary
   * @return an XML document
-  * @throws ACFException
+  * @throws ManifoldCFException
   * @throws ServiceInterruption
   */
   public XMLDoc getDocuments(String site, String docLibrary)
-    throws ACFException, ServiceInterruption
+    throws ManifoldCFException, ServiceInterruption
   {
     long currentTime;
     try
@@ -527,27 +527,27 @@ public class SPSProxyHelper {
       doc.processPath(nodeList, "*", null);
       if (nodeList.size() != 1)
       {
-        throw new ACFException("Bad xml - missing outer 'ns1:dsQueryResponse' node - there are "+Integer.toString(nodeList.size())+" nodes");
+        throw new ManifoldCFException("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 ACFException("Bad xml - outer node is not 'ns1:dsQueryResponse'");
+        throw new ManifoldCFException("Bad xml - outer node is not 'ns1:dsQueryResponse'");
 
       nodeList.clear();
       doc.processPath(nodeList, "*", parent);
 
       if ( nodeList.size() != 2 )
       {
-        throw new ACFException( " No results found." );
+        throw new ManifoldCFException( " No results found." );
       }
 
       return doc;
     }
     catch (java.net.MalformedURLException e)
     {
-      throw new ACFException("Bad SharePoint url: "+e.getMessage(),e);
+      throw new ManifoldCFException("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 ACFException("Http error "+httpErrorCode+" while reading from "+baseUrl+site+" - check IIS and SharePoint security settings! "+e.getMessage(),e);
+            throw new ManifoldCFException("Http error "+httpErrorCode+" while reading from "+baseUrl+site+" - check IIS and SharePoint security settings! "+e.getMessage(),e);
           else
-            throw new ACFException("Unexpected http error code "+httpErrorCode+" accessing SharePoint at "+baseUrl+site+": "+e.getMessage(),e);
+            throw new ManifoldCFException("Unexpected http error code "+httpErrorCode+" accessing SharePoint at "+baseUrl+site+": "+e.getMessage(),e);
         }
-        throw new ACFException("Unknown http error occurred: "+e.getMessage(),e);
+        throw new ManifoldCFException("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 ACFException("Interrupted",ACFException.INTERRUPTED);
+          throw new ManifoldCFException("Interrupted",ManifoldCFException.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 ACFException("Unexpected remote procedure exception: "+e.getMessage(), e);
+      throw new ManifoldCFException("Unexpected remote procedure exception: "+e.getMessage(), e);
     }
   }
 
@@ -650,11 +650,11 @@ public class SPSProxyHelper {
   * @param parentSite
   * @param docLibrary
   * @return document library ID
-  * @throws ACFException
+  * @throws ManifoldCFException
   * @throws ServiceInterruption
   */
   public String getDocLibID(String parentSite, String parentSiteDecoded, String docLibrary)
-    throws ServiceInterruption, ACFException
+    throws ServiceInterruption, ManifoldCFException
   {
     long currentTime;
     try
@@ -683,11 +683,11 @@ public class SPSProxyHelper {
       doc.processPath(nodeList, "*", null);
       if (nodeList.size() != 1)
       {
-        throw new ACFException("Bad xml - missing outer 'ns1:Lists' node - there are "+Integer.toString(nodeList.size())+" nodes");
+        throw new ManifoldCFException("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 ACFException("Bad xml - outer node is not 'ns1:Lists'");
+        throw new ManifoldCFException("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 ACFException("View url is not in the expected form: '"+urlPath+"'");
+              throw new ManifoldCFException("View url is not in the expected form: '"+urlPath+"'");
             urlPath = urlPath.substring(chuckIndex);
             if (!urlPath.startsWith("/"))
-              throw new ACFException("View url without site is not in the expected form: '"+urlPath+"'");
+              throw new ManifoldCFException("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 ACFException("Bad view url without site: '"+urlPath+"'");
+              throw new ManifoldCFException("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 ACFException("Bad SharePoint url: "+e.getMessage(),e);
+      throw new ManifoldCFException("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 ACFException("Http error "+httpErrorCode+" while reading from "+baseUrl+parentSite+" - check IIS and SharePoint security settings! "+e.getMessage(),e);
+            throw new ManifoldCFException("Http error "+httpErrorCode+" while reading from "+baseUrl+parentSite+" - check IIS and SharePoint security settings! "+e.getMessage(),e);
           else
-            throw new ACFException("Unexpected http error code "+httpErrorCode+" accessing SharePoint at "+baseUrl+parentSite+": "+e.getMessage(),e);
+            throw new ManifoldCFException("Unexpected http error code "+httpErrorCode+" accessing SharePoint at "+baseUrl+parentSite+": "+e.getMessage(),e);
         }
-        throw new ACFException("Unknown http error occurred: "+e.getMessage(),e);
+        throw new ManifoldCFException("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 ACFException("Interrupted",ACFException.INTERRUPTED);
+          throw new ManifoldCFException("Interrupted",ManifoldCFException.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 ACFException("Unexpected remote procedure exception: "+e.getMessage(), e);
+      throw new ManifoldCFException("Unexpected remote procedure exception: "+e.getMessage(), e);
     }
   }
 
@@ -839,11 +839,11 @@ public class SPSProxyHelper {
   * @param site
   * @param docPath
   * @return an XML document
-  * @throws ACFException
+  * @throws ManifoldCFException
   * @throws ServiceInterruption
   */
   public XMLDoc getVersions( String site, String docPath)
-    throws ServiceInterruption, ACFException
+    throws ServiceInterruption, ManifoldCFException
   {
     long currentTime;
     try
@@ -863,18 +863,18 @@ public class SPSProxyHelper {
 
       if (nodeList.size() != 1)
       {
-        throw new ACFException("Bad xml - missing outer 'results' node - there are "+Integer.toString(nodeList.size())+" nodes");
+        throw new ManifoldCFException("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 ACFException("Bad xml - outer node is not 'results'");
+        throw new ManifoldCFException("Bad xml - outer node is not 'results'");
 
       return doc;
     }
     catch (java.net.MalformedURLException e)
     {
-      throw new ACFException("Bad SharePoint url: "+e.getMessage(),e);
+      throw new ManifoldCFException("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 ACFException("Http error "+httpErrorCode+" while reading from "+baseUrl+site+" - check IIS and SharePoint security settings! "+e.getMessage(),e);
+            throw new ManifoldCFException("Http error "+httpErrorCode+" while reading from "+baseUrl+site+" - check IIS and SharePoint security settings! "+e.getMessage(),e);
           else
-            throw new ACFException("Unexpected http error code "+httpErrorCode+" accessing SharePoint at "+baseUrl+site+": "+e.getMessage(),e);
+            throw new ManifoldCFException("Unexpected http error code "+httpErrorCode+" accessing SharePoint at "+baseUrl+site+": "+e.getMessage(),e);
         }
-        throw new ACFException("Unknown http error occurred: "+e.getMessage(),e);
+        throw new ManifoldCFException("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 ACFException("Interrupted",ACFException.INTERRUPTED);
+          throw new ManifoldCFException("Interrupted",ManifoldCFException.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 ACFException("Unexpected remote procedure exception: "+e.getMessage(), e);
+      throw new ManifoldCFException("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 ACFException, java.net.MalformedURLException, javax.xml.rpc.ServiceException,
+  throws ManifoldCFException, 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 ACFException("Bad xml - missing outer 'ns1:GetUserInfo' node - there are "+Integer.toString(nodeList.size())+" nodes");
+      throw new ManifoldCFException("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 ACFException("Bad xml - outer node is not 'ns1:GetUserInfo'");
+      throw new ManifoldCFException("Bad xml - outer node is not 'ns1:GetUserInfo'");
 
     nodeList.clear();
     doc.processPath(nodeList, "*", parent);  // ns1:User
 
     if ( nodeList.size() != 1 )
     {
-      throw new ACFException( " No User found." );
+      throw new ManifoldCFException( " 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 ACFException, java.net.MalformedURLException, javax.xml.rpc.ServiceException, java.rmi.RemoteException
+    throws ManifoldCFException, 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 ACFException("Bad xml - missing outer 'ns1:GetUserCollectionFromGroup' node - there are "
+      throw new ManifoldCFException("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 ACFException("Bad xml - outer node is not 'ns1:GetUserCollectionFromGroup'");
+      throw new ManifoldCFException("Bad xml - outer node is not 'ns1:GetUserCollectionFromGroup'");
 
     nodeList.clear();
     doc.processPath(nodeList, "*", parent); // <ns1:Users>
 
     if (nodeList.size() != 1)
     {
-      throw new ACFException(" No Users collection found.");
+      throw new ManifoldCFException(" 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 ACFException, java.net.MalformedURLException, javax.xml.rpc.ServiceException,
+  throws ManifoldCFException, 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 ACFException("Bad xml - missing outer 'ns1:GetUserCollectionFromRole' node - there are "+Integer.toString(nodeList.size())+" nodes");
+      throw new ManifoldCFException("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 ACFException("Bad xml - outer node is not 'ns1:GetUserCollectionFromRole'");
+      throw new ManifoldCFException("Bad xml - outer node is not 'ns1:GetUserCollectionFromRole'");
 
     nodeList.clear();
     doc.processPath(nodeList, "*", parent);  // <ns1:Users>
 
     if ( nodeList.size() != 1 )
     {
-      throw new ACFException( " No Users collection found." );
+      throw new ManifoldCFException( " 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 ACFException, ServiceInterruption
+    throws ManifoldCFException, ServiceInterruption
   {
     long currentTime;
     try
@@ -1151,7 +1151,7 @@ public class SPSProxyHelper {
     }
     catch (java.net.MalformedURLException e)
     {
-      throw new ACFException("Bad SharePoint url: "+e.getMessage(),e);
+      throw new ManifoldCFException("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 ACFException("The site at "+baseUrl+site+" did not exist");
+            throw new ManifoldCFException("The site at "+baseUrl+site+" did not exist");
           }
           else if (httpErrorCode.equals("401"))
-            throw new ACFException("Crawl user did not authenticate properly, or has insufficient permissions to access "+baseUrl+site+": "+e.getMessage(),e);
+            throw new ManifoldCFException("Crawl user did not authenticate properly, or has insufficient permissions to access "+baseUrl+site+": "+e.getMessage(),e);
           else if (httpErrorCode.equals("403"))
-            throw new ACFException("Http error "+httpErrorCode+" while reading from "+baseUrl+site+" - check IIS and SharePoint security settings! "+e.getMessage(),e);
+            throw new ManifoldCFException("Http error "+httpErrorCode+" while reading from "+baseUrl+site+" - check IIS and SharePoint security settings! "+e.getMessage(),e);
 	  else if (httpErrorCode.equals("302"))
-	    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.");
+	    throw new ManifoldCFException("ManifoldCF'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 ACFException("Unexpected http error code "+httpErrorCode+" accessing SharePoint at "+baseUrl+site+": "+e.getMessage(),e);
+            throw new ManifoldCFException("Unexpected http error code "+httpErrorCode+" accessing SharePoint at "+baseUrl+site+": "+e.getMessage(),e);
         }
-        throw new ACFException("Unknown http error occurred: "+e.getMessage(),e);
+        throw new ManifoldCFException("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 ACFException("Accessing site "+site+" failed with unexpected SharePoint error code "+sharepointErrorCode+": "+errorString,e);
+          throw new ManifoldCFException("Accessing site "+site+" failed with unexpected SharePoint error code "+sharepointErrorCode+": "+errorString,e);
         }
-        throw new ACFException("Unknown SharePoint server error accessing site "+site+" - axis fault = "+e.getFaultCode().getLocalPart()+", detail = "+e.getFaultString(),e);
+        throw new ManifoldCFException("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 ACFException("Interrupted",ACFException.INTERRUPTED);
+          throw new ManifoldCFException("Interrupted",ManifoldCFException.INTERRUPTED);
       }
 
-      throw new ACFException("Got an unknown remote exception accessing site "+site+" - axis fault = "+e.getFaultCode().getLocalPart()+", detail = "+e.getFaultString(),e);
+      throw new ManifoldCFException("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 ACFException("Got an unexpected remote exception accessing site "+site+": "+e.getMessage(),e);
+      throw new ManifoldCFException("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 ACFException, ServiceInterruption
+    throws ManifoldCFException, ServiceInterruption
   {
     long currentTime;
     try
@@ -1252,19 +1252,19 @@ public class SPSProxyHelper {
       doc.processPath(nodeList, "*", null);
       if (nodeList.size() != 1)
       {
-        throw new ACFException("Bad xml - missing outer node - there are "+Integer.toString(nodeList.size())+" nodes");
+        throw new ManifoldCFException("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 ACFException("Bad xml - outer node is '" + doc.getNodeName(parent) + "' not 'ns1:List'");
+        throw new ManifoldCFException("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 ACFException( "Bad xml - child node 0 '" + doc.getNodeName(fields) + "' is not 'ns1:Fields'");
+        throw new ManifoldCFException( "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 ACFException("Bad SharePoint url: "+e.getMessage(),e);
+      throw new ManifoldCFException("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 ACFException("Remote procedure exception: "+e.getMessage(),e);
+            throw new ManifoldCFException("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 ACFException("Unexpected http error code "+httpErrorCode+" accessing SharePoint at "+baseUrl+site+": "+e.getMessage(),e);
+          throw new ManifoldCFException("Unexpected http error code "+httpErrorCode+" accessing SharePoint at "+baseUrl+site+": "+e.getMessage(),e);
         }
-        throw new ACFException("Unknown http error occurred: "+e.getMessage(),e);
+        throw new ManifoldCFException("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 ACFException("Interrupted",ACFException.INTERRUPTED);
+          throw new ManifoldCFException("Interrupted",ManifoldCFException.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 ACFException("Unexpected remote exception occurred: "+e.getMessage(),e);
+      throw new ManifoldCFException("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 ACFException, ServiceInterruption
+    throws ManifoldCFException, ServiceInterruption
   {
     long currentTime;
     try
@@ -1445,13 +1445,13 @@ public class SPSProxyHelper {
       doc.processPath(nodeList, "*", null);
       if (nodeList.size() != 1)
       {
-        throw new ACFException("Bad xml - missing outer 'ns1:dsQueryResponse' node - there are "+Integer.toString(nodeList.size())+" nodes");
+        throw new ManifoldCFException("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 ACFException("Bad xml - outer node is not 'ns1:dsQueryResponse'");
+        throw new ManifoldCFException("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 ACFException("Soap exception: "+e.getMessage(),e);
+      throw new ManifoldCFException("Soap exception: "+e.getMessage(),e);
     }
     catch (java.net.MalformedURLException e)
     {
-      throw new ACFException("Bad SharePoint url: "+e.getMessage(),e);
+      throw new ManifoldCFException("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 ACFException("Remote procedure exception: "+e.getMessage(),e);
+            throw new ManifoldCFException("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 ACFException("Unexpected http error code "+httpErrorCode+" accessing SharePoint at "+baseUrl+site+": "+e.getMessage(),e);
+          throw new ManifoldCFException("Unexpected http error code "+httpErrorCode+" accessing SharePoint at "+baseUrl+site+": "+e.getMessage(),e);
         }
-        throw new ACFException("Unknown http error occurred: "+e.getMessage(),e);
+        throw new ManifoldCFException("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 ACFException("Interrupted",ACFException.INTERRUPTED);
+          throw new ManifoldCFException("Interrupted",ManifoldCFException.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 ACFException("Unexpected remote exception occurred: "+e.getMessage(),e);
+      throw new ManifoldCFException("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 ACFException, ServiceInterruption
+    throws ManifoldCFException, ServiceInterruption
   {
     long currentTime;
     try
@@ -1572,11 +1572,11 @@ public class SPSProxyHelper {
       doc.processPath(nodeList, "*", null);
       if (nodeList.size() != 1)
       {
-        throw new ACFException("Bad xml - missing outer 'ns1:Webs' node - there are "+Integer.toString(nodeList.size())+" nodes");
+        throw new ManifoldCFException("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 ACFException("Bad xml - outer node is not 'ns1:Webs'");
+        throw new ManifoldCFException("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 ACFException("Bad SharePoint url: "+e.getMessage(),e);
+      throw new ManifoldCFException("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 ACFException("Remote procedure exception: "+e.getMessage(),e);
+            throw new ManifoldCFException("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 ACFException("Unexpected http error code "+httpErrorCode+" accessing SharePoint at "+baseUrl+parentSite+": "+e.getMessage(),e);
+          throw new ManifoldCFException("Unexpected http error code "+httpErrorCode+" accessing SharePoint at "+baseUrl+parentSite+": "+e.getMessage(),e);
         }
-        throw new ACFException("Unknown http error occurred: "+e.getMessage(),e);
+        throw new ManifoldCFException("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 ACFException("Interrupted",ACFException.INTERRUPTED);
+          throw new ManifoldCFException("Interrupted",ManifoldCFException.INTERRUPTED);
       }
 
       if (Logging.connectors.isDebugEnabled())
@@ -1665,7 +1665,7 @@ public class SPSProxyHelper {
     }
     catch (java.rmi.RemoteException e)
     {
-      throw new ACFException("Unexpected remote exception occurred: "+e.getMessage(),e);
+      throw new ManifoldCFException("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 ACFException, ServiceInterruption
+    throws ManifoldCFException, ServiceInterruption
   {
     long currentTime;
     try
@@ -1705,11 +1705,11 @@ public class SPSProxyHelper {
       doc.processPath(nodeList, "*", null);
       if (nodeList.size() != 1)
       {
-        throw new ACFException("Bad xml - missing outer 'ns1:Lists' node - there are "+Integer.toString(nodeList.size())+" nodes");
+        throw new ManifoldCFException("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 ACFException("Bad xml - outer node is not 'ns1:Lists'");
+        throw new ManifoldCFException("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 ACFException("View url is not in the expected form: '"+urlPath+"'");
+              throw new ManifoldCFException("View url is not in the expected form: '"+urlPath+"'");
             urlPath = urlPath.substring(chuckIndex);
             if (!urlPath.startsWith("/"))
-              throw new ACFException("View url without site is not in the expected form: '"+urlPath+"'");
+              throw new ManifoldCFException("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 ACFException("Bad view url without site: '"+urlPath+"'");
+              throw new ManifoldCFException("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 ACFException("Bad SharePoint url: "+e.getMessage(),e);
+      throw new ManifoldCFException("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 ACFException("Remote procedure exception: "+e.getMessage(),e);
+            throw new ManifoldCFException("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 ACFException("Unexpected http error code "+httpErrorCode+" accessing SharePoint at "+baseUrl+parentSite+": "+e.getMessage(),e);
+          throw new ManifoldCFException("Unexpected http error code "+httpErrorCode+" accessing SharePoint at "+baseUrl+parentSite+": "+e.getMessage(),e);
         }
-        throw new ACFException("Unknown http error occurred: "+e.getMessage(),e);
+        throw new ManifoldCFException("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 ACFException("Interrupted",ACFException.INTERRUPTED);
+          throw new ManifoldCFException("Interrupted",ManifoldCFException.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 ACFException("Unexpected remote exception occurred: "+e.getMessage(),e);
+      throw new ManifoldCFException("Unexpected remote exception occurred: "+e.getMessage(),e);
     }
   }
 

Modified: incubator/lcf/trunk/modules/connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharepoint/SharePointRepository.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharepoint/SharePointRepository.java?rev=1004255&r1=1004254&r2=1004255&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharepoint/SharePointRepository.java (original)
+++ incubator/lcf/trunk/modules/connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharepoint/SharePointRepository.java Mon Oct  4 14:32:19 2010
@@ -22,7 +22,7 @@ import org.apache.manifoldcf.core.interf
 import org.apache.manifoldcf.agents.interfaces.*;
 import org.apache.manifoldcf.crawler.interfaces.*;
 import org.apache.manifoldcf.crawler.system.Logging;
-import org.apache.manifoldcf.crawler.system.ACF;
+import org.apache.manifoldcf.crawler.system.ManifoldCF;
 import org.apache.manifoldcf.core.common.*;
 
 import java.io.*;
@@ -108,7 +108,7 @@ public class SharePointRepository extend
 
   /** Set up a session */
   protected void getSession()
-    throws ACFException
+    throws ManifoldCFException
   {
     if (proxy == null)
     {
@@ -135,7 +135,7 @@ public class SharePointRepository extend
       }
       catch (NumberFormatException e)
       {
-        throw new ACFException(e.getMessage(),e);
+        throw new ManifoldCFException(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 ACFException("Invalid user name - need <domain>\\<name>");
+        throw new ManifoldCFException("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 = ACF.getFileProperty(wsddPathProperty);
+      File sharepointWSDDLocation = ManifoldCF.getFileProperty(wsddPathProperty);
       if (sharepointWSDDLocation == null)
-        throw new ACFException("SharePoint wsdd location path (property "+wsddPathProperty+") must be specified!");
+        throw new ManifoldCFException("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 ACFException
+    throws ManifoldCFException
   {
     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 ACFException
+    throws ManifoldCFException
   {
     getSession();
     try
@@ -303,7 +303,7 @@ public class SharePointRepository extend
     {
       return "SharePoint temporarily unavailable: "+e.getMessage();
     }
-    catch (ACFException e)
+    catch (ManifoldCFException e)
     {
       return e.getMessage();
     }
@@ -315,7 +315,7 @@ public class SharePointRepository extend
   * in active use.
   */
   public void poll()
-    throws ACFException
+    throws ManifoldCFException
   {
     if (connectionManager != null)
       connectionManager.closeIdleConnections(60000L);
@@ -329,7 +329,7 @@ public class SharePointRepository extend
   *@return true if the resource is found, false if not.  In either case, output may be filled in.
   */
   public boolean requestInfo(Configuration output, String command)
-    throws ACFException
+    throws ManifoldCFException
   {
     if (command.startsWith("fields/"))
     {
@@ -371,11 +371,11 @@ public class SharePointRepository extend
       }
       catch (ServiceInterruption e)
       {
-        ACF.createServiceInterruptionNode(output,e);
+        ManifoldCF.createServiceInterruptionNode(output,e);
       }
-      catch (ACFException e)
+      catch (ManifoldCFException e)
       {
-        ACF.createErrorNode(output,e);
+        ManifoldCF.createErrorNode(output,e);
       }
     }
     else if (command.startsWith("sites/"))
@@ -395,11 +395,11 @@ public class SharePointRepository extend
       }
       catch (ServiceInterruption e)
       {
-        ACF.createServiceInterruptionNode(output,e);
+        ManifoldCF.createServiceInterruptionNode(output,e);
       }
-      catch (ACFException e)
+      catch (ManifoldCFException e)
       {
-        ACF.createErrorNode(output,e);
+        ManifoldCF.createErrorNode(output,e);
       }
     }
     else if (command.startsWith("libraries/"))
@@ -419,11 +419,11 @@ public class SharePointRepository extend
       }
       catch (ServiceInterruption e)
       {
-        ACF.createServiceInterruptionNode(output,e);
+        ManifoldCF.createServiceInterruptionNode(output,e);
       }
-      catch (ACFException e)
+      catch (ManifoldCFException e)
       {
-        ACF.createErrorNode(output,e);
+        ManifoldCF.createErrorNode(output,e);
       }
     }
     else
@@ -459,7 +459,7 @@ public class SharePointRepository extend
   */
   public void addSeedDocuments(ISeedingActivity activities, DocumentSpecification spec,
     long startTime, long endTime, int jobMode)
-    throws ACFException, ServiceInterruption
+    throws ManifoldCFException, ServiceInterruption
   {
     // Check the session
     getSession();
@@ -487,7 +487,7 @@ public class SharePointRepository extend
   */
   public String[] getDocumentVersions(String[] documentIdentifiers, String[] oldVersions, IVersionActivity activities,
     DocumentSpecification spec, int jobMode, boolean usesDefaultAuthority)
-    throws ACFException, ServiceInterruption
+    throws ManifoldCFException, ServiceInterruption
   {
     getSession();
 
@@ -793,7 +793,7 @@ public class SharePointRepository extend
         }
       }
       else
-        throw new ACFException("Invalid document identifier discovered: '"+documentIdentifier+"'");
+        throw new ManifoldCFException("Invalid document identifier discovered: '"+documentIdentifier+"'");
       i++;
     }
     return rval;
@@ -811,7 +811,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 ACFException, ServiceInterruption
+    throws ManifoldCFException, ServiceInterruption
   {
     getSession();
 
@@ -930,7 +930,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 ACFException("Internal error: Relative path '"+relPath+"' was expected to start with '"+
+                  throw new ManifoldCFException("Internal error: Relative path '"+relPath+"' was expected to start with '"+
                     serverLocation+"'");
                 }
 
@@ -1072,7 +1072,7 @@ public class SharePointRepository extend
                       {
                         activities.recordActivity(new Long(startFetchTime),ACTIVITY_FETCH,
                           null,documentIdentifier,"Error","Http status "+Integer.toString(returnCode),null);
-                        throw new ACFException("Error fetching document '"+fileUrl+"': "+Integer.toString(returnCode));
+                        throw new ManifoldCFException("Error fetching document '"+fileUrl+"': "+Integer.toString(returnCode));
                       }
 
                       // int contentSize = (int)method.getResponseContentLength();
@@ -1104,7 +1104,7 @@ public class SharePointRepository extend
                         }
                         catch (InterruptedIOException e)
                         {
-                          throw new ACFException("Interrupted: "+e.getMessage(),e,ACFException.INTERRUPTED);
+                          throw new ManifoldCFException("Interrupted: "+e.getMessage(),e,ManifoldCFException.INTERRUPTED);
                         }
                         catch (IOException e)
                         {
@@ -1124,7 +1124,7 @@ public class SharePointRepository extend
                   }
                   catch (InterruptedException e)
                   {
-                    throw new ACFException("Interrupted: "+e.getMessage(),e,ACFException.INTERRUPTED);
+                    throw new ManifoldCFException("Interrupted: "+e.getMessage(),e,ManifoldCFException.INTERRUPTED);
                   }
                   catch (java.net.SocketTimeoutException e)
                   {
@@ -1146,14 +1146,14 @@ public class SharePointRepository extend
                   }
                   catch (InterruptedIOException e)
                   {
-                    throw new ACFException("Interrupted: "+e.getMessage(),e,ACFException.INTERRUPTED);
+                    throw new ManifoldCFException("Interrupted: "+e.getMessage(),e,ManifoldCFException.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 ACFException("SharePoint: Illegal argument: "+e.getMessage(),e);
+                    throw new ManifoldCFException("SharePoint: Illegal argument: "+e.getMessage(),e);
                   }
                   catch (HttpException e)
                   {
@@ -1293,7 +1293,7 @@ public class SharePointRepository extend
                   }
                   catch (InterruptedIOException e)
                   {
-                    throw new ACFException("Interrupted: "+e.getMessage(),e,ACFException.INTERRUPTED);
+                    throw new ManifoldCFException("Interrupted: "+e.getMessage(),e,ManifoldCFException.INTERRUPTED);
                   }
                   catch (IOException e)
                   {
@@ -1309,25 +1309,25 @@ public class SharePointRepository extend
             }
             catch (java.net.SocketTimeoutException e)
             {
-              throw new ACFException("Socket timeout error writing '"+fileUrl+"' to temporary file: "+e.getMessage(),e);
+              throw new ManifoldCFException("Socket timeout error writing '"+fileUrl+"' to temporary file: "+e.getMessage(),e);
             }
             catch (org.apache.commons.httpclient.ConnectTimeoutException e)
             {
-              throw new ACFException("Connect timeout error writing '"+fileUrl+"' to temporary file: "+e.getMessage(),e);
+              throw new ManifoldCFException("Connect timeout error writing '"+fileUrl+"' to temporary file: "+e.getMessage(),e);
             }
             catch (InterruptedIOException e)
             {
-              throw new ACFException("Interrupted: "+e.getMessage(),e,ACFException.INTERRUPTED);
+              throw new ManifoldCFException("Interrupted: "+e.getMessage(),e,ManifoldCFException.INTERRUPTED);
             }
             catch (IOException e)
             {
-              throw new ACFException("IO error writing '"+fileUrl+"' to temporary file: "+e.getMessage(),e);
+              throw new ManifoldCFException("IO error writing '"+fileUrl+"' to temporary file: "+e.getMessage(),e);
             }
           }
         }
       }
       else
-        throw new ACFException("Found illegal document identifier in processDocuments: '"+documentIdentifier+"'");
+        throw new ManifoldCFException("Found illegal document identifier in processDocuments: '"+documentIdentifier+"'");
 
       i++;
     }
@@ -1350,7 +1350,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 ACFException, IOException
+    throws ManifoldCFException, IOException
   {
     tabsArray.add("Server");
     out.print(
@@ -1476,7 +1476,7 @@ public class SharePointRepository extend
   *@param tabName is the current tab name.
   */
   public void outputConfigurationBody(IThreadContext threadContext, IHTTPOutput out, ConfigParams parameters, String tabName)
-    throws ACFException, IOException
+    throws ManifoldCFException, IOException
   {
     String serverVersion = parameters.getParameter("serverVersion");
     if (serverVersion == null)
@@ -1633,7 +1633,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 ACFException
+    throws ManifoldCFException
   {
     String serverVersion = variableContext.getParameter("serverVersion");
     if (serverVersion != null)
@@ -1733,7 +1733,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 ACFException, IOException
+    throws ManifoldCFException, IOException
   {
     out.print(
 "<table class=\"displaytable\">\n"+
@@ -1781,7 +1781,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 ACFException, IOException
+    throws ManifoldCFException, IOException
   {
     tabsArray.add("Paths");
     tabsArray.add("Security");
@@ -1957,7 +1957,7 @@ public class SharePointRepository extend
   *@param tabName is the current tab name.
   */
   public void outputSpecificationBody(IHTTPOutput out, DocumentSpecification ds, String tabName)
-    throws ACFException, IOException
+    throws ManifoldCFException, IOException
   {
     int i;
     int k;
@@ -2228,7 +2228,7 @@ public class SharePointRepository extend
             pathLibrary = null;
           }
         }
-        catch (ACFException e)
+        catch (ManifoldCFException e)
         {
           e.printStackTrace();
           message = e.getMessage();
@@ -2855,7 +2855,7 @@ public class SharePointRepository extend
         {
           metaFieldList = getFieldList(site,lib);
         }
-        catch (ACFException e)
+        catch (ManifoldCFException e)
         {
           e.printStackTrace();
           message = e.getMessage();
@@ -2901,7 +2901,7 @@ public class SharePointRepository extend
             metaPathState = "unknown";
           }
         }
-        catch (ACFException e)
+        catch (ManifoldCFException e)
         {
           e.printStackTrace();
           message = e.getMessage();
@@ -3232,7 +3232,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 ACFException
+    throws ManifoldCFException
   {
     // Remove old-style rules, but only if the information would not be lost
     if (variableContext.getParameter("specpathcount") != null && variableContext.getParameter("metapathcount") != null)
@@ -3748,7 +3748,7 @@ public class SharePointRepository extend
   *@param ds is the current document specification for this job.
   */
   public void viewSpecification(IHTTPOutput out, DocumentSpecification ds)
-    throws ACFException, IOException
+    throws ManifoldCFException, IOException
   {
     // Display path rules
     out.print(
@@ -4199,7 +4199,7 @@ public class SharePointRepository extend
   * @return list of the fields
   */
   public Map getFieldList( String parentSite, String docLibrary )
-    throws ServiceInterruption, ACFException
+    throws ServiceInterruption, ManifoldCFException
   {
     getSession();
     return proxy.getFieldList( encodePath(parentSite), proxy.getDocLibID( encodePath(parentSite), parentSite, docLibrary) );
@@ -4211,7 +4211,7 @@ public class SharePointRepository extend
   * @return list of the sites
   */
   public ArrayList getSites( String parentSite )
-    throws ServiceInterruption, ACFException
+    throws ServiceInterruption, ManifoldCFException
   {
     getSession();
     return proxy.getSites( encodePath(parentSite) );
@@ -4223,7 +4223,7 @@ public class SharePointRepository extend
   * @return list of the libraries
   */
   public ArrayList getDocLibsBySite( String parentSite )
-    throws ACFException, ServiceInterruption
+    throws ManifoldCFException, ServiceInterruption
   {
     getSession();
     return proxy.getDocumentLibraries( encodePath(parentSite), parentSite );
@@ -5062,7 +5062,7 @@ public class SharePointRepository extend
 
     /** Constructor */
     public SystemMetadataDescription(DocumentSpecification spec)
-      throws ACFException
+      throws ManifoldCFException
     {
       pathAttributeName = null;
       int i = 0;
@@ -5091,7 +5091,7 @@ public class SharePointRepository extend
     /** Given an identifier, get the translated string that goes into the metadata.
     */
     public String getPathAttributeValue(String documentIdentifier)
-      throws ACFException
+      throws ManifoldCFException
     {
       String path = getPathString(documentIdentifier);
       return matchMap.translate(path);
@@ -5102,7 +5102,7 @@ public class SharePointRepository extend
     * is easy to calculate.
     */
     public String getPathString(String documentIdentifier)
-      throws ACFException
+      throws ManifoldCFException
     {
       // There will be a "//" somewhere in the string.  Remove it!
       int dslashIndex = documentIdentifier.indexOf("//");
@@ -5122,7 +5122,7 @@ public class SharePointRepository extend
     /** Constructor.  Pass the keystore.
     */
     public MySSLSocketFactory(IKeystoreManager keystore)
-      throws ACFException
+      throws ManifoldCFException
     {
       this.keystore = keystore;
       thisSocketFactory = keystore.getSecureSocketFactory();
@@ -5203,7 +5203,7 @@ public class SharePointRepository extend
       {
         return keystore.getString().equals(other.keystore.getString());
       }
-      catch (ACFException e)
+      catch (ManifoldCFException e)
       {
         return false;
       }
@@ -5215,7 +5215,7 @@ public class SharePointRepository extend
       {
         return keystore.getString().hashCode();
       }
-      catch (ACFException e)
+      catch (ManifoldCFException e)
       {
         return 0;
       }

Modified: incubator/lcf/trunk/modules/connectors/solr/connector/src/main/java/org/apache/manifoldcf/agents/output/solr/HttpPoster.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/connectors/solr/connector/src/main/java/org/apache/manifoldcf/agents/output/solr/HttpPoster.java?rev=1004255&r1=1004254&r2=1004255&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/connectors/solr/connector/src/main/java/org/apache/manifoldcf/agents/output/solr/HttpPoster.java (original)
+++ incubator/lcf/trunk/modules/connectors/solr/connector/src/main/java/org/apache/manifoldcf/agents/output/solr/HttpPoster.java Mon Oct  4 14:32:19 2010
@@ -111,7 +111,7 @@ public class HttpPoster
     {
       secureSocketFactory = getSecureSocketFactory();
     }
-    catch (ACFException e)
+    catch (ManifoldCFException 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 ACFException
+    throws ManifoldCFException
   {
     this.allowAttributeName = allowAttributeName;
     this.denyAttributeName = denyAttributeName;
@@ -146,7 +146,7 @@ public class HttpPoster
       }
       catch (java.io.UnsupportedEncodingException e)
       {
-        throw new ACFException("Couldn't convert to utf-8 bytes: "+e.getMessage(),e);
+        throw new ManifoldCFException("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 = ACF.getProperty(ingestBufferSizeProperty);
+    String x = ManifoldCF.getProperty(ingestBufferSizeProperty);
     if (x != null && x.length() > 0)
       buffersize = new Integer(x).intValue();
-    x = ACF.getProperty(ingestResponseRetryCount);
+    x = ManifoldCF.getProperty(ingestResponseRetryCount);
     if (x != null && x.length() > 0)
       responseRetries = new Integer(x).intValue();
-    x = ACF.getProperty(ingestResponseRetryInterval);
+    x = ManifoldCF.getProperty(ingestResponseRetryInterval);
     if (x != null && x.length() > 0)
       responseRetryWait = new Long(x).longValue();
-    x = ACF.getProperty(ingestRescheduleInterval);
+    x = ManifoldCF.getProperty(ingestRescheduleInterval);
     if (x != null && x.length() > 0)
       interruptionRetryTime = new Long(x).longValue();
   }
@@ -179,7 +179,7 @@ public class HttpPoster
   /** Cause a commit to happen.
   */
   public void commitPost()
-    throws ACFException, ServiceInterruption
+    throws ManifoldCFException, ServiceInterruption
   {
     if (Logging.ingest.isDebugEnabled())
       Logging.ingest.debug("commitPost()");
@@ -201,8 +201,8 @@ public class HttpPoster
           {
             if (thr instanceof ServiceInterruption)
               throw (ServiceInterruption)thr;
-            if (thr instanceof ACFException)
-              throw (ACFException)thr;
+            if (thr instanceof ManifoldCFException)
+              throw (ManifoldCFException)thr;
             if (thr instanceof IOException)
               throw (IOException)thr;
             if (thr instanceof RuntimeException)
@@ -215,7 +215,7 @@ public class HttpPoster
         catch (InterruptedException e)
         {
           t.interrupt();
-          throw new ACFException("Interrupted: "+e.getMessage(),ACFException.INTERRUPTED);
+          throw new ManifoldCFException("Interrupted: "+e.getMessage(),ManifoldCFException.INTERRUPTED);
         }
       }
       catch (IOException ioe)
@@ -236,11 +236,11 @@ public class HttpPoster
       // Sleep for a time, and retry
       try
       {
-        ACF.sleep(10000L);
+        ManifoldCF.sleep(10000L);
       }
       catch (InterruptedException e)
       {
-        throw new ACFException("Interrupted",ACFException.INTERRUPTED);
+        throw new ManifoldCFException("Interrupted",ManifoldCFException.INTERRUPTED);
       }
       ioErrorRetry--;
 
@@ -256,12 +256,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 ACFException, ServiceInterruption
+  * @throws ManifoldCFException, ServiceInterruption
   */
   public boolean indexPost(String documentURI,
     RepositoryDocument document, Map arguments, Map sourceTargets,
     String authorityNameString, IOutputAddActivity activities)
-    throws ACFException, ServiceInterruption
+    throws ManifoldCFException, ServiceInterruption
   {
     if (Logging.ingest.isDebugEnabled())
       Logging.ingest.debug("indexPost(): '" + documentURI + "'");
@@ -298,8 +298,8 @@ public class HttpPoster
           {
             if (thr instanceof ServiceInterruption)
               throw (ServiceInterruption)thr;
-            if (thr instanceof ACFException)
-              throw (ACFException)thr;
+            if (thr instanceof ManifoldCFException)
+              throw (ManifoldCFException)thr;
             if (thr instanceof IOException)
               throw (IOException)thr;
             if (thr instanceof RuntimeException)
@@ -312,7 +312,7 @@ public class HttpPoster
         catch (InterruptedException e)
         {
           t.interrupt();
-          throw new ACFException("Interrupted: "+e.getMessage(),ACFException.INTERRUPTED);
+          throw new ManifoldCFException("Interrupted: "+e.getMessage(),ManifoldCFException.INTERRUPTED);
         }
       }
       catch (java.net.SocketTimeoutException ioe)
@@ -347,11 +347,11 @@ public class HttpPoster
       // Sleep for a time, and retry
       try
       {
-        ACF.sleep(10000L);
+        ManifoldCF.sleep(10000L);
       }
       catch (InterruptedException e)
       {
-        throw new ACFException("Interrupted: "+e.getMessage(),ACFException.INTERRUPTED);
+        throw new ManifoldCFException("Interrupted: "+e.getMessage(),ManifoldCFException.INTERRUPTED);
       }
       ioErrorRetry--;
 
@@ -364,7 +364,7 @@ public class HttpPoster
   /** Post a check request.
   */
   public void checkPost()
-    throws ACFException, ServiceInterruption
+    throws ManifoldCFException, ServiceInterruption
   {
     if (Logging.ingest.isDebugEnabled())
       Logging.ingest.debug("checkPost()");
@@ -386,8 +386,8 @@ public class HttpPoster
           {
             if (thr instanceof ServiceInterruption)
               throw (ServiceInterruption)thr;
-            if (thr instanceof ACFException)
-              throw (ACFException)thr;
+            if (thr instanceof ManifoldCFException)
+              throw (ManifoldCFException)thr;
             if (thr instanceof IOException)
               throw (IOException)thr;
             if (thr instanceof RuntimeException)
@@ -400,7 +400,7 @@ public class HttpPoster
         catch (InterruptedException e)
         {
           t.interrupt();
-          throw new ACFException("Interrupted: "+e.getMessage(),ACFException.INTERRUPTED);
+          throw new ManifoldCFException("Interrupted: "+e.getMessage(),ManifoldCFException.INTERRUPTED);
         }
       }
       catch (IOException ioe)
@@ -421,11 +421,11 @@ public class HttpPoster
       // Sleep for a time, and retry
       try
       {
-        ACF.sleep(10000L);
+        ManifoldCF.sleep(10000L);
       }
       catch (InterruptedException e)
       {
-        throw new ACFException("Interrupted",ACFException.INTERRUPTED);
+        throw new ManifoldCFException("Interrupted",ManifoldCFException.INTERRUPTED);
       }
       ioErrorRetry--;
 
@@ -437,7 +437,7 @@ public class HttpPoster
   *@param documentURI is the document's URI.
   */
   public void deletePost(String documentURI, IOutputRemoveActivity activities)
-    throws ACFException, ServiceInterruption
+    throws ManifoldCFException, ServiceInterruption
   {
     if (Logging.ingest.isDebugEnabled())
       Logging.ingest.debug("deletePost(): '" + documentURI + "'");
@@ -462,8 +462,8 @@ public class HttpPoster
           {
             if (thr instanceof ServiceInterruption)
               throw (ServiceInterruption)thr;
-            if (thr instanceof ACFException)
-              throw (ACFException)thr;
+            if (thr instanceof ManifoldCFException)
+              throw (ManifoldCFException)thr;
             if (thr instanceof IOException)
               throw (IOException)thr;
             if (thr instanceof RuntimeException)
@@ -476,7 +476,7 @@ public class HttpPoster
         catch (InterruptedException e)
         {
           t.interrupt();
-          throw new ACFException("Interrupted: "+e.getMessage(),ACFException.INTERRUPTED);
+          throw new ManifoldCFException("Interrupted: "+e.getMessage(),ManifoldCFException.INTERRUPTED);
         }
       }
       catch (IOException ioe)
@@ -498,11 +498,11 @@ public class HttpPoster
       // Sleep for a time, and retry
       try
       {
-        ACF.sleep(10000L);
+        ManifoldCF.sleep(10000L);
       }
       catch (InterruptedException e)
       {
-        throw new ACFException("Interrupted",ACFException.INTERRUPTED);
+        throw new ManifoldCFException("Interrupted",ManifoldCFException.INTERRUPTED);
       }
 
       ioErrorRetry--;
@@ -518,7 +518,7 @@ public class HttpPoster
   * @return the modified ACL.
   */
   protected static String[] convertACL(String[] acl, String authorityNameString, IOutputAddActivity activities)
-    throws ACFException
+    throws ManifoldCFException
   {
     if (acl != null)
     {
@@ -560,9 +560,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 ACFException
+  * @throws ManifoldCFException
   */
-  protected CodeDetails getResponse(InputStream in) throws ACFException, ServiceInterruption
+  protected CodeDetails getResponse(InputStream in) throws ManifoldCFException, ServiceInterruption
   {
     Logging.ingest.debug("Waiting for response stream");
 
@@ -607,7 +607,7 @@ public class HttpPoster
       {
         doc = new XMLDoc(in);
       }
-      catch (ACFException e)
+      catch (ManifoldCFException e)
       {
         // Syntax errors should be eaten; we'll just return a null doc in that case.
         e.printStackTrace();
@@ -629,7 +629,7 @@ public class HttpPoster
     }
     catch (InterruptedIOException e)
     {
-      throw new ACFException("Interrupted",ACFException.INTERRUPTED);
+      throw new ManifoldCFException("Interrupted",ManifoldCFException.INTERRUPTED);
     }
     catch (java.net.ConnectException e)
     {
@@ -682,7 +682,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 ACFException
+    throws ManifoldCFException
   {
     try
     {
@@ -695,18 +695,18 @@ public class HttpPoster
     }
     catch (java.security.NoSuchAlgorithmException e)
     {
-      throw new ACFException("No such algorithm: "+e.getMessage(),e);
+      throw new ManifoldCFException("No such algorithm: "+e.getMessage(),e);
     }
     catch (java.security.KeyManagementException e)
     {
-      throw new ACFException("Key management exception: "+e.getMessage(),e);
+      throw new ManifoldCFException("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, ACFException
+    throws IOException, ManifoldCFException
   {
     Socket socket;
     if (protocol.equals("https"))
@@ -722,7 +722,7 @@ public class HttpPoster
       }
       catch (IOException e)
       {
-        throw new ACFException("Couldn't set up SSL connection to ingestion API: "+e.getMessage(),e);
+        throw new ManifoldCFException("Couldn't set up SSL connection to ingestion API: "+e.getMessage(),e);
       }
     }
     else
@@ -1264,7 +1264,7 @@ public class HttpPoster
 
                 // A negative number means http error of some kind.
                 if (codeValue < 0)
-                  throw new ACFException("Http protocol error");
+                  throw new ManifoldCFException("Http protocol error");
 
                 // 200 means we got a status document back
                 if (codeValue == 200)
@@ -1282,11 +1282,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 ACFException,
+                // 3) Something is wrong with the setup, e.g. bad credentials.  In this case we chuck a ManifoldCFException,
                 //    since this will abort the current activity entirely.
 
                 if (codeValue == 401)
-                  throw new ACFException("Bad credentials for ingestion",ACFException.SETUP_ERROR);
+                  throw new ManifoldCFException("Bad credentials for ingestion",ManifoldCFException.SETUP_ERROR);
 
                 if (codeValue >= 400 && codeValue < 500)
                 {
@@ -1297,7 +1297,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 ACFException("Ingestion HTTP error code "+Integer.toString(codeValue)),
+                  new ManifoldCFException("Ingestion HTTP error code "+Integer.toString(codeValue)),
                   currentTime + interruptionRetryTime,
                   currentTime + 2L * 60L * 60000L,
                   -1,
@@ -1332,7 +1332,7 @@ public class HttpPoster
         }
         catch (UnsupportedEncodingException ioe)
         {
-          throw new ACFException("Fatal ingestion error: "+ioe.getMessage(),ioe);
+          throw new ManifoldCFException("Fatal ingestion error: "+ioe.getMessage(),ioe);
         }
         catch (java.net.SocketTimeoutException ioe)
         {
@@ -1502,7 +1502,7 @@ public class HttpPoster
                 int codeValue = cd.getCodeValue();
 
                 if (codeValue < 0)
-                  throw new ACFException("Http protocol error");
+                  throw new ManifoldCFException("Http protocol error");
 
                 // 200 means we got an xml document back
                 if (codeValue == 200)
@@ -1514,13 +1514,13 @@ public class HttpPoster
 
                 // We ignore everything in the range from 400-500 now
                 if (codeValue == 401)
-                  throw new ACFException("Bad credentials for ingestion",ACFException.SETUP_ERROR);
+                  throw new ManifoldCFException("Bad credentials for ingestion",ManifoldCFException.SETUP_ERROR);
 
                 if (codeValue >= 400 && codeValue < 500)
                   return;
 
                 // Anything else means the document didn't delete.  Throw the error.
-                throw new ACFException("Error deleting document: '"+cd.getDescription()+"'");
+                throw new ManifoldCFException("Error deleting document: '"+cd.getDescription()+"'");
               }
               finally
               {
@@ -1551,7 +1551,7 @@ public class HttpPoster
         }
         catch (UnsupportedEncodingException ioe)
         {
-          throw new ACFException("Fatal ingestion error: "+ioe.getMessage(),ioe);
+          throw new ManifoldCFException("Fatal ingestion error: "+ioe.getMessage(),ioe);
         }
         catch (InterruptedIOException ioe)
         {
@@ -1648,7 +1648,7 @@ public class HttpPoster
 
                 int codeValue = cd.getCodeValue();
                 if (codeValue < 0)
-                  throw new ACFException("Http protocol error");
+                  throw new ManifoldCFException("Http protocol error");
 
                 // 200 means everything went OK
                 if (codeValue == 200)
@@ -1659,10 +1659,10 @@ public class HttpPoster
 
                 // We ignore everything in the range from 400-500 now
                 if (codeValue == 401)
-                  throw new ACFException("Bad credentials for commit request",ACFException.SETUP_ERROR);
+                  throw new ManifoldCFException("Bad credentials for commit request",ManifoldCFException.SETUP_ERROR);
 
                 // Anything else means the info request failed.
-                throw new ACFException("Error connecting to update request API: '"+cd.getDescription()+"'");
+                throw new ManifoldCFException("Error connecting to update request API: '"+cd.getDescription()+"'");
               }
               finally
               {
@@ -1693,7 +1693,7 @@ public class HttpPoster
         }
         catch (UnsupportedEncodingException ioe)
         {
-          throw new ACFException("Fatal commit error: "+ioe.getMessage(),ioe);
+          throw new ManifoldCFException("Fatal commit error: "+ioe.getMessage(),ioe);
         }
         catch (InterruptedIOException ioe)
         {
@@ -1772,7 +1772,7 @@ public class HttpPoster
 
                 int codeValue = cd.getCodeValue();
                 if (codeValue < 0)
-                  throw new ACFException("Http protocol error");
+                  throw new ManifoldCFException("Http protocol error");
 
                 // 200 means everything went OK
                 if (codeValue == 200)
@@ -1783,10 +1783,10 @@ public class HttpPoster
 
                 // We ignore everything in the range from 400-500 now
                 if (codeValue == 401)
-                  throw new ACFException("Bad credentials for ingestion",ACFException.SETUP_ERROR);
+                  throw new ManifoldCFException("Bad credentials for ingestion",ManifoldCFException.SETUP_ERROR);
 
                 // Anything else means the info request failed.
-                throw new ACFException("Error connecting to ingestion API: '"+cd.getDescription()+"'");
+                throw new ManifoldCFException("Error connecting to ingestion API: '"+cd.getDescription()+"'");
               }
               finally
               {
@@ -1817,7 +1817,7 @@ public class HttpPoster
         }
         catch (UnsupportedEncodingException ioe)
         {
-          throw new ACFException("Fatal ingestion error: "+ioe.getMessage(),ioe);
+          throw new ManifoldCFException("Fatal ingestion error: "+ioe.getMessage(),ioe);
         }
         catch (InterruptedIOException ioe)
         {
@@ -1903,13 +1903,13 @@ public class HttpPoster
     }
 
     public String getDescription()
-      throws ACFException
+      throws ManifoldCFException
     {
       return res + "\r\n" + ((returnDoc!=null)?returnDoc.getXML():"");
     }
 
     public void parseIngestionResponse()
-      throws ACFException
+      throws ManifoldCFException
     {
       // Look at response XML
       String statusValue = "unknown";
@@ -1958,26 +1958,26 @@ public class HttpPoster
         if (statusValue.equals("0"))
           return;
 
-        throw new ACFException("Ingestion returned error: "+statusValue);
+        throw new ManifoldCFException("Ingestion returned error: "+statusValue);
       }
       else
-        throw new ACFException("XML parsing error on response");
+        throw new ManifoldCFException("XML parsing error on response");
     }
 
     public void parseRemovalResponse()
-      throws ACFException
+      throws ManifoldCFException
     {
       parseIngestionResponse();
     }
 
     public void parseCommitResponse()
-      throws ACFException
+      throws ManifoldCFException
     {
       parseIngestionResponse();
     }
     
     public void parseStatusResponse()
-      throws ACFException
+      throws ManifoldCFException
     {
       // Look at response XML
       String statusValue = "unknown";
@@ -2013,10 +2013,10 @@ public class HttpPoster
         if (statusValue.equals("OK"))
           return;
 
-        throw new ACFException("Status error: "+statusValue);
+        throw new ManifoldCFException("Status error: "+statusValue);
       }
       else
-        throw new ACFException("XML parsing error on response");
+        throw new ManifoldCFException("XML parsing error on response");
     }
   }
 



Mime
View raw message