Return-Path: Delivered-To: apmail-incubator-connectors-commits-archive@minotaur.apache.org Received: (qmail 48699 invoked from network); 4 Oct 2010 14:33:42 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 4 Oct 2010 14:33:42 -0000 Received: (qmail 86197 invoked by uid 500); 4 Oct 2010 14:33:42 -0000 Delivered-To: apmail-incubator-connectors-commits-archive@incubator.apache.org Received: (qmail 86120 invoked by uid 500); 4 Oct 2010 14:33:42 -0000 Mailing-List: contact connectors-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: connectors-dev@incubator.apache.org Delivered-To: mailing list connectors-commits@incubator.apache.org Received: (qmail 85789 invoked by uid 99); 4 Oct 2010 14:33:41 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 04 Oct 2010 14:33:41 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 04 Oct 2010 14:33:27 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id B22D82388BB6; Mon, 4 Oct 2010 14:32:34 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1004255 [11/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... Date: Mon, 04 Oct 2010 14:32:28 -0000 To: connectors-commits@incubator.apache.org From: kwright@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20101004143234.B22D82388BB6@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Modified: incubator/lcf/trunk/modules/framework/agents/src/main/java/org/apache/manifoldcf/agents/output/BaseOutputConnector.java URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/agents/src/main/java/org/apache/manifoldcf/agents/output/BaseOutputConnector.java?rev=1004255&r1=1004254&r2=1004255&view=diff ============================================================================== --- incubator/lcf/trunk/modules/framework/agents/src/main/java/org/apache/manifoldcf/agents/output/BaseOutputConnector.java (original) +++ incubator/lcf/trunk/modules/framework/agents/src/main/java/org/apache/manifoldcf/agents/output/BaseOutputConnector.java Mon Oct 4 14:32:19 2010 @@ -62,7 +62,7 @@ public abstract class BaseOutputConnecto *@return true if the resource is found, false if not. In either case, output may be filled in. */ public boolean requestInfo(Configuration output, String command) - throws ACFException + throws ManifoldCFException { return false; } @@ -73,7 +73,7 @@ public abstract class BaseOutputConnecto *@param activities is the handle to an object that the implementer of an output connector may use to perform operations, such as logging processing activity. */ public void noteJobComplete(IOutputNotifyActivity activities) - throws ACFException, ServiceInterruption + throws ManifoldCFException, ServiceInterruption { // The base implementation does nothing here. } @@ -84,7 +84,7 @@ public abstract class BaseOutputConnecto *@return true if the mime type is indexable by this connector. */ public boolean checkMimeTypeIndexable(String mimeType) - throws ACFException, ServiceInterruption + throws ManifoldCFException, ServiceInterruption { return true; } @@ -96,7 +96,7 @@ public abstract class BaseOutputConnecto *@return true if the file is indexable. */ public boolean checkDocumentIndexable(File localFile) - throws ACFException, ServiceInterruption + throws ManifoldCFException, ServiceInterruption { return true; } @@ -118,7 +118,7 @@ public abstract class BaseOutputConnecto *@param tabsArray is an array of tab names. Add to this array any tab names that are specific to the connector. */ public void outputSpecificationHeader(IHTTPOutput out, OutputSpecification os, ArrayList tabsArray) - throws ACFException, IOException + throws ManifoldCFException, IOException { } @@ -131,7 +131,7 @@ public abstract class BaseOutputConnecto *@param tabName is the current tab name. */ public void outputSpecificationBody(IHTTPOutput out, OutputSpecification os, String tabName) - throws ACFException, IOException + throws ManifoldCFException, IOException { } @@ -144,7 +144,7 @@ public abstract class BaseOutputConnecto *@return null if all is well, or a string error message if there is an error that should prevent saving of the job (and cause a redirection to an error page). */ public String processSpecificationPost(IPostParameters variableContext, OutputSpecification os) - throws ACFException + throws ManifoldCFException { return null; } @@ -156,7 +156,7 @@ public abstract class BaseOutputConnecto *@param os is the current output specification for this job. */ public void viewSpecification(IHTTPOutput out, OutputSpecification os) - throws ACFException, IOException + throws ManifoldCFException, IOException { } Modified: incubator/lcf/trunk/modules/framework/agents/src/main/java/org/apache/manifoldcf/agents/outputconnection/OutputConnectionManager.java URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/agents/src/main/java/org/apache/manifoldcf/agents/outputconnection/OutputConnectionManager.java?rev=1004255&r1=1004254&r2=1004255&view=diff ============================================================================== --- incubator/lcf/trunk/modules/framework/agents/src/main/java/org/apache/manifoldcf/agents/outputconnection/OutputConnectionManager.java (original) +++ incubator/lcf/trunk/modules/framework/agents/src/main/java/org/apache/manifoldcf/agents/outputconnection/OutputConnectionManager.java Mon Oct 4 14:32:19 2010 @@ -22,7 +22,7 @@ import java.util.*; import org.apache.manifoldcf.core.interfaces.*; import org.apache.manifoldcf.agents.interfaces.*; import org.apache.manifoldcf.agents.interfaces.CacheKeyFactory; -import org.apache.manifoldcf.agents.system.ACF; +import org.apache.manifoldcf.agents.system.ManifoldCF; /** This class is the manager of the outputconnection description. Inside, a database table is managed, @@ -53,7 +53,7 @@ public class OutputConnectionManager ext *@param threadContext is the thread context. */ public OutputConnectionManager(IThreadContext threadContext, IDBInterface database) - throws ACFException + throws ManifoldCFException { super(database,"outputconnections"); @@ -64,7 +64,7 @@ public class OutputConnectionManager ext /** Install the manager. */ public void install() - throws ACFException + throws ManifoldCFException { // Always have an outer loop, in case retries required while (true) @@ -95,51 +95,51 @@ public class OutputConnectionManager ext /** Uninstall the manager. */ public void deinstall() - throws ACFException + throws ManifoldCFException { performDrop(null); } /** Export configuration */ public void exportConfiguration(java.io.OutputStream os) - throws java.io.IOException, ACFException + throws java.io.IOException, ManifoldCFException { // Write a version indicator - ACF.writeDword(os,1); + ManifoldCF.writeDword(os,1); // Get the authority list IOutputConnection[] list = getAllConnections(); // Write the number of authorities - ACF.writeDword(os,list.length); + ManifoldCF.writeDword(os,list.length); // Loop through the list and write the individual repository connection info int i = 0; while (i < list.length) { IOutputConnection conn = list[i++]; - ACF.writeString(os,conn.getName()); - ACF.writeString(os,conn.getDescription()); - ACF.writeString(os,conn.getClassName()); - ACF.writeString(os,conn.getConfigParams().toXML()); - ACF.writeDword(os,conn.getMaxConnections()); + ManifoldCF.writeString(os,conn.getName()); + ManifoldCF.writeString(os,conn.getDescription()); + ManifoldCF.writeString(os,conn.getClassName()); + ManifoldCF.writeString(os,conn.getConfigParams().toXML()); + ManifoldCF.writeDword(os,conn.getMaxConnections()); } } /** Import configuration */ public void importConfiguration(java.io.InputStream is) - throws java.io.IOException, ACFException + throws java.io.IOException, ManifoldCFException { - int version = ACF.readDword(is); + int version = ManifoldCF.readDword(is); if (version != 1) throw new java.io.IOException("Unknown repository connection configuration version: "+Integer.toString(version)); - int count = ACF.readDword(is); + int count = ManifoldCF.readDword(is); int i = 0; while (i < count) { IOutputConnection conn = create(); - conn.setName(ACF.readString(is)); - conn.setDescription(ACF.readString(is)); - conn.setClassName(ACF.readString(is)); - conn.getConfigParams().fromXML(ACF.readString(is)); - conn.setMaxConnections(ACF.readDword(is)); + conn.setName(ManifoldCF.readString(is)); + conn.setDescription(ManifoldCF.readString(is)); + conn.setClassName(ManifoldCF.readString(is)); + conn.getConfigParams().fromXML(ManifoldCF.readString(is)); + conn.setMaxConnections(ManifoldCF.readDword(is)); // Attempt to save this connection save(conn); i++; @@ -150,7 +150,7 @@ public class OutputConnectionManager ext *@return an array of connection objects. */ public IOutputConnection[] getAllConnections() - throws ACFException + throws ManifoldCFException { beginTransaction(); try @@ -171,7 +171,7 @@ public class OutputConnectionManager ext } return loadMultiple(names); } - catch (ACFException e) + catch (ManifoldCFException e) { signalRollback(); throw e; @@ -192,7 +192,7 @@ public class OutputConnectionManager ext *@return the loaded connection object, or null if not found. */ public IOutputConnection load(String name) - throws ACFException + throws ManifoldCFException { return loadMultiple(new String[]{name})[0]; } @@ -202,7 +202,7 @@ public class OutputConnectionManager ext *@return the loaded connection objects. */ public IOutputConnection[] loadMultiple(String[] names) - throws ACFException + throws ManifoldCFException { // Build description objects OutputConnectionDescription[] objectDescriptions = new OutputConnectionDescription[names.length]; @@ -225,7 +225,7 @@ public class OutputConnectionManager ext *@return the new object. */ public IOutputConnection create() - throws ACFException + throws ManifoldCFException { OutputConnection rval = new OutputConnection(); return rval; @@ -236,7 +236,7 @@ public class OutputConnectionManager ext *@return true if the object is being created, false otherwise. */ public boolean save(IOutputConnection object) - throws ACFException + throws ManifoldCFException { StringSetBuffer ssb = new StringSetBuffer(); ssb.add(getOutputConnectionsKey()); @@ -250,7 +250,7 @@ public class OutputConnectionManager ext { performLock(); // Notify of a change to the configuration - ACF.noteConfigurationChange(); + ManifoldCF.noteConfigurationChange(); // See whether the instance exists ArrayList params = new ArrayList(); params.add(object.getName()); @@ -294,7 +294,7 @@ public class OutputConnectionManager ext cacheManager.invalidateKeys(ch); return isCreated; } - catch (ACFException e) + catch (ManifoldCFException e) { signalRollback(); throw e; @@ -320,7 +320,7 @@ public class OutputConnectionManager ext * name does not exist, no error is returned. */ public void delete(String name) - throws ACFException + throws ManifoldCFException { StringSetBuffer ssb = new StringSetBuffer(); ssb.add(getOutputConnectionsKey()); @@ -334,14 +334,14 @@ public class OutputConnectionManager ext { // Check if anything refers to this connection name if (AgentManagerFactory.isOutputConnectionInUse(threadContext,name)) - throw new ACFException("Can't delete output connection '"+name+"': existing entities refer to it"); - ACF.noteConfigurationChange(); + throw new ManifoldCFException("Can't delete output connection '"+name+"': existing entities refer to it"); + ManifoldCF.noteConfigurationChange(); ArrayList params = new ArrayList(); params.add(name); performDelete("WHERE "+nameField+"=?",params,null); cacheManager.invalidateKeys(ch); } - catch (ACFException e) + catch (ManifoldCFException e) { signalRollback(); throw e; @@ -368,7 +368,7 @@ public class OutputConnectionManager ext *@return the repository connections that use that connector. */ public String[] findConnectionsForConnector(String className) - throws ACFException + throws ManifoldCFException { StringSetBuffer ssb = new StringSetBuffer(); ssb.add(getOutputConnectionsKey()); @@ -394,7 +394,7 @@ public class OutputConnectionManager ext *@return true if the underlying connector is registered. */ public boolean checkConnectorExists(String name) - throws ACFException + throws ManifoldCFException { beginTransaction(); try @@ -407,13 +407,13 @@ public class OutputConnectionManager ext IResultSet set = performQuery("SELECT "+classNameField+" FROM "+getTableName()+" WHERE "+nameField+"=?",params, localCacheKeys,null); if (set.getRowCount() == 0) - throw new ACFException("No such connection: '"+name+"'"); + throw new ManifoldCFException("No such connection: '"+name+"'"); IResultRow row = set.getRow(0); String className = (String)row.getValue(classNameField); IOutputConnectorManager cm = OutputConnectorManagerFactory.make(threadContext); return cm.isInstalled(className); } - catch (ACFException e) + catch (ManifoldCFException e) { signalRollback(); throw e; @@ -465,7 +465,7 @@ public class OutputConnectionManager ext *@return the corresponding output connection objects. */ protected OutputConnection[] getOutputConnectionsMultiple(String[] connectionNames) - throws ACFException + throws ManifoldCFException { OutputConnection[] rval = new OutputConnection[connectionNames.length]; HashMap returnIndex = new HashMap(); @@ -509,7 +509,7 @@ public class OutputConnectionManager ext signalRollback(); throw e; } - catch (ACFException e) + catch (ManifoldCFException e) { signalRollback(); throw e; @@ -527,7 +527,7 @@ public class OutputConnectionManager ext *@param params is the set of parameters. */ protected void getOutputConnectionsChunk(OutputConnection[] rval, Map returnIndex, String idList, ArrayList params) - throws ACFException + throws ManifoldCFException { IResultSet set; set = performQuery("SELECT * FROM "+getTableName()+" WHERE "+ @@ -649,7 +649,7 @@ public class OutputConnectionManager ext * @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 ACFException + public Object[] create(ICacheDescription[] objectDescriptions) throws ManifoldCFException { // Turn the object descriptions into the parameters for the ToolInstance requests String[] connectionNames = new String[objectDescriptions.length]; @@ -672,7 +672,7 @@ public class OutputConnectionManager ext * @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 { // Cast what came in as what it really is OutputConnectionDescription objectDesc = (OutputConnectionDescription)objectDescription; @@ -690,7 +690,7 @@ public class OutputConnectionManager ext /** 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; we only want to fetch objects in this cacher. } Modified: incubator/lcf/trunk/modules/framework/agents/src/main/java/org/apache/manifoldcf/agents/outputconnmgr/OutputConnectorManager.java URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/agents/src/main/java/org/apache/manifoldcf/agents/outputconnmgr/OutputConnectorManager.java?rev=1004255&r1=1004254&r2=1004255&view=diff ============================================================================== --- incubator/lcf/trunk/modules/framework/agents/src/main/java/org/apache/manifoldcf/agents/outputconnmgr/OutputConnectorManager.java (original) +++ incubator/lcf/trunk/modules/framework/agents/src/main/java/org/apache/manifoldcf/agents/outputconnmgr/OutputConnectorManager.java Mon Oct 4 14:32:19 2010 @@ -41,7 +41,7 @@ public class OutputConnectorManager exte *@param database is the database handle. */ public OutputConnectorManager(IThreadContext threadContext, IDBInterface database) - throws ACFException + throws ManifoldCFException { super(database,"outputconnectors"); this.threadContext = threadContext; @@ -51,7 +51,7 @@ public class OutputConnectorManager exte /** Install or upgrade. */ public void install() - throws ACFException + throws ManifoldCFException { // Always have an outer loop, in case upgrade needs it. while (true) @@ -100,7 +100,7 @@ public class OutputConnectorManager exte /** Uninstall. This also unregisters all connectors. */ public void deinstall() - throws ACFException + throws ManifoldCFException { StringSet invKeys = new StringSet(getCacheKey()); @@ -119,7 +119,7 @@ public class OutputConnectorManager exte } performDrop(invKeys); } - catch (ACFException e) + catch (ManifoldCFException e) { signalRollback(); throw e; @@ -141,7 +141,7 @@ public class OutputConnectorManager exte *@param className is the class name. */ public void registerConnector(String description, String className) - throws ACFException + throws ManifoldCFException { StringSet invKeys = new StringSet(getCacheKey()); beginTransaction(); @@ -168,7 +168,7 @@ public class OutputConnectorManager exte // Either way, we must do the install/upgrade itself. OutputConnectorFactory.install(threadContext,className); } - catch (ACFException e) + catch (ManifoldCFException e) { signalRollback(); throw e; @@ -189,7 +189,7 @@ public class OutputConnectorManager exte *@param className is the class name of the connector to unregister. */ public void unregisterConnector(String className) - throws ACFException + throws ManifoldCFException { StringSet invKeys = new StringSet(getCacheKey()); beginTransaction(); @@ -200,7 +200,7 @@ public class OutputConnectorManager exte removeConnector(className); } - catch (ACFException e) + catch (ManifoldCFException e) { signalRollback(); throw e; @@ -222,7 +222,7 @@ public class OutputConnectorManager exte *@param className is the connector class to remove. */ public void removeConnector(String className) - throws ACFException + throws ManifoldCFException { StringSet invKeys = new StringSet(getCacheKey()); ArrayList list = new ArrayList(); @@ -235,7 +235,7 @@ public class OutputConnectorManager exte * These will be ordered by description. */ public IResultSet getConnectors() - throws ACFException + throws ManifoldCFException { StringSet invKeys = new StringSet(getCacheKey()); @@ -248,7 +248,7 @@ public class OutputConnectorManager exte *@return the description, or null if the class is not registered. */ public String getDescription(String className) - throws ACFException + throws ManifoldCFException { StringSet invKeys = new StringSet(getCacheKey()); @@ -267,7 +267,7 @@ public class OutputConnectorManager exte *@return true if installed, false otherwise. */ public boolean isInstalled(String className) - throws ACFException + throws ManifoldCFException { // Use the global table key; that's good enough because we don't expect stuff to change out from under very often. StringSet invKeys = new StringSet(getCacheKey()); Added: incubator/lcf/trunk/modules/framework/agents/src/main/java/org/apache/manifoldcf/agents/system/ManifoldCF.java URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/agents/src/main/java/org/apache/manifoldcf/agents/system/ManifoldCF.java?rev=1004255&view=auto ============================================================================== --- incubator/lcf/trunk/modules/framework/agents/src/main/java/org/apache/manifoldcf/agents/system/ManifoldCF.java (added) +++ incubator/lcf/trunk/modules/framework/agents/src/main/java/org/apache/manifoldcf/agents/system/ManifoldCF.java Mon Oct 4 14:32:19 2010 @@ -0,0 +1,255 @@ +/* $Id: ManifoldCF.java 988245 2010-08-23 18:39:35Z kwright $ */ + +/** +* Licensed to the Apache Software Foundation (ASF) under one or more +* contributor license agreements. See the NOTICE file distributed with +* this work for additional information regarding copyright ownership. +* The ASF licenses this file to You under the Apache License, Version 2.0 +* (the "License"); you may not use this file except in compliance with +* the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package org.apache.manifoldcf.agents.system; + +import org.apache.manifoldcf.core.interfaces.*; +import org.apache.manifoldcf.agents.interfaces.*; +import java.io.*; +import java.util.*; + +public class ManifoldCF extends org.apache.manifoldcf.core.system.ManifoldCF +{ + public static final String _rcsid = "@(#)$Id: ManifoldCF.java 988245 2010-08-23 18:39:35Z kwright $"; + + // Agents initialized flag + protected static boolean agentsInitialized = false; + + /** This is the place we keep track of the agents we've started. */ + protected static HashMap runningHash = new HashMap(); + /** This flag prevents startAgents() from starting anything once stopAgents() has been called. */ + protected static boolean stopAgentsRun = false; + + /** Initialize environment. + */ + public static void initializeEnvironment() + throws ManifoldCFException + { + synchronized (initializeFlagLock) + { + if (agentsInitialized) + return; + + // Do core initialization + org.apache.manifoldcf.core.system.ManifoldCF.initializeEnvironment(); + + // Create the shutdown hook for agents. All activity will be keyed off of runningHash, so it is safe to do this under all conditions. + org.apache.manifoldcf.core.system.ManifoldCF.addShutdownHook(new AgentsShutdownHook()); + + // Initialize the local loggers + Logging.initializeLoggers(); + Logging.setLogLevels(); + agentsInitialized = true; + } + } + + + /** Install the agent tables. This is also responsible for upgrading the existing + * tables!!! + *@param threadcontext is the thread context. + */ + public static void installTables(IThreadContext threadcontext) + throws ManifoldCFException + { + IAgentManager mgr = AgentManagerFactory.make(threadcontext); + IIncrementalIngester igstmgr = IncrementalIngesterFactory.make(threadcontext); + IOutputConnectorManager outputConnMgr = OutputConnectorManagerFactory.make(threadcontext); + IOutputConnectionManager outputConnectionManager = OutputConnectionManagerFactory.make(threadcontext); + mgr.install(); + outputConnMgr.install(); + outputConnectionManager.install(); + igstmgr.install(); + } + + /** Uninstall all the crawler system tables. + *@param threadcontext is the thread context. + */ + public static void deinstallTables(IThreadContext threadcontext) + throws ManifoldCFException + { + IAgentManager mgr = AgentManagerFactory.make(threadcontext); + IIncrementalIngester igstmgr = IncrementalIngesterFactory.make(threadcontext); + IOutputConnectorManager outputConnMgr = OutputConnectorManagerFactory.make(threadcontext); + IOutputConnectionManager outputConnectionManager = OutputConnectionManagerFactory.make(threadcontext); + igstmgr.deinstall(); + outputConnectionManager.deinstall(); + outputConnMgr.deinstall(); + mgr.deinstall(); + } + + /** Start all not-running agents. + *@param threadContext is the thread context. + */ + public static void startAgents(IThreadContext threadContext) + throws ManifoldCFException + { + // Get agent manager + IAgentManager manager = AgentManagerFactory.make(threadContext); + String[] classes = manager.getAllAgents(); + ManifoldCFException problem = null; + synchronized (runningHash) + { + // DO NOT permit this method to do anything if stopAgents() has ever been called for this JVM! + // (If it has, it means that the JVM is trying to shut down.) + if (stopAgentsRun) + return; + int i = 0; + while (i < classes.length) + { + String className = classes[i++]; + if (runningHash.get(className) == null) + { + // Start this agent + IAgent agent = AgentFactory.make(threadContext,className); + try + { + // There is a potential race condition where the agent has been started but hasn't yet appeared in runningHash. + // But having runningHash be the synchronizer for this activity will prevent any problems. + // There is ANOTHER potential race condition, however, that can occur if the process is shut down just before startAgents() is called. + // We avoid that problem by means of a flag, which prevents startAgents() from doing anything once stopAgents() has been called. + agent.startAgent(); + // Successful! + runningHash.put(className,agent); + } + catch (ManifoldCFException e) + { + problem = e; + } + } + } + } + if (problem != null) + throw problem; + // Done. + } + + /** Stop all started agents. + */ + public static void stopAgents(IThreadContext threadContext) + throws ManifoldCFException + { + synchronized (runningHash) + { + HashMap iterHash = (HashMap)runningHash.clone(); + Iterator iter = iterHash.keySet().iterator(); + while (iter.hasNext()) + { + String className = (String)iter.next(); + IAgent agent = (IAgent)runningHash.get(className); + // Stop it + agent.stopAgent(); + runningHash.remove(className); + } + } + // Done. + } + + /** Signal output connection needs redoing. + * This is called when something external changed on an output connection, and + * therefore all associated documents must be reindexed. + *@param threadContext is the thread context. + *@param connectionName is the connection name. + */ + public static void signalOutputConnectionRedo(IThreadContext threadContext, String connectionName) + throws ManifoldCFException + { + // Blow away the incremental ingestion table first + IIncrementalIngester ingester = IncrementalIngesterFactory.make(threadContext); + ingester.resetOutputConnection(connectionName); + // Now, signal to all agents that the output connection configuration has changed. Do this second, so that there cannot be documents + // resulting from this signal that find themselves "unchanged". + AgentManagerFactory.noteOutputConnectionChange(threadContext,connectionName); + } + + /** Agents shutdown hook class */ + protected static class AgentsShutdownHook implements IShutdownHook + { + + public AgentsShutdownHook() + { + } + + public void doCleanup() + throws ManifoldCFException + { + // Shutting down in this way must prevent startup from taking place. + synchronized (runningHash) + { + stopAgentsRun = true; + } + IThreadContext tc = ThreadContextFactory.make(); + stopAgents(tc); + } + + } + + // Helper methods for API support. These are made public so connectors can use them to implement the executeCommand method. + + // These are the universal node types. + + protected static final String API_ERRORNODE = "error"; + protected static final String API_SERVICEINTERRUPTIONNODE = "service_interruption"; + + /** Find a configuration node given a name */ + public static ConfigurationNode findConfigurationNode(Configuration input, String argumentName) + { + // Look for argument among the children + int i = 0; + while (i < input.getChildCount()) + { + ConfigurationNode cn = input.findChild(i++); + if (cn.getType().equals(argumentName)) + return cn; + } + return null; + + } + + /** Find a configuration value given a name */ + public static String getRootArgument(Configuration input, String argumentName) + { + ConfigurationNode node = findConfigurationNode(input,argumentName); + if (node == null) + return null; + return node.getValue(); + } + + /** Handle an exception, by converting it to an error node. */ + public static void createErrorNode(Configuration output, ManifoldCFException e) + throws ManifoldCFException + { + if (e.getErrorCode() == ManifoldCFException.INTERRUPTED) + throw e; + Logging.api.error(e.getMessage(),e); + ConfigurationNode error = new ConfigurationNode(API_ERRORNODE); + error.setValue(e.getMessage()); + output.addChild(output.getChildCount(),error); + } + + /** Handle a service interruption, by converting it to a serviceinterruption node. */ + public static void createServiceInterruptionNode(Configuration output, ServiceInterruption e) + { + Logging.api.warn(e.getMessage(),e); + ConfigurationNode error = new ConfigurationNode(API_SERVICEINTERRUPTIONNODE); + error.setValue(e.getMessage()); + output.addChild(output.getChildCount(),error); + } + + +} + Modified: incubator/lcf/trunk/modules/framework/api-servlet/src/main/java/org/apache/manifoldcf/api/APIServlet.java URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/api-servlet/src/main/java/org/apache/manifoldcf/api/APIServlet.java?rev=1004255&r1=1004254&r2=1004255&view=diff ============================================================================== --- incubator/lcf/trunk/modules/framework/api-servlet/src/main/java/org/apache/manifoldcf/api/APIServlet.java (original) +++ incubator/lcf/trunk/modules/framework/api-servlet/src/main/java/org/apache/manifoldcf/api/APIServlet.java Mon Oct 4 14:32:19 2010 @@ -21,7 +21,7 @@ package org.apache.manifoldcf.api; import org.apache.manifoldcf.core.interfaces.*; import org.apache.manifoldcf.agents.interfaces.*; import org.apache.manifoldcf.crawler.interfaces.*; -import org.apache.manifoldcf.crawler.system.ACF; +import org.apache.manifoldcf.crawler.system.ManifoldCF; import org.apache.manifoldcf.crawler.system.Logging; import java.io.*; @@ -31,7 +31,7 @@ import java.net.*; import javax.servlet.*; import javax.servlet.http.*; -/** This servlet class provides API services for ACF. +/** This servlet class provides API services for ManifoldCF. */ public class APIServlet extends HttpServlet { @@ -46,10 +46,10 @@ public class APIServlet extends HttpServ try { // Set up the environment - ACF.initializeEnvironment(); + ManifoldCF.initializeEnvironment(); // Nothing more needs to be done at this point. } - catch (ACFException e) + catch (ManifoldCFException e) { Logging.misc.error("Error starting API service: "+e.getMessage(),e); throw new ServletException("Error starting API service: "+e.getMessage(),e); @@ -64,10 +64,10 @@ public class APIServlet extends HttpServ try { // Set up the environment - ACF.initializeEnvironment(); + ManifoldCF.initializeEnvironment(); // Nothing more needs to be done. } - catch (ACFException e) + catch (ManifoldCFException e) { Logging.misc.error("Error shutting down API service: "+e.getMessage(),e); } @@ -82,7 +82,7 @@ public class APIServlet extends HttpServ try { // Set up the environment - ACF.initializeEnvironment(); + ManifoldCF.initializeEnvironment(); // Mint a thread context IThreadContext tc = ThreadContextFactory.make(); @@ -100,7 +100,7 @@ public class APIServlet extends HttpServ executeRead(tc,response,pathInfo); } - catch (ACFException e) + catch (ManifoldCFException e) { // We should only see this error if there's an API problem, not if there's an actual problem with the method being called. response.sendError(response.SC_BAD_REQUEST,e.getMessage()); @@ -115,7 +115,7 @@ public class APIServlet extends HttpServ try { // Set up the environment - ACF.initializeEnvironment(); + ManifoldCF.initializeEnvironment(); // Mint a thread context IThreadContext tc = ThreadContextFactory.make(); @@ -141,7 +141,7 @@ public class APIServlet extends HttpServ content.close(); } } - catch (ACFException e) + catch (ManifoldCFException e) { // We should only see this error if there's an API problem, not if there's an actual problem with the method being called. response.sendError(response.SC_BAD_REQUEST,e.getMessage()); @@ -157,7 +157,7 @@ public class APIServlet extends HttpServ try { // Set up the environment - ACF.initializeEnvironment(); + ManifoldCF.initializeEnvironment(); // Mint a thread context IThreadContext tc = ThreadContextFactory.make(); @@ -184,7 +184,7 @@ public class APIServlet extends HttpServ } } - catch (ACFException e) + catch (ManifoldCFException e) { // We should only see this error if there's an API problem, not if there's an actual problem with the method being called. response.sendError(response.SC_BAD_REQUEST,e.getMessage()); @@ -199,7 +199,7 @@ public class APIServlet extends HttpServ try { // Set up the environment - ACF.initializeEnvironment(); + ManifoldCF.initializeEnvironment(); // Mint a thread context IThreadContext tc = ThreadContextFactory.make(); @@ -217,7 +217,7 @@ public class APIServlet extends HttpServ executeDelete(tc,response,pathInfo); } - catch (ACFException e) + catch (ManifoldCFException e) { // We should only see this error if there's an API problem, not if there's an actual problem with the method being called. response.sendError(response.SC_BAD_REQUEST,e.getMessage()); @@ -229,7 +229,7 @@ public class APIServlet extends HttpServ /** Perform a general "read" operation. */ protected static void executeRead(IThreadContext tc, HttpServletResponse response, String pathInfo) - throws ACFException, IOException + throws ManifoldCFException, IOException { // Strip off leading "/" if (pathInfo.startsWith("/")) @@ -254,7 +254,7 @@ public class APIServlet extends HttpServ // There the only response distinction we have here is between exception and no exception. Configuration output = new Configuration(); - boolean exists = ACF.executeReadCommand(tc,output,command); + boolean exists = ManifoldCF.executeReadCommand(tc,output,command); // Output @@ -267,7 +267,7 @@ public class APIServlet extends HttpServ { outputText = output.toJSON(); } - catch (ACFException e) + catch (ManifoldCFException e) { // Log it Logging.api.error("Error forming JSON response: "+e.getMessage(),e); @@ -306,7 +306,7 @@ public class APIServlet extends HttpServ /** Perform a general "write" operation. */ protected static void executeWrite(IThreadContext tc, HttpServletResponse response, String pathInfo, InputStream data) - throws ACFException, IOException + throws ManifoldCFException, IOException { // Strip off leading "/" if (pathInfo.startsWith("/")) @@ -364,7 +364,7 @@ public class APIServlet extends HttpServ // Exception vs. no exception // OK vs CREATE (both with json response packets) Configuration output = new Configuration(); - int writeResult = ACF.executeWriteCommand(tc,output,command,input); + int writeResult = ManifoldCF.executeWriteCommand(tc,output,command,input); // Output @@ -378,7 +378,7 @@ public class APIServlet extends HttpServ { outputText = output.toJSON(); } - catch (ACFException e) + catch (ManifoldCFException e) { // Log it Logging.api.error("Error forming JSON response: "+e.getMessage(),e); @@ -394,9 +394,9 @@ public class APIServlet extends HttpServ } // This should return either 200 or SC_CREATED - if (writeResult == ACF.WRITERESULT_CREATED) + if (writeResult == ManifoldCF.WRITERESULT_CREATED) response.setStatus(response.SC_CREATED); - else if (writeResult == ACF.WRITERESULT_NOTFOUND) + else if (writeResult == ManifoldCF.WRITERESULT_NOTFOUND) response.setStatus(response.SC_NOT_FOUND); byte[] responseValue = outputText.getBytes("utf-8"); @@ -420,7 +420,7 @@ public class APIServlet extends HttpServ /** Perform a general "post" operation. */ protected static void executePost(IThreadContext tc, HttpServletResponse response, String pathInfo, InputStream data) - throws ACFException, IOException + throws ManifoldCFException, IOException { // Strip off leading "/" if (pathInfo.startsWith("/")) @@ -475,7 +475,7 @@ public class APIServlet extends HttpServ // Execute the request. Configuration output = new Configuration(); - int writeResult = ACF.executePostCommand(tc,output,command,input); + int writeResult = ManifoldCF.executePostCommand(tc,output,command,input); // Output @@ -489,7 +489,7 @@ public class APIServlet extends HttpServ { outputText = output.toJSON(); } - catch (ACFException e) + catch (ManifoldCFException e) { // Log it Logging.api.error("Error forming JSON response: "+e.getMessage(),e); @@ -505,9 +505,9 @@ public class APIServlet extends HttpServ } // This should return either 200 or SC_CREATED - if (writeResult == ACF.WRITERESULT_CREATED) + if (writeResult == ManifoldCF.WRITERESULT_CREATED) response.setStatus(response.SC_CREATED); - else if (writeResult == ACF.WRITERESULT_NOTFOUND) + else if (writeResult == ManifoldCF.WRITERESULT_NOTFOUND) response.setStatus(response.SC_NOT_FOUND); byte[] responseValue = outputText.getBytes("utf-8"); @@ -531,7 +531,7 @@ public class APIServlet extends HttpServ /** Perform a general "delete" operation. */ protected static void executeDelete(IThreadContext tc, HttpServletResponse response, String pathInfo) - throws ACFException, IOException + throws ManifoldCFException, IOException { // Strip off leading "/" if (pathInfo.startsWith("/")) @@ -556,7 +556,7 @@ public class APIServlet extends HttpServ // There the only response distinction we have here is between exception and no exception. Configuration output = new Configuration(); - boolean exists = ACF.executeDeleteCommand(tc,output,command); + boolean exists = ManifoldCF.executeDeleteCommand(tc,output,command); // Output String outputText = null; @@ -568,7 +568,7 @@ public class APIServlet extends HttpServ { outputText = output.toJSON(); } - catch (ACFException e) + catch (ManifoldCFException e) { // Log it Logging.api.error("Error forming JSON response: "+e.getMessage(),e); Modified: incubator/lcf/trunk/modules/framework/authority-servlet/src/main/java/org/apache/manifoldcf/authorityservice/servlet/UserACLServlet.java URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/authority-servlet/src/main/java/org/apache/manifoldcf/authorityservice/servlet/UserACLServlet.java?rev=1004255&r1=1004254&r2=1004255&view=diff ============================================================================== --- incubator/lcf/trunk/modules/framework/authority-servlet/src/main/java/org/apache/manifoldcf/authorityservice/servlet/UserACLServlet.java (original) +++ incubator/lcf/trunk/modules/framework/authority-servlet/src/main/java/org/apache/manifoldcf/authorityservice/servlet/UserACLServlet.java Mon Oct 4 14:32:19 2010 @@ -20,7 +20,7 @@ package org.apache.manifoldcf.authoritys import org.apache.manifoldcf.core.interfaces.*; import org.apache.manifoldcf.authorities.interfaces.*; -import org.apache.manifoldcf.authorities.system.ACF; +import org.apache.manifoldcf.authorities.system.ManifoldCF; import org.apache.manifoldcf.authorities.system.Logging; import org.apache.manifoldcf.authorities.system.RequestQueue; import org.apache.manifoldcf.authorities.system.AuthRequest; @@ -63,11 +63,11 @@ public class UserACLServlet extends Http try { // Set up the environment - ACF.initializeEnvironment(); + ManifoldCF.initializeEnvironment(); IThreadContext itc = ThreadContextFactory.make(); - ACF.startSystem(itc); + ManifoldCF.startSystem(itc); } - catch (ACFException e) + catch (ManifoldCFException e) { Logging.misc.error("Error starting authority service: "+e.getMessage(),e); throw new ServletException("Error starting authority service: "+e.getMessage(),e); @@ -82,11 +82,11 @@ public class UserACLServlet extends Http try { // Set up the environment - ACF.initializeEnvironment(); + ManifoldCF.initializeEnvironment(); IThreadContext itc = ThreadContextFactory.make(); - ACF.stopSystem(itc); + ManifoldCF.stopSystem(itc); } - catch (ACFException e) + catch (ManifoldCFException e) { Logging.misc.error("Error shutting down authority service: "+e.getMessage(),e); } @@ -101,7 +101,7 @@ public class UserACLServlet extends Http try { // Set up the environment - ACF.initializeEnvironment(); + ManifoldCF.initializeEnvironment(); Logging.authorityService.debug("Received request"); @@ -137,11 +137,11 @@ public class UserACLServlet extends Http Logging.authorityService.debug("Received authority request for user '"+userID+"'"); } - RequestQueue queue = ACF.getRequestQueue(); + RequestQueue queue = ManifoldCF.getRequestQueue(); if (queue == null) { // System wasn't started; return unauthorized - throw new ACFException("System improperly initialized"); + throw new ManifoldCFException("System improperly initialized"); } IThreadContext itc = ThreadContextFactory.make(); @@ -195,8 +195,8 @@ public class UserACLServlet extends Http if (exception != null) { // Exceptions are always bad now - // The ACFException here must disable access to the UI without causing a generic badness thing to happen, so use 403. - if (exception instanceof ACFException) + // The ManifoldCFException here must disable access to the UI without causing a generic badness thing to happen, so use 403. + if (exception instanceof ManifoldCFException) response.sendError(response.SC_FORBIDDEN,"From "+ar.getIdentifyingString()+": "+exception.getMessage()); else response.sendError(response.SC_INTERNAL_SERVER_ERROR,"From "+ar.getIdentifyingString()+": "+exception.getMessage()); @@ -265,7 +265,7 @@ public class UserACLServlet extends Http Logging.authorityService.error("Unsupported encoding: "+e.getMessage(),e); throw new ServletException("Fatal error occurred: "+e.getMessage(),e); } - catch (ACFException e) + catch (ManifoldCFException e) { Logging.authorityService.error("User ACL servlet error: "+e.getMessage(),e); response.sendError(response.SC_INTERNAL_SERVER_ERROR,e.getMessage()); Modified: incubator/lcf/trunk/modules/framework/core/src/main/java/org/apache/manifoldcf/core/DBCreate.java URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/core/src/main/java/org/apache/manifoldcf/core/DBCreate.java?rev=1004255&r1=1004254&r2=1004255&view=diff ============================================================================== --- incubator/lcf/trunk/modules/framework/core/src/main/java/org/apache/manifoldcf/core/DBCreate.java (original) +++ incubator/lcf/trunk/modules/framework/core/src/main/java/org/apache/manifoldcf/core/DBCreate.java Mon Oct 4 14:32:19 2010 @@ -19,12 +19,12 @@ package org.apache.manifoldcf.core; import org.apache.manifoldcf.core.interfaces.IThreadContext; -import org.apache.manifoldcf.core.interfaces.ACFException; -import org.apache.manifoldcf.core.system.ACF; +import org.apache.manifoldcf.core.interfaces.ManifoldCFException; +import org.apache.manifoldcf.core.system.ManifoldCF; import org.apache.manifoldcf.core.system.Logging; /** - * Create the database using the name as specified through the {@see ACF}. The username and password for the + * Create the database using the name as specified through the {@see ManifoldCF}. The username and password for the * configured database need to be specified during construction. */ public class DBCreate extends DBInitializationCommand @@ -46,10 +46,10 @@ public class DBCreate extends DBInitiali /** * {@inheritDoc} */ - public void doExecute(IThreadContext tc) throws ACFException + public void doExecute(IThreadContext tc) throws ManifoldCFException { - ACF.createSystemDatabase(tc, getUserName(), getPassword()); - Logging.root.info("ACF database created"); + ManifoldCF.createSystemDatabase(tc, getUserName(), getPassword()); + Logging.root.info("ManifoldCF database created"); } /** @@ -78,9 +78,9 @@ public class DBCreate extends DBInitiali try { dbCreate.execute(); - System.err.println("ACF database created"); + System.err.println("ManifoldCF database created"); } - catch (ACFException e) + catch (ManifoldCFException e) { e.printStackTrace(); System.exit(1); Modified: incubator/lcf/trunk/modules/framework/core/src/main/java/org/apache/manifoldcf/core/DBDrop.java URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/core/src/main/java/org/apache/manifoldcf/core/DBDrop.java?rev=1004255&r1=1004254&r2=1004255&view=diff ============================================================================== --- incubator/lcf/trunk/modules/framework/core/src/main/java/org/apache/manifoldcf/core/DBDrop.java (original) +++ incubator/lcf/trunk/modules/framework/core/src/main/java/org/apache/manifoldcf/core/DBDrop.java Mon Oct 4 14:32:19 2010 @@ -19,12 +19,12 @@ package org.apache.manifoldcf.core; import org.apache.manifoldcf.core.interfaces.IThreadContext; -import org.apache.manifoldcf.core.interfaces.ACFException; -import org.apache.manifoldcf.core.system.ACF; +import org.apache.manifoldcf.core.interfaces.ManifoldCFException; +import org.apache.manifoldcf.core.system.ManifoldCF; import org.apache.manifoldcf.core.system.Logging; /** - * Drop the database using the name as specified through the {@see ACF}. The username and password for the + * Drop the database using the name as specified through the {@see ManifoldCF}. The username and password for the * configured database need to be specified during construction. */ public class DBDrop extends DBInitializationCommand @@ -42,10 +42,10 @@ public class DBDrop extends DBInitializa super(userName, password); } - protected void doExecute(IThreadContext tc) throws ACFException + protected void doExecute(IThreadContext tc) throws ManifoldCFException { - ACF.dropSystemDatabase(tc, getUserName(), getPassword()); - Logging.root.info("ACF database dropped"); + ManifoldCF.dropSystemDatabase(tc, getUserName(), getPassword()); + Logging.root.info("ManifoldCF database dropped"); } /** @@ -74,9 +74,9 @@ public class DBDrop extends DBInitializa try { dbDrop.execute(); - System.err.println("ACF database dropped"); + System.err.println("ManifoldCF database dropped"); } - catch (ACFException e) + catch (ManifoldCFException e) { e.printStackTrace(); System.exit(1); Modified: incubator/lcf/trunk/modules/framework/core/src/main/java/org/apache/manifoldcf/core/DBInitializationCommand.java URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/core/src/main/java/org/apache/manifoldcf/core/DBInitializationCommand.java?rev=1004255&r1=1004254&r2=1004255&view=diff ============================================================================== --- incubator/lcf/trunk/modules/framework/core/src/main/java/org/apache/manifoldcf/core/DBInitializationCommand.java (original) +++ incubator/lcf/trunk/modules/framework/core/src/main/java/org/apache/manifoldcf/core/DBInitializationCommand.java Mon Oct 4 14:32:19 2010 @@ -1,9 +1,9 @@ package org.apache.manifoldcf.core; import org.apache.manifoldcf.core.interfaces.IThreadContext; -import org.apache.manifoldcf.core.interfaces.ACFException; +import org.apache.manifoldcf.core.interfaces.ManifoldCFException; import org.apache.manifoldcf.core.interfaces.ThreadContextFactory; -import org.apache.manifoldcf.core.system.ACF; +import org.apache.manifoldcf.core.system.ManifoldCF; /** * Parent class for all database initialization related commands. This class provides methods to @@ -28,14 +28,14 @@ public abstract class DBInitializationCo this.password = password; } - public void execute() throws ACFException + public void execute() throws ManifoldCFException { - ACF.initializeEnvironment(); + ManifoldCF.initializeEnvironment(); IThreadContext tc = ThreadContextFactory.make(); doExecute(tc); } - protected abstract void doExecute(IThreadContext tc) throws ACFException; + protected abstract void doExecute(IThreadContext tc) throws ManifoldCFException; protected String getPassword() { Modified: incubator/lcf/trunk/modules/framework/core/src/main/java/org/apache/manifoldcf/core/InitializationCommand.java URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/core/src/main/java/org/apache/manifoldcf/core/InitializationCommand.java?rev=1004255&r1=1004254&r2=1004255&view=diff ============================================================================== --- incubator/lcf/trunk/modules/framework/core/src/main/java/org/apache/manifoldcf/core/InitializationCommand.java (original) +++ incubator/lcf/trunk/modules/framework/core/src/main/java/org/apache/manifoldcf/core/InitializationCommand.java Mon Oct 4 14:32:19 2010 @@ -1,6 +1,6 @@ package org.apache.manifoldcf.core; -import org.apache.manifoldcf.core.interfaces.ACFException; +import org.apache.manifoldcf.core.interfaces.ManifoldCFException; /** * Interface for commands that initialize state of the connector framework. Among implementations available are: @@ -15,7 +15,7 @@ public interface InitializationCommand /** * Execute the command. * - * @throws ACFException Thrown if the execution fails + * @throws ManifoldCFException Thrown if the execution fails */ - void execute() throws ACFException; + void execute() throws ManifoldCFException; } Modified: incubator/lcf/trunk/modules/framework/core/src/main/java/org/apache/manifoldcf/core/LockClean.java URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/core/src/main/java/org/apache/manifoldcf/core/LockClean.java?rev=1004255&r1=1004254&r2=1004255&view=diff ============================================================================== --- incubator/lcf/trunk/modules/framework/core/src/main/java/org/apache/manifoldcf/core/LockClean.java (original) +++ incubator/lcf/trunk/modules/framework/core/src/main/java/org/apache/manifoldcf/core/LockClean.java Mon Oct 4 14:32:19 2010 @@ -22,7 +22,7 @@ import org.apache.manifoldcf.core.interf import org.apache.manifoldcf.core.system.*; /** - * ACF makes use of a synchronization directory to store data about the current state of the synchronization between + * ManifoldCF makes use of a synchronization directory to store data about the current state of the synchronization between * the repository connection and the output connection. This class is used to clear this directory. */ public class LockClean implements InitializationCommand @@ -36,10 +36,10 @@ public class LockClean implements Initia /** * {@inheritDoc} */ - public void execute() throws ACFException + public void execute() throws ManifoldCFException { - ACF.initializeEnvironment(); - String synchDir = ACF.getProperty(org.apache.manifoldcf.core.lockmanager.LockManager.synchDirectoryProperty); + ManifoldCF.initializeEnvironment(); + String synchDir = ManifoldCF.getProperty(org.apache.manifoldcf.core.lockmanager.LockManager.synchDirectoryProperty); if (synchDir != null) { // Recursively clean up the contents of the synch directory. But don't remove the directory itself @@ -107,7 +107,7 @@ public class LockClean implements Initia lockClean.execute(); System.err.println("Synchronization storage cleaned up"); } - catch (ACFException e) + catch (ManifoldCFException e) { e.printStackTrace(System.err); System.exit(2); Modified: incubator/lcf/trunk/modules/framework/core/src/main/java/org/apache/manifoldcf/core/Obfuscate.java URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/core/src/main/java/org/apache/manifoldcf/core/Obfuscate.java?rev=1004255&r1=1004254&r2=1004255&view=diff ============================================================================== --- incubator/lcf/trunk/modules/framework/core/src/main/java/org/apache/manifoldcf/core/Obfuscate.java (original) +++ incubator/lcf/trunk/modules/framework/core/src/main/java/org/apache/manifoldcf/core/Obfuscate.java Mon Oct 4 14:32:19 2010 @@ -42,9 +42,9 @@ public class Obfuscate String string = args[0]; try { - UTF8Stdout.println(ACF.obfuscate(string)); + UTF8Stdout.println(ManifoldCF.obfuscate(string)); } - catch (ACFException e) + catch (ManifoldCFException e) { e.printStackTrace(); System.exit(1); Modified: incubator/lcf/trunk/modules/framework/core/src/main/java/org/apache/manifoldcf/core/cachemanager/CacheManager.java URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/core/src/main/java/org/apache/manifoldcf/core/cachemanager/CacheManager.java?rev=1004255&r1=1004254&r2=1004255&view=diff ============================================================================== --- incubator/lcf/trunk/modules/framework/core/src/main/java/org/apache/manifoldcf/core/cachemanager/CacheManager.java (original) +++ incubator/lcf/trunk/modules/framework/core/src/main/java/org/apache/manifoldcf/core/cachemanager/CacheManager.java Mon Oct 4 14:32:19 2010 @@ -21,7 +21,7 @@ package org.apache.manifoldcf.core.cache import org.apache.manifoldcf.core.interfaces.*; import java.util.*; import org.apache.manifoldcf.core.system.Logging; -import org.apache.manifoldcf.core.system.ACF; +import org.apache.manifoldcf.core.system.ManifoldCF; import java.io.*; /** This class implements the cache manager interface, and provides generic cache management @@ -43,7 +43,7 @@ public class CacheManager implements ICa protected HashMap transactionHash = new HashMap(); public CacheManager(IThreadContext context) - throws ACFException + throws ManifoldCFException { lockManager = LockManagerFactory.make(context); } @@ -76,7 +76,7 @@ public class CacheManager implements ICa */ public void findObjectsAndExecute(ICacheDescription[] locateObjectDescriptions, StringSet invalidateKeys, ICacheExecutor execObject, String transactionID) - throws ACFException + throws ManifoldCFException { // There is some clever engineering involved here. The lock manager is used to control synchronization // around usage and invalidation of objects. However, there is ANOTHER lock condition that needs to be @@ -198,7 +198,7 @@ public class CacheManager implements ICa */ public ICacheHandle enterCache(ICacheDescription[] locateObjectDescriptions, StringSet invalidateKeys, String transactionID) - throws ACFException + throws ManifoldCFException { if (Logging.cache.isDebugEnabled()) { @@ -283,7 +283,7 @@ public class CacheManager implements ICa CacheTransactionHandle handle = (CacheTransactionHandle)transactionHash.get(transactionID); if (handle == null) { - ACFException ex = new ACFException("Illegal transaction ID: '"+transactionID+"'",ACFException.GENERAL_ERROR); + ManifoldCFException ex = new ManifoldCFException("Illegal transaction ID: '"+transactionID+"'",ManifoldCFException.GENERAL_ERROR); Logging.cache.error(Thread.currentThread().toString()+": enterCache: "+transactionID+": "+this.toString()+": Transaction hash = "+transactionHash.toString(),ex); throw ex; } @@ -313,7 +313,7 @@ public class CacheManager implements ICa *@param handle is the cache handle. */ public ICacheCreateHandle enterCreateSection(ICacheHandle handle) - throws ACFException + throws ManifoldCFException { if (Logging.cache.isDebugEnabled()) @@ -328,8 +328,8 @@ public class CacheManager implements ICa // stop multiple creation. ICacheDescription[] locateObjectDescriptions = handle.getObjectDescriptions(); if (locateObjectDescriptions == null) - throw new ACFException("Can't enter create section without objects to create", - ACFException.GENERAL_ERROR); + throw new ManifoldCFException("Can't enter create section without objects to create", + ManifoldCFException.GENERAL_ERROR); int i = 0; ArrayList writeCriticalSectionArray = new ArrayList(); while (i < locateObjectDescriptions.length) @@ -372,11 +372,11 @@ public class CacheManager implements ICa *@return the object, or null if not found. */ public Object lookupObject(ICacheCreateHandle handle, ICacheDescription objectDescription) - throws ACFException + throws ManifoldCFException { if (handle == null) - throw new ACFException("Can't do lookup outside of create section", - ACFException.GENERAL_ERROR); + throw new ManifoldCFException("Can't do lookup outside of create section", + ManifoldCFException.GENERAL_ERROR); if (Logging.cache.isDebugEnabled()) { @@ -398,7 +398,7 @@ public class CacheManager implements ICa CacheTransactionHandle transactionHandle = (CacheTransactionHandle)transactionHash.get(transactionID); if (transactionHandle == null) { - ACFException ex = new ACFException("Illegal transaction id",ACFException.GENERAL_ERROR); + ManifoldCFException ex = new ManifoldCFException("Illegal transaction id",ManifoldCFException.GENERAL_ERROR); Logging.cache.error(Thread.currentThread().toString()+": lookupObject: "+transactionID+": "+this.toString()+": Transaction hash = "+transactionHash.toString(),ex); throw ex; } @@ -467,7 +467,7 @@ public class CacheManager implements ICa *@return true if expired, false otherwise. */ protected boolean hasExpired(String key, long createTime) - throws ACFException + throws ManifoldCFException { long createdDate = readSharedData(key); if (Logging.cache.isDebugEnabled()) @@ -509,11 +509,11 @@ public class CacheManager implements ICa */ public void saveObject(ICacheCreateHandle handle, ICacheDescription objectDescription, Object object) - throws ACFException + throws ManifoldCFException { if (handle == null) - throw new ACFException("Can't do save outside of create section", - ACFException.GENERAL_ERROR); + throw new ManifoldCFException("Can't do save outside of create section", + ManifoldCFException.GENERAL_ERROR); if (Logging.cache.isDebugEnabled()) { @@ -561,7 +561,7 @@ public class CacheManager implements ICa CacheTransactionHandle transactionHandle = (CacheTransactionHandle)transactionHash.get(transactionID); if (transactionHandle == null) { - ACFException ex = new ACFException("Bad transaction handle",ACFException.GENERAL_ERROR); + ManifoldCFException ex = new ManifoldCFException("Bad transaction handle",ManifoldCFException.GENERAL_ERROR); Logging.cache.error(Thread.currentThread().toString()+": saveObject: "+transactionID+": "+this.toString()+": Transaction hash = "+transactionHash.toString(),ex); throw ex; } @@ -574,7 +574,7 @@ public class CacheManager implements ICa *@param handle is the handle created by the corresponding enterCreateSection() method. */ public void leaveCreateSection(ICacheCreateHandle handle) - throws ACFException + throws ManifoldCFException { if (Logging.cache.isDebugEnabled()) @@ -589,7 +589,7 @@ public class CacheManager implements ICa *@param handle is the cache handle. Does nothing if a null set of keys was passed in. */ public void invalidateKeys(ICacheHandle handle) - throws ACFException + throws ManifoldCFException { if (Logging.cache.isDebugEnabled()) @@ -610,7 +610,7 @@ public class CacheManager implements ICa CacheTransactionHandle transactionHandle = (CacheTransactionHandle)transactionHash.get(transactionID); if (transactionHandle == null) { - ACFException ex = new ACFException("Bad transaction ID!",ACFException.GENERAL_ERROR); + ManifoldCFException ex = new ManifoldCFException("Bad transaction ID!",ManifoldCFException.GENERAL_ERROR); Logging.cache.error(Thread.currentThread().toString()+": invalidateKeys: "+transactionID+": "+this.toString()+": Transaction hash = "+transactionHash.toString(),ex); throw ex; } @@ -623,7 +623,7 @@ public class CacheManager implements ICa *@param keys is the set of keys to invalidate. */ protected void performInvalidation(StringSet keys) - throws ACFException + throws ManifoldCFException { // Finally, perform the invalidation. @@ -649,7 +649,7 @@ public class CacheManager implements ICa *@param handle is the handle of the cache we are leaving. */ public void leaveCache(ICacheHandle handle) - throws ACFException + throws ManifoldCFException { if (Logging.cache.isDebugEnabled()) @@ -668,7 +668,7 @@ public class CacheManager implements ICa *@param enclosingTransactionID is the id of the transaction that is in effect, or null. */ public void startTransaction(String startingTransactionID, String enclosingTransactionID) - throws ACFException + throws ManifoldCFException { if (Logging.cache.isDebugEnabled()) @@ -684,8 +684,8 @@ public class CacheManager implements ICa parent = (CacheTransactionHandle)transactionHash.get(enclosingTransactionID); if (parent == null) { - ACFException ex = new ACFException("Illegal parent transaction ID: "+enclosingTransactionID, - ACFException.GENERAL_ERROR); + ManifoldCFException ex = new ManifoldCFException("Illegal parent transaction ID: "+enclosingTransactionID, + ManifoldCFException.GENERAL_ERROR); Logging.cache.error(Thread.currentThread().toString()+": startTransaction: "+this.toString()+": Transaction hash = "+transactionHash.toString(),ex); throw ex; } @@ -706,7 +706,7 @@ public class CacheManager implements ICa * held open will be released. */ public void commitTransaction(String transactionID) - throws ACFException + throws ManifoldCFException { if (Logging.cache.isDebugEnabled()) @@ -716,7 +716,7 @@ public class CacheManager implements ICa CacheTransactionHandle handle = (CacheTransactionHandle)transactionHash.get(transactionID); if (handle == null) - throw new ACFException("Cache manager: commit transaction without start!",ACFException.GENERAL_ERROR); + throw new ManifoldCFException("Cache manager: commit transaction without start!",ManifoldCFException.GENERAL_ERROR); // First, move all the locally cached entries into the global cache. // This is safe to do because we know that the transaction belongs to a single thread. @@ -782,7 +782,7 @@ public class CacheManager implements ICa * held for the transaction. */ public void rollbackTransaction(String transactionID) - throws ACFException + throws ManifoldCFException { if (Logging.cache.isDebugEnabled()) @@ -792,7 +792,7 @@ public class CacheManager implements ICa CacheTransactionHandle handle = (CacheTransactionHandle)transactionHash.get(transactionID); if (handle == null) - throw new ACFException("Cache manager: rollback transaction without start!",ACFException.GENERAL_ERROR); + throw new ManifoldCFException("Cache manager: rollback transaction without start!",ManifoldCFException.GENERAL_ERROR); // End all of the locks // We always end the write locks before the read locks. @@ -819,7 +819,7 @@ public class CacheManager implements ICa *@param currentTimestamp is the current time in milliseconds since epoch. */ public void expireObjects(long currentTimestamp) - throws ACFException + throws ManifoldCFException { // This is a local JVM operation; we will not need to do any locks. We just // need to blow expired objects from the cache. @@ -834,7 +834,7 @@ public class CacheManager implements ICa *@return the invalidation time, or 0 if none. */ protected long readSharedData(String key) - throws ACFException + throws ManifoldCFException { // Read cache resource byte[] cacheResourceData = lockManager.readData("cache-"+key); @@ -847,7 +847,7 @@ public class CacheManager implements ICa } catch (UnsupportedEncodingException e) { - throw new ACFException(e.getMessage(),e); + throw new ManifoldCFException(e.getMessage(),e); } } @@ -856,7 +856,7 @@ public class CacheManager implements ICa *@param value is the invalidation timestamp. */ protected void writeSharedData(String key, long value) - throws ACFException + throws ManifoldCFException { if (value == 0L) lockManager.writeData(key,null); @@ -868,7 +868,7 @@ public class CacheManager implements ICa } catch (UnsupportedEncodingException e) { - throw new ACFException(e.getMessage(),e); + throw new ManifoldCFException(e.getMessage(),e); } } } @@ -1170,7 +1170,7 @@ public class CacheManager implements ICa *@return the array of write locks we still need to throw. */ public StringSet getRemainingWriteLocks(StringSet cacheKeys, StringSet keys) - throws ACFException + throws ManifoldCFException { // If any of these keys are read locks but not yet write locks, we throw an exception! // (There is currently no ability to promote a read lock to a write lock.) Modified: incubator/lcf/trunk/modules/framework/core/src/main/java/org/apache/manifoldcf/core/common/Base64.java URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/core/src/main/java/org/apache/manifoldcf/core/common/Base64.java?rev=1004255&r1=1004254&r2=1004255&view=diff ============================================================================== --- incubator/lcf/trunk/modules/framework/core/src/main/java/org/apache/manifoldcf/core/common/Base64.java (original) +++ incubator/lcf/trunk/modules/framework/core/src/main/java/org/apache/manifoldcf/core/common/Base64.java Mon Oct 4 14:32:19 2010 @@ -79,7 +79,7 @@ public class Base64 *@return false if end-of-stream encountered, true otherwise */ public boolean decodeNextWord(Reader inputBuffer, OutputStream outputBuffer) - throws ACFException + throws ManifoldCFException { try { @@ -91,7 +91,7 @@ public class Base64 if (character == -1) { if (bufferIndex != 0) - throw new ACFException("Unexpected end of base64 input"); + throw new ManifoldCFException("Unexpected end of base64 input"); return false; } char ch = (char)character; @@ -99,7 +99,7 @@ public class Base64 characterBuffer[bufferIndex++] = ch; // else - // throw new ACFException("Illegal Base64 character: '"+ch+"'"); + // throw new ManifoldCFException("Illegal Base64 character: '"+ch+"'"); } // We have the data; do the conversion. @@ -132,7 +132,7 @@ public class Base64 } catch (IOException e) { - throw new ACFException("IO error converting from base 64",e); + throw new ManifoldCFException("IO error converting from base 64",e); } } @@ -141,7 +141,7 @@ public class Base64 *@param outputBuffer is the binary output stream. */ public void decodeStream(Reader inputBuffer, OutputStream outputBuffer) - throws ACFException + throws ManifoldCFException { // Just loop until done. // It may be efficient to replace this with a "bulk" method, but probably not much. @@ -155,7 +155,7 @@ public class Base64 *@return a corresponding byte array. */ public byte[] decodeString(String inputString) - throws ACFException + throws ManifoldCFException { try { @@ -184,7 +184,7 @@ public class Base64 } catch (IOException e) { - throw new ACFException("Error streaming through base64 decoder",e); + throw new ManifoldCFException("Error streaming through base64 decoder",e); } } @@ -194,7 +194,7 @@ public class Base64 *@return false if end-of-stream encountered, true otherwise. */ public boolean encodeNextWord(InputStream inputStream, Writer outputWriter) - throws ACFException + throws ManifoldCFException { try { @@ -206,7 +206,7 @@ public class Base64 switch (actualLength) { case 0: - throw new ACFException("Read 0 bytes!"); + throw new ManifoldCFException("Read 0 bytes!"); case 1: i = byteBuffer[0]&0xff; outputWriter.write(base64CharacterArray[i>>2]); @@ -240,7 +240,7 @@ public class Base64 } catch (IOException e) { - throw new ACFException("IO error encoding in base64",e); + throw new ManifoldCFException("IO error encoding in base64",e); } } @@ -249,7 +249,7 @@ public class Base64 *@param outputWriter is the output writer. */ public void encodeStream(InputStream inputStream, Writer outputWriter) - throws ACFException + throws ManifoldCFException { while (encodeNextWord(inputStream,outputWriter)) { @@ -261,7 +261,7 @@ public class Base64 *@return the encoded string. */ public String encodeByteArray(byte[] inputByteArray) - throws ACFException + throws ManifoldCFException { try { @@ -287,7 +287,7 @@ public class Base64 } catch (IOException e) { - throw new ACFException("Error streaming through base64 encoder",e); + throw new ManifoldCFException("Error streaming through base64 encoder",e); } } Modified: incubator/lcf/trunk/modules/framework/core/src/main/java/org/apache/manifoldcf/core/common/XMLDoc.java URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/core/src/main/java/org/apache/manifoldcf/core/common/XMLDoc.java?rev=1004255&r1=1004254&r2=1004255&view=diff ============================================================================== --- incubator/lcf/trunk/modules/framework/core/src/main/java/org/apache/manifoldcf/core/common/XMLDoc.java (original) +++ incubator/lcf/trunk/modules/framework/core/src/main/java/org/apache/manifoldcf/core/common/XMLDoc.java Mon Oct 4 14:32:19 2010 @@ -27,7 +27,7 @@ import javax.xml.parsers.*; import org.xml.sax.*; import org.w3c.dom.*; -import org.apache.manifoldcf.core.interfaces.ACFException; +import org.apache.manifoldcf.core.interfaces.ManifoldCFException; public class XMLDoc { @@ -228,7 +228,7 @@ public class XMLDoc * @return xml raw text */ public String getXML() - throws ACFException + throws ManifoldCFException { try { @@ -236,7 +236,7 @@ public class XMLDoc } catch (UnsupportedEncodingException e) { - throw new ACFException(e.getMessage(),e); + throw new ManifoldCFException(e.getMessage(),e); } } @@ -244,7 +244,7 @@ public class XMLDoc * @return xml in byte array */ public byte[] toByteArray() - throws ACFException + throws ManifoldCFException { ByteArrayOutputStream os = new ByteArrayOutputStream(_blocksiz); dumpOutput(os); @@ -255,7 +255,7 @@ public class XMLDoc /** Creates the empty doc */ public XMLDoc() - throws ACFException + throws ManifoldCFException { try { @@ -266,7 +266,7 @@ public class XMLDoc } catch (Exception e) { - throw new ACFException("Error setting up parser: "+e.getMessage(),e); + throw new ManifoldCFException("Error setting up parser: "+e.getMessage(),e); } } @@ -275,7 +275,7 @@ public class XMLDoc * @param data xml to parse */ public XMLDoc(String data) - throws ACFException + throws ManifoldCFException { try { @@ -284,7 +284,7 @@ public class XMLDoc } catch (UnsupportedEncodingException e) { - throw new ACFException(e.getMessage(),e); + throw new ManifoldCFException(e.getMessage(),e); } } @@ -293,7 +293,7 @@ public class XMLDoc * @param data xml to parse */ public XMLDoc(StringBuffer data) - throws ACFException + throws ManifoldCFException { try { @@ -303,7 +303,7 @@ public class XMLDoc } catch (UnsupportedEncodingException e) { - throw new ACFException(e.getMessage(),e); + throw new ManifoldCFException(e.getMessage(),e); } } @@ -312,7 +312,7 @@ public class XMLDoc * @param is InputStream of xml to parse */ public XMLDoc(InputStream is) - throws ACFException + throws ManifoldCFException { _doc = init(is); } @@ -320,7 +320,7 @@ public class XMLDoc /** Construct a document from all the children of an existing element object from another document. */ public XMLDoc(XMLDoc oldDoc, Object parent) - throws ACFException + throws ManifoldCFException { try { @@ -346,12 +346,12 @@ public class XMLDoc } catch (Exception e) { - throw new ACFException("Error setting up parser: "+e.getMessage(),e); + throw new ManifoldCFException("Error setting up parser: "+e.getMessage(),e); } } private Document init(InputStream is) - throws ACFException + throws ManifoldCFException { Document doc = null; try { @@ -366,7 +366,7 @@ public class XMLDoc } catch (Exception e) { - throw new ACFException("XML parsing error: "+e.getMessage(),e); + throw new ManifoldCFException("XML parsing error: "+e.getMessage(),e); } return doc; @@ -686,7 +686,7 @@ public class XMLDoc // Transform the output for serialization private void dumpOutput(OutputStream os) - throws ACFException + throws ManifoldCFException { try { @@ -699,7 +699,7 @@ public class XMLDoc } catch (Exception e) { - throw new ACFException("Error dumping output: "+e.getMessage(),e); + throw new ManifoldCFException("Error dumping output: "+e.getMessage(),e); } } Modified: incubator/lcf/trunk/modules/framework/core/src/main/java/org/apache/manifoldcf/core/connector/BaseConnector.java URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/core/src/main/java/org/apache/manifoldcf/core/connector/BaseConnector.java?rev=1004255&r1=1004254&r2=1004255&view=diff ============================================================================== --- incubator/lcf/trunk/modules/framework/core/src/main/java/org/apache/manifoldcf/core/connector/BaseConnector.java (original) +++ incubator/lcf/trunk/modules/framework/core/src/main/java/org/apache/manifoldcf/core/connector/BaseConnector.java Mon Oct 4 14:32:19 2010 @@ -40,7 +40,7 @@ public abstract class BaseConnector impl *@param threadContext is the current thread context. */ public void install(IThreadContext threadContext) - throws ACFException + throws ManifoldCFException { // Base install does nothing } @@ -51,7 +51,7 @@ public abstract class BaseConnector impl *@param threadContext is the current thread context. */ public void deinstall(IThreadContext threadContext) - throws ACFException + throws ManifoldCFException { // Base uninstall does nothing } @@ -71,7 +71,7 @@ public abstract class BaseConnector impl *@return the connection's status as a displayable string. */ public String check() - throws ACFException + throws ManifoldCFException { // Base version returns "OK" status. return "Connection working"; @@ -81,7 +81,7 @@ public abstract class BaseConnector impl * in active use. */ public void poll() - throws ACFException + throws ManifoldCFException { // Base version does nothing } @@ -89,7 +89,7 @@ public abstract class BaseConnector impl /** Close the connection. Call this before discarding the repository connector. */ public void disconnect() - throws ACFException + throws ManifoldCFException { params = null; } @@ -127,7 +127,7 @@ public abstract class BaseConnector impl *@param tabsArray is an array of tab names. Add to this array any tab names that are specific to the connector. */ public void outputConfigurationHeader(IThreadContext threadContext, IHTTPOutput out, ConfigParams parameters, ArrayList tabsArray) - throws ACFException, IOException + throws ManifoldCFException, IOException { } @@ -141,7 +141,7 @@ public abstract class BaseConnector impl *@param tabName is the current tab name. */ public void outputConfigurationBody(IThreadContext threadContext, IHTTPOutput out, ConfigParams parameters, String tabName) - throws ACFException, IOException + throws ManifoldCFException, IOException { } @@ -155,7 +155,7 @@ public abstract class BaseConnector impl *@return null if all is well, or a string error message if there is an error that should prevent saving of the connection (and cause a redirection to an error page). */ public String processConfigurationPost(IThreadContext threadContext, IPostParameters variableContext, ConfigParams parameters) - throws ACFException + throws ManifoldCFException { return null; } @@ -168,7 +168,7 @@ public abstract class BaseConnector impl *@param parameters are the configuration parameters, as they currently exist, for this connection being configured. */ public void viewConfiguration(IThreadContext threadContext, IHTTPOutput out, ConfigParams parameters) - throws ACFException, IOException + throws ManifoldCFException, IOException { } Modified: incubator/lcf/trunk/modules/framework/core/src/main/java/org/apache/manifoldcf/core/database/BaseTable.java URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/core/src/main/java/org/apache/manifoldcf/core/database/BaseTable.java?rev=1004255&r1=1004254&r2=1004255&view=diff ============================================================================== --- incubator/lcf/trunk/modules/framework/core/src/main/java/org/apache/manifoldcf/core/database/BaseTable.java (original) +++ incubator/lcf/trunk/modules/framework/core/src/main/java/org/apache/manifoldcf/core/database/BaseTable.java Mon Oct 4 14:32:19 2010 @@ -60,7 +60,7 @@ public class BaseTable /** Perform a table lock operation. */ protected void performLock() - throws ACFException + throws ManifoldCFException { dbInterface.performLock(tableName); } @@ -71,7 +71,7 @@ public class BaseTable *@param parameterMap is the map of column name/values to write. */ protected void performInsert(Map parameterMap, StringSet invalidateKeys) - throws ACFException + throws ManifoldCFException { dbInterface.performInsert(tableName,parameterMap,invalidateKeys); } @@ -83,7 +83,7 @@ public class BaseTable *@param whereParameters are the parameters that come with the where clause, if any. */ protected void performUpdate(Map parameterMap, String whereClause, ArrayList whereParameters, StringSet invalidateKeys) - throws ACFException + throws ManifoldCFException { dbInterface.performUpdate(tableName,parameterMap,whereClause,whereParameters,invalidateKeys); } @@ -94,7 +94,7 @@ public class BaseTable *@param whereParameters are the parameters that come with the where clause, if any. */ protected void performDelete(String whereClause, ArrayList whereParameters, StringSet invalidateKeys) - throws ACFException + throws ManifoldCFException { dbInterface.performDelete(tableName,whereClause,whereParameters,invalidateKeys); } @@ -106,7 +106,7 @@ public class BaseTable *@param invalidateKeys are the cache keys that should be invalidated, if any. */ protected void performCreate(Map columnMap, StringSet invalidateKeys) - throws ACFException + throws ManifoldCFException { dbInterface.performCreate(tableName,columnMap,invalidateKeys); } @@ -121,7 +121,7 @@ public class BaseTable */ public void performAlter(Map columnMap, Map columnModifyMap, ArrayList columnDeleteList, StringSet invalidateKeys) - throws ACFException + throws ManifoldCFException { dbInterface.performAlter(tableName,columnMap,columnModifyMap,columnDeleteList,invalidateKeys); } @@ -132,7 +132,7 @@ public class BaseTable * in the index, in order. */ protected void addTableIndex(boolean unique, ArrayList columnList) - throws ACFException + throws ManifoldCFException { dbInterface.addTableIndex(tableName,unique,columnList); } @@ -142,7 +142,7 @@ public class BaseTable *@param description is the index description. */ protected void performAddIndex(String indexName, IndexDescription description) - throws ACFException + throws ManifoldCFException { dbInterface.performAddIndex(indexName,tableName,description); } @@ -151,7 +151,7 @@ public class BaseTable *@param indexName is the name of the index to remove. */ public void performRemoveIndex(String indexName) - throws ACFException + throws ManifoldCFException { dbInterface.performRemoveIndex(indexName); } @@ -159,7 +159,7 @@ public class BaseTable /** Analyze this table. */ protected void analyzeTable() - throws ACFException + throws ManifoldCFException { dbInterface.analyzeTable(tableName); } @@ -167,7 +167,7 @@ public class BaseTable /** Reindex this table. */ protected void reindexTable() - throws ACFException + throws ManifoldCFException { dbInterface.reindexTable(tableName); } @@ -176,7 +176,7 @@ public class BaseTable *@param invalidateKeys are the cache keys that should be invalidated, if any. */ protected void performDrop(StringSet invalidateKeys) - throws ACFException + throws ManifoldCFException { dbInterface.performDrop(tableName,invalidateKeys); } @@ -188,7 +188,7 @@ public class BaseTable *@return a map of column names & ColumnDescription's, or null. */ protected Map getTableSchema(StringSet invalidateKeys, String queryClass) - throws ACFException + throws ManifoldCFException { return dbInterface.getTableSchema(tableName,invalidateKeys,queryClass); } @@ -199,7 +199,7 @@ public class BaseTable *@return a map of index names and IndexDescription objects, describing the indexes. */ protected Map getTableIndexes(StringSet invalidateKeys, String queryClass) - throws ACFException + throws ManifoldCFException { return dbInterface.getTableIndexes(tableName,invalidateKeys,queryClass); } @@ -210,7 +210,7 @@ public class BaseTable *@param invalidateKeys are the cache keys to invalidate. */ protected void performModification(String query, ArrayList params, StringSet invalidateKeys) - throws ACFException + throws ManifoldCFException { dbInterface.performModification(query,params,invalidateKeys); } @@ -224,7 +224,7 @@ public class BaseTable *@return a resultset. */ protected IResultSet performQuery(String query, ArrayList params, StringSet cacheKeys, String queryClass) - throws ACFException + throws ManifoldCFException { return dbInterface.performQuery(query,params,cacheKeys,queryClass); } @@ -239,7 +239,7 @@ public class BaseTable *@return a resultset. */ protected IResultSet performQuery(String query, ArrayList params, StringSet cacheKeys, String queryClass, int resultLimit) - throws ACFException + throws ManifoldCFException { return dbInterface.performQuery(query,params,cacheKeys,queryClass,resultLimit,null); } @@ -253,7 +253,7 @@ public class BaseTable * signalRollback() method, and rethrow the exception. Then, after that a finally{} block which calls endTransaction(). */ protected void beginTransaction() - throws ACFException + throws ManifoldCFException { dbInterface.beginTransaction(); } @@ -269,7 +269,7 @@ public class BaseTable * signalRollback() was called within the transaction). */ protected void endTransaction() - throws ACFException + throws ManifoldCFException { dbInterface.endTransaction(); }