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/10/04 16:32:28 UTC

svn commit: r1004255 [12/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/manifoldc...

Modified: incubator/lcf/trunk/modules/framework/core/src/main/java/org/apache/manifoldcf/core/database/ConnectionFactory.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/core/src/main/java/org/apache/manifoldcf/core/database/ConnectionFactory.java?rev=1004255&r1=1004254&r2=1004255&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/framework/core/src/main/java/org/apache/manifoldcf/core/database/ConnectionFactory.java (original)
+++ incubator/lcf/trunk/modules/framework/core/src/main/java/org/apache/manifoldcf/core/database/ConnectionFactory.java Mon Oct  4 14:32:19 2010
@@ -20,7 +20,7 @@ package org.apache.manifoldcf.core.datab
 
 import org.apache.manifoldcf.core.interfaces.*;
 import org.apache.manifoldcf.core.system.Logging;
-import org.apache.manifoldcf.core.system.ACF;
+import org.apache.manifoldcf.core.system.ManifoldCF;
 
 import java.util.*;
 import java.sql.*;
@@ -49,7 +49,7 @@ public class ConnectionFactory
   }
 
   public static Connection getConnection(String jdbcUrl, String jdbcDriver, String database, String userName, String password)
-    throws ACFException
+    throws ManifoldCFException
   {
 
     ConnectionPoolManager _pool = poolManager.ensurePoolExists(jdbcDriver);
@@ -67,11 +67,11 @@ public class ConnectionFactory
       }
       if (cp == null)
       {
-        String handleMax = ACF.getProperty(ACF.databaseHandleMaxcountProperty);
+        String handleMax = ManifoldCF.getProperty(ManifoldCF.databaseHandleMaxcountProperty);
         int maxDBConnections = defaultMaxDBConnections;
         if (handleMax != null && handleMax.length() > 0)
           maxDBConnections = Integer.parseInt(handleMax);
-        String timeoutValueString = ACF.getProperty(ACF.databaseHandleTimeoutProperty);
+        String timeoutValueString = ManifoldCF.getProperty(ManifoldCF.databaseHandleTimeoutProperty);
         int timeoutValue = defaultTimeoutValue;
         if (timeoutValueString != null && timeoutValueString.length() > 0)
           timeoutValue = Integer.parseInt(timeoutValueString);
@@ -101,12 +101,12 @@ public class ConnectionFactory
     }
     catch (Exception e)
     {
-      throw new ACFException("Error getting connection",e,ACFException.DATABASE_ERROR);
+      throw new ManifoldCFException("Error getting connection",e,ManifoldCFException.DATABASE_ERROR);
     }
   }
 
   public static void releaseConnection(Connection c)
-    throws ACFException
+    throws ManifoldCFException
   {
     try
     {
@@ -118,7 +118,7 @@ public class ConnectionFactory
     }
     catch (Exception e)
     {
-      throw new ACFException("Error releasing connection",e,ACFException.DATABASE_ERROR);
+      throw new ManifoldCFException("Error releasing connection",e,ManifoldCFException.DATABASE_ERROR);
     }
   }
 
@@ -154,11 +154,11 @@ public class ConnectionFactory
       try
       {
         // Ten seconds is a long time
-        ACF.sleep(10000L);
+        ManifoldCF.sleep(10000L);
       }
       catch (InterruptedException e)
       {
-        throw new ACFException("Interrupted",ACFException.INTERRUPTED);
+        throw new ManifoldCFException("Interrupted",ManifoldCFException.INTERRUPTED);
       }
     }
 
@@ -195,7 +195,7 @@ public class ConnectionFactory
     }
 
     public ConnectionPoolManager ensurePoolExists(String jdbcDriver)
-      throws ACFException
+      throws ManifoldCFException
     {
       synchronized (poolExistenceLock)
       {
@@ -207,11 +207,11 @@ public class ConnectionFactory
         }
         catch (Exception e)
         {
-          throw new ACFException("Unable to load database driver: "+e.getMessage(),e,ACFException.SETUP_ERROR);
+          throw new ManifoldCFException("Unable to load database driver: "+e.getMessage(),e,ManifoldCFException.SETUP_ERROR);
         }
         try
         {
-          String handleMax = ACF.getProperty(ACF.databaseHandleMaxcountProperty);
+          String handleMax = ManifoldCF.getProperty(ManifoldCF.databaseHandleMaxcountProperty);
           int maxDBConnections = defaultMaxDBConnections;
           if (handleMax != null && handleMax.length() > 0)
             maxDBConnections = Integer.parseInt(handleMax);
@@ -220,7 +220,7 @@ public class ConnectionFactory
         }
         catch (Exception e)
         {
-          throw new ACFException("Unable to initialize database handle pool: "+e.getMessage(),e,ACFException.SETUP_ERROR);
+          throw new ManifoldCFException("Unable to initialize database handle pool: "+e.getMessage(),e,ManifoldCFException.SETUP_ERROR);
         }
       }
     }
@@ -289,7 +289,7 @@ public class ConnectionFactory
         {
           try
           {
-            ACF.sleep(1000L);
+            ManifoldCF.sleep(1000L);
             k++;
             continue;
           }

Modified: incubator/lcf/trunk/modules/framework/core/src/main/java/org/apache/manifoldcf/core/database/DBInterfaceDerby.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/core/src/main/java/org/apache/manifoldcf/core/database/DBInterfaceDerby.java?rev=1004255&r1=1004254&r2=1004255&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/framework/core/src/main/java/org/apache/manifoldcf/core/database/DBInterfaceDerby.java (original)
+++ incubator/lcf/trunk/modules/framework/core/src/main/java/org/apache/manifoldcf/core/database/DBInterfaceDerby.java Mon Oct  4 14:32:19 2010
@@ -19,7 +19,7 @@
 package org.apache.manifoldcf.core.database;
 
 import org.apache.manifoldcf.core.interfaces.*;
-import org.apache.manifoldcf.core.system.ACF;
+import org.apache.manifoldcf.core.system.ManifoldCF;
 import org.apache.manifoldcf.core.system.Logging;
 import java.util.*;
 import java.util.regex.*;
@@ -51,11 +51,11 @@ public class DBInterfaceDerby extends Da
   }
   
   protected static String getFullDatabasePath(String databaseName)
-    throws ACFException
+    throws ManifoldCFException
   {
-    File path = ACF.getFileProperty(databasePathProperty);
+    File path = ManifoldCF.getFileProperty(databasePathProperty);
     if (path == null)
-      throw new ACFException("Derby database requires '"+databasePathProperty+"' property, containing a relative path");
+      throw new ManifoldCFException("Derby database requires '"+databasePathProperty+"' property, containing a relative path");
     String pathString = path.toString().replace("\\\\","/");
     if (!pathString.endsWith("/"))
       pathString = pathString + "/";
@@ -63,7 +63,7 @@ public class DBInterfaceDerby extends Da
   }
   
   public DBInterfaceDerby(IThreadContext tc, String databaseName, String userName, String password)
-    throws ACFException
+    throws ManifoldCFException
   {
     super(tc,_url+getFullDatabasePath(databaseName)+";user="+userName+";password="+password,_driver,getFullDatabasePath(databaseName),userName,password);
     cacheKey = CacheKeyFactory.makeDatabaseKey(this.databaseName);
@@ -75,7 +75,7 @@ public class DBInterfaceDerby extends Da
   * database communication.
   */
   public void openDatabase()
-    throws ACFException
+    throws ManifoldCFException
   {
     try
     {
@@ -85,7 +85,7 @@ public class DBInterfaceDerby extends Da
     }
     catch (Exception e)
     {
-      throw new ACFException(e.getMessage(),e,ACFException.SETUP_ERROR);
+      throw new ManifoldCFException(e.getMessage(),e,ManifoldCFException.SETUP_ERROR);
     }
   }
   
@@ -93,7 +93,7 @@ public class DBInterfaceDerby extends Da
   * all database communication.
   */
   public void closeDatabase()
-    throws ACFException
+    throws ManifoldCFException
   {
     try
     {
@@ -102,7 +102,7 @@ public class DBInterfaceDerby extends Da
     }
     catch (Exception e)
     {
-      throw new ACFException(e.getMessage(),e);
+      throw new ManifoldCFException(e.getMessage(),e);
     }
 
     // For the shutdown itself, eat the exception
@@ -128,7 +128,7 @@ public class DBInterfaceDerby extends Da
   *@param tableName is the name of the table.
   */
   public void performLock(String tableName)
-    throws ACFException
+    throws ManifoldCFException
   {
     performModification("LOCK TABLE "+tableName+" IN EXCLUSIVE MODE",null,null);
   }
@@ -140,7 +140,7 @@ public class DBInterfaceDerby extends Da
   *@param parameterMap is the map of column name/values to write.
   */
   public void performInsert(String tableName, Map parameterMap, StringSet invalidateKeys)
-    throws ACFException
+    throws ManifoldCFException
   {
     ArrayList paramArray = new ArrayList();
 
@@ -193,7 +193,7 @@ public class DBInterfaceDerby extends Da
   *@param whereParameters are the parameters that come with the where clause, if any.
   */
   public void performUpdate(String tableName, Map parameterMap, String whereClause, ArrayList whereParameters, StringSet invalidateKeys)
-    throws ACFException
+    throws ManifoldCFException
   {
     ArrayList paramArray = new ArrayList();
 
@@ -258,7 +258,7 @@ public class DBInterfaceDerby extends Da
   *@param whereParameters are the parameters that come with the where clause, if any.
   */
   public void performDelete(String tableName, String whereClause, ArrayList whereParameters, StringSet invalidateKeys)
-    throws ACFException
+    throws ManifoldCFException
   {
     StringBuffer bf = new StringBuffer();
     bf.append("DELETE FROM ");
@@ -284,7 +284,7 @@ public class DBInterfaceDerby extends Da
   *@param invalidateKeys are the cache keys that should be invalidated, if any.
   */
   public void performCreate(String tableName, Map columnMap, StringSet invalidateKeys)
-    throws ACFException
+    throws ManifoldCFException
   {
     int constraintNumber = 0;
     StringBuffer queryBuffer = new StringBuffer("CREATE TABLE ");
@@ -309,7 +309,7 @@ public class DBInterfaceDerby extends Da
   }
 
   protected void appendDescription(StringBuffer queryBuffer, String columnName, ColumnDescription cd, boolean forceNull)
-    throws ACFException
+    throws ManifoldCFException
   {
     queryBuffer.append(columnName);
     queryBuffer.append(' ');
@@ -348,7 +348,7 @@ public class DBInterfaceDerby extends Da
   */
   public void performAlter(String tableName, Map columnMap, Map columnModifyMap, ArrayList columnDeleteList,
     StringSet invalidateKeys)
-    throws ACFException
+    throws ManifoldCFException
   {
     beginTransaction(TRANSACTION_ENCLOSING);
     try
@@ -402,7 +402,7 @@ public class DBInterfaceDerby extends Da
         }
       }
     }
-    catch (ACFException e)
+    catch (ManifoldCFException e)
     {
       signalRollback();
       throw e;
@@ -438,7 +438,7 @@ public class DBInterfaceDerby extends Da
   * in the index, in order.
   */
   public void addTableIndex(String tableName, boolean unique, ArrayList columnList)
-    throws ACFException
+    throws ManifoldCFException
   {
     String[] columns = new String[columnList.size()];
     int i = 0;
@@ -456,7 +456,7 @@ public class DBInterfaceDerby extends Da
   *@param description is the index description.
   */
   public void performAddIndex(String indexName, String tableName, IndexDescription description)
-    throws ACFException
+    throws ManifoldCFException
   {
     String[] columnNames = description.getColumnNames();
     if (columnNames.length == 0)
@@ -491,7 +491,7 @@ public class DBInterfaceDerby extends Da
   *@param indexName is the name of the index to remove.
   */
   public void performRemoveIndex(String indexName)
-    throws ACFException
+    throws ManifoldCFException
   {
     performModification("DROP INDEX "+indexName,null,null);
   }
@@ -500,7 +500,7 @@ public class DBInterfaceDerby extends Da
   *@param tableName is the name of the table to analyze/calculate statistics for.
   */
   public void analyzeTable(String tableName)
-    throws ACFException
+    throws ManifoldCFException
   {
     // Does nothing on Derby
   }
@@ -509,7 +509,7 @@ public class DBInterfaceDerby extends Da
   *@param tableName is the name of the table to rebuild indexes for.
   */
   public void reindexTable(String tableName)
-    throws ACFException
+    throws ManifoldCFException
   {
     // Does nothing on Derby
   }
@@ -519,7 +519,7 @@ public class DBInterfaceDerby extends Da
   *@param invalidateKeys are the cache keys that should be invalidated, if any.
   */
   public void performDrop(String tableName, StringSet invalidateKeys)
-    throws ACFException
+    throws ManifoldCFException
   {
     performModification("DROP TABLE "+tableName,null,invalidateKeys);
   }
@@ -530,7 +530,7 @@ public class DBInterfaceDerby extends Da
   *@param invalidateKeys are the cache keys that should be invalidated, if any.
   */
   public void createUserAndDatabase(String adminUserName, String adminPassword, StringSet invalidateKeys)
-    throws ACFException
+    throws ManifoldCFException
   {
     Database rootDatabase = new Database(context,_url+databaseName,_driver,databaseName,"","");
     IResultSet set = rootDatabase.executeQuery("VALUES SYSCS_UTIL.SYSCS_GET_DATABASE_PROPERTY('derby.user."+userName+"')",null,null,null,null,true,-1,null,null);
@@ -556,7 +556,7 @@ public class DBInterfaceDerby extends Da
   *@param invalidateKeys are the cache keys that should be invalidated, if any.
   */
   public void dropUserAndDatabase(String adminUserName, String adminPassword, StringSet invalidateKeys)
-    throws ACFException
+    throws ManifoldCFException
   {
     File f = new File(databaseName);
     if (f.exists())
@@ -594,11 +594,11 @@ public class DBInterfaceDerby extends Da
   *@param theException is the exception to reinterpret
   *@return the reinterpreted exception to throw.
   */
-  protected ACFException reinterpretException(ACFException theException)
+  protected ManifoldCFException reinterpretException(ManifoldCFException theException)
   {
     if (Logging.db.isDebugEnabled())
       Logging.db.debug("Reinterpreting exception '"+theException.getMessage()+"'.  The exception type is "+Integer.toString(theException.getErrorCode()));
-    if (theException.getErrorCode() != ACFException.DATABASE_CONNECTION_ERROR)
+    if (theException.getErrorCode() != ManifoldCFException.DATABASE_CONNECTION_ERROR)
       return theException;
     Throwable e = theException.getCause();
     if (!(e instanceof java.sql.SQLException))
@@ -612,10 +612,10 @@ public class DBInterfaceDerby extends Da
     // insert the same row.  (Everything only works, then, as long as there is a unique constraint corresponding to every bad insert that
     // one could make.)
     if (sqlState != null && sqlState.equals("23505"))
-      return new ACFException(message,e,ACFException.DATABASE_TRANSACTION_ABORT);
+      return new ManifoldCFException(message,e,ManifoldCFException.DATABASE_TRANSACTION_ABORT);
     // Deadlock also aborts.
     if (sqlState != null && sqlState.equals("40001"))
-      return new ACFException(message,e,ACFException.DATABASE_TRANSACTION_ABORT);
+      return new ManifoldCFException(message,e,ManifoldCFException.DATABASE_TRANSACTION_ABORT);
     if (Logging.db.isDebugEnabled())
       Logging.db.debug("Exception "+theException.getMessage()+" is NOT a transaction abort signal");
     return theException;
@@ -627,13 +627,13 @@ public class DBInterfaceDerby extends Da
   *@param invalidateKeys are the cache keys to invalidate.
   */
   public void performModification(String query, ArrayList params, StringSet invalidateKeys)
-    throws ACFException
+    throws ManifoldCFException
   {
     try
     {
       executeQuery(query,params,null,invalidateKeys,null,false,0,null,null);
     }
-    catch (ACFException e)
+    catch (ManifoldCFException e)
     {
       throw reinterpretException(e);
     }
@@ -647,7 +647,7 @@ public class DBInterfaceDerby extends Da
   * table doesn't exist.
   */
   public Map getTableSchema(String tableName, StringSet cacheKeys, String queryClass)
-    throws ACFException
+    throws ManifoldCFException
   {
     String query = "SELECT CAST(t0.columnname AS VARCHAR(128)) AS columnname,CAST(t0.columndatatype AS VARCHAR(128)) AS columndatatype FROM sys.syscolumns t0, sys.systables t1 WHERE t0.referenceid=t1.tableid AND CAST(t1.tablename AS VARCHAR(128))=? ORDER BY t0.columnnumber ASC";
     ArrayList list = new ArrayList();
@@ -679,7 +679,7 @@ public class DBInterfaceDerby extends Da
   *@return a map of index names and IndexDescription objects, describing the indexes.
   */
   public Map getTableIndexes(String tableName, StringSet cacheKeys, String queryClass)
-    throws ACFException
+    throws ManifoldCFException
   {
     Map rval = new HashMap();
 
@@ -711,7 +711,7 @@ public class DBInterfaceDerby extends Da
   *@return the set of tables.
   */
   public StringSet getAllTables(StringSet cacheKeys, String queryClass)
-    throws ACFException
+    throws ManifoldCFException
   {
     IResultSet set = performQuery("SELECT CAST(tablename AS VARCHAR(128)) FROM sys.systables WHERE table_type='T'",null,cacheKeys,queryClass);
     StringSetBuffer ssb = new StringSetBuffer();
@@ -736,13 +736,13 @@ public class DBInterfaceDerby extends Da
   *@return a resultset.
   */
   public IResultSet performQuery(String query, ArrayList params, StringSet cacheKeys, String queryClass)
-    throws ACFException
+    throws ManifoldCFException
   {
     try
     {
       return executeQuery(query,params,cacheKeys,null,queryClass,true,-1,null,null);
     }
-    catch (ACFException e)
+    catch (ManifoldCFException e)
     {
       throw reinterpretException(e);
     }
@@ -760,13 +760,13 @@ public class DBInterfaceDerby extends Da
   */
   public IResultSet performQuery(String query, ArrayList params, StringSet cacheKeys, String queryClass,
     int maxResults, ILimitChecker returnLimit)
-    throws ACFException
+    throws ManifoldCFException
   {
     try
     {
       return executeQuery(query,params,cacheKeys,null,queryClass,true,maxResults,null,returnLimit);
     }
-    catch (ACFException e)
+    catch (ManifoldCFException e)
     {
       throw reinterpretException(e);
     }
@@ -785,13 +785,13 @@ public class DBInterfaceDerby extends Da
   */
   public IResultSet performQuery(String query, ArrayList params, StringSet cacheKeys, String queryClass,
     int maxResults, ResultSpecification resultSpec, ILimitChecker returnLimit)
-    throws ACFException
+    throws ManifoldCFException
   {
     try
     {
       return executeQuery(query,params,cacheKeys,null,queryClass,true,maxResults,resultSpec,returnLimit);
     }
-    catch (ACFException e)
+    catch (ManifoldCFException e)
     {
       throw reinterpretException(e);
     }
@@ -957,7 +957,7 @@ public class DBInterfaceDerby extends Da
   * signalRollback() method, and rethrow the exception.  Then, after that a finally{} block which calls endTransaction().
   */
   public void beginTransaction()
-    throws ACFException
+    throws ManifoldCFException
   {
     beginTransaction(TRANSACTION_ENCLOSING);
   }
@@ -972,7 +972,7 @@ public class DBInterfaceDerby extends Da
   *@param transactionType is the kind of transaction desired.
   */
   public void beginTransaction(int transactionType)
-    throws ACFException
+    throws ManifoldCFException
   {
     if (getCurrentTransactionType() == TRANSACTION_SERIALIZED)
     {
@@ -998,7 +998,7 @@ public class DBInterfaceDerby extends Da
         super.endTransaction();
         throw e;
       }
-      catch (ACFException e)
+      catch (ManifoldCFException e)
       {
         super.signalRollback();
         super.endTransaction();
@@ -1017,7 +1017,7 @@ public class DBInterfaceDerby extends Da
         super.endTransaction();
         throw e;
       }
-      catch (ACFException e)
+      catch (ManifoldCFException e)
       {
         super.signalRollback();
         super.endTransaction();
@@ -1026,7 +1026,7 @@ public class DBInterfaceDerby extends Da
       super.beginTransaction(TRANSACTION_SERIALIZED);
       break;
     default:
-      throw new ACFException("Bad transaction type");
+      throw new ManifoldCFException("Bad transaction type");
     }
   }
 
@@ -1042,7 +1042,7 @@ public class DBInterfaceDerby extends Da
   * signalRollback() was called within the transaction).
   */
   public void endTransaction()
-    throws ACFException
+    throws ManifoldCFException
   {
     if (serializableDepth > 0)
     {
@@ -1058,7 +1058,7 @@ public class DBInterfaceDerby extends Da
   
   /** Abstract method to start a transaction */
   protected void startATransaction()
-    throws ACFException
+    throws ManifoldCFException
   {
     if (!inTransaction)
     {
@@ -1068,7 +1068,7 @@ public class DBInterfaceDerby extends Da
       }
       catch (java.sql.SQLException e)
       {
-        throw new ACFException(e.getMessage(),e);
+        throw new ManifoldCFException(e.getMessage(),e);
       }
       inTransaction = true;
     }
@@ -1077,7 +1077,7 @@ public class DBInterfaceDerby extends Da
 
   /** Abstract method to commit a transaction */
   protected void commitCurrentTransaction()
-    throws ACFException
+    throws ManifoldCFException
   {
     if (inTransaction)
     {
@@ -1094,18 +1094,18 @@ public class DBInterfaceDerby extends Da
         }
         catch (java.sql.SQLException e)
         {
-          throw new ACFException(e.getMessage(),e);
+          throw new ManifoldCFException(e.getMessage(),e);
         }
         inTransaction = false;
       }
     }
     else
-      throw new ACFException("Transaction nesting error!");
+      throw new ManifoldCFException("Transaction nesting error!");
   }
   
   /** Abstract method to roll back a transaction */
   protected void rollbackCurrentTransaction()
-    throws ACFException
+    throws ManifoldCFException
   {
     if (inTransaction)
     {
@@ -1122,13 +1122,13 @@ public class DBInterfaceDerby extends Da
         }
         catch (java.sql.SQLException e)
         {
-          throw new ACFException(e.getMessage(),e);
+          throw new ManifoldCFException(e.getMessage(),e);
         }
         inTransaction = false;
       }
     }
     else
-      throw new ACFException("Transaction nesting error!");
+      throw new ManifoldCFException("Transaction nesting error!");
   }
 
   /** Abstract method for mapping a column name from resultset */

Modified: incubator/lcf/trunk/modules/framework/core/src/main/java/org/apache/manifoldcf/core/database/DBInterfaceMySQL.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/core/src/main/java/org/apache/manifoldcf/core/database/DBInterfaceMySQL.java?rev=1004255&r1=1004254&r2=1004255&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/framework/core/src/main/java/org/apache/manifoldcf/core/database/DBInterfaceMySQL.java (original)
+++ incubator/lcf/trunk/modules/framework/core/src/main/java/org/apache/manifoldcf/core/database/DBInterfaceMySQL.java Mon Oct  4 14:32:19 2010
@@ -32,7 +32,7 @@ public class DBInterfaceMySQL extends Da
   protected String cacheKey;
 
   public DBInterfaceMySQL(IThreadContext tc, String databaseName, String userName, String password)
-    throws ACFException
+    throws ManifoldCFException
   {
     super(tc,_url+databaseName,_driver,databaseName,userName,password);
     cacheKey = CacheKeyFactory.makeDatabaseKey(this.databaseName);
@@ -42,7 +42,7 @@ public class DBInterfaceMySQL extends Da
   * database communication.
   */
   public void openDatabase()
-    throws ACFException
+    throws ManifoldCFException
   {
     // Nothing to do.
   }
@@ -51,7 +51,7 @@ public class DBInterfaceMySQL extends Da
   * all database communication.
   */
   public void closeDatabase()
-    throws ACFException
+    throws ManifoldCFException
   {
     // Nothing to do.
   }
@@ -68,7 +68,7 @@ public class DBInterfaceMySQL extends Da
   *@param tableName is the name of the table.
   */
   public void performLock(String tableName)
-    throws ACFException
+    throws ManifoldCFException
   {
     performModification("LOCK TABLE "+tableName+" IN EXCLUSIVE MODE",null,null);
   }
@@ -80,7 +80,7 @@ public class DBInterfaceMySQL extends Da
   *@param parameterMap is the map of column name/values to write.
   */
   public void performInsert(String tableName, Map parameterMap, StringSet invalidateKeys)
-    throws ACFException
+    throws ManifoldCFException
   {
     ArrayList paramArray = new ArrayList();
 
@@ -133,7 +133,7 @@ public class DBInterfaceMySQL extends Da
   *@param whereParameters are the parameters that come with the where clause, if any.
   */
   public void performUpdate(String tableName, Map parameterMap, String whereClause, ArrayList whereParameters, StringSet invalidateKeys)
-    throws ACFException
+    throws ManifoldCFException
   {
     ArrayList paramArray = new ArrayList();
 
@@ -198,7 +198,7 @@ public class DBInterfaceMySQL extends Da
   *@param whereParameters are the parameters that come with the where clause, if any.
   */
   public void performDelete(String tableName, String whereClause, ArrayList whereParameters, StringSet invalidateKeys)
-    throws ACFException
+    throws ManifoldCFException
   {
     StringBuffer bf = new StringBuffer();
     bf.append("DELETE FROM ");
@@ -224,7 +224,7 @@ public class DBInterfaceMySQL extends Da
   *@param invalidateKeys are the cache keys that should be invalidated, if any.
   */
   public void performCreate(String tableName, Map columnMap, StringSet invalidateKeys)
-    throws ACFException
+    throws ManifoldCFException
   {
     StringBuffer queryBuffer = new StringBuffer("CREATE TABLE ");
     queryBuffer.append(tableName);
@@ -279,7 +279,7 @@ public class DBInterfaceMySQL extends Da
   */
   public void performAlter(String tableName, Map columnMap, Map columnModifyMap, ArrayList columnDeleteList,
     StringSet invalidateKeys)
-    throws ACFException
+    throws ManifoldCFException
   {
     // MHL
   }
@@ -291,7 +291,7 @@ public class DBInterfaceMySQL extends Da
   * in the index, in order.
   */
   public void addTableIndex(String tableName, boolean unique, ArrayList columnList)
-    throws ACFException
+    throws ManifoldCFException
   {
     String[] columns = new String[columnList.size()];
     int i = 0;
@@ -309,7 +309,7 @@ public class DBInterfaceMySQL extends Da
   *@param description is the index description.
   */
   public void performAddIndex(String indexName, String tableName, IndexDescription description)
-    throws ACFException
+    throws ManifoldCFException
   {
     String[] columnNames = description.getColumnNames();
     if (columnNames.length == 0)
@@ -344,7 +344,7 @@ public class DBInterfaceMySQL extends Da
   *@param indexName is the name of the index to remove.
   */
   public void performRemoveIndex(String indexName)
-    throws ACFException
+    throws ManifoldCFException
   {
     performModification("DROP INDEX "+indexName,null,null);
   }
@@ -353,7 +353,7 @@ public class DBInterfaceMySQL extends Da
   *@param tableName is the name of the table to analyze/calculate statistics for.
   */
   public void analyzeTable(String tableName)
-    throws ACFException
+    throws ManifoldCFException
   {
     // Does nothing
   }
@@ -362,7 +362,7 @@ public class DBInterfaceMySQL extends Da
   *@param tableName is the name of the table to rebuild indexes for.
   */
   public void reindexTable(String tableName)
-    throws ACFException
+    throws ManifoldCFException
   {
     // Does nothing
   }
@@ -372,7 +372,7 @@ public class DBInterfaceMySQL extends Da
   *@param invalidateKeys are the cache keys that should be invalidated, if any.
   */
   public void performDrop(String tableName, StringSet invalidateKeys)
-    throws ACFException
+    throws ManifoldCFException
   {
     performModification("DROP TABLE "+tableName,null,invalidateKeys);
   }
@@ -383,7 +383,7 @@ public class DBInterfaceMySQL extends Da
   *@param invalidateKeys are the cache keys that should be invalidated, if any.
   */
   public void createUserAndDatabase(String adminUserName, String adminPassword, StringSet invalidateKeys)
-    throws ACFException
+    throws ManifoldCFException
   {
     // Connect to super database
     Database masterDatabase = new Database(context,_url+"mysql",_driver,"mysql",adminUserName,adminPassword);
@@ -404,7 +404,7 @@ public class DBInterfaceMySQL extends Da
   *@param invalidateKeys are the cache keys that should be invalidated, if any.
   */
   public void dropUserAndDatabase(String adminUserName, String adminPassword, StringSet invalidateKeys)
-    throws ACFException
+    throws ManifoldCFException
   {
     // Connect to super database
     Database masterDatabase = new Database(context,_url+"mysql",_driver,"mysql",adminUserName,adminPassword);
@@ -417,7 +417,7 @@ public class DBInterfaceMySQL extends Da
   *@param invalidateKeys are the cache keys to invalidate.
   */
   public void performModification(String query, ArrayList params, StringSet invalidateKeys)
-    throws ACFException
+    throws ManifoldCFException
   {
     executeQuery(query,params,null,invalidateKeys,null,false,0,null,null);
   }
@@ -429,7 +429,7 @@ public class DBInterfaceMySQL extends Da
   *@return a map of column names and ColumnDescription objects, describing the schema.
   */
   public Map getTableSchema(String tableName, StringSet cacheKeys, String queryClass)
-    throws ACFException
+    throws ManifoldCFException
   {
     IResultSet set = performQuery("DESCRIBE "+tableName,null,cacheKeys,queryClass);
     // Digest the result
@@ -455,7 +455,7 @@ public class DBInterfaceMySQL extends Da
   *@return a map of index names and IndexDescription objects, describing the indexes.
   */
   public Map getTableIndexes(String tableName, StringSet cacheKeys, String queryClass)
-    throws ACFException
+    throws ManifoldCFException
   {
     // MHL
     return null;
@@ -467,7 +467,7 @@ public class DBInterfaceMySQL extends Da
   *@return the set of tables.
   */
   public StringSet getAllTables(StringSet cacheKeys, String queryClass)
-    throws ACFException
+    throws ManifoldCFException
   {
     IResultSet set = performQuery("SHOW TABLES",null,cacheKeys,queryClass);
     StringSetBuffer ssb = new StringSetBuffer();
@@ -496,7 +496,7 @@ public class DBInterfaceMySQL extends Da
   *@return a resultset.
   */
   public IResultSet performQuery(String query, ArrayList params, StringSet cacheKeys, String queryClass)
-    throws ACFException
+    throws ManifoldCFException
   {
     return executeQuery(query,params,cacheKeys,null,queryClass,true,-1,null,null);
   }
@@ -513,7 +513,7 @@ public class DBInterfaceMySQL extends Da
   */
   public IResultSet performQuery(String query, ArrayList params, StringSet cacheKeys, String queryClass,
     int maxResults, ILimitChecker returnLimit)
-    throws ACFException
+    throws ManifoldCFException
   {
     return executeQuery(query,params,cacheKeys,null,queryClass,true,maxResults,null,returnLimit);
   }
@@ -531,7 +531,7 @@ public class DBInterfaceMySQL extends Da
   */
   public IResultSet performQuery(String query, ArrayList params, StringSet cacheKeys, String queryClass,
     int maxResults, ResultSpecification resultSpec, ILimitChecker returnLimit)
-    throws ACFException
+    throws ManifoldCFException
   {
     return executeQuery(query,params,cacheKeys,null,queryClass,true,maxResults,resultSpec,returnLimit);
   }
@@ -673,7 +673,7 @@ public class DBInterfaceMySQL extends Da
   * signalRollback() method, and rethrow the exception.  Then, after that a finally{} block which calls endTransaction().
   */
   public void beginTransaction()
-    throws ACFException
+    throws ManifoldCFException
   {
     super.beginTransaction(TRANSACTION_READCOMMITTED);
   }
@@ -688,28 +688,28 @@ public class DBInterfaceMySQL extends Da
   *@param transactionType is the kind of transaction desired.
   */
   public void beginTransaction(int transactionType)
-    throws ACFException
+    throws ManifoldCFException
   {
     super.beginTransaction(TRANSACTION_READCOMMITTED);
   }
 
   /** Abstract method to start a transaction */
   protected void startATransaction()
-    throws ACFException
+    throws ManifoldCFException
   {
     executeViaThread(connection,"START TRANSACTION",null,false,0,null,null);
   }
 
   /** Abstract method to commit a transaction */
   protected void commitCurrentTransaction()
-    throws ACFException
+    throws ManifoldCFException
   {
     executeViaThread(connection,"COMMIT",null,false,0,null,null);
   }
   
   /** Abstract method to roll back a transaction */
   protected void rollbackCurrentTransaction()
-    throws ACFException
+    throws ManifoldCFException
   {
     executeViaThread(connection,"ROLLBACK",null,false,0,null,null);
   }

Modified: incubator/lcf/trunk/modules/framework/core/src/main/java/org/apache/manifoldcf/core/database/DBInterfacePostgreSQL.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/core/src/main/java/org/apache/manifoldcf/core/database/DBInterfacePostgreSQL.java?rev=1004255&r1=1004254&r2=1004255&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/framework/core/src/main/java/org/apache/manifoldcf/core/database/DBInterfacePostgreSQL.java (original)
+++ incubator/lcf/trunk/modules/framework/core/src/main/java/org/apache/manifoldcf/core/database/DBInterfacePostgreSQL.java Mon Oct  4 14:32:19 2010
@@ -41,7 +41,7 @@ public class DBInterfacePostgreSQL exten
   protected ArrayList tablesToReindex = new ArrayList();
 
   public DBInterfacePostgreSQL(IThreadContext tc, String databaseName, String userName, String password)
-    throws ACFException
+    throws ManifoldCFException
   {
     super(tc,_url+databaseName,_driver,databaseName,userName,password);
     cacheKey = CacheKeyFactory.makeDatabaseKey(this.databaseName);
@@ -51,7 +51,7 @@ public class DBInterfacePostgreSQL exten
   * database communication.
   */
   public void openDatabase()
-    throws ACFException
+    throws ManifoldCFException
   {
     // Nothing to do
   }
@@ -60,7 +60,7 @@ public class DBInterfacePostgreSQL exten
   * all database communication.
   */
   public void closeDatabase()
-    throws ACFException
+    throws ManifoldCFException
   {
     // Nothing to do
   }
@@ -77,7 +77,7 @@ public class DBInterfacePostgreSQL exten
   *@param tableName is the name of the table.
   */
   public void performLock(String tableName)
-    throws ACFException
+    throws ManifoldCFException
   {
     performModification("LOCK TABLE "+tableName+" IN EXCLUSIVE MODE",null,null);
   }
@@ -89,7 +89,7 @@ public class DBInterfacePostgreSQL exten
   *@param parameterMap is the map of column name/values to write.
   */
   public void performInsert(String tableName, Map parameterMap, StringSet invalidateKeys)
-    throws ACFException
+    throws ManifoldCFException
   {
     ArrayList paramArray = new ArrayList();
 
@@ -142,7 +142,7 @@ public class DBInterfacePostgreSQL exten
   *@param whereParameters are the parameters that come with the where clause, if any.
   */
   public void performUpdate(String tableName, Map parameterMap, String whereClause, ArrayList whereParameters, StringSet invalidateKeys)
-    throws ACFException
+    throws ManifoldCFException
   {
     ArrayList paramArray = new ArrayList();
 
@@ -207,7 +207,7 @@ public class DBInterfacePostgreSQL exten
   *@param whereParameters are the parameters that come with the where clause, if any.
   */
   public void performDelete(String tableName, String whereClause, ArrayList whereParameters, StringSet invalidateKeys)
-    throws ACFException
+    throws ManifoldCFException
   {
     StringBuffer bf = new StringBuffer();
     bf.append("DELETE FROM ");
@@ -233,7 +233,7 @@ public class DBInterfacePostgreSQL exten
   *@param invalidateKeys are the cache keys that should be invalidated, if any.
   */
   public void performCreate(String tableName, Map columnMap, StringSet invalidateKeys)
-    throws ACFException
+    throws ManifoldCFException
   {
     StringBuffer queryBuffer = new StringBuffer("CREATE TABLE ");
     queryBuffer.append(tableName);
@@ -293,7 +293,7 @@ public class DBInterfacePostgreSQL exten
   */
   public void performAlter(String tableName, Map columnMap, Map columnModifyMap, ArrayList columnDeleteList,
     StringSet invalidateKeys)
-    throws ACFException
+    throws ManifoldCFException
   {
     beginTransaction(TRANSACTION_ENCLOSING);
     try
@@ -347,7 +347,7 @@ public class DBInterfacePostgreSQL exten
         }
       }
     }
-    catch (ACFException e)
+    catch (ManifoldCFException e)
     {
       signalRollback();
       throw e;
@@ -385,7 +385,7 @@ public class DBInterfacePostgreSQL exten
   * in the index, in order.
   */
   public void addTableIndex(String tableName, boolean unique, ArrayList columnList)
-    throws ACFException
+    throws ManifoldCFException
   {
     String[] columns = new String[columnList.size()];
     int i = 0;
@@ -403,7 +403,7 @@ public class DBInterfacePostgreSQL exten
   *@param description is the index description.
   */
   public void performAddIndex(String indexName, String tableName, IndexDescription description)
-    throws ACFException
+    throws ManifoldCFException
   {
     String[] columnNames = description.getColumnNames();
     if (columnNames.length == 0)
@@ -438,7 +438,7 @@ public class DBInterfacePostgreSQL exten
   *@param indexName is the name of the index to remove.
   */
   public void performRemoveIndex(String indexName)
-    throws ACFException
+    throws ManifoldCFException
   {
     performModification("DROP INDEX "+indexName,null,null);
   }
@@ -447,7 +447,7 @@ public class DBInterfacePostgreSQL exten
   *@param tableName is the name of the table to analyze/calculate statistics for.
   */
   public void analyzeTable(String tableName)
-    throws ACFException
+    throws ManifoldCFException
   {
     if (getTransactionID() == null)
       performModification("ANALYZE "+tableName,null,null);
@@ -459,7 +459,7 @@ public class DBInterfacePostgreSQL exten
   *@param tableName is the name of the table to rebuild indexes for.
   */
   public void reindexTable(String tableName)
-    throws ACFException
+    throws ManifoldCFException
   {
     if (getTransactionID() == null)
       performModification("REINDEX TABLE "+tableName,null,null);
@@ -472,7 +472,7 @@ public class DBInterfacePostgreSQL exten
   *@param invalidateKeys are the cache keys that should be invalidated, if any.
   */
   public void performDrop(String tableName, StringSet invalidateKeys)
-    throws ACFException
+    throws ManifoldCFException
   {
     performModification("DROP TABLE "+tableName,null,invalidateKeys);
   }
@@ -483,7 +483,7 @@ public class DBInterfacePostgreSQL exten
   *@param invalidateKeys are the cache keys that should be invalidated, if any.
   */
   public void createUserAndDatabase(String adminUserName, String adminPassword, StringSet invalidateKeys)
-    throws ACFException
+    throws ManifoldCFException
   {
     // Create a connection to the master database, using the credentials supplied
     Database masterDatabase = new Database(context,_url+"template1",_driver,"template1",adminUserName,adminPassword);
@@ -509,7 +509,7 @@ public class DBInterfacePostgreSQL exten
 	  userName+" ENCODING="+quoteSQLString("utf8"),null,null,invalidateKeys,null,false,0,null,null);
       }
     }
-    catch (ACFException e)
+    catch (ManifoldCFException e)
     {
       throw reinterpretException(e);
     }
@@ -521,7 +521,7 @@ public class DBInterfacePostgreSQL exten
   *@param invalidateKeys are the cache keys that should be invalidated, if any.
   */
   public void dropUserAndDatabase(String adminUserName, String adminPassword, StringSet invalidateKeys)
-    throws ACFException
+    throws ManifoldCFException
   {
     // Create a connection to the master database, using the credentials supplied
     Database masterDatabase = new Database(context,_url+"template1",_driver,"template1",adminUserName,adminPassword);
@@ -532,7 +532,7 @@ public class DBInterfacePostgreSQL exten
       // Drop user
       masterDatabase.executeQuery("DROP USER "+userName,null,null,invalidateKeys,null,false,0,null,null);
     }
-    catch (ACFException e)
+    catch (ManifoldCFException e)
     {
       throw reinterpretException(e);
     }
@@ -543,11 +543,11 @@ public class DBInterfacePostgreSQL exten
   *@param theException is the exception to reinterpret
   *@return the reinterpreted exception to throw.
   */
-  protected ACFException reinterpretException(ACFException theException)
+  protected ManifoldCFException reinterpretException(ManifoldCFException theException)
   {
     if (Logging.db.isDebugEnabled())
       Logging.db.debug("Reinterpreting exception '"+theException.getMessage()+"'.  The exception type is "+Integer.toString(theException.getErrorCode()));
-    if (theException.getErrorCode() != ACFException.DATABASE_CONNECTION_ERROR)
+    if (theException.getErrorCode() != ManifoldCFException.DATABASE_CONNECTION_ERROR)
       return theException;
     Throwable e = theException.getCause();
     if (!(e instanceof java.sql.SQLException))
@@ -559,15 +559,15 @@ public class DBInterfacePostgreSQL exten
     String sqlState = sqlException.getSQLState();
     // Could not serialize
     if (sqlState != null && sqlState.equals("40001"))
-      return new ACFException(message,e,ACFException.DATABASE_TRANSACTION_ABORT);
+      return new ManifoldCFException(message,e,ManifoldCFException.DATABASE_TRANSACTION_ABORT);
     // Deadlock detected
     if (sqlState != null && sqlState.equals("40P01"))
-      return new ACFException(message,e,ACFException.DATABASE_TRANSACTION_ABORT);
+      return new ManifoldCFException(message,e,ManifoldCFException.DATABASE_TRANSACTION_ABORT);
     // Note well: We also have to treat 'duplicate key' as a transaction abort, since this is what you get when two threads attempt to
     // insert the same row.  (Everything only works, then, as long as there is a unique constraint corresponding to every bad insert that
     // one could make.)
     if (sqlState != null && sqlState.equals("23505"))
-      return new ACFException(message,e,ACFException.DATABASE_TRANSACTION_ABORT);
+      return new ManifoldCFException(message,e,ManifoldCFException.DATABASE_TRANSACTION_ABORT);
     if (Logging.db.isDebugEnabled())
       Logging.db.debug("Exception "+theException.getMessage()+" is NOT a transaction abort signal");
     return theException;
@@ -579,13 +579,13 @@ public class DBInterfacePostgreSQL exten
   *@param invalidateKeys are the cache keys to invalidate.
   */
   public void performModification(String query, ArrayList params, StringSet invalidateKeys)
-    throws ACFException
+    throws ManifoldCFException
   {
     try
     {
       executeQuery(query,params,null,invalidateKeys,null,false,0,null,null);
     }
-    catch (ACFException e)
+    catch (ManifoldCFException e)
     {
       throw reinterpretException(e);
     }
@@ -599,7 +599,7 @@ public class DBInterfacePostgreSQL exten
   * table doesn't exist.
   */
   public Map getTableSchema(String tableName, StringSet cacheKeys, String queryClass)
-    throws ACFException
+    throws ManifoldCFException
   {
     StringBuffer query = new StringBuffer();
     query.append("SELECT pg_attribute.attname AS \"Field\",");
@@ -641,7 +641,7 @@ public class DBInterfacePostgreSQL exten
   *@return a map of index names and IndexDescription objects, describing the indexes.
   */
   public Map getTableIndexes(String tableName, StringSet cacheKeys, String queryClass)
-    throws ACFException
+    throws ManifoldCFException
   {
     Map rval = new HashMap();
 
@@ -664,7 +664,7 @@ public class DBInterfacePostgreSQL exten
       {
         beforeMatch = indexdef.indexOf("CREATE INDEX ",parsePosition);
         if (beforeMatch == -1)
-          throw new ACFException("Cannot parse index description: '"+indexdef+"'");
+          throw new ManifoldCFException("Cannot parse index description: '"+indexdef+"'");
         isUnique = false;
         parsePosition += "CREATE INDEX ".length();
       }
@@ -676,12 +676,12 @@ public class DBInterfacePostgreSQL exten
 
       int afterMatch = indexdef.indexOf(" ON",parsePosition);
       if (afterMatch == -1)
-        throw new ACFException("Cannot parse index description: '"+indexdef+"'");
+        throw new ManifoldCFException("Cannot parse index description: '"+indexdef+"'");
       String indexName = indexdef.substring(parsePosition,afterMatch);
       parsePosition = afterMatch + " ON".length();
       int parenPosition = indexdef.indexOf("(",parsePosition);
       if (parenPosition == -1)
-        throw new ACFException("Cannot parse index description: '"+indexdef+"'");
+        throw new ManifoldCFException("Cannot parse index description: '"+indexdef+"'");
       parsePosition = parenPosition + 1;
       ArrayList columns = new ArrayList();
       while (true)
@@ -691,7 +691,7 @@ public class DBInterfacePostgreSQL exten
         if (nextIndex == -1)
           nextIndex = nextParenIndex;
         if (nextIndex == -1)
-          throw new ACFException("Cannot parse index description: '"+indexdef+"'");
+          throw new ManifoldCFException("Cannot parse index description: '"+indexdef+"'");
         if (nextParenIndex != -1 && nextParenIndex < nextIndex)
           nextIndex = nextParenIndex;
 
@@ -722,7 +722,7 @@ public class DBInterfacePostgreSQL exten
   *@return the set of tables.
   */
   public StringSet getAllTables(StringSet cacheKeys, String queryClass)
-    throws ACFException
+    throws ManifoldCFException
   {
     IResultSet set = performQuery("SELECT relname FROM pg_class",null,cacheKeys,queryClass);
     StringSetBuffer ssb = new StringSetBuffer();
@@ -747,13 +747,13 @@ public class DBInterfacePostgreSQL exten
   *@return a resultset.
   */
   public IResultSet performQuery(String query, ArrayList params, StringSet cacheKeys, String queryClass)
-    throws ACFException
+    throws ManifoldCFException
   {
     try
     {
       return executeQuery(query,params,cacheKeys,null,queryClass,true,-1,null,null);
     }
-    catch (ACFException e)
+    catch (ManifoldCFException e)
     {
       throw reinterpretException(e);
     }
@@ -771,13 +771,13 @@ public class DBInterfacePostgreSQL exten
   */
   public IResultSet performQuery(String query, ArrayList params, StringSet cacheKeys, String queryClass,
     int maxResults, ILimitChecker returnLimit)
-    throws ACFException
+    throws ManifoldCFException
   {
     try
     {
       return executeQuery(query,params,cacheKeys,null,queryClass,true,maxResults,null,returnLimit);
     }
-    catch (ACFException e)
+    catch (ManifoldCFException e)
     {
       throw reinterpretException(e);
     }
@@ -796,13 +796,13 @@ public class DBInterfacePostgreSQL exten
   */
   public IResultSet performQuery(String query, ArrayList params, StringSet cacheKeys, String queryClass,
     int maxResults, ResultSpecification resultSpec, ILimitChecker returnLimit)
-    throws ACFException
+    throws ManifoldCFException
   {
     try
     {
       return executeQuery(query,params,cacheKeys,null,queryClass,true,maxResults,resultSpec,returnLimit);
     }
-    catch (ACFException e)
+    catch (ManifoldCFException e)
     {
       throw reinterpretException(e);
     }
@@ -961,7 +961,7 @@ public class DBInterfacePostgreSQL exten
   * signalRollback() method, and rethrow the exception.  Then, after that a finally{} block which calls endTransaction().
   */
   public void beginTransaction()
-    throws ACFException
+    throws ManifoldCFException
   {
     beginTransaction(TRANSACTION_ENCLOSING);
   }
@@ -976,7 +976,7 @@ public class DBInterfacePostgreSQL exten
   *@param transactionType is the kind of transaction desired.
   */
   public void beginTransaction(int transactionType)
-    throws ACFException
+    throws ManifoldCFException
   {
     if (getCurrentTransactionType() == TRANSACTION_SERIALIZED)
     {
@@ -1006,7 +1006,7 @@ public class DBInterfacePostgreSQL exten
         super.endTransaction();
         throw e;
       }
-      catch (ACFException e)
+      catch (ManifoldCFException e)
       {
         super.signalRollback();
         super.endTransaction();
@@ -1014,7 +1014,7 @@ public class DBInterfacePostgreSQL exten
       }
       break;
     default:
-      throw new ACFException("Bad transaction type: "+Integer.toString(transactionType));
+      throw new ManifoldCFException("Bad transaction type: "+Integer.toString(transactionType));
     }
   }
 
@@ -1030,7 +1030,7 @@ public class DBInterfacePostgreSQL exten
   * signalRollback() was called within the transaction).
   */
   public void endTransaction()
-    throws ACFException
+    throws ManifoldCFException
   {
     if (serializableDepth > 0)
     {
@@ -1058,28 +1058,28 @@ public class DBInterfacePostgreSQL exten
 
   /** Abstract method to start a transaction */
   protected void startATransaction()
-    throws ACFException
+    throws ManifoldCFException
   {
     executeViaThread(connection,"START TRANSACTION",null,false,0,null,null);
   }
 
   /** Abstract method to commit a transaction */
   protected void commitCurrentTransaction()
-    throws ACFException
+    throws ManifoldCFException
   {
     executeViaThread(connection,"COMMIT",null,false,0,null,null);
   }
   
   /** Abstract method to roll back a transaction */
   protected void rollbackCurrentTransaction()
-    throws ACFException
+    throws ManifoldCFException
   {
     executeViaThread(connection,"ROLLBACK",null,false,0,null,null);
   }
   
   /** Abstract method for explaining a query */
   protected void explainQuery(String query, ArrayList params)
-    throws ACFException
+    throws ManifoldCFException
   {
     IResultSet x = executeUncachedQuery("EXPLAIN "+query,params,true,
       -1,null,null);

Modified: incubator/lcf/trunk/modules/framework/core/src/main/java/org/apache/manifoldcf/core/database/Database.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/core/src/main/java/org/apache/manifoldcf/core/database/Database.java?rev=1004255&r1=1004254&r2=1004255&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/framework/core/src/main/java/org/apache/manifoldcf/core/database/Database.java (original)
+++ incubator/lcf/trunk/modules/framework/core/src/main/java/org/apache/manifoldcf/core/database/Database.java Mon Oct  4 14:32:19 2010
@@ -51,7 +51,7 @@ public class Database
   protected final static String _TRANSACTION_ = "_TRANSACTION_";
 
   public Database(IThreadContext context, String jdbcUrl, String jdbcDriverClass, String databaseName, String userName, String password)
-    throws ACFException
+    throws ManifoldCFException
   {
     this.context = context;
     this.jdbcUrl = jdbcUrl;
@@ -82,25 +82,25 @@ public class Database
 
   /** Abstract method to start a transaction */
   protected void startATransaction()
-    throws ACFException
+    throws ManifoldCFException
   {
   }
 
   /** Abstract method to commit a transaction */
   protected void commitCurrentTransaction()
-    throws ACFException
+    throws ManifoldCFException
   {
   }
   
   /** Abstract method to roll back a transaction */
   protected void rollbackCurrentTransaction()
-    throws ACFException
+    throws ManifoldCFException
   {
   }
   
   /** Abstract method for explaining a query */
   protected void explainQuery(String query, ArrayList params)
-    throws ACFException
+    throws ManifoldCFException
   {
   }
   
@@ -138,7 +138,7 @@ public class Database
   */
   public IResultSet executeQuery(String query, ArrayList params, StringSet cacheKeys, StringSet invalidateKeys,
     String queryClass, boolean needResult, int maxReturn, ResultSpecification spec, ILimitChecker returnLimits)
-    throws ACFException
+    throws ManifoldCFException
   {
     // System.out.println("Query: "+query);
     if (Logging.db.isDebugEnabled())
@@ -189,7 +189,7 @@ public class Database
   *@param transactionType describes the type of the transaction.
   */
   public void beginTransaction(int transactionType)
-    throws ACFException
+    throws ManifoldCFException
   {
     if (Logging.db.isDebugEnabled())
       Logging.db.debug("Beginning transaction of type "+Integer.toString(transactionType));
@@ -208,7 +208,7 @@ public class Database
   /** Synchronize internal transactions.
   */
   protected void synchronizeTransactions()
-    throws ACFException
+    throws ManifoldCFException
   {
     while (delayedTransactionDepth > 0)
     {
@@ -222,7 +222,7 @@ public class Database
   /** Perform actual transaction begin.
   */
   protected void internalTransactionBegin()
-    throws ACFException
+    throws ManifoldCFException
   {
     // Get a semipermanent connection
     if (connection == null)
@@ -233,9 +233,9 @@ public class Database
         // Start a transaction
         startATransaction();
       }
-      catch (ACFException e)
+      catch (ManifoldCFException e)
       {
-        if (e.getErrorCode() == ACFException.INTERRUPTED)
+        if (e.getErrorCode() == ManifoldCFException.INTERRUPTED)
         {
           connection = null;
           throw e;
@@ -257,9 +257,9 @@ public class Database
       {
         startATransaction();
       }
-      catch (ACFException e)
+      catch (ManifoldCFException e)
       {
-        if (e.getErrorCode() == ACFException.INTERRUPTED)
+        if (e.getErrorCode() == ManifoldCFException.INTERRUPTED)
         {
           // Don't do anything else other than drop the connection on the floor
           connection = null;
@@ -281,11 +281,11 @@ public class Database
   * signalRollback() was called within the transaction).
   */
   public void endTransaction()
-    throws ACFException
+    throws ManifoldCFException
   {
     Logging.db.debug("Ending transaction");
     if (th == null)
-      throw new ACFException("End transaction without begin!",ACFException.GENERAL_ERROR);
+      throw new ManifoldCFException("End transaction without begin!",ManifoldCFException.GENERAL_ERROR);
 
     TransactionHandle parentTransaction = th.getParent();
     // If the database throws up on the commit or the rollback, above us there
@@ -313,9 +313,9 @@ public class Database
             commitCurrentTransaction();
           }
         }
-        catch (ACFException e)
+        catch (ManifoldCFException e)
         {
-          if (e.getErrorCode() == ACFException.INTERRUPTED)
+          if (e.getErrorCode() == ManifoldCFException.INTERRUPTED)
           {
             // Drop the connection on the floor, so it cannot be reused.
             connection = null;
@@ -400,7 +400,7 @@ public class Database
   /** Do query execution via a subthread, so the primary thread can be interrupted */
   protected IResultSet executeViaThread(Connection connection, String query, ArrayList params, boolean bResults, int maxResults,
     ResultSpecification spec, ILimitChecker returnLimit)
-    throws ACFException
+    throws ManifoldCFException
   {
     if (connection == null)
       // This probably means that the thread was interrupted and the connection was abandoned.  Just return null.
@@ -414,11 +414,11 @@ public class Database
       Throwable thr = t.getException();
       if (thr != null)
       {
-        if (thr instanceof ACFException)
+        if (thr instanceof ManifoldCFException)
         {
           // Nest the exceptions so there is a hope we actually see the context, while preserving the kind of error it is
-          ACFException me = (ACFException)thr;
-          throw new ACFException("Database exception: "+me.getMessage(),me.getCause(),me.getErrorCode());
+          ManifoldCFException me = (ManifoldCFException)thr;
+          throw new ManifoldCFException("Database exception: "+me.getMessage(),me.getCause(),me.getErrorCode());
         }
         else
           throw (Error)thr;
@@ -429,7 +429,7 @@ public class Database
     {
       t.interrupt();
       // We need the caller to abandon any connections left around, so rethrow in a way that forces them to process the event properly.
-      throw new ACFException(e.getMessage(),e,ACFException.INTERRUPTED);
+      throw new ManifoldCFException(e.getMessage(),e,ManifoldCFException.INTERRUPTED);
     }
 
   }
@@ -439,7 +439,7 @@ public class Database
   */
   protected IResultSet executeUncachedQuery(String query, ArrayList params, boolean bResults, int maxResults,
     ResultSpecification spec, ILimitChecker returnLimit)
-    throws ACFException
+    throws ManifoldCFException
   {
 
     if (connection != null)
@@ -448,9 +448,9 @@ public class Database
       {
         return executeViaThread(connection,query,params,bResults,maxResults,spec,returnLimit);
       }
-      catch (ACFException e)
+      catch (ManifoldCFException e)
       {
-        if (e.getErrorCode() == ACFException.INTERRUPTED)
+        if (e.getErrorCode() == ManifoldCFException.INTERRUPTED)
           // drop the connection object on the floor, so it cannot possibly be reused
           connection = null;
         throw e;
@@ -464,9 +464,9 @@ public class Database
       {
         return executeViaThread(tempConnection,query,params,bResults,maxResults,spec,returnLimit);
       }
-      catch (ACFException e)
+      catch (ManifoldCFException e)
       {
-        if (e.getErrorCode() == ACFException.INTERRUPTED)
+        if (e.getErrorCode() == ManifoldCFException.INTERRUPTED)
           // drop the connection object on the floor, so it cannot possibly be reused
           tempConnection = null;
         throw e;
@@ -490,7 +490,7 @@ public class Database
   */
   protected IResultSet execute(Connection connection, String query, ArrayList params, boolean bResults, int maxResults,
     ResultSpecification spec, ILimitChecker returnLimit)
-    throws ACFException
+    throws ManifoldCFException
   {
     IResultSet rval = null;
     try
@@ -579,7 +579,7 @@ public class Database
       {
         // There are a lot of different sorts of error that can be embedded here.  Unfortunately, it's database dependent how
         // to interpret the error.  So toss a generic error, and let the caller figure out if it needs to treat it differently.
-        throw new ACFException("Exception doing query: "+e.getMessage(),e,ACFException.DATABASE_CONNECTION_ERROR);
+        throw new ManifoldCFException("Exception doing query: "+e.getMessage(),e,ManifoldCFException.DATABASE_CONNECTION_ERROR);
       }
     }
     finally
@@ -593,7 +593,7 @@ public class Database
 
   // Read data from a resultset
   protected IResultSet getData(ResultSet rs, boolean bResults, int maxResults, ResultSpecification spec, ILimitChecker returnLimit)
-    throws ACFException
+    throws ManifoldCFException
   {
     RSet results = new RSet();  // might be empty but not an error
     try
@@ -628,7 +628,7 @@ public class Database
             {
               // This is an error situation; if a result with no columns is
               // necessary, bResults must be false!!!
-              throw new ACFException("Empty query, no columns returned",ACFException.GENERAL_ERROR);
+              throw new ManifoldCFException("Empty query, no columns returned",ManifoldCFException.GENERAL_ERROR);
             }
 
             while (rs.next() && (maxResults == -1 || maxResults > 0) && (returnLimit == null || returnLimit.checkContinue()))
@@ -682,7 +682,7 @@ public class Database
       }
       catch (java.sql.SQLException e)
       {
-        throw new ACFException("Resultset error: "+e.getMessage(),e,ACFException.DATABASE_CONNECTION_ERROR);
+        throw new ManifoldCFException("Resultset error: "+e.getMessage(),e,ManifoldCFException.DATABASE_CONNECTION_ERROR);
       }
     }
     catch (Throwable e)
@@ -704,8 +704,8 @@ public class Database
             ((CharacterInput)o).discard();
         }
       }
-      if (e instanceof ACFException)
-        throw (ACFException)e;
+      if (e instanceof ManifoldCFException)
+        throw (ManifoldCFException)e;
       if (e instanceof RuntimeException)
         throw (RuntimeException)e;
       if (e instanceof Error)
@@ -717,7 +717,7 @@ public class Database
 
   // pass params to preparedStatement
   protected static void loadPS(PreparedStatement ps, ArrayList data)
-    throws java.sql.SQLException, ACFException
+    throws java.sql.SQLException, ManifoldCFException
   {
     if (data!=null)
     {
@@ -776,7 +776,7 @@ public class Database
   /** Clean up parameters after query has been triggered.
   */
   protected static void cleanupParameters(ArrayList data)
-    throws ACFException
+    throws ManifoldCFException
   {
     if (data != null)
     {
@@ -798,7 +798,7 @@ public class Database
   }
 
   protected int findColumn(ResultSet rs, String name)
-    throws ACFException
+    throws ManifoldCFException
   {
     try
     {
@@ -810,12 +810,12 @@ public class Database
     }
     catch (Exception e)
     {
-      throw new ACFException("Error finding " + name + " in resultset: "+e.getMessage(),e,ACFException.DATABASE_ERROR);
+      throw new ManifoldCFException("Error finding " + name + " in resultset: "+e.getMessage(),e,ManifoldCFException.DATABASE_ERROR);
     }
   }
 
   protected Blob getBLOB(ResultSet rs, int col)
-    throws ACFException
+    throws ManifoldCFException
   {
     try
     {
@@ -823,16 +823,16 @@ public class Database
     }
     catch (java.sql.SQLException sqle)
     {
-      throw new ACFException("Error in getBlob",sqle,ACFException.DATABASE_CONNECTION_ERROR);
+      throw new ManifoldCFException("Error in getBlob",sqle,ManifoldCFException.DATABASE_CONNECTION_ERROR);
     }
     catch (Exception sqle)
     {
-      throw new ACFException("Error in getBlob",sqle,ACFException.DATABASE_ERROR);
+      throw new ManifoldCFException("Error in getBlob",sqle,ManifoldCFException.DATABASE_ERROR);
     }
   }
 
   protected boolean isBLOB(ResultSetMetaData rsmd, int col)
-    throws ACFException
+    throws ManifoldCFException
   {
     try
     {
@@ -841,16 +841,16 @@ public class Database
     }
     catch (java.sql.SQLException sqle)
     {
-      throw new ACFException("Error in isBlob("+col+"): "+sqle.getMessage(),sqle,ACFException.DATABASE_CONNECTION_ERROR);
+      throw new ManifoldCFException("Error in isBlob("+col+"): "+sqle.getMessage(),sqle,ManifoldCFException.DATABASE_CONNECTION_ERROR);
     }
     catch (Exception sqle)
     {
-      throw new ACFException("Error in isBlob("+col+"): "+sqle.getMessage(),sqle,ACFException.DATABASE_ERROR);
+      throw new ManifoldCFException("Error in isBlob("+col+"): "+sqle.getMessage(),sqle,ManifoldCFException.DATABASE_ERROR);
     }
   }
 
   protected boolean isBinary(ResultSetMetaData rsmd, int col)
-    throws ACFException
+    throws ManifoldCFException
   {
     try
     {
@@ -860,16 +860,16 @@ public class Database
     }
     catch (java.sql.SQLException sqle)
     {
-      throw new ACFException("Error in isBinary("+col+"): "+sqle.getMessage(),sqle,ACFException.DATABASE_CONNECTION_ERROR);
+      throw new ManifoldCFException("Error in isBinary("+col+"): "+sqle.getMessage(),sqle,ManifoldCFException.DATABASE_CONNECTION_ERROR);
     }
     catch (Exception sqle)
     {
-      throw new ACFException("Error in isBinary("+col+"): "+sqle.getMessage(),sqle,ACFException.DATABASE_ERROR);
+      throw new ManifoldCFException("Error in isBinary("+col+"): "+sqle.getMessage(),sqle,ManifoldCFException.DATABASE_ERROR);
     }
   }
 
   protected Object getObject(ResultSet rs, ResultSetMetaData rsmd, int col, int desiredForm)
-    throws ACFException
+    throws ManifoldCFException
   {
     Object result = null;
 
@@ -965,7 +965,7 @@ public class Database
             break;
 
           case java.sql.Types.BLOB:
-            throw new ACFException("BLOB is not a string, column = " + col,ACFException.GENERAL_ERROR);
+            throw new ManifoldCFException("BLOB is not a string, column = " + col,ManifoldCFException.GENERAL_ERROR);
 
           default :
             switch (desiredForm)
@@ -978,7 +978,7 @@ public class Database
               result = new TempFileCharacterInput(rs.getCharacterStream(col));
               break;
             default:
-              throw new ACFException("Illegal form requested for column "+Integer.toString(col)+": "+Integer.toString(desiredForm));
+              throw new ManifoldCFException("Illegal form requested for column "+Integer.toString(col)+": "+Integer.toString(desiredForm));
             }
             break;
           }
@@ -992,7 +992,7 @@ public class Database
       }
       catch (java.sql.SQLException e)
       {
-        throw new ACFException("Exception in getObject(): "+e.getMessage(),e,ACFException.DATABASE_CONNECTION_ERROR);
+        throw new ManifoldCFException("Exception in getObject(): "+e.getMessage(),e,ManifoldCFException.DATABASE_CONNECTION_ERROR);
       }
     }
     catch (Throwable e)
@@ -1001,8 +1001,8 @@ public class Database
         ((CharacterInput)result).discard();
       else if (result instanceof BinaryInput)
         ((BinaryInput)result).discard();
-      if (e instanceof ACFException)
-        throw (ACFException)e;
+      if (e instanceof ManifoldCFException)
+        throw (ManifoldCFException)e;
       if (e instanceof RuntimeException)
         throw (RuntimeException)e;
       if (e instanceof Error)
@@ -1049,7 +1049,7 @@ public class Database
     * @param objectDescriptions are the unique identifiers of the objects.
     * @return the newly created objects to cache, or null, if any object cannot be created.
     */
-    public Object[] create(ICacheDescription[] objectDescriptions) throws ACFException
+    public Object[] create(ICacheDescription[] objectDescriptions) throws ManifoldCFException
     {
       // Perform the requested query, within the appropriate transaction object.
       // Call the database object to do this
@@ -1090,7 +1090,7 @@ public class Database
           {
             database.explainQuery(description.getQuery(),description.getParameters());
           }
-          catch (ACFException e)
+          catch (ManifoldCFException e)
           {
             Logging.db.error("Explain failed with error "+e.getMessage(),e);
           }
@@ -1109,7 +1109,7 @@ public class Database
     * @param objectDescription is the unique identifier of the object.
     * @param cachedObject is the cached object.
     */
-    public void exists(ICacheDescription objectDescription, Object cachedObject) throws ACFException
+    public void exists(ICacheDescription objectDescription, Object cachedObject) throws ManifoldCFException
     {
       // System.out.println("Object created or found: "+objectDescription.getCriticalSectionName());
       // Save the resultset for return
@@ -1119,7 +1119,7 @@ public class Database
     /** Perform the desired operation.  This method is called after either createGetObject()
     * or exists() is called for every requested object.
     */
-    public void execute() throws ACFException
+    public void execute() throws ManifoldCFException
     {
       // Does nothing at all; the query would already have been done
     }

Modified: incubator/lcf/trunk/modules/framework/core/src/main/java/org/apache/manifoldcf/core/database/TransactionHandle.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/core/src/main/java/org/apache/manifoldcf/core/database/TransactionHandle.java?rev=1004255&r1=1004254&r2=1004255&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/framework/core/src/main/java/org/apache/manifoldcf/core/database/TransactionHandle.java (original)
+++ incubator/lcf/trunk/modules/framework/core/src/main/java/org/apache/manifoldcf/core/database/TransactionHandle.java Mon Oct  4 14:32:19 2010
@@ -36,7 +36,7 @@ public class TransactionHandle
   protected int transactionType;
 
   public TransactionHandle(IThreadContext tc, TransactionHandle previousTransaction, int transactionType)
-    throws ACFException
+    throws ManifoldCFException
   {
     // Grab a unique ID
     transactionID = IDFactory.make(tc);

Modified: incubator/lcf/trunk/modules/framework/core/src/main/java/org/apache/manifoldcf/core/interfaces/BinaryInput.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/core/src/main/java/org/apache/manifoldcf/core/interfaces/BinaryInput.java?rev=1004255&r1=1004254&r2=1004255&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/framework/core/src/main/java/org/apache/manifoldcf/core/interfaces/BinaryInput.java (original)
+++ incubator/lcf/trunk/modules/framework/core/src/main/java/org/apache/manifoldcf/core/interfaces/BinaryInput.java Mon Oct  4 14:32:19 2010
@@ -42,7 +42,7 @@ public abstract class BinaryInput
 
   /** Obtain the stream to pass to JDBC */
   public InputStream getStream()
-    throws ACFException
+    throws ManifoldCFException
   {
     if (stream == null)
       openStream();
@@ -51,7 +51,7 @@ public abstract class BinaryInput
 
   /** Obtain the length to pass to JDBC */
   public long getLength()
-    throws ACFException
+    throws ManifoldCFException
   {
     if (length == -1L)
       calculateLength();
@@ -60,7 +60,7 @@ public abstract class BinaryInput
 
   /** Close the stream we passed to JDBC */
   public void doneWithStream()
-    throws ACFException
+    throws ManifoldCFException
   {
     if (stream != null)
       closeStream();
@@ -71,7 +71,7 @@ public abstract class BinaryInput
 
   /** Discard the object */
   public void discard()
-    throws ACFException
+    throws ManifoldCFException
   {
     doneWithStream();
   }
@@ -79,14 +79,14 @@ public abstract class BinaryInput
   // Protected methods
 
   protected abstract void openStream()
-    throws ACFException;
+    throws ManifoldCFException;
 
   protected abstract void calculateLength()
-    throws ACFException;
+    throws ManifoldCFException;
 
   /** Close the stream */
   protected void closeStream()
-    throws ACFException
+    throws ManifoldCFException
   {
     try
     {
@@ -95,11 +95,11 @@ public abstract class BinaryInput
     }
     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 exception closing stream: "+e.getMessage(),e,ACFException.GENERAL_ERROR);
+      throw new ManifoldCFException("IO exception closing stream: "+e.getMessage(),e,ManifoldCFException.GENERAL_ERROR);
     }
   }
 

Modified: incubator/lcf/trunk/modules/framework/core/src/main/java/org/apache/manifoldcf/core/interfaces/CacheManagerFactory.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/core/src/main/java/org/apache/manifoldcf/core/interfaces/CacheManagerFactory.java?rev=1004255&r1=1004254&r2=1004255&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/framework/core/src/main/java/org/apache/manifoldcf/core/interfaces/CacheManagerFactory.java (original)
+++ incubator/lcf/trunk/modules/framework/core/src/main/java/org/apache/manifoldcf/core/interfaces/CacheManagerFactory.java Mon Oct  4 14:32:19 2010
@@ -35,7 +35,7 @@ public class CacheManagerFactory
   * @return the proper cache manager instance.
   */
   public static ICacheManager make(IThreadContext context)
-    throws ACFException
+    throws ManifoldCFException
   {
     Object o = context.get(cacheManager);
     if (o == null || !(o instanceof ICacheManager))

Modified: incubator/lcf/trunk/modules/framework/core/src/main/java/org/apache/manifoldcf/core/interfaces/CharacterInput.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/core/src/main/java/org/apache/manifoldcf/core/interfaces/CharacterInput.java?rev=1004255&r1=1004254&r2=1004255&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/framework/core/src/main/java/org/apache/manifoldcf/core/interfaces/CharacterInput.java (original)
+++ incubator/lcf/trunk/modules/framework/core/src/main/java/org/apache/manifoldcf/core/interfaces/CharacterInput.java Mon Oct  4 14:32:19 2010
@@ -42,7 +42,7 @@ public abstract class CharacterInput
   }
 
   public Reader getStream()
-    throws ACFException
+    throws ManifoldCFException
   {
     if (stream == null)
       openStream();
@@ -50,14 +50,14 @@ public abstract class CharacterInput
   }
 
   public void doneWithStream()
-    throws ACFException
+    throws ManifoldCFException
   {
     if (stream != null)
       closeStream();
   }
 
   public long getCharacterLength()
-    throws ACFException
+    throws ManifoldCFException
   {
     if (charLength == -1L)
       calculateLength();
@@ -65,7 +65,7 @@ public abstract class CharacterInput
   }
 
   public String getHashValue()
-    throws ACFException
+    throws ManifoldCFException
   {
     if (hashValue == null)
       calculateHashValue();
@@ -74,14 +74,14 @@ public abstract class CharacterInput
 
   /** Open a Utf8 stream directly */
   public abstract InputStream getUtf8Stream()
-    throws ACFException;
+    throws ManifoldCFException;
 
   /** Transfer to a new object; this causes the current object to become "already discarded" */
   public abstract CharacterInput transfer();
 
   /** Discard this object permanently */
   public void discard()
-    throws ACFException
+    throws ManifoldCFException
   {
     doneWithStream();
   }
@@ -90,11 +90,11 @@ public abstract class CharacterInput
 
   /** Open a reader, for use by a caller, until closeStream is called */
   protected abstract void openStream()
-    throws ACFException;
+    throws ManifoldCFException;
 
   /** Close any open reader */
   protected void closeStream()
-    throws ACFException
+    throws ManifoldCFException
   {
     try
     {
@@ -103,20 +103,20 @@ public abstract class CharacterInput
     }
     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("Error closing stream: "+e.getMessage(),e,ACFException.GENERAL_ERROR);
+      throw new ManifoldCFException("Error closing stream: "+e.getMessage(),e,ManifoldCFException.GENERAL_ERROR);
     }
   }
 
   /** Calculate the datum's length in characters */
   protected abstract void calculateLength()
-    throws ACFException;
+    throws ManifoldCFException;
 
   /** Calculate the datum's hash value */
   protected abstract void calculateHashValue()
-    throws ACFException;
+    throws ManifoldCFException;
 
 }

Modified: incubator/lcf/trunk/modules/framework/core/src/main/java/org/apache/manifoldcf/core/interfaces/ConfigParams.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/core/src/main/java/org/apache/manifoldcf/core/interfaces/ConfigParams.java?rev=1004255&r1=1004254&r2=1004255&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/framework/core/src/main/java/org/apache/manifoldcf/core/interfaces/ConfigParams.java (original)
+++ incubator/lcf/trunk/modules/framework/core/src/main/java/org/apache/manifoldcf/core/interfaces/ConfigParams.java Mon Oct  4 14:32:19 2010
@@ -21,7 +21,7 @@ package org.apache.manifoldcf.core.inter
 import org.apache.manifoldcf.core.interfaces.*;
 import java.util.*;
 import java.io.*;
-import org.apache.manifoldcf.core.system.ACF;
+import org.apache.manifoldcf.core.system.ManifoldCF;
 
 /** This class represents a set of configuration parameters, with structure, which is a generalized hierarchy of nodes that
 * can be interpreted by a repository or authority connector in an appropriate way.
@@ -67,7 +67,7 @@ public class ConfigParams extends Config
   *@param xml is the input XML.
   */
   public ConfigParams(String xml)
-    throws ACFException
+    throws ManifoldCFException
   {
     super("configuration");
     fromXML(xml);
@@ -77,7 +77,7 @@ public class ConfigParams extends Config
   *@param xmlstream is the input XML stream.  Does NOT close the stream.
   */
   public ConfigParams(InputStream xmlstream)
-    throws ACFException
+    throws ManifoldCFException
   {
     super("configuration");
     fromXML(xmlstream);
@@ -151,9 +151,9 @@ public class ConfigParams extends Config
       return rval;
     try
     {
-      return ACF.deobfuscate(rval);
+      return ManifoldCF.deobfuscate(rval);
     }
-    catch (ACFException e)
+    catch (ManifoldCFException e)
     {
       // Ignore this exception, and return an empty string.
       return "";
@@ -203,9 +203,9 @@ public class ConfigParams extends Config
     {
       try
       {
-        value = ACF.obfuscate(value);
+        value = ManifoldCF.obfuscate(value);
       }
-      catch (ACFException e)
+      catch (ManifoldCFException e)
       {
         // Ignore this exception, and set "" to be the value
         value = "";

Modified: incubator/lcf/trunk/modules/framework/core/src/main/java/org/apache/manifoldcf/core/interfaces/Configuration.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/core/src/main/java/org/apache/manifoldcf/core/interfaces/Configuration.java?rev=1004255&r1=1004254&r2=1004255&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/framework/core/src/main/java/org/apache/manifoldcf/core/interfaces/Configuration.java (original)
+++ incubator/lcf/trunk/modules/framework/core/src/main/java/org/apache/manifoldcf/core/interfaces/Configuration.java Mon Oct  4 14:32:19 2010
@@ -21,7 +21,7 @@ package org.apache.manifoldcf.core.inter
 import org.apache.manifoldcf.core.interfaces.*;
 import java.util.*;
 import java.io.*;
-import org.apache.manifoldcf.core.system.ACF;
+import org.apache.manifoldcf.core.system.ManifoldCF;
 import org.apache.manifoldcf.core.common.XMLDoc;
 import org.json.*;
 
@@ -141,7 +141,7 @@ public class Configuration
   *@return the xml corresponding to these Configuration.
   */
   public String toXML()
-    throws ACFException
+    throws ManifoldCFException
   {
     XMLDoc doc = new XMLDoc();
     // name of root node in definition
@@ -161,7 +161,7 @@ public class Configuration
   *@return the json corresponding to this Configuration.
   */
   public String toJSON()
-    throws ACFException
+    throws ManifoldCFException
   {
     try
     {
@@ -254,7 +254,7 @@ public class Configuration
     }
     catch (JSONException e)
     {
-      throw new ACFException(e.getMessage(),e);
+      throw new ManifoldCFException(e.getMessage(),e);
     }
   }
   
@@ -264,7 +264,7 @@ public class Configuration
   *@param node is the node.
   */
   protected static void writeNode(XMLDoc doc, Object parent, ConfigurationNode node)
-    throws ACFException
+    throws ManifoldCFException
   {
     // Get the type
     String type = node.getType();
@@ -297,7 +297,7 @@ public class Configuration
   *@param writeKey is true if the key needs to be written, false otherwise.
   */
   protected static void writeNode(JSONWriter writer, ConfigurationNode node, boolean writeKey, boolean writeSpecialKey)
-    throws ACFException
+    throws ManifoldCFException
   {
     try
     {
@@ -429,7 +429,7 @@ public class Configuration
     }
     catch (JSONException e)
     {
-      throw new ACFException(e.getMessage(),e);
+      throw new ManifoldCFException(e.getMessage(),e);
     }
   }
   
@@ -437,7 +437,7 @@ public class Configuration
   *@param xml is the input XML.
   */
   public void fromXML(String xml)
-    throws ACFException
+    throws ManifoldCFException
   {
     XMLDoc doc = new XMLDoc(xml);
     initializeFromDoc(doc);
@@ -447,7 +447,7 @@ public class Configuration
   *@param json is the input JSON.
   */
   public void fromJSON(String json)
-    throws ACFException
+    throws ManifoldCFException
   {
     if (readOnly)
       throw new IllegalStateException("Attempt to change read-only object");
@@ -479,13 +479,13 @@ public class Configuration
     }
     catch (JSONException e)
     {
-      throw new ACFException("Json syntax error - "+e.getMessage(),e);
+      throw new ManifoldCFException("Json syntax error - "+e.getMessage(),e);
     }
   }
   
   /** Process a JSON object */
   protected void processObject(String key, Object x)
-    throws ACFException
+    throws ManifoldCFException
   {
     if (x instanceof JSONObject)
     {
@@ -501,14 +501,14 @@ public class Configuration
     {
       // Children, as a list of separately enumerated child nodes.
       if (!(x instanceof JSONArray))
-        throw new ACFException("Expected array contents for '"+JSON_CHILDREN+"' node");
+        throw new ManifoldCFException("Expected array contents for '"+JSON_CHILDREN+"' node");
       JSONArray array = (JSONArray)x;
       int i = 0;
       while (i < array.length())
       {
         Object z = array.opt(i++);
         if (!(z instanceof JSONObject))
-          throw new ACFException("Expected object as array member");
+          throw new ManifoldCFException("Expected object as array member");
         ConfigurationNode nestedCn = readNode((String)null,(JSONObject)z);
         addChild(getChildCount(),nestedCn);
       }
@@ -525,7 +525,7 @@ public class Configuration
   
   /** Read a node from a json object */
   protected ConfigurationNode readNode(String key, JSONObject object)
-    throws ACFException
+    throws ManifoldCFException
   {
     // Override key if type field is found.
     if (object.has(JSON_TYPE))
@@ -536,11 +536,11 @@ public class Configuration
       }
       catch (JSONException e)
       {
-        throw new ACFException("Exception decoding JSON: "+e.getMessage());
+        throw new ManifoldCFException("Exception decoding JSON: "+e.getMessage());
       }
     }
     if (key == null)
-      throw new ACFException("No type found for node");
+      throw new ManifoldCFException("No type found for node");
     Iterator iter;
     ConfigurationNode rval = createNewNode(key);
     iter = object.keys();
@@ -570,7 +570,7 @@ public class Configuration
   
   /** Process a JSON object */
   protected void processObject(ConfigurationNode cn, String key, Object x)
-    throws ACFException
+    throws ManifoldCFException
   {
     if (x instanceof JSONObject)
     {
@@ -601,14 +601,14 @@ public class Configuration
       {
         // Children, as a list of separately enumerated child nodes.
         if (!(x instanceof JSONArray))
-          throw new ACFException("Expected array contents for '"+JSON_CHILDREN+"' node");
+          throw new ManifoldCFException("Expected array contents for '"+JSON_CHILDREN+"' node");
         JSONArray array = (JSONArray)x;
         int i = 0;
         while (i < array.length())
         {
           Object z = array.opt(i++);
           if (!(z instanceof JSONObject))
-            throw new ACFException("Expected object as array member");
+            throw new ManifoldCFException("Expected object as array member");
           ConfigurationNode nestedCn = readNode((String)null,(JSONObject)z);
           cn.addChild(cn.getChildCount(),nestedCn);
         }
@@ -628,14 +628,14 @@ public class Configuration
   *@param xmlstream is the input XML stream.  Does NOT close the stream.
   */
   public void fromXML(InputStream xmlstream)
-    throws ACFException
+    throws ManifoldCFException
   {
     XMLDoc doc = new XMLDoc(xmlstream);
     initializeFromDoc(doc);
   }
 
   protected void initializeFromDoc(XMLDoc doc)
-    throws ACFException
+    throws ManifoldCFException
   {
     if (readOnly)
       throw new IllegalStateException("Attempt to change read-only object");
@@ -645,11 +645,11 @@ public class Configuration
 
     if (list.size() != 1)
     {
-      throw new ACFException("Bad xml - missing outer '"+rootNodeLabel+"' node - there are "+Integer.toString(list.size())+" nodes");
+      throw new ManifoldCFException("Bad xml - missing outer '"+rootNodeLabel+"' node - there are "+Integer.toString(list.size())+" nodes");
     }
     Object parent = list.get(0);
     if (!doc.getNodeName(parent).equals(rootNodeLabel))
-      throw new ACFException("Bad xml - outer node is not '"+rootNodeLabel+"'");
+      throw new ManifoldCFException("Bad xml - outer node is not '"+rootNodeLabel+"'");
 
     list.clear();
     doc.processPath(list, "*", parent);
@@ -670,7 +670,7 @@ public class Configuration
   *@return the specification node.
   */
   protected ConfigurationNode readNode(XMLDoc doc, Object object)
-    throws ACFException
+    throws ManifoldCFException
   {
     String type = doc.getNodeName(object);
     ConfigurationNode rval = createNewNode(type);