You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@manifoldcf.apache.org by kw...@apache.org on 2010/02/17 16:57:35 UTC

svn commit: r911029 [6/19] - in /incubator/lcf/trunk: modules/connectors/documentum/connector/org/apache/lcf/crawler/authorities/DCTM/ modules/connectors/documentum/connector/org/apache/lcf/crawler/connectors/DCTM/ modules/connectors/documentum/crawler...

Modified: incubator/lcf/trunk/modules/connectors/sharepoint/connector/org/apache/lcf/crawler/connectors/sharepoint/SPSProxyHelper.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/connectors/sharepoint/connector/org/apache/lcf/crawler/connectors/sharepoint/SPSProxyHelper.java?rev=911029&r1=911028&r2=911029&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/connectors/sharepoint/connector/org/apache/lcf/crawler/connectors/sharepoint/SPSProxyHelper.java (original)
+++ incubator/lcf/trunk/modules/connectors/sharepoint/connector/org/apache/lcf/crawler/connectors/sharepoint/SPSProxyHelper.java Wed Feb 17 15:57:27 2010
@@ -24,7 +24,7 @@
 import javax.xml.soap.*;
 
 import org.apache.lcf.core.common.XMLDoc;
-import org.apache.lcf.core.interfaces.MetacartaException;
+import org.apache.lcf.core.interfaces.LCFException;
 import org.apache.lcf.agents.interfaces.ServiceInterruption;
 import org.apache.lcf.crawler.system.Logging;
 
@@ -45,8 +45,8 @@
 public class SPSProxyHelper {
 
 
-	public static final String PROTOCOL_FACTORY_PROPERTY = "Metacarta_Protocol_Factory";
-	public static final String CONNECTION_MANAGER_PROPERTY = "Metacarta_Connection_Manager";
+	public static final String PROTOCOL_FACTORY_PROPERTY = "LCF_Protocol_Factory";
+	public static final String CONNECTION_MANAGER_PROPERTY = "LCF_Connection_Manager";
 
 	private String serverUrl;
 	private String serverLocation;
@@ -88,7 +88,7 @@
 	 * @throws Exception
 	 */
 	public String[] getACLs(String site, String docLib )
-		throws MetacartaException, ServiceInterruption
+		throws LCFException, ServiceInterruption
 	{
 	    long currentTime;
 	    try
@@ -109,18 +109,18 @@
 		doc.processPath(nodeList, "*", null);
 		if (nodeList.size() != 1)
 		{
-			throw new MetacartaException("Bad xml - missing outer 'ns1:GetPermissionCollection' node - there are "+Integer.toString(nodeList.size())+" nodes");
+			throw new LCFException("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 MetacartaException("Bad xml - outer node is not 'ns1:GetPermissionCollection'");
+			throw new LCFException("Bad xml - outer node is not 'ns1:GetPermissionCollection'");
 
 		nodeList.clear();
 		doc.processPath(nodeList, "*", parent);
 		
 		if ( nodeList.size() != 1 )
 		{
-			throw new MetacartaException( " No results found." );
+			throw new LCFException( " No results found." );
 		}
 		parent = nodeList.get(0);
 		nodeList.clear();
@@ -172,7 +172,7 @@
 	    }
             catch (java.net.MalformedURLException e)
             {
-                    throw new MetacartaException("Bad SharePoint url: "+e.getMessage(),e);
+                    throw new LCFException("Bad SharePoint url: "+e.getMessage(),e);
             }
             catch (javax.xml.rpc.ServiceException e)
             {
@@ -207,11 +207,11 @@
 					return null;
 				}
 				else if (httpErrorCode.equals("403"))
-					throw new MetacartaException("Http error "+httpErrorCode+" while reading from "+baseUrl+site+" - check IIS and SharePoint security settings! "+e.getMessage(),e);
+					throw new LCFException("Http error "+httpErrorCode+" while reading from "+baseUrl+site+" - check IIS and SharePoint security settings! "+e.getMessage(),e);
 				else
-					throw new MetacartaException("Unexpected http error code "+httpErrorCode+" accessing SharePoint at "+baseUrl+site+": "+e.getMessage(),e);
+					throw new LCFException("Unexpected http error code "+httpErrorCode+" accessing SharePoint at "+baseUrl+site+": "+e.getMessage(),e);
 			}
-			throw new MetacartaException("Unknown http error occurred: "+e.getMessage(),e);
+			throw new LCFException("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 @@
 		{
 			String exceptionName = e.getFaultString();
 			if (exceptionName.equals("java.lang.InterruptedException"))
-				throw new MetacartaException("Interrupted",MetacartaException.INTERRUPTED);
+				throw new LCFException("Interrupted",LCFException.INTERRUPTED);
 		}
 
 		if (Logging.connectors.isDebugEnabled())
@@ -266,7 +266,7 @@
 		// 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 MetacartaException("Unexpected remote procedure exception: "+e.getMessage(), e);
+		throw new LCFException("Unexpected remote procedure exception: "+e.getMessage(), e);
             }
 	}
 
@@ -279,7 +279,7 @@
 	 * @throws Exception
 	 */
 	public String[] getDocumentACLs(String site, String file)
-		throws MetacartaException, ServiceInterruption
+		throws LCFException, ServiceInterruption
 	{
 	    long currentTime;
 	    try
@@ -313,18 +313,18 @@
 		doc.processPath(nodeList, "*", null);
 		if (nodeList.size() != 1)
 		{
-			throw new MetacartaException("Bad xml - missing outer 'ns1:GetPermissionCollection' node - there are "+Integer.toString(nodeList.size())+" nodes");
+			throw new LCFException("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 MetacartaException("Bad xml - outer node is not 'GetPermissionCollection'");
+			throw new LCFException("Bad xml - outer node is not 'GetPermissionCollection'");
 
 		nodeList.clear();
 		doc.processPath(nodeList, "*", parent);
 		
 		if ( nodeList.size() != 1 )
 		{
-			throw new MetacartaException( " No results found." );
+			throw new LCFException( " No results found." );
 		}
 		parent = nodeList.get(0);
 		nodeList.clear();
@@ -376,7 +376,7 @@
 	    }
             catch (java.net.MalformedURLException e)
             {
-                    throw new MetacartaException("Bad SharePoint url: "+e.getMessage(),e);
+                    throw new LCFException("Bad SharePoint url: "+e.getMessage(),e);
             }
             catch (javax.xml.rpc.ServiceException e)
             {
@@ -411,11 +411,11 @@
 					return null;
 				}
 				else if (httpErrorCode.equals("403"))
-					throw new MetacartaException("Http error "+httpErrorCode+" while reading from "+baseUrl+site+" - check IIS and SharePoint security settings! "+e.getMessage(),e);
+					throw new LCFException("Http error "+httpErrorCode+" while reading from "+baseUrl+site+" - check IIS and SharePoint security settings! "+e.getMessage(),e);
 				else
-					throw new MetacartaException("Unexpected http error code "+httpErrorCode+" accessing SharePoint at "+baseUrl+site+": "+e.getMessage(),e);
+					throw new LCFException("Unexpected http error code "+httpErrorCode+" accessing SharePoint at "+baseUrl+site+": "+e.getMessage(),e);
 			}
-			throw new MetacartaException("Unknown http error occurred: "+e.getMessage(),e);
+			throw new LCFException("Unknown http error occurred: "+e.getMessage(),e);
 		}
 		else if (e.getFaultCode().equals(new javax.xml.namespace.QName("http://schemas.xmlsoap.org/soap/envelope/","Server")))
 		{
@@ -456,7 +456,7 @@
 		{
 			String exceptionName = e.getFaultString();
 			if (exceptionName.equals("java.lang.InterruptedException"))
-				throw new MetacartaException("Interrupted",MetacartaException.INTERRUPTED);
+				throw new LCFException("Interrupted",LCFException.INTERRUPTED);
 		}
 
 		if (Logging.connectors.isDebugEnabled())
@@ -470,7 +470,7 @@
 		// 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 MetacartaException("Unexpected remote procedure exception: "+e.getMessage(), e);
+		throw new LCFException("Unexpected remote procedure exception: "+e.getMessage(), e);
             }
 	}
 
@@ -479,10 +479,10 @@
 	 * @param site
 	 * @param docLibrary
 	 * @return
-	 * @throws MetacartaException
+	 * @throws LCFException
 	 */
 	public XMLDoc getDocuments(String site, String docLibrary)
-		throws MetacartaException, ServiceInterruption
+		throws LCFException, ServiceInterruption
 	{
 		long currentTime;
 		try
@@ -525,27 +525,27 @@
 			doc.processPath(nodeList, "*", null);
 			if (nodeList.size() != 1)
 			{
-				throw new MetacartaException("Bad xml - missing outer 'ns1:dsQueryResponse' node - there are "+Integer.toString(nodeList.size())+" nodes");
+				throw new LCFException("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 MetacartaException("Bad xml - outer node is not 'ns1:dsQueryResponse'");
+				throw new LCFException("Bad xml - outer node is not 'ns1:dsQueryResponse'");
 	
 			nodeList.clear();
 			doc.processPath(nodeList, "*", parent);
 			
 			if ( nodeList.size() != 2 )
 			{
-				throw new MetacartaException( " No results found." );
+				throw new LCFException( " No results found." );
 			}
 	
 			return doc;
 		}
 		catch (java.net.MalformedURLException e)
 		{
-                    throw new MetacartaException("Bad SharePoint url: "+e.getMessage(),e);
+                    throw new LCFException("Bad SharePoint url: "+e.getMessage(),e);
 		}
 		catch (javax.xml.rpc.ServiceException e)
 		{
@@ -580,11 +580,11 @@
 						return null;
 					}
 					else if (httpErrorCode.equals("403"))
-						throw new MetacartaException("Http error "+httpErrorCode+" while reading from "+baseUrl+site+" - check IIS and SharePoint security settings! "+e.getMessage(),e);
+						throw new LCFException("Http error "+httpErrorCode+" while reading from "+baseUrl+site+" - check IIS and SharePoint security settings! "+e.getMessage(),e);
 					else
-						throw new MetacartaException("Unexpected http error code "+httpErrorCode+" accessing SharePoint at "+baseUrl+site+": "+e.getMessage(),e);
+						throw new LCFException("Unexpected http error code "+httpErrorCode+" accessing SharePoint at "+baseUrl+site+": "+e.getMessage(),e);
 				}
-				throw new MetacartaException("Unknown http error occurred: "+e.getMessage(),e);
+				throw new LCFException("Unknown http error occurred: "+e.getMessage(),e);
 			}
 			else if (e.getFaultCode().equals(new javax.xml.namespace.QName("http://schemas.xmlsoap.org/soap/envelope/","Server")))
 			{
@@ -625,7 +625,7 @@
 			{
 				String exceptionName = e.getFaultString();
 				if (exceptionName.equals("java.lang.InterruptedException"))
-					throw new MetacartaException("Interrupted",MetacartaException.INTERRUPTED);
+					throw new LCFException("Interrupted",LCFException.INTERRUPTED);
 			}
 
 			if (Logging.connectors.isDebugEnabled())
@@ -639,7 +639,7 @@
 			// 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 MetacartaException("Unexpected remote procedure exception: "+e.getMessage(), e);
+			throw new LCFException("Unexpected remote procedure exception: "+e.getMessage(), e);
 		}
 	}
 	
@@ -651,7 +651,7 @@
 	 * @throws Exception
 	 */
 	public String getDocLibID(String parentSite, String parentSiteDecoded, String docLibrary)
-		throws ServiceInterruption, MetacartaException
+		throws ServiceInterruption, LCFException
 	{
 	    long currentTime;
 	    try
@@ -680,11 +680,11 @@
 		doc.processPath(nodeList, "*", null);
 		if (nodeList.size() != 1)
 		{
-			throw new MetacartaException("Bad xml - missing outer 'ns1:Lists' node - there are "+Integer.toString(nodeList.size())+" nodes");
+			throw new LCFException("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 MetacartaException("Bad xml - outer node is not 'ns1:Lists'");
+			throw new LCFException("Bad xml - outer node is not 'ns1:Lists'");
 
 		nodeList.clear();
 		doc.processPath(nodeList, "*", parent);  // <ns1:Lists>
@@ -708,14 +708,14 @@
 				if (urlPath != null && urlPath.length() > 0)
 				{
 					if (urlPath.length() < chuckIndex)
-						throw new MetacartaException("View url is not in the expected form: '"+urlPath+"'");
+						throw new LCFException("View url is not in the expected form: '"+urlPath+"'");
 					urlPath = urlPath.substring(chuckIndex);
 					if (!urlPath.startsWith("/"))
-						throw new MetacartaException("View url without site is not in the expected form: '"+urlPath+"'");
+						throw new LCFException("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 MetacartaException("Bad view url without site: '"+urlPath+"'");
+						throw new LCFException("Bad view url without site: '"+urlPath+"'");
 					String pathpart = urlPath.substring(1,index);
 
 					if ( pathpart.equals(docLibrary) )
@@ -733,7 +733,7 @@
 	    }
             catch (java.net.MalformedURLException e)
             {
-                    throw new MetacartaException("Bad SharePoint url: "+e.getMessage(),e);
+                    throw new LCFException("Bad SharePoint url: "+e.getMessage(),e);
             }
             catch (javax.xml.rpc.ServiceException e)
             {
@@ -768,11 +768,11 @@
 					return null;
 				}
 				else if (httpErrorCode.equals("403"))
-					throw new MetacartaException("Http error "+httpErrorCode+" while reading from "+baseUrl+parentSite+" - check IIS and SharePoint security settings! "+e.getMessage(),e);
+					throw new LCFException("Http error "+httpErrorCode+" while reading from "+baseUrl+parentSite+" - check IIS and SharePoint security settings! "+e.getMessage(),e);
 				else
-					throw new MetacartaException("Unexpected http error code "+httpErrorCode+" accessing SharePoint at "+baseUrl+parentSite+": "+e.getMessage(),e);
+					throw new LCFException("Unexpected http error code "+httpErrorCode+" accessing SharePoint at "+baseUrl+parentSite+": "+e.getMessage(),e);
 			}
-			throw new MetacartaException("Unknown http error occurred: "+e.getMessage(),e);
+			throw new LCFException("Unknown http error occurred: "+e.getMessage(),e);
 		}
 		else if (e.getFaultCode().equals(new javax.xml.namespace.QName("http://schemas.xmlsoap.org/soap/envelope/","Server")))
 		{
@@ -813,7 +813,7 @@
 		{
 			String exceptionName = e.getFaultString();
 			if (exceptionName.equals("java.lang.InterruptedException"))
-				throw new MetacartaException("Interrupted",MetacartaException.INTERRUPTED);
+				throw new LCFException("Interrupted",LCFException.INTERRUPTED);
 		}
 
 		if (Logging.connectors.isDebugEnabled())
@@ -827,7 +827,7 @@
 		// 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 MetacartaException("Unexpected remote procedure exception: "+e.getMessage(), e);
+		throw new LCFException("Unexpected remote procedure exception: "+e.getMessage(), e);
             }
 	}
 	
@@ -839,7 +839,7 @@
 	 * @throws Exception
 	 */
 	public XMLDoc getVersions( String site, String docPath)
-		throws ServiceInterruption, MetacartaException
+		throws ServiceInterruption, LCFException
 	{
 	    long currentTime;
 	    try
@@ -859,18 +859,18 @@
 		
 		if (nodeList.size() != 1)
 		{
-			throw new MetacartaException("Bad xml - missing outer 'results' node - there are "+Integer.toString(nodeList.size())+" nodes");
+			throw new LCFException("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 MetacartaException("Bad xml - outer node is not 'results'");
+			throw new LCFException("Bad xml - outer node is not 'results'");
 		
 		return doc;
 	    }
             catch (java.net.MalformedURLException e)
             {
-                    throw new MetacartaException("Bad SharePoint url: "+e.getMessage(),e);
+                    throw new LCFException("Bad SharePoint url: "+e.getMessage(),e);
             }
             catch (javax.xml.rpc.ServiceException e)
             {
@@ -905,11 +905,11 @@
 					return null;
 				}
 				else if (httpErrorCode.equals("403"))
-					throw new MetacartaException("Http error "+httpErrorCode+" while reading from "+baseUrl+site+" - check IIS and SharePoint security settings! "+e.getMessage(),e);
+					throw new LCFException("Http error "+httpErrorCode+" while reading from "+baseUrl+site+" - check IIS and SharePoint security settings! "+e.getMessage(),e);
 				else
-					throw new MetacartaException("Unexpected http error code "+httpErrorCode+" accessing SharePoint at "+baseUrl+site+": "+e.getMessage(),e);
+					throw new LCFException("Unexpected http error code "+httpErrorCode+" accessing SharePoint at "+baseUrl+site+": "+e.getMessage(),e);
 			}
-			throw new MetacartaException("Unknown http error occurred: "+e.getMessage(),e);
+			throw new LCFException("Unknown http error occurred: "+e.getMessage(),e);
 		}
 		else if (e.getFaultCode().equals(new javax.xml.namespace.QName("http://schemas.xmlsoap.org/soap/envelope/","Server")))
 		{
@@ -950,7 +950,7 @@
 		{
 			String exceptionName = e.getFaultString();
 			if (exceptionName.equals("java.lang.InterruptedException"))
-				throw new MetacartaException("Interrupted",MetacartaException.INTERRUPTED);
+				throw new LCFException("Interrupted",LCFException.INTERRUPTED);
 		}
 
 		if (Logging.connectors.isDebugEnabled())
@@ -964,7 +964,7 @@
 		// 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 MetacartaException("Unexpected remote procedure exception: "+e.getMessage(), e);
+		throw new LCFException("Unexpected remote procedure exception: "+e.getMessage(), e);
             }
 	}
 	
@@ -976,7 +976,7 @@
 	 * @throws Exception
 	 */
 	private String getSidForUser(com.microsoft.schemas.sharepoint.soap.directory.UserGroupSoap userCall, String userLogin )
-		throws MetacartaException, java.net.MalformedURLException, javax.xml.rpc.ServiceException,
+		throws LCFException, java.net.MalformedURLException, javax.xml.rpc.ServiceException,
 			java.rmi.RemoteException
 	{
 		com.microsoft.schemas.sharepoint.soap.directory.GetUserInfoResponseGetUserInfoResult userResp = userCall.getUserInfo( userLogin );
@@ -988,18 +988,18 @@
 		doc.processPath(nodeList, "*", null);
 		if (nodeList.size() != 1)
 		{
-			throw new MetacartaException("Bad xml - missing outer 'ns1:GetUserInfo' node - there are "+Integer.toString(nodeList.size())+" nodes");
+			throw new LCFException("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 MetacartaException("Bad xml - outer node is not 'ns1:GetUserInfo'");
+			throw new LCFException("Bad xml - outer node is not 'ns1:GetUserInfo'");
 
 		nodeList.clear();
 		doc.processPath(nodeList, "*", parent);  // ns1:User
 		
 		if ( nodeList.size() != 1 )
 		{
-			throw new MetacartaException( " No User found." );
+			throw new LCFException( " No User found." );
 		}
 		parent = nodeList.get(0);
 		nodeList.clear();
@@ -1015,7 +1015,7 @@
 	 * @throws Exception
 	 */
 	private String[] getSidsForGroup(com.microsoft.schemas.sharepoint.soap.directory.UserGroupSoap userCall, String groupName)
-		throws MetacartaException, java.net.MalformedURLException, javax.xml.rpc.ServiceException, java.rmi.RemoteException
+		throws LCFException, 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();
@@ -1026,19 +1026,19 @@
 		doc.processPath(nodeList, "*", null);
 		if (nodeList.size() != 1)
 		{
-			throw new MetacartaException("Bad xml - missing outer 'ns1:GetUserCollectionFromGroup' node - there are "
+			throw new LCFException("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 MetacartaException("Bad xml - outer node is not 'ns1:GetUserCollectionFromGroup'");
+			throw new LCFException("Bad xml - outer node is not 'ns1:GetUserCollectionFromGroup'");
 
 		nodeList.clear();
 		doc.processPath(nodeList, "*", parent); // <ns1:Users>
 
 		if (nodeList.size() != 1)
 		{
-			throw new MetacartaException(" No Users collection found.");
+			throw new LCFException(" No Users collection found.");
 		}
 		parent = nodeList.get(0);
 		nodeList.clear();
@@ -1064,7 +1064,7 @@
 	 * @throws Exception
 	 */
 	private String[] getSidsForRole( com.microsoft.schemas.sharepoint.soap.directory.UserGroupSoap userCall, String roleName )
-		throws MetacartaException, java.net.MalformedURLException, javax.xml.rpc.ServiceException,
+		throws LCFException, java.net.MalformedURLException, javax.xml.rpc.ServiceException,
 			java.rmi.RemoteException
 	{
 		
@@ -1077,18 +1077,18 @@
 		doc.processPath(nodeList, "*", null);
 		if (nodeList.size() != 1)
 		{
-			throw new MetacartaException("Bad xml - missing outer 'ns1:GetUserCollectionFromRole' node - there are "+Integer.toString(nodeList.size())+" nodes");
+			throw new LCFException("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 MetacartaException("Bad xml - outer node is not 'ns1:GetUserCollectionFromRole'");
+			throw new LCFException("Bad xml - outer node is not 'ns1:GetUserCollectionFromRole'");
 
 		nodeList.clear();
 		doc.processPath(nodeList, "*", parent);  // <ns1:Users>
 		
 		if ( nodeList.size() != 1 )
 		{
-			throw new MetacartaException( " No Users collection found." );
+			throw new LCFException( " No Users collection found." );
 		}
 		parent = nodeList.get(0);
 		nodeList.clear();
@@ -1114,7 +1114,7 @@
 	 * @throws java.rmi.RemoteException
 	 */
 	public boolean checkConnection( String site, boolean sps30 )
-		throws MetacartaException, ServiceInterruption
+		throws LCFException, ServiceInterruption
 	{
 	    long currentTime;
 	    try
@@ -1147,7 +1147,7 @@
 	    }
             catch (java.net.MalformedURLException e)
             {
-                    throw new MetacartaException("Bad SharePoint url: "+e.getMessage(),e);
+                    throw new LCFException("Bad SharePoint url: "+e.getMessage(),e);
             }
             catch (javax.xml.rpc.ServiceException e)
             {
@@ -1169,16 +1169,16 @@
 				if (httpErrorCode.equals("404"))
 				{
 					// Page did not exist
-					throw new MetacartaException("The site at "+baseUrl+site+" did not exist");
+					throw new LCFException("The site at "+baseUrl+site+" did not exist");
 				}
 				else if (httpErrorCode.equals("401"))
-					throw new MetacartaException("Crawl user did not authenticate properly, or has insufficient permissions to access "+baseUrl+site+": "+e.getMessage(),e);
+					throw new LCFException("Crawl user did not authenticate properly, or has insufficient permissions to access "+baseUrl+site+": "+e.getMessage(),e);
 				else if (httpErrorCode.equals("403"))
-					throw new MetacartaException("Http error "+httpErrorCode+" while reading from "+baseUrl+site+" - check IIS and SharePoint security settings! "+e.getMessage(),e);
+					throw new LCFException("Http error "+httpErrorCode+" while reading from "+baseUrl+site+" - check IIS and SharePoint security settings! "+e.getMessage(),e);
 				else
-					throw new MetacartaException("Unexpected http error code "+httpErrorCode+" accessing SharePoint at "+baseUrl+site+": "+e.getMessage(),e);
+					throw new LCFException("Unexpected http error code "+httpErrorCode+" accessing SharePoint at "+baseUrl+site+": "+e.getMessage(),e);
 			}
-			throw new MetacartaException("Unknown http error occurred: "+e.getMessage(),e);
+			throw new LCFException("Unknown http error occurred: "+e.getMessage(),e);
 		}
 		else if (e.getFaultCode().equals(new javax.xml.namespace.QName("http://schemas.xmlsoap.org/soap/envelope/","Server")))
 		{
@@ -1192,25 +1192,25 @@
 				if (elem != null)
 					errorString = elem2.getFirstChild().getNodeValue().trim();
 
-				throw new MetacartaException("Accessing site "+site+" failed with unexpected SharePoint error code "+sharepointErrorCode+": "+errorString,e);
+				throw new LCFException("Accessing site "+site+" failed with unexpected SharePoint error code "+sharepointErrorCode+": "+errorString,e);
 			}
-			throw new MetacartaException("Unknown SharePoint server error accessing site "+site+" - axis fault = "+e.getFaultCode().getLocalPart()+", detail = "+e.getFaultString(),e);
+			throw new LCFException("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 MetacartaException("Interrupted",MetacartaException.INTERRUPTED);
+				throw new LCFException("Interrupted",LCFException.INTERRUPTED);
 		}
 
-		throw new MetacartaException("Got an unknown remote exception accessing site "+site+" - axis fault = "+e.getFaultCode().getLocalPart()+", detail = "+e.getFaultString(),e);
+		throw new LCFException("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 MetacartaException("Got an unexpected remote exception accessing site "+site+": "+e.getMessage(),e);
+		throw new LCFException("Got an unexpected remote exception accessing site "+site+": "+e.getMessage(),e);
             }
 	}
 
@@ -1221,7 +1221,7 @@
      * @return list of the fields
      */
 	public Map getFieldList( String site, String docLibrary )
-		throws MetacartaException, ServiceInterruption
+		throws LCFException, ServiceInterruption
 	{
 	    long currentTime;
 	    try
@@ -1246,19 +1246,19 @@
 		doc.processPath(nodeList, "*", null);
 		if (nodeList.size() != 1)
 		{
-			throw new MetacartaException("Bad xml - missing outer node - there are "+Integer.toString(nodeList.size())+" nodes");
+			throw new LCFException("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 MetacartaException("Bad xml - outer node is '" + doc.getNodeName(parent) + "' not 'ns1:List'");
+			throw new LCFException("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 MetacartaException( "Bad xml - child node 0 '" + doc.getNodeName(fields) + "' is not 'ns1:Fields'");
+			throw new LCFException( "Bad xml - child node 0 '" + doc.getNodeName(fields) + "' is not 'ns1:Fields'");
 		
 		nodeList.clear();
 		doc.processPath(nodeList, "*", fields);  
@@ -1285,7 +1285,7 @@
 	    }
             catch (java.net.MalformedURLException e)
             {
-                    throw new MetacartaException("Bad SharePoint url: "+e.getMessage(),e);
+                    throw new LCFException("Bad SharePoint url: "+e.getMessage(),e);
             }
             catch (javax.xml.rpc.ServiceException e)
             {
@@ -1307,23 +1307,23 @@
 				if (httpErrorCode.equals("404"))
 					return null;
 				else if (httpErrorCode.equals("403"))
-					throw new MetacartaException("Remote procedure exception: "+e.getMessage(),e);
+					throw new LCFException("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 MetacartaException("Unexpected http error code "+httpErrorCode+" accessing SharePoint at "+baseUrl+site+": "+e.getMessage(),e);
+				throw new LCFException("Unexpected http error code "+httpErrorCode+" accessing SharePoint at "+baseUrl+site+": "+e.getMessage(),e);
 			}
-			throw new MetacartaException("Unknown http error occurred: "+e.getMessage(),e);
+			throw new LCFException("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 MetacartaException("Interrupted",MetacartaException.INTERRUPTED);
+				throw new LCFException("Interrupted",LCFException.INTERRUPTED);
 		}
 
 		// I don't know if this is what you get when the library is missing, but here's hoping.
@@ -1338,7 +1338,7 @@
 	    }
             catch (java.rmi.RemoteException e)
             {
-		throw new MetacartaException("Unexpected remote exception occurred: "+e.getMessage(),e);
+		throw new LCFException("Unexpected remote exception occurred: "+e.getMessage(),e);
             }
 	}
 	
@@ -1350,7 +1350,7 @@
      * @return set of the field values
      */
 	public Map getFieldValues( ArrayList fieldNames, String site, String docLibrary, String docId )
-		throws MetacartaException, ServiceInterruption
+		throws LCFException, ServiceInterruption
 	{
 		long currentTime;
 		try
@@ -1439,13 +1439,13 @@
 			doc.processPath(nodeList, "*", null);
 			if (nodeList.size() != 1)
 			{
-				throw new MetacartaException("Bad xml - missing outer 'ns1:dsQueryResponse' node - there are "+Integer.toString(nodeList.size())+" nodes");
+				throw new LCFException("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 MetacartaException("Bad xml - outer node is not 'ns1:dsQueryResponse'");
+				throw new LCFException("Bad xml - outer node is not 'ns1:dsQueryResponse'");
 	
 			nodeList.clear();
 			doc.processPath(nodeList, "*", parent);
@@ -1479,11 +1479,11 @@
 		}
 		catch (javax.xml.soap.SOAPException e)
 		{
-		    throw new MetacartaException("Soap exception: "+e.getMessage(),e);
+		    throw new LCFException("Soap exception: "+e.getMessage(),e);
 		}
 		catch (java.net.MalformedURLException e)
 		{
-                    throw new MetacartaException("Bad SharePoint url: "+e.getMessage(),e);
+                    throw new LCFException("Bad SharePoint url: "+e.getMessage(),e);
 		}
 		catch (javax.xml.rpc.ServiceException e)
 		{
@@ -1505,23 +1505,23 @@
 					if (httpErrorCode.equals("404"))
 						return null;
 					else if (httpErrorCode.equals("403"))
-						throw new MetacartaException("Remote procedure exception: "+e.getMessage(),e);
+						throw new LCFException("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 MetacartaException("Unexpected http error code "+httpErrorCode+" accessing SharePoint at "+baseUrl+site+": "+e.getMessage(),e);
+					throw new LCFException("Unexpected http error code "+httpErrorCode+" accessing SharePoint at "+baseUrl+site+": "+e.getMessage(),e);
 				}
-				throw new MetacartaException("Unknown http error occurred: "+e.getMessage(),e);
+				throw new LCFException("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 MetacartaException("Interrupted",MetacartaException.INTERRUPTED);
+					throw new LCFException("Interrupted",LCFException.INTERRUPTED);
 			}
 
 			// I don't know if this is what you get when the library is missing, but here's hoping.
@@ -1536,7 +1536,7 @@
 		}
 		catch (java.rmi.RemoteException e)
 		{
-			throw new MetacartaException("Unexpected remote exception occurred: "+e.getMessage(),e);
+			throw new LCFException("Unexpected remote exception occurred: "+e.getMessage(),e);
 		}
 	}
 	
@@ -1546,7 +1546,7 @@
 	 * @return lists of sites as an arraylist of NameValue objects
 	 */
 	public ArrayList getSites( String parentSite )
-		throws MetacartaException, ServiceInterruption
+		throws LCFException, ServiceInterruption
 	{
 	    long currentTime;
 	    try
@@ -1566,11 +1566,11 @@
 		doc.processPath(nodeList, "*", null);
 		if (nodeList.size() != 1)
 		{
-			throw new MetacartaException("Bad xml - missing outer 'ns1:Webs' node - there are "+Integer.toString(nodeList.size())+" nodes");
+			throw new LCFException("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 MetacartaException("Bad xml - outer node is not 'ns1:Webs'");
+			throw new LCFException("Bad xml - outer node is not 'ns1:Webs'");
 
 		nodeList.clear();
 		doc.processPath(nodeList, "*", parent);  // <ns1:Webs>
@@ -1610,7 +1610,7 @@
 	    }
             catch (java.net.MalformedURLException e)
             {
-                    throw new MetacartaException("Bad SharePoint url: "+e.getMessage(),e);
+                    throw new LCFException("Bad SharePoint url: "+e.getMessage(),e);
             }
             catch (javax.xml.rpc.ServiceException e)
             {
@@ -1632,23 +1632,23 @@
 				if (httpErrorCode.equals("404"))
 					return null;
 				else if (httpErrorCode.equals("403"))
-					throw new MetacartaException("Remote procedure exception: "+e.getMessage(),e);
+					throw new LCFException("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 MetacartaException("Unexpected http error code "+httpErrorCode+" accessing SharePoint at "+baseUrl+parentSite+": "+e.getMessage(),e);
+				throw new LCFException("Unexpected http error code "+httpErrorCode+" accessing SharePoint at "+baseUrl+parentSite+": "+e.getMessage(),e);
 			}
-			throw new MetacartaException("Unknown http error occurred: "+e.getMessage(),e);
+			throw new LCFException("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 MetacartaException("Interrupted",MetacartaException.INTERRUPTED);
+				throw new LCFException("Interrupted",LCFException.INTERRUPTED);
 		}
 
 		if (Logging.connectors.isDebugEnabled())
@@ -1659,7 +1659,7 @@
 	    }
             catch (java.rmi.RemoteException e)
             {
-		throw new MetacartaException("Unexpected remote exception occurred: "+e.getMessage(),e);
+		throw new LCFException("Unexpected remote exception occurred: "+e.getMessage(),e);
             }
 
 	}
@@ -1670,7 +1670,7 @@
 	 * @return lists of NameValue objects, representing document libraries
 	 */
 	public ArrayList getDocumentLibraries( String parentSite, String parentSiteDecoded )
-		throws MetacartaException, ServiceInterruption
+		throws LCFException, ServiceInterruption
 	{
 	    long currentTime;
 	    try
@@ -1699,11 +1699,11 @@
 		doc.processPath(nodeList, "*", null);
 		if (nodeList.size() != 1)
 		{
-			throw new MetacartaException("Bad xml - missing outer 'ns1:Lists' node - there are "+Integer.toString(nodeList.size())+" nodes");
+			throw new LCFException("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 MetacartaException("Bad xml - outer node is not 'ns1:Lists'");
+			throw new LCFException("Bad xml - outer node is not 'ns1:Lists'");
 
 		nodeList.clear();
 		doc.processPath(nodeList, "*", parent);  // <ns1:Lists>
@@ -1733,14 +1733,14 @@
 				if (urlPath != null && urlPath.length() > 0)
 				{
 					if (urlPath.length() < chuckIndex)
-						throw new MetacartaException("View url is not in the expected form: '"+urlPath+"'");
+						throw new LCFException("View url is not in the expected form: '"+urlPath+"'");
 					urlPath = urlPath.substring(chuckIndex);
 					if (!urlPath.startsWith("/"))
-						throw new MetacartaException("View url without site is not in the expected form: '"+urlPath+"'");
+						throw new LCFException("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 MetacartaException("Bad view url without site: '"+urlPath+"'");
+						throw new LCFException("Bad view url without site: '"+urlPath+"'");
 					String pathpart = urlPath.substring(1,index);
 
 					if ( pathpart.length() != 0 && !pathpart.equals("_catalogs"))
@@ -1757,7 +1757,7 @@
 	    }
             catch (java.net.MalformedURLException e)
             {
-                    throw new MetacartaException("Bad SharePoint url: "+e.getMessage(),e);
+                    throw new LCFException("Bad SharePoint url: "+e.getMessage(),e);
             }
             catch (javax.xml.rpc.ServiceException e)
             {
@@ -1779,22 +1779,22 @@
 				if (httpErrorCode.equals("404"))
 					return null;
 				else if (httpErrorCode.equals("403"))
-					throw new MetacartaException("Remote procedure exception: "+e.getMessage(),e);
+					throw new LCFException("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 MetacartaException("Unexpected http error code "+httpErrorCode+" accessing SharePoint at "+baseUrl+parentSite+": "+e.getMessage(),e);
+				throw new LCFException("Unexpected http error code "+httpErrorCode+" accessing SharePoint at "+baseUrl+parentSite+": "+e.getMessage(),e);
 			}
-			throw new MetacartaException("Unknown http error occurred: "+e.getMessage(),e);
+			throw new LCFException("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 MetacartaException("Interrupted",MetacartaException.INTERRUPTED);
+				throw new LCFException("Interrupted",LCFException.INTERRUPTED);
 		}
 		if (Logging.connectors.isDebugEnabled())
 			Logging.connectors.debug("SharePoint: Got a remote exception reading document libraries for site "+parentSite+" - retrying",e);
@@ -1804,7 +1804,7 @@
 	    }
             catch (java.rmi.RemoteException e)
             {
-		throw new MetacartaException("Unexpected remote exception occurred: "+e.getMessage(),e);
+		throw new LCFException("Unexpected remote exception occurred: "+e.getMessage(),e);
             }		
 	}
 	

Modified: incubator/lcf/trunk/modules/connectors/sharepoint/connector/org/apache/lcf/crawler/connectors/sharepoint/SharePointRepository.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/connectors/sharepoint/connector/org/apache/lcf/crawler/connectors/sharepoint/SharePointRepository.java?rev=911029&r1=911028&r2=911029&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/connectors/sharepoint/connector/org/apache/lcf/crawler/connectors/sharepoint/SharePointRepository.java (original)
+++ incubator/lcf/trunk/modules/connectors/sharepoint/connector/org/apache/lcf/crawler/connectors/sharepoint/SharePointRepository.java Wed Feb 17 15:57:27 2010
@@ -22,7 +22,7 @@
 import org.apache.lcf.agents.interfaces.*;
 import org.apache.lcf.crawler.interfaces.*;
 import org.apache.lcf.crawler.system.Logging;
-import org.apache.lcf.crawler.system.Metacarta;
+import org.apache.lcf.crawler.system.LCF;
 import org.apache.lcf.core.common.*;
 
 import java.io.*;
@@ -105,7 +105,7 @@
 
 	/** Set up a session */
 	protected void getSession()
-		throws MetacartaException
+		throws LCFException
 	{
 		if (proxy == null)
 		{
@@ -132,7 +132,7 @@
 			}
 			catch (NumberFormatException e)
 			{
-				throw new MetacartaException(e.getMessage(),e);
+				throw new LCFException(e.getMessage(),e);
 			}
 			serverLocation = params.getParameter("serverLocation");
 			if (serverLocation == null)
@@ -153,7 +153,7 @@
 				ntlmDomain = userName.substring(0,index);
 			}
 			else
-				throw new MetacartaException("Invalid user name - need <domain>\\<name>");
+				throw new LCFException("Invalid user name - need <domain>\\<name>");
 
 			serverUrl = serverProtocol + "://" + serverName;
 			if (serverProtocol.equals("https"))
@@ -223,7 +223,7 @@
 	/** Close the connection.  Call this before discarding the repository connector.
 	*/
 	public void disconnect()
-		throws MetacartaException
+		throws LCFException
 	{
 		serverUrl = null;
 		fileBaseUrl = null;
@@ -276,7 +276,7 @@
 	*@return the connection's status as a displayable string.
 	*/
 	public String check()
-		throws MetacartaException
+		throws LCFException
 	{
 		getSession();
 		try
@@ -296,7 +296,7 @@
 		{
 			return "SharePoint temporarily unavailable: "+e.getMessage();
 		}
-		catch (MetacartaException e)
+		catch (LCFException e)
 		{
 			return e.getMessage();
 		}
@@ -308,7 +308,7 @@
 	* in active use.
 	*/
 	public void poll()
-		throws MetacartaException
+		throws LCFException
 	{
 		if (connectionManager != null)
 			connectionManager.closeIdleConnections(60000L);
@@ -342,7 +342,7 @@
 	*/
 	public void addSeedDocuments(ISeedingActivity activities, DocumentSpecification spec,
 		long startTime, long endTime, int jobMode)
-		throws MetacartaException, ServiceInterruption
+		throws LCFException, ServiceInterruption
 	{
 		// Check the session
 		getSession();
@@ -370,7 +370,7 @@
 	*/
 	public String[] getDocumentVersions(String[] documentIdentifiers, String[] oldVersions, IVersionActivity activities,
 		DocumentSpecification spec, int jobMode, boolean usesDefaultAuthority)
-		throws MetacartaException, ServiceInterruption
+		throws LCFException, ServiceInterruption
 	{
 		getSession();
 		
@@ -676,7 +676,7 @@
 					}
 				}
 				else
-					throw new MetacartaException("Invalid document identifier discovered: '"+documentIdentifier+"'");
+					throw new LCFException("Invalid document identifier discovered: '"+documentIdentifier+"'");
 				i++;
 		}
 		return rval;
@@ -735,7 +735,7 @@
 	* 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 MetacartaException, ServiceInterruption
+		throws LCFException, ServiceInterruption
 	{
 		getSession();
 		
@@ -854,7 +854,7 @@
 								{
 									// Unexpected processing error; the path to the folder or document did not start with the location
 									// offset, so throw up.
-									throw new MetacartaException("Internal error: Relative path '"+relPath+"' was expected to start with '"+
+									throw new LCFException("Internal error: Relative path '"+relPath+"' was expected to start with '"+
 										serverLocation+"'");
 								}
 						
@@ -996,7 +996,7 @@
 											{
 												activities.recordActivity(new Long(startFetchTime),ACTIVITY_FETCH,
 													null,documentIdentifier,"Error","Http status "+Integer.toString(returnCode),null);
-												throw new MetacartaException("Error fetching document '"+fileUrl+"': "+Integer.toString(returnCode));
+												throw new LCFException("Error fetching document '"+fileUrl+"': "+Integer.toString(returnCode));
 											}
 							
 											// int contentSize = (int)method.getResponseContentLength();
@@ -1028,7 +1028,7 @@
 												}
 												catch (InterruptedIOException e)
 												{
-													throw new MetacartaException("Interrupted: "+e.getMessage(),e,MetacartaException.INTERRUPTED);
+													throw new LCFException("Interrupted: "+e.getMessage(),e,LCFException.INTERRUPTED);
 												}
 												catch (IOException e)
 												{
@@ -1048,7 +1048,7 @@
 									}
 									catch (InterruptedException e)
 									{
-										throw new MetacartaException("Interrupted: "+e.getMessage(),e,MetacartaException.INTERRUPTED);
+										throw new LCFException("Interrupted: "+e.getMessage(),e,LCFException.INTERRUPTED);
 									}
 									catch (java.net.SocketTimeoutException e)
 									{
@@ -1070,14 +1070,14 @@
 									}
 									catch (InterruptedIOException e)
 									{
-										throw new MetacartaException("Interrupted: "+e.getMessage(),e,MetacartaException.INTERRUPTED);
+										throw new LCFException("Interrupted: "+e.getMessage(),e,LCFException.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 MetacartaException("SharePoint: Illegal argument: "+e.getMessage(),e);
+										throw new LCFException("SharePoint: Illegal argument: "+e.getMessage(),e);
 									}
 									catch (HttpException e) 
 									{  
@@ -1217,7 +1217,7 @@
 									}
 									catch (InterruptedIOException e)
 									{
-										throw new MetacartaException("Interrupted: "+e.getMessage(),e,MetacartaException.INTERRUPTED);
+										throw new LCFException("Interrupted: "+e.getMessage(),e,LCFException.INTERRUPTED);
 									}
 									catch (IOException e)
 									{
@@ -1233,25 +1233,25 @@
 						}
 						catch (java.net.SocketTimeoutException e)
 						{
-							throw new MetacartaException("Socket timeout error writing '"+fileUrl+"' to temporary file: "+e.getMessage(),e);
+							throw new LCFException("Socket timeout error writing '"+fileUrl+"' to temporary file: "+e.getMessage(),e);
 						}
 						catch (org.apache.commons.httpclient.ConnectTimeoutException e)
 						{
-							throw new MetacartaException("Connect timeout error writing '"+fileUrl+"' to temporary file: "+e.getMessage(),e);
+							throw new LCFException("Connect timeout error writing '"+fileUrl+"' to temporary file: "+e.getMessage(),e);
 						}
 						catch (InterruptedIOException e)
 						{
-							throw new MetacartaException("Interrupted: "+e.getMessage(),e,MetacartaException.INTERRUPTED);
+							throw new LCFException("Interrupted: "+e.getMessage(),e,LCFException.INTERRUPTED);
 						}
 						catch (IOException e)
 						{
-							throw new MetacartaException("IO error writing '"+fileUrl+"' to temporary file: "+e.getMessage(),e);
+							throw new LCFException("IO error writing '"+fileUrl+"' to temporary file: "+e.getMessage(),e);
 						}
 					}
 				}
 			}
 			else
-				throw new MetacartaException("Found illegal document identifier in processDocuments: '"+documentIdentifier+"'");
+				throw new LCFException("Found illegal document identifier in processDocuments: '"+documentIdentifier+"'");
 			
 			i++;
 		}
@@ -1265,7 +1265,7 @@
 	* @return list of the fields
 	*/
 	public Map getFieldList( String parentSite, String docLibrary )
-		throws ServiceInterruption, MetacartaException
+		throws ServiceInterruption, LCFException
 	{
 		getSession();
 		return proxy.getFieldList( encodePath(parentSite), proxy.getDocLibID( encodePath(parentSite), parentSite, docLibrary) );
@@ -1277,7 +1277,7 @@
 	* @return list of the sites
 	*/
 	public ArrayList getSites( String parentSite )
-		throws ServiceInterruption, MetacartaException
+		throws ServiceInterruption, LCFException
 	{
 		getSession();
 		return proxy.getSites( encodePath(parentSite) );
@@ -1289,7 +1289,7 @@
 	* @return list of the libraries
 	*/
 	public ArrayList getDocLibsBySite( String parentSite )
-		throws MetacartaException, ServiceInterruption
+		throws LCFException, ServiceInterruption
 	{
 		getSession();
 		return proxy.getDocumentLibraries( encodePath(parentSite), parentSite );
@@ -2128,7 +2128,7 @@
 
 		/** Constructor */
 		public SystemMetadataDescription(DocumentSpecification spec)
-			throws MetacartaException
+			throws LCFException
 		{
 			pathAttributeName = null;
 			int i = 0;
@@ -2157,7 +2157,7 @@
 		/** Given an identifier, get the translated string that goes into the metadata.
 		*/
 		public String getPathAttributeValue(String documentIdentifier)
-			throws MetacartaException
+			throws LCFException
 		{
 			String path = getPathString(documentIdentifier);
 			return matchMap.translate(path);
@@ -2168,7 +2168,7 @@
 		* is easy to calculate.
 		*/
 		public String getPathString(String documentIdentifier)
-			throws MetacartaException
+			throws LCFException
 		{
 			// There will be a "//" somewhere in the string.  Remove it!
 			int dslashIndex = documentIdentifier.indexOf("//");
@@ -2188,7 +2188,7 @@
 		/** Constructor.  Pass the keystore.
 		*/
 		public MySSLSocketFactory(IKeystoreManager keystore)
-			throws MetacartaException
+			throws LCFException
 		{
 			this.keystore = keystore;
 			thisSocketFactory = keystore.getSecureSocketFactory();
@@ -2269,7 +2269,7 @@
 			{
 				return keystore.getString().equals(other.keystore.getString());
 			}
-			catch (MetacartaException e)
+			catch (LCFException e)
 			{
 				return false;
 			}
@@ -2281,7 +2281,7 @@
 			{
 				return keystore.getString().hashCode();
 			}
-			catch (MetacartaException e)
+			catch (LCFException e)
 			{
 				return 0;
 			}

Modified: incubator/lcf/trunk/modules/connectors/sharepoint/crawler-ui/connectors/sharepoint/editspec.jsp
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/connectors/sharepoint/crawler-ui/connectors/sharepoint/editspec.jsp?rev=911029&r1=911028&r2=911029&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/connectors/sharepoint/crawler-ui/connectors/sharepoint/editspec.jsp (original)
+++ incubator/lcf/trunk/modules/connectors/sharepoint/crawler-ui/connectors/sharepoint/editspec.jsp Wed Feb 17 15:57:27 2010
@@ -299,7 +299,7 @@
 				RepositoryConnectorFactory.release(connector);
 			}
 		}
-		catch (MetacartaException e)
+		catch (LCFException e)
 		{
 			e.printStackTrace();
 			message = e.getMessage();
@@ -915,7 +915,7 @@
 			RepositoryConnectorFactory.release(connector);
 		    }
 		}
-		catch (MetacartaException e)
+		catch (LCFException e)
 		{
 			e.printStackTrace();
 			message = e.getMessage();
@@ -973,7 +973,7 @@
 				RepositoryConnectorFactory.release(connector);
 			}
 		}
-		catch (MetacartaException e)
+		catch (LCFException e)
 		{
 			e.printStackTrace();
 			message = e.getMessage();

Modified: incubator/lcf/trunk/modules/connectors/webcrawler/connector/org/apache/lcf/crawler/connectors/webcrawler/CookieManager.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/connectors/webcrawler/connector/org/apache/lcf/crawler/connectors/webcrawler/CookieManager.java?rev=911029&r1=911028&r2=911029&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/connectors/webcrawler/connector/org/apache/lcf/crawler/connectors/webcrawler/CookieManager.java (original)
+++ incubator/lcf/trunk/modules/connectors/webcrawler/connector/org/apache/lcf/crawler/connectors/webcrawler/CookieManager.java Wed Feb 17 15:57:27 2010
@@ -24,7 +24,7 @@
 import org.apache.lcf.crawler.interfaces.*;
 import org.apache.lcf.authorities.interfaces.*;
 import org.apache.lcf.crawler.interfaces.CacheKeyFactory;
-import org.apache.lcf.crawler.system.Metacarta;
+import org.apache.lcf.crawler.system.LCF;
 import org.apache.lcf.crawler.system.Logging;
 
 import org.apache.commons.httpclient.Cookie;
@@ -73,7 +73,7 @@
         *@param database is the database handle.
         */
         public CookieManager(IThreadContext tc, IDBInterface database)
-                throws MetacartaException
+                throws LCFException
         {
                 super(database,"cookiedata");
                 cacheManager = CacheManagerFactory.make(tc);
@@ -82,7 +82,7 @@
         /** Install the manager.
         */
         public void install()
-                throws MetacartaException
+                throws LCFException
         {
                 beginTransaction();
                 try
@@ -120,7 +120,7 @@
                                 addTableIndex(false,list);
                         }
                 }
-                catch (MetacartaException e)
+                catch (LCFException e)
                 {
                         signalRollback();
                         throw e;
@@ -139,7 +139,7 @@
         /** Uninstall the manager.
         */
         public void deinstall()
-                throws MetacartaException
+                throws LCFException
         {
                 performDrop(null);
         }
@@ -149,7 +149,7 @@
         *@return the login cookies object.
         */
         public LoginCookies readCookies(String sessionKey)
-                throws MetacartaException
+                throws LCFException
         {
                 // Build description objects
                 CookiesDescription[] objectDescriptions = new CookiesDescription[1];
@@ -169,7 +169,7 @@
         *@param cookies are the cookies to write into the database.
         */
         public void updateCookies(String sessionKey, LoginCookies cookies)
-                throws MetacartaException
+                throws LCFException
         {
                 StringSetBuffer ssb = new StringSetBuffer();
                 ssb.add(getCookiesCacheKey(sessionKey));
@@ -256,7 +256,7 @@
                             
                                 cacheManager.invalidateKeys(ch);
                         }
-                        catch (MetacartaException e)
+                        catch (LCFException e)
                         {
                                 signalRollback();
                                 throw e;
@@ -293,7 +293,7 @@
         *@return the login cookies object.
         */
         protected LoginCookies readCookiesUncached(String sessionKey)
-                throws MetacartaException
+                throws LCFException
         {
                 ArrayList list = new ArrayList();
                 list.add(sessionKey);
@@ -348,14 +348,14 @@
         /** Convert a boolean string to a boolean.
         */
         protected static boolean stringToBoolean(String value)
-                throws MetacartaException
+                throws LCFException
         {
                 if (value.equals("T"))
                         return true;
                 else if (value.equals("F"))
                         return false;
                 else
-                        throw new MetacartaException("Expected T or F but saw "+value);
+                        throw new LCFException("Expected T or F but saw "+value);
         }
         
         /** Convert a boolean to a boolean string.
@@ -371,7 +371,7 @@
         /** Convert a string to a port array.
         */
         protected static int[] stringToPorts(String value)
-                throws MetacartaException
+                throws LCFException
         {
                 String[] ports = value.split(",");
                 int[] rval = new int[ports.length];
@@ -384,7 +384,7 @@
                         }
                         catch (NumberFormatException e)
                         {
-                                throw new MetacartaException(e.getMessage(),e);
+                                throw new LCFException(e.getMessage(),e);
                         }
                         i++;
                 }
@@ -563,7 +563,7 @@
                 * @return the newly created objects to cache, or null, if any object cannot be created.
                 *  The order of the returned objects must correspond to the order of the object descriptinos.
                 */
-                public Object[] create(ICacheDescription[] objectDescriptions) throws MetacartaException
+                public Object[] create(ICacheDescription[] objectDescriptions) throws LCFException
                 {
                         // I'm not expecting multiple values to be requested, so it's OK to walk through the objects
                         // and do a request at a time.
@@ -587,7 +587,7 @@
                 * @param objectDescription is the unique identifier of the object.
                 * @param cachedObject is the cached object.
                 */
-                public void exists(ICacheDescription objectDescription, Object cachedObject) throws MetacartaException
+                public void exists(ICacheDescription objectDescription, Object cachedObject) throws LCFException
                 {
                         // Cast what came in as what it really is
                         CookiesDescription objectDesc = (CookiesDescription)objectDescription;
@@ -599,7 +599,7 @@
                 /** Perform the desired operation.  This method is called after either createGetObject()
                 * or exists() is called for every requested object.
                 */
-                public void execute() throws MetacartaException
+                public void execute() throws LCFException
                 {
                         // Does nothing; we only want to fetch objects in this cacher.
                 }

Modified: incubator/lcf/trunk/modules/connectors/webcrawler/connector/org/apache/lcf/crawler/connectors/webcrawler/CredentialsDescription.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/connectors/webcrawler/connector/org/apache/lcf/crawler/connectors/webcrawler/CredentialsDescription.java?rev=911029&r1=911028&r2=911029&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/connectors/webcrawler/connector/org/apache/lcf/crawler/connectors/webcrawler/CredentialsDescription.java (original)
+++ incubator/lcf/trunk/modules/connectors/webcrawler/connector/org/apache/lcf/crawler/connectors/webcrawler/CredentialsDescription.java Wed Feb 17 15:57:27 2010
@@ -19,7 +19,7 @@
 package org.apache.lcf.crawler.connectors.webcrawler;
 
 import org.apache.lcf.core.interfaces.*;
-import org.apache.lcf.crawler.system.Metacarta;
+import org.apache.lcf.crawler.system.LCF;
 import java.util.*;
 import java.util.regex.*;
 
@@ -54,7 +54,7 @@
 
         /** Constructor.  Build the description from the ConfigParams. */
         public CredentialsDescription(ConfigParams configData)
-                throws MetacartaException
+                throws LCFException
         {
                 // Scan, looking for bin description nodes
                 int i = 0;
@@ -74,7 +74,7 @@
                                         }
                                         catch (java.util.regex.PatternSyntaxException e)
                                         {
-                                                throw new MetacartaException("Access credential regular expression '"+urlDescription+"' is illegal: "+e.getMessage(),e);
+                                                throw new LCFException("Access credential regular expression '"+urlDescription+"' is illegal: "+e.getMessage(),e);
                                         }
                                         CredentialsItem ti = new CredentialsItem(p);
 
@@ -84,7 +84,7 @@
                                         String userName = node.getAttributeValue(WebcrawlerConfig.ATTR_USERNAME);
                                         String password = node.getAttributeValue(WebcrawlerConfig.ATTR_PASSWORD);
                                         if (password != null)
-                                                password = Metacarta.deobfuscate(password);
+                                                password = LCF.deobfuscate(password);
                                 
                                         if (type.equals(WebcrawlerConfig.ATTRVALUE_BASIC))
                                                 ti.setCredential(new BasicCredential(userName,password));
@@ -115,7 +115,7 @@
                                                                 }
                                                                 catch (java.util.regex.PatternSyntaxException e)
                                                                 {
-                                                                        throw new MetacartaException("Authentication page regular expression '"+authPageRegexp+"' is illegal: "+e.getMessage(),e);
+                                                                        throw new LCFException("Authentication page regular expression '"+authPageRegexp+"' is illegal: "+e.getMessage(),e);
                                                                 }
                                                                 Pattern matchPattern;
                                                                 try
@@ -124,7 +124,7 @@
                                                                 }
                                                                 catch (java.util.regex.PatternSyntaxException e)
                                                                 {
-                                                                        throw new MetacartaException("Match regular expression '"+matchRegexp+"' is illegal: "+e.getMessage(),e);
+                                                                        throw new LCFException("Match regular expression '"+matchRegexp+"' is illegal: "+e.getMessage(),e);
                                                                 }
                                                                 if (pageType.equals(WebcrawlerConfig.ATTRVALUE_FORM))
                                                                 {
@@ -139,7 +139,7 @@
                                                                         sc.addAuthPage(authPageRegexp,authPattern,null,null,null,null,matchRegexp,matchPattern);
                                                                 }
                                                                 else
-                                                                        throw new MetacartaException("Invalid page type: "+pageType);
+                                                                        throw new LCFException("Invalid page type: "+pageType);
                                                                 
                                                                 // Finally, walk through any specified parameters
                                                                 int k = 0;
@@ -156,12 +156,12 @@
                                                                                 }
                                                                                 catch (java.util.regex.PatternSyntaxException e)
                                                                                 {
-                                                                                        throw new MetacartaException("Parameter name regular expression '"+paramName+"' is illegal: "+e.getMessage(),e);
+                                                                                        throw new LCFException("Parameter name regular expression '"+paramName+"' is illegal: "+e.getMessage(),e);
                                                                                 }
                                                                                 String passwordValue = paramNode.getAttributeValue(WebcrawlerConfig.ATTR_PASSWORD);
                                                                                 String paramValue = paramNode.getAttributeValue(WebcrawlerConfig.ATTR_VALUE);
                                                                                 if (passwordValue != null)
-                                                                                        paramValue = Metacarta.deobfuscate(passwordValue);
+                                                                                        paramValue = LCF.deobfuscate(passwordValue);
                                                                                 sc.addPageParameter(authPageRegexp,paramName,paramNamePattern,paramValue);
                                                                         }
                                                                 }
@@ -170,12 +170,12 @@
                                                 ti.setCredential(sc);
                                         }
                                         else
-                                                throw new MetacartaException("Illegal credential type: "+type);
+                                                throw new LCFException("Illegal credential type: "+type);
                                         patternHash.put(urlDescription,ti);
                                 }
                                 catch (PatternSyntaxException e)
                                 {
-                                        throw new MetacartaException("Bad pattern syntax in '"+urlDescription+"'",e);
+                                        throw new LCFException("Bad pattern syntax in '"+urlDescription+"'",e);
                                 }
                         }
                 }
@@ -542,7 +542,7 @@
                         String preferredLinkRegexp, Pattern preferredLinkPattern,
                         String formNameRegexp, Pattern formNamePattern,
                         String preferredRedirectionRegexp, Pattern preferredRedirectionPattern)
-                        throws MetacartaException
+                        throws LCFException
                 {
                         sessionPages.put(urlregexp,new SessionCredentialItem(urlregexp,urlPattern,
                                 preferredLinkRegexp,preferredLinkPattern,
@@ -569,7 +569,7 @@
                 * If null is returned, then this page has no specific login information.
                 */
                 public Iterator findLoginParameters(String documentIdentifier)
-                        throws MetacartaException
+                        throws LCFException
                 {
                         return new LoginParameterIterator(sessionPages,documentIdentifier);
                 }
@@ -629,7 +629,7 @@
         
                 /** Turn this instance into a Credentials object, given the specified target host name */
                 public Credentials makeCredentialsObject(String targetHostName)
-                        throws MetacartaException
+                        throws LCFException
                 {
                         return credentialsObject;
                 }
@@ -668,7 +668,7 @@
                 
                 /** Turn this instance into a Credentials object, given the specified target host name */
                 public Credentials makeCredentialsObject(String targetHostName)
-                        throws MetacartaException
+                        throws LCFException
                 {
                         return new NTCredentials(userName,password,targetHostName,domain);
                 }

Modified: incubator/lcf/trunk/modules/connectors/webcrawler/connector/org/apache/lcf/crawler/connectors/webcrawler/DNSManager.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/connectors/webcrawler/connector/org/apache/lcf/crawler/connectors/webcrawler/DNSManager.java?rev=911029&r1=911028&r2=911029&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/connectors/webcrawler/connector/org/apache/lcf/crawler/connectors/webcrawler/DNSManager.java (original)
+++ incubator/lcf/trunk/modules/connectors/webcrawler/connector/org/apache/lcf/crawler/connectors/webcrawler/DNSManager.java Wed Feb 17 15:57:27 2010
@@ -24,7 +24,7 @@
 import org.apache.lcf.crawler.interfaces.*;
 import org.apache.lcf.authorities.interfaces.*;
 import org.apache.lcf.crawler.interfaces.CacheKeyFactory;
-import org.apache.lcf.crawler.system.Metacarta;
+import org.apache.lcf.crawler.system.LCF;
 import org.apache.lcf.crawler.system.Logging;
 
 
@@ -55,7 +55,7 @@
 	*@param database is the database handle.
 	*/
 	public DNSManager(IThreadContext tc, IDBInterface database)
-		throws MetacartaException
+		throws LCFException
 	{
 		super(database,"dnsdata");
 		cacheManager = CacheManagerFactory.make(tc);
@@ -64,7 +64,7 @@
 	/** Install the manager.
 	*/
 	public void install()
-		throws MetacartaException
+		throws LCFException
 	{
 		beginTransaction();
 		try
@@ -86,7 +86,7 @@
 				// addTableIndex(false,list);
 			}
 		}
-		catch (MetacartaException e)
+		catch (LCFException e)
 		{
 			signalRollback();
 			throw e;
@@ -105,7 +105,7 @@
 	/** Uninstall the manager.
 	*/
 	public void deinstall()
-		throws MetacartaException
+		throws LCFException
 	{
 		performDrop(null);
 	}
@@ -114,7 +114,7 @@
 	*@return null if there is no available cached version of this info.
 	*/
 	public DNSInfo lookup(String hostName, long currentTime)
-		throws MetacartaException
+		throws LCFException
 	{
 		// Build description objects
 		HostDescription[] objectDescriptions = new HostDescription[1];
@@ -139,7 +139,7 @@
 	*@param expirationTime is the time this data should expire.
 	*/
 	public void writeDNSData(String hostName, String fqdn, String ipaddress, long expirationTime)
-		throws MetacartaException
+		throws LCFException
 	{
 		StringSetBuffer ssb = new StringSetBuffer();
 		ssb.add(getDNSKey(hostName));
@@ -179,7 +179,7 @@
 			}
 			cacheManager.invalidateKeys(ch);
 		    }
-		    catch (MetacartaException e)
+		    catch (LCFException e)
 		    {
 			signalRollback();
 			throw e;
@@ -215,7 +215,7 @@
 	*@return null if the data doesn't exist at all.  Return DNS data if it does.
 	*/
 	protected DNSInfo readDNSInfo(String hostName)
-		throws MetacartaException
+		throws LCFException
 	{
 		ArrayList list = new ArrayList();
 		list.add(hostName);
@@ -409,7 +409,7 @@
 		* @return the newly created objects to cache, or null, if any object cannot be created.
 		*  The order of the returned objects must correspond to the order of the object descriptinos.
 		*/
-		public Object[] create(ICacheDescription[] objectDescriptions) throws MetacartaException
+		public Object[] create(ICacheDescription[] objectDescriptions) throws LCFException
 		{
 			// I'm not expecting multiple values to be request, so it's OK to walk through the objects
 			// and do a request at a time.
@@ -436,7 +436,7 @@
 		* @param objectDescription is the unique identifier of the object.
 		* @param cachedObject is the cached object.
 		*/
-		public void exists(ICacheDescription objectDescription, Object cachedObject) throws MetacartaException
+		public void exists(ICacheDescription objectDescription, Object cachedObject) throws LCFException
 		{
 			// Cast what came in as what it really is
 			HostDescription objectDesc = (HostDescription)objectDescription;
@@ -448,7 +448,7 @@
 		/** Perform the desired operation.  This method is called after either createGetObject()
 		* or exists() is called for every requested object.
 		*/
-		public void execute() throws MetacartaException
+		public void execute() throws LCFException
 		{
 			// Does nothing; we only want to fetch objects in this cacher.
 		}

Modified: incubator/lcf/trunk/modules/connectors/webcrawler/connector/org/apache/lcf/crawler/connectors/webcrawler/DataCache.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/connectors/webcrawler/connector/org/apache/lcf/crawler/connectors/webcrawler/DataCache.java?rev=911029&r1=911028&r2=911029&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/connectors/webcrawler/connector/org/apache/lcf/crawler/connectors/webcrawler/DataCache.java (original)
+++ incubator/lcf/trunk/modules/connectors/webcrawler/connector/org/apache/lcf/crawler/connectors/webcrawler/DataCache.java Wed Feb 17 15:57:27 2010
@@ -22,7 +22,7 @@
 import org.apache.lcf.agents.interfaces.*;
 import org.apache.lcf.crawler.interfaces.*;
 import org.apache.lcf.crawler.system.Logging;
-import org.apache.lcf.crawler.system.Metacarta;
+import org.apache.lcf.crawler.system.LCF;
 import java.util.*;
 import java.io.*;
 
@@ -55,7 +55,7 @@
 	*@return a "checksum" value, to use as a version string.
 	*/
 	public String addData(IVersionActivity activities, String documentIdentifier, IThrottledConnection connection)
-		throws MetacartaException, ServiceInterruption
+		throws LCFException, ServiceInterruption
 	{
 		// Grab the response code, and the content-type header
 		int responseCode = connection.getResponseCode();
@@ -79,7 +79,7 @@
 				// after it's removed.  So disable this and live with the occasional
 				// dangling file left as a result of shutdown or error. :-(
 				// tempFile.deleteOnExit();
-				Metacarta.addFile(tempFile);
+				LCF.addFile(tempFile);
 
 				// Transfer data to temporary file
 				long checkSum = 0L;
@@ -111,7 +111,7 @@
 						catch (InterruptedIOException e)
 						{
 							//Logging.connectors.warn("IO interruption seen",e);
-							throw new MetacartaException("Interrupted: "+e.getMessage(),MetacartaException.INTERRUPTED);
+							throw new LCFException("Interrupted: "+e.getMessage(),LCFException.INTERRUPTED);
 						}
 						catch (IOException e)
 						{
@@ -150,22 +150,22 @@
 			}
 			catch (IOException e)
 			{
-				Metacarta.deleteFile(tempFile);
+				LCF.deleteFile(tempFile);
 				throw e;
 			}
-			catch (MetacartaException e)
+			catch (LCFException e)
 			{
-				Metacarta.deleteFile(tempFile);
+				LCF.deleteFile(tempFile);
 				throw e;
 			}
 			catch (ServiceInterruption e)
 			{
-				Metacarta.deleteFile(tempFile);
+				LCF.deleteFile(tempFile);
 				throw e;
 			}
 			catch (Error e)
 			{
-				Metacarta.deleteFile(tempFile);
+				LCF.deleteFile(tempFile);
 				throw e;
 			}
 		    }
@@ -197,20 +197,20 @@
 		}
 		catch (java.net.SocketTimeoutException e)
 		{
-			throw new MetacartaException("Socket timeout exception creating temporary file: "+e.getMessage(),e);
+			throw new LCFException("Socket timeout exception creating temporary file: "+e.getMessage(),e);
 		}
 		catch (org.apache.commons.httpclient.ConnectTimeoutException e)
 		{
-			throw new MetacartaException("Socket connect timeout exception creating temporary file: "+e.getMessage(),e);
+			throw new LCFException("Socket connect timeout exception creating temporary file: "+e.getMessage(),e);
 		}
 		catch (InterruptedIOException e)
 		{
 			//Logging.connectors.warn("IO interruption seen",e);
-			throw new MetacartaException("Interrupted: "+e.getMessage(),MetacartaException.INTERRUPTED);
+			throw new LCFException("Interrupted: "+e.getMessage(),LCFException.INTERRUPTED);
 		}
 		catch (IOException e)
 		{
-			throw new MetacartaException("IO exception creating temporary file: "+e.getMessage(),e);
+			throw new LCFException("IO exception creating temporary file: "+e.getMessage(),e);
 		}
 	}
 
@@ -267,7 +267,7 @@
 	*@return a binary data stream.
 	*/
 	public synchronized InputStream getData(String documentIdentifier)
-		throws MetacartaException
+		throws LCFException
 	{
 		DocumentData dd = (DocumentData)cacheData.get(documentIdentifier);
 		if (dd == null)
@@ -278,7 +278,7 @@
 		}
 		catch (FileNotFoundException e)
 		{
-			throw new MetacartaException("File not found exception opening data: "+e.getMessage(),e);
+			throw new LCFException("File not found exception opening data: "+e.getMessage(),e);
 		}
 	}
 
@@ -290,7 +290,7 @@
 		DocumentData dd = (DocumentData)cacheData.remove(documentIdentifier);
 		if (dd != null)
 		{
-			Metacarta.deleteFile(dd.getData());
+			LCF.deleteFile(dd.getData());
 		}
 	}
 

Modified: incubator/lcf/trunk/modules/connectors/webcrawler/connector/org/apache/lcf/crawler/connectors/webcrawler/IThrottledConnection.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/connectors/webcrawler/connector/org/apache/lcf/crawler/connectors/webcrawler/IThrottledConnection.java?rev=911029&r1=911028&r2=911029&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/connectors/webcrawler/connector/org/apache/lcf/crawler/connectors/webcrawler/IThrottledConnection.java (original)
+++ incubator/lcf/trunk/modules/connectors/webcrawler/connector/org/apache/lcf/crawler/connectors/webcrawler/IThrottledConnection.java Wed Feb 17 15:57:27 2010
@@ -43,12 +43,12 @@
         *	 is used solely for logging purposes.
         */
         public void beginFetch(String fetchType)
-                throws MetacartaException;
+                throws LCFException;
 
         /** Execute the fetch and get the return code.  This method uses the
         * standard logging mechanism to keep track of the fetch attempt.  It also
         * signals the following conditions: ServiceInterruption (if a dynamic
-        * error occurs), or MetacartaException if a fatal error occurs, or nothing if
+        * error occurs), or LCFException if a fatal error occurs, or nothing if
         * a standard protocol error occurs.
         * Note that, for proxies etc, the idea is for this fetch request to handle whatever
         * redirections are needed to support proxies.
@@ -64,32 +64,32 @@
         public void executeFetch(String urlPath, String userAgent, String from, int connectionTimeoutMilliseconds,
                 int socketTimeoutMilliseconds, boolean redirectOK, String host, FormData formData,
                 LoginCookies loginCookies)
-                throws MetacartaException, ServiceInterruption;
+                throws LCFException, ServiceInterruption;
 
         /** Get the http response code.
         *@return the response code.  This is either an HTTP response code, or one of the codes above.
         */
         public int getResponseCode()
-                throws MetacartaException, ServiceInterruption;
+                throws LCFException, ServiceInterruption;
 
         /** Get the last fetch cookies.
         *@return the cookies now in effect from the last fetch.
         */
         public LoginCookies getLastFetchCookies()
-                throws MetacartaException, ServiceInterruption;
+                throws LCFException, ServiceInterruption;
 
         /** Get a specified response header, if it exists.
         *@param headerName is the name of the header.
         *@return the header value, or null if it doesn't exist.
         */
         public String getResponseHeader(String headerName)
-                throws MetacartaException, ServiceInterruption;
+                throws LCFException, ServiceInterruption;
 
         /** Get the response input stream.  It is the responsibility of the caller
         * to close this stream when done.
         */
         public InputStream getResponseBodyStream()
-                throws MetacartaException, ServiceInterruption;
+                throws LCFException, ServiceInterruption;
 
         /** Note that the connection fetch was interrupted by something.
         */
@@ -99,10 +99,10 @@
         * describing what was done.
         */
         public void doneFetch(IVersionActivity activities)
-                throws MetacartaException;
+                throws LCFException;
 
         /** Close the connection.  Call this to end this server connection.
         */
         public void close()
-                throws MetacartaException;
+                throws LCFException;
 }

Modified: incubator/lcf/trunk/modules/connectors/webcrawler/connector/org/apache/lcf/crawler/connectors/webcrawler/PageCredentials.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/connectors/webcrawler/connector/org/apache/lcf/crawler/connectors/webcrawler/PageCredentials.java?rev=911029&r1=911028&r2=911029&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/connectors/webcrawler/connector/org/apache/lcf/crawler/connectors/webcrawler/PageCredentials.java (original)
+++ incubator/lcf/trunk/modules/connectors/webcrawler/connector/org/apache/lcf/crawler/connectors/webcrawler/PageCredentials.java Wed Feb 17 15:57:27 2010
@@ -32,5 +32,5 @@
 
 	/** Turn this instance into a Credentials object, given the specified target host name */
 	public Credentials makeCredentialsObject(String targetHostName)
-		throws MetacartaException;
+		throws LCFException;
 }

Modified: incubator/lcf/trunk/modules/connectors/webcrawler/connector/org/apache/lcf/crawler/connectors/webcrawler/RobotsManager.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/connectors/webcrawler/connector/org/apache/lcf/crawler/connectors/webcrawler/RobotsManager.java?rev=911029&r1=911028&r2=911029&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/connectors/webcrawler/connector/org/apache/lcf/crawler/connectors/webcrawler/RobotsManager.java (original)
+++ incubator/lcf/trunk/modules/connectors/webcrawler/connector/org/apache/lcf/crawler/connectors/webcrawler/RobotsManager.java Wed Feb 17 15:57:27 2010
@@ -24,7 +24,7 @@
 import org.apache.lcf.crawler.interfaces.*;
 import org.apache.lcf.authorities.interfaces.*;
 import org.apache.lcf.crawler.interfaces.CacheKeyFactory;
-import org.apache.lcf.crawler.system.Metacarta;
+import org.apache.lcf.crawler.system.LCF;
 import org.apache.lcf.crawler.system.Logging;
 
 
@@ -53,7 +53,7 @@
 	*@param database is the database handle.
 	*/
 	public RobotsManager(IThreadContext tc, IDBInterface database)
-		throws MetacartaException
+		throws LCFException
 	{
 		super(database,"robotsdata");
 		cacheManager = CacheManagerFactory.make(tc);
@@ -62,7 +62,7 @@
 	/** Install the manager.
 	*/
 	public void install()
-		throws MetacartaException
+		throws LCFException
 	{
 		beginTransaction();
 		try
@@ -78,7 +78,7 @@
 				performCreate(map,null);
 			}
 		}
-		catch (MetacartaException e)
+		catch (LCFException e)
 		{
 			signalRollback();
 			throw e;
@@ -97,7 +97,7 @@
 	/** Uninstall the manager.
 	*/
 	public void deinstall()
-		throws MetacartaException
+		throws LCFException
 	{
 		performDrop(null);
 	}
@@ -110,7 +110,7 @@
 	*/
 	public Boolean checkFetchAllowed(String userAgent, String hostName, long currentTime, String pathString,
 		IVersionActivity activities)
-		throws MetacartaException
+		throws LCFException
 	{
 		// Build description objects
 		HostDescription[] objectDescriptions = new HostDescription[1];
@@ -135,7 +135,7 @@
 	*@param data is the robots data stream.  May be null.
 	*/
 	public void writeRobotsData(String hostName, long expirationTime, InputStream data)
-		throws MetacartaException, IOException
+		throws LCFException, IOException
 	{
 		TempFileInput tfi = null;
 		try
@@ -146,9 +146,9 @@
 				{
 					tfi = new TempFileInput(data);
 				}
-				catch (MetacartaException e)
+				catch (LCFException e)
 				{
-					if (e.getErrorCode() == MetacartaException.INTERRUPTED)
+					if (e.getErrorCode() == LCFException.INTERRUPTED)
 						throw e;
 					throw new IOException("Fetch failed: "+e.getMessage());
 				}
@@ -189,7 +189,7 @@
 				}
 				cacheManager.invalidateKeys(ch);
 			    }
-			    catch (MetacartaException e)
+			    catch (LCFException e)
 			    {
 				signalRollback();
 				throw e;
@@ -231,7 +231,7 @@
 	*@return null if the data doesn't exist at all.  Return robots data if it does.
 	*/
 	protected RobotsData readRobotsData(String hostName, IVersionActivity activities)
-		throws MetacartaException
+		throws LCFException
 	{
 	    try
 	    {
@@ -242,7 +242,7 @@
 		if (set.getRowCount() == 0)
 			return null;
 		if (set.getRowCount() > 1)
-			throw new MetacartaException("Unexpected number of robotsdata rows matching '"+hostName+"': "+Integer.toString(set.getRowCount()));
+			throw new LCFException("Unexpected number of robotsdata rows matching '"+hostName+"': "+Integer.toString(set.getRowCount()));
 		IResultRow row = set.getRow(0);
 		long expiration = ((Long)row.getValue(expirationField)).longValue();
 		BinaryInput bi = (BinaryInput)row.getValue(robotsField);
@@ -260,11 +260,11 @@
 	    }
 	    catch (InterruptedIOException e)
 	    {
-		throw new MetacartaException("Interrupted: "+e.getMessage(),e,MetacartaException.INTERRUPTED);
+		throw new LCFException("Interrupted: "+e.getMessage(),e,LCFException.INTERRUPTED);
 	    }
 	    catch (IOException e)
 	    {
-		throw new MetacartaException("IO error reading robots data for "+hostName+": "+e.getMessage(),e);
+		throw new LCFException("IO error reading robots data for "+hostName+": "+e.getMessage(),e);
 	    }
 	}
 
@@ -297,7 +297,7 @@
 
 		/** Constructor. */
 		public RobotsData(InputStream is, long expiration, String hostName, IVersionActivity activities)
-			throws IOException, MetacartaException
+			throws IOException, LCFException
 		{
 			this.expiration = expiration;
 			if (is == null)
@@ -404,7 +404,7 @@
 		* Is NOT expected to close the stream.
 		*/
 		protected void parseRobotsTxt(BufferedReader r, String hostName, IVersionActivity activities)
-			throws IOException, MetacartaException
+			throws IOException, LCFException
 		{
 			boolean parseCompleted = false;
 			boolean robotsWasHtml = false;
@@ -788,7 +788,7 @@
 		* @return the newly created objects to cache, or null, if any object cannot be created.
 		*  The order of the returned objects must correspond to the order of the object descriptinos.
 		*/
-		public Object[] create(ICacheDescription[] objectDescriptions) throws MetacartaException
+		public Object[] create(ICacheDescription[] objectDescriptions) throws LCFException
 		{
 			// I'm not expecting multiple values to be request, so it's OK to walk through the objects
 			// and do a request at a time.
@@ -815,7 +815,7 @@
 		* @param objectDescription is the unique identifier of the object.
 		* @param cachedObject is the cached object.
 		*/
-		public void exists(ICacheDescription objectDescription, Object cachedObject) throws MetacartaException
+		public void exists(ICacheDescription objectDescription, Object cachedObject) throws LCFException
 		{
 			// Cast what came in as what it really is
 			HostDescription objectDesc = (HostDescription)objectDescription;
@@ -827,7 +827,7 @@
 		/** Perform the desired operation.  This method is called after either createGetObject()
 		* or exists() is called for every requested object.
 		*/
-		public void execute() throws MetacartaException
+		public void execute() throws LCFException
 		{
 			// Does nothing; we only want to fetch objects in this cacher.
 		}