Return-Path: Delivered-To: apmail-incubator-connectors-commits-archive@minotaur.apache.org Received: (qmail 55141 invoked from network); 23 Aug 2010 18:10:36 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 23 Aug 2010 18:10:36 -0000 Received: (qmail 83011 invoked by uid 500); 23 Aug 2010 18:10:36 -0000 Delivered-To: apmail-incubator-connectors-commits-archive@incubator.apache.org Received: (qmail 82968 invoked by uid 500); 23 Aug 2010 18:10:36 -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 82961 invoked by uid 99); 23 Aug 2010 18:10:36 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 23 Aug 2010 18:10:36 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED,WEIRD_QUOTING 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, 23 Aug 2010 18:10:33 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 40E092388C43; Mon, 23 Aug 2010 18:08:49 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r988237 [15/24] - in /incubator/lcf/trunk: modules/connectors/activedirectory/connector/org/apache/acf/authorities/authorities/activedirectory/ modules/connectors/documentum/connector/org/apache/acf/crawler/authorities/DCTM/ modules/connect... Date: Mon, 23 Aug 2010 18:08:42 -0000 To: connectors-commits@incubator.apache.org From: kwright@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20100823180902.40E092388C43@eris.apache.org> Modified: incubator/lcf/trunk/modules/framework/crawler-ui/execute.jsp URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/crawler-ui/execute.jsp?rev=988237&r1=988236&r2=988237&view=diff ============================================================================== --- incubator/lcf/trunk/modules/framework/crawler-ui/execute.jsp (original) +++ incubator/lcf/trunk/modules/framework/crawler-ui/execute.jsp Mon Aug 23 18:08:32 2010 @@ -157,7 +157,7 @@ <% } } - catch (LCFException e) + catch (ACFException e) { e.printStackTrace(); variableContext.setParameter("text",e.getMessage()); @@ -173,13 +173,13 @@ { String connectionName = variableContext.getParameter("connname"); if (connectionName == null) - throw new LCFException("Missing connection parameter"); + throw new ACFException("Missing connection parameter"); connManager.delete(connectionName); %> <% } - catch (LCFException e) + catch (ACFException e) { e.printStackTrace(); variableContext.setParameter("text",e.getMessage()); @@ -266,7 +266,7 @@ <% } } - catch (LCFException e) + catch (ACFException e) { e.printStackTrace(); variableContext.setParameter("text",e.getMessage()); @@ -282,13 +282,13 @@ { String connectionName = variableContext.getParameter("connname"); if (connectionName == null) - throw new LCFException("Missing connection parameter"); + throw new ACFException("Missing connection parameter"); authConnManager.delete(connectionName); %> <% } - catch (LCFException e) + catch (ACFException e) { e.printStackTrace(); variableContext.setParameter("text",e.getMessage()); @@ -375,7 +375,7 @@ <% } } - catch (LCFException e) + catch (ACFException e) { e.printStackTrace(); variableContext.setParameter("text",e.getMessage()); @@ -391,13 +391,13 @@ { String connectionName = variableContext.getParameter("connname"); if (connectionName == null) - throw new LCFException("Missing connection parameter"); + throw new ACFException("Missing connection parameter"); outputManager.delete(connectionName); %> <% } - catch (LCFException e) + catch (ACFException e) { e.printStackTrace(); variableContext.setParameter("text",e.getMessage()); @@ -419,13 +419,13 @@ { String connectionName = variableContext.getParameter("connname"); if (connectionName == null) - throw new LCFException("Missing connection parameter"); - org.apache.acf.agents.system.LCF.signalOutputConnectionRedo(threadContext,connectionName); + throw new ACFException("Missing connection parameter"); + org.apache.acf.agents.system.ACF.signalOutputConnectionRedo(threadContext,connectionName); %> <% } - catch (LCFException e) + catch (ACFException e) { e.printStackTrace(); variableContext.setParameter("text",e.getMessage()); @@ -769,7 +769,7 @@ <% } } - catch (LCFException e) + catch (ACFException e) { e.printStackTrace(); variableContext.setParameter("text",e.getMessage()); @@ -785,13 +785,13 @@ { String jobID = variableContext.getParameter("jobid"); if (jobID == null) - throw new LCFException("Missing job parameter"); + throw new ACFException("Missing job parameter"); manager.deleteJob(new Long(jobID)); %> <% } - catch (LCFException e) + catch (ACFException e) { e.printStackTrace(); variableContext.setParameter("text",e.getMessage()); @@ -922,7 +922,7 @@ <% } } - catch (LCFException e) + catch (ACFException e) { e.printStackTrace(); variableContext.setParameter("text",e.getMessage()); Modified: incubator/lcf/trunk/modules/framework/crawler-ui/listauthorities.jsp URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/crawler-ui/listauthorities.jsp?rev=988237&r1=988236&r2=988237&view=diff ============================================================================== --- incubator/lcf/trunk/modules/framework/crawler-ui/listauthorities.jsp (original) +++ incubator/lcf/trunk/modules/framework/crawler-ui/listauthorities.jsp Mon Aug 23 18:08:32 2010 @@ -116,7 +116,7 @@ <% } - catch (LCFException e) + catch (ACFException e) { e.printStackTrace(); variableContext.setParameter("text",e.getMessage()); Modified: incubator/lcf/trunk/modules/framework/crawler-ui/listconnections.jsp URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/crawler-ui/listconnections.jsp?rev=988237&r1=988236&r2=988237&view=diff ============================================================================== --- incubator/lcf/trunk/modules/framework/crawler-ui/listconnections.jsp (original) +++ incubator/lcf/trunk/modules/framework/crawler-ui/listconnections.jsp Mon Aug 23 18:08:32 2010 @@ -117,7 +117,7 @@ <% } - catch (LCFException e) + catch (ACFException e) { e.printStackTrace(); variableContext.setParameter("text",e.getMessage()); Modified: incubator/lcf/trunk/modules/framework/crawler-ui/listjobs.jsp URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/crawler-ui/listjobs.jsp?rev=988237&r1=988236&r2=988237&view=diff ============================================================================== --- incubator/lcf/trunk/modules/framework/crawler-ui/listjobs.jsp (original) +++ incubator/lcf/trunk/modules/framework/crawler-ui/listjobs.jsp Mon Aug 23 18:08:32 2010 @@ -120,7 +120,7 @@ <% } - catch (LCFException e) + catch (ACFException e) { e.printStackTrace(); variableContext.setParameter("text",e.getMessage()); Modified: incubator/lcf/trunk/modules/framework/crawler-ui/listoutputs.jsp URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/crawler-ui/listoutputs.jsp?rev=988237&r1=988236&r2=988237&view=diff ============================================================================== --- incubator/lcf/trunk/modules/framework/crawler-ui/listoutputs.jsp (original) +++ incubator/lcf/trunk/modules/framework/crawler-ui/listoutputs.jsp Mon Aug 23 18:08:32 2010 @@ -118,7 +118,7 @@ <% } - catch (LCFException e) + catch (ACFException e) { e.printStackTrace(); variableContext.setParameter("text",e.getMessage()); Modified: incubator/lcf/trunk/modules/framework/crawler-ui/maxactivityreport.jsp URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/crawler-ui/maxactivityreport.jsp?rev=988237&r1=988236&r2=988237&view=diff ============================================================================== --- incubator/lcf/trunk/modules/framework/crawler-ui/maxactivityreport.jsp (original) +++ incubator/lcf/trunk/modules/framework/crawler-ui/maxactivityreport.jsp Mon Aug 23 18:08:32 2010 @@ -20,7 +20,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -boolean maintenanceUnderway = org.apache.acf.crawler.system.LCF.checkMaintenanceUnderway(); +boolean maintenanceUnderway = org.apache.acf.crawler.system.ACF.checkMaintenanceUnderway(); %> Modified: incubator/lcf/trunk/modules/framework/crawler-ui/maxbandwidthreport.jsp URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/crawler-ui/maxbandwidthreport.jsp?rev=988237&r1=988236&r2=988237&view=diff ============================================================================== --- incubator/lcf/trunk/modules/framework/crawler-ui/maxbandwidthreport.jsp (original) +++ incubator/lcf/trunk/modules/framework/crawler-ui/maxbandwidthreport.jsp Mon Aug 23 18:08:32 2010 @@ -20,7 +20,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -boolean maintenanceUnderway = org.apache.acf.crawler.system.LCF.checkMaintenanceUnderway(); +boolean maintenanceUnderway = org.apache.acf.crawler.system.ACF.checkMaintenanceUnderway(); %> Modified: incubator/lcf/trunk/modules/framework/crawler-ui/queuestatus.jsp URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/crawler-ui/queuestatus.jsp?rev=988237&r1=988236&r2=988237&view=diff ============================================================================== --- incubator/lcf/trunk/modules/framework/crawler-ui/queuestatus.jsp (original) +++ incubator/lcf/trunk/modules/framework/crawler-ui/queuestatus.jsp Mon Aug 23 18:08:32 2010 @@ -20,7 +20,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -boolean maintenanceUnderway = org.apache.acf.crawler.system.LCF.checkMaintenanceUnderway(); +boolean maintenanceUnderway = org.apache.acf.crawler.system.ACF.checkMaintenanceUnderway(); %> Modified: incubator/lcf/trunk/modules/framework/crawler-ui/resultreport.jsp URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/crawler-ui/resultreport.jsp?rev=988237&r1=988236&r2=988237&view=diff ============================================================================== --- incubator/lcf/trunk/modules/framework/crawler-ui/resultreport.jsp (original) +++ incubator/lcf/trunk/modules/framework/crawler-ui/resultreport.jsp Mon Aug 23 18:08:32 2010 @@ -20,7 +20,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -boolean maintenanceUnderway = org.apache.acf.crawler.system.LCF.checkMaintenanceUnderway(); +boolean maintenanceUnderway = org.apache.acf.crawler.system.ACF.checkMaintenanceUnderway(); %> Modified: incubator/lcf/trunk/modules/framework/crawler-ui/showjobstatus.jsp URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/crawler-ui/showjobstatus.jsp?rev=988237&r1=988236&r2=988237&view=diff ============================================================================== --- incubator/lcf/trunk/modules/framework/crawler-ui/showjobstatus.jsp (original) +++ incubator/lcf/trunk/modules/framework/crawler-ui/showjobstatus.jsp Mon Aug 23 18:08:32 2010 @@ -20,7 +20,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -boolean maintenanceUnderway = org.apache.acf.crawler.system.LCF.checkMaintenanceUnderway(); +boolean maintenanceUnderway = org.apache.acf.crawler.system.ACF.checkMaintenanceUnderway(); %> @@ -213,7 +213,7 @@ if (maintenanceUnderway == false) <% } - catch (LCFException e) + catch (ACFException e) { out.println("Error: "+e.getMessage()); e.printStackTrace(); Modified: incubator/lcf/trunk/modules/framework/crawler-ui/simplereport.jsp URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/crawler-ui/simplereport.jsp?rev=988237&r1=988236&r2=988237&view=diff ============================================================================== --- incubator/lcf/trunk/modules/framework/crawler-ui/simplereport.jsp (original) +++ incubator/lcf/trunk/modules/framework/crawler-ui/simplereport.jsp Mon Aug 23 18:08:32 2010 @@ -20,7 +20,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -boolean maintenanceUnderway = org.apache.acf.crawler.system.LCF.checkMaintenanceUnderway(); +boolean maintenanceUnderway = org.apache.acf.crawler.system.ACF.checkMaintenanceUnderway(); %> Modified: incubator/lcf/trunk/modules/framework/crawler-ui/viewauthority.jsp URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/crawler-ui/viewauthority.jsp?rev=988237&r1=988236&r2=988237&view=diff ============================================================================== --- incubator/lcf/trunk/modules/framework/crawler-ui/viewauthority.jsp (original) +++ incubator/lcf/trunk/modules/framework/crawler-ui/viewauthority.jsp Mon Aug 23 18:08:32 2010 @@ -71,7 +71,7 @@ IAuthorityConnection connection = manager.load(connectionName); if (connection == null) { - throw new LCFException("No such authority: '"+connectionName+"'"); + throw new ACFException("No such authority: '"+connectionName+"'"); } else { @@ -110,7 +110,7 @@ } } } - catch (LCFException e) + catch (ACFException e) { connectionStatus = "Threw exception: '"+org.apache.acf.ui.util.Encoder.bodyEscape(e.getMessage())+"'"; } @@ -157,7 +157,7 @@ <% } } - catch (LCFException e) + catch (ACFException e) { e.printStackTrace(); variableContext.setParameter("text",e.getMessage()); Modified: incubator/lcf/trunk/modules/framework/crawler-ui/viewconnection.jsp URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/crawler-ui/viewconnection.jsp?rev=988237&r1=988236&r2=988237&view=diff ============================================================================== --- incubator/lcf/trunk/modules/framework/crawler-ui/viewconnection.jsp (original) +++ incubator/lcf/trunk/modules/framework/crawler-ui/viewconnection.jsp Mon Aug 23 18:08:32 2010 @@ -72,7 +72,7 @@ IRepositoryConnection connection = connManager.load(connectionName); if (connection == null) { - throw new LCFException("No such connection: '"+connectionName+"'"); + throw new ACFException("No such connection: '"+connectionName+"'"); } else { @@ -113,7 +113,7 @@ } } } - catch (LCFException e) + catch (ACFException e) { connectionStatus = "Threw exception: '"+org.apache.acf.ui.util.Encoder.bodyEscape(e.getMessage())+"'"; } @@ -211,7 +211,7 @@ <% } } - catch (LCFException e) + catch (ACFException e) { e.printStackTrace(); variableContext.setParameter("text",e.getMessage()); Modified: incubator/lcf/trunk/modules/framework/crawler-ui/viewjob.jsp URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/crawler-ui/viewjob.jsp?rev=988237&r1=988236&r2=988237&view=diff ============================================================================== --- incubator/lcf/trunk/modules/framework/crawler-ui/viewjob.jsp (original) +++ incubator/lcf/trunk/modules/framework/crawler-ui/viewjob.jsp Mon Aug 23 18:08:32 2010 @@ -74,7 +74,7 @@ IJobDescription job = manager.load(new Long(jobID)); if (job == null) { - throw new LCFException("No such job: "+jobID); + throw new ACFException("No such job: "+jobID); } else { @@ -599,7 +599,7 @@ <% } } - catch (LCFException e) + catch (ACFException e) { e.printStackTrace(); variableContext.setParameter("text",e.getMessage()); Modified: incubator/lcf/trunk/modules/framework/crawler-ui/viewoutput.jsp URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/crawler-ui/viewoutput.jsp?rev=988237&r1=988236&r2=988237&view=diff ============================================================================== --- incubator/lcf/trunk/modules/framework/crawler-ui/viewoutput.jsp (original) +++ incubator/lcf/trunk/modules/framework/crawler-ui/viewoutput.jsp Mon Aug 23 18:08:32 2010 @@ -82,7 +82,7 @@ IOutputConnection connection = connManager.load(connectionName); if (connection == null) { - throw new LCFException("No such connection: '"+connectionName+"'"); + throw new ACFException("No such connection: '"+connectionName+"'"); } else { @@ -119,7 +119,7 @@ } } } - catch (LCFException e) + catch (ACFException e) { connectionStatus = "Threw exception: '"+org.apache.acf.ui.util.Encoder.bodyEscape(e.getMessage())+"'"; } @@ -169,7 +169,7 @@ <% } } - catch (LCFException e) + catch (ACFException e) { e.printStackTrace(); variableContext.setParameter("text",e.getMessage()); Added: incubator/lcf/trunk/modules/framework/jetty-runner/org/apache/acf/jettyrunner/ACFJettyRunner.java URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/jetty-runner/org/apache/acf/jettyrunner/ACFJettyRunner.java?rev=988237&view=auto ============================================================================== --- incubator/lcf/trunk/modules/framework/jetty-runner/org/apache/acf/jettyrunner/ACFJettyRunner.java (added) +++ incubator/lcf/trunk/modules/framework/jetty-runner/org/apache/acf/jettyrunner/ACFJettyRunner.java Mon Aug 23 18:08:32 2010 @@ -0,0 +1,450 @@ +/** + * 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.acf.jettyrunner; + +import java.io.*; +import org.apache.acf.core.interfaces.*; +import org.apache.acf.agents.interfaces.*; +import org.apache.acf.crawler.interfaces.*; +import org.apache.acf.authorities.interfaces.*; +import org.apache.acf.agents.system.*; + +import java.io.IOException; +import java.io.InputStream; +import java.net.URL; + +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.mortbay.jetty.Handler; +import org.mortbay.jetty.Server; +import org.mortbay.jetty.Connector; +import org.mortbay.jetty.webapp.WebAppContext; +import org.mortbay.jetty.servlet.Context; +import org.mortbay.jetty.servlet.FilterHolder; +import org.mortbay.log.Logger; + +/** + * Run ACF with jetty. + * + */ +public class ACFJettyRunner +{ + + public static final String _rcsid = "@(#)$Id: ACFJettyRunner.java 964035 2010-07-14 12:55:26Z kwright $"; + + public static final String agentShutdownSignal = org.apache.acf.agents.AgentRun.agentShutdownSignal; + + // Configuration parameters + public static final String connectorsConfigurationFile = "org.apache.acf.connectorsconfigurationfile"; + + // Connectors configuration file + public static final String NODE_OUTPUTCONNECTOR = "outputconnector"; + public static final String NODE_AUTHORITYCONNECTOR = "authorityconnector"; + public static final String NODE_REPOSITORYCONNECTOR = "repositoryconnector"; + public static final String ATTRIBUTE_NAME = "name"; + public static final String ATTRIBUTE_CLASS = "class"; + + protected Server server; + + public ACFJettyRunner( int port, String crawlerWarPath, String authorityServiceWarPath, String apiWarPath ) + { + server = new Server( port ); + server.setStopAtShutdown( true ); + + // Initialize the servlets + WebAppContext lcfCrawlerUI = new WebAppContext(crawlerWarPath,"/lcf-crawler-ui"); + // This will cause jetty to ignore all of the framework and jdbc jars in the war, which is what we want. + lcfCrawlerUI.setParentLoaderPriority(true); + server.addHandler(lcfCrawlerUI); + WebAppContext lcfAuthorityService = new WebAppContext(authorityServiceWarPath,"/lcf-authority-service"); + // This will cause jetty to ignore all of the framework and jdbc jars in the war, which is what we want. + lcfAuthorityService.setParentLoaderPriority(true); + server.addHandler(lcfAuthorityService); + WebAppContext lcfApi = new WebAppContext(apiWarPath,"/lcf-api"); + lcfApi.setParentLoaderPriority(true); + server.addHandler(lcfApi); + } + + public void start() + throws ACFException + { + if(!server.isRunning() ) + { + try + { + server.start(); + } + catch (Exception e) + { + throw new ACFException("Couldn't start: "+e.getMessage(),e); + } + } + } + + public void stop() + throws ACFException + { + if( server.isRunning() ) + { + try + { + server.stop(); + } + catch (Exception e) + { + throw new ACFException("Couldn't stop: "+e.getMessage(),e); + } + try + { + server.join(); + } + catch (InterruptedException e) + { + throw new ACFException(e.getMessage(),e,ACFException.INTERRUPTED); + } + } + } + + /** + * Returns the Local Port of the first Connector found for the jetty Server. + * @return the port number. + */ + public int getLocalPort() + throws ACFException + { + Connector[] conns = server.getConnectors(); + if (0 == conns.length) { + throw new ACFException("Jetty Server has no Connectors"); + } + return conns[0].getLocalPort(); + } + + /** + * A main class that starts jetty+lcf + */ + public static void main( String[] args ) + { + if (args.length != 4 && args.length != 1 && args.length != 0) + { + System.err.println("Usage: ACFJettyRunner [ [ ]]"); + System.exit(1); + } + + int jettyPort = 8345; + if (args.length > 0) + { + try + { + jettyPort = Integer.parseInt(args[0]); + } + catch (NumberFormatException e) + { + e.printStackTrace(System.err); + System.exit(1); + } + } + + String crawlerWarPath = "war/lcf-crawler-ui.war"; + String authorityserviceWarPath = "war/lcf-authority-service.war"; + String apiWarPath = "war/lcf-api.war"; + if (args.length == 4) + { + crawlerWarPath = args[1]; + authorityserviceWarPath = args[2]; + apiWarPath = args[3]; + } + + // Ready to begin in earnest... + System.setProperty(ACF.lcfConfigFileProperty,"./properties.xml"); + try + { + ACF.initializeEnvironment(); + IThreadContext tc = ThreadContextFactory.make(); + + // Clear the agents shutdown signal. + ILockManager lockManager = LockManagerFactory.make(tc); + lockManager.clearGlobalFlag(agentShutdownSignal); + + // Grab a database handle, so we can use transactions later. + IDBInterface database = DBInterfaceFactory.make(tc, + ACF.getMasterDatabaseName(), + ACF.getMasterDatabaseUsername(), + ACF.getMasterDatabasePassword()); + + // Do the basic initialization of the database and its schema + ACF.createSystemDatabase(tc,"",""); + ACF.installTables(tc); + IAgentManager agentMgr = AgentManagerFactory.make(tc); + agentMgr.registerAgent("org.apache.acf.crawler.system.CrawlerAgent"); + + // Read connectors configuration file (to figure out what we need to register) + Connectors c = null; + File connectorConfigFile = ACF.getFileProperty(connectorsConfigurationFile); + if (connectorConfigFile != null) + { + try + { + // Open the file, read it, and attempt to do the connector registrations + InputStream is = new FileInputStream(connectorConfigFile); + try + { + c = new Connectors(is); + } + finally + { + is.close(); + } + } + catch (FileNotFoundException e) + { + throw new ACFException("Couldn't find connector configuration file: "+e.getMessage(),e); + } + catch (IOException e) + { + throw new ACFException("Error reading connector configuration file: "+e.getMessage(),e); + } + } + + // Unregister all connectors. + + // Output connectors... + { + IOutputConnectorManager mgr = OutputConnectorManagerFactory.make(tc); + IOutputConnectionManager connManager = OutputConnectionManagerFactory.make(tc); + IResultSet classNames = mgr.getConnectors(); + int i = 0; + while (i < classNames.getRowCount()) + { + IResultRow row = classNames.getRow(i++); + String className = (String)row.getValue("classname"); + // Deregistration should be done in a transaction + database.beginTransaction(); + try + { + // Find the connection names that come with this class + String[] connectionNames = connManager.findConnectionsForConnector(className); + // For all connection names, notify all agents of the deregistration + AgentManagerFactory.noteOutputConnectorDeregistration(tc,connectionNames); + // Now that all jobs have been placed into an appropriate state, actually do the deregistration itself. + mgr.unregisterConnector(className); + } + catch (ACFException e) + { + database.signalRollback(); + throw e; + } + catch (Error e) + { + database.signalRollback(); + throw e; + } + finally + { + database.endTransaction(); + } + } + System.err.println("Successfully unregistered all output connectors"); + } + + // Authority connectors... + { + IAuthorityConnectorManager mgr = AuthorityConnectorManagerFactory.make(tc); + IResultSet classNames = mgr.getConnectors(); + int i = 0; + while (i < classNames.getRowCount()) + { + IResultRow row = classNames.getRow(i++); + mgr.unregisterConnector((String)row.getValue("classname")); + } + System.err.println("Successfully unregistered all authority connectors"); + } + + // Repository connectors... + { + IConnectorManager mgr = ConnectorManagerFactory.make(tc); + IJobManager jobManager = JobManagerFactory.make(tc); + IRepositoryConnectionManager connManager = RepositoryConnectionManagerFactory.make(tc); + IResultSet classNames = mgr.getConnectors(); + int i = 0; + while (i < classNames.getRowCount()) + { + IResultRow row = classNames.getRow(i++); + String className = (String)row.getValue("classname"); + // Deregistration should be done in a transaction + database.beginTransaction(); + try + { + // Find the connection names that come with this class + String[] connectionNames = connManager.findConnectionsForConnector(className); + // For each connection name, modify the jobs to note that the connector is no longer installed + jobManager.noteConnectorDeregistration(connectionNames); + // Now that all jobs have been placed into an appropriate state, actually do the deregistration itself. + mgr.unregisterConnector(className); + } + catch (ACFException e) + { + database.signalRollback(); + throw e; + } + catch (Error e) + { + database.signalRollback(); + throw e; + } + finally + { + database.endTransaction(); + } + } + System.err.println("Successfully unregistered all repository connectors"); + } + + if (c != null) + { + + // Other code will go here to discover and register various connectors that exist in the classpath + int i = 0; + while (i < c.getChildCount()) + { + ConfigurationNode cn = c.findChild(i++); + if (cn.getType().equals(NODE_OUTPUTCONNECTOR)) + { + String name = cn.getAttributeValue(ATTRIBUTE_NAME); + String className = cn.getAttributeValue(ATTRIBUTE_CLASS); + IOutputConnectorManager mgr = OutputConnectorManagerFactory.make(tc); + IOutputConnectionManager connManager = OutputConnectionManagerFactory.make(tc); + // Registration should be done in a transaction + database.beginTransaction(); + try + { + // First, register connector + mgr.registerConnector(name,className); + // Then, signal to all jobs that might depend on this connector that they can switch state + // Find the connection names that come with this class + String[] connectionNames = connManager.findConnectionsForConnector(className); + // For all connection names, notify all agents of the registration + AgentManagerFactory.noteOutputConnectorRegistration(tc,connectionNames); + } + catch (ACFException e) + { + database.signalRollback(); + throw e; + } + catch (Error e) + { + database.signalRollback(); + throw e; + } + finally + { + database.endTransaction(); + } + System.err.println("Successfully registered output connector '"+className+"'"); + } + else if (cn.getType().equals(NODE_AUTHORITYCONNECTOR)) + { + String name = cn.getAttributeValue(ATTRIBUTE_NAME); + String className = cn.getAttributeValue(ATTRIBUTE_CLASS); + IAuthorityConnectorManager mgr = AuthorityConnectorManagerFactory.make(tc); + mgr.registerConnector(name,className); + System.err.println("Successfully registered authority connector '"+className+"'"); + } + else if (cn.getType().equals(NODE_REPOSITORYCONNECTOR)) + { + String name = cn.getAttributeValue(ATTRIBUTE_NAME); + String className = cn.getAttributeValue(ATTRIBUTE_CLASS); + IConnectorManager mgr = ConnectorManagerFactory.make(tc); + IJobManager jobManager = JobManagerFactory.make(tc); + IRepositoryConnectionManager connManager = RepositoryConnectionManagerFactory.make(tc); + // Deregistration should be done in a transaction + database.beginTransaction(); + try + { + // First, register connector + mgr.registerConnector(name,className); + // Then, signal to all jobs that might depend on this connector that they can switch state + // Find the connection names that come with this class + String[] connectionNames = connManager.findConnectionsForConnector(className); + // For each connection name, modify the jobs to note that the connector is now installed + jobManager.noteConnectorRegistration(connectionNames); + } + catch (ACFException e) + { + database.signalRollback(); + throw e; + } + catch (Error e) + { + database.signalRollback(); + throw e; + } + finally + { + database.endTransaction(); + } + System.err.println("Successfully registered repository connector '"+className+"'"); + } + else + throw new ACFException("Unrecognized connectors node type '"+cn.getType()+"'"); + } + } + + System.err.println("Starting jetty..."); + + // Create a jetty instance + ACFJettyRunner jetty = new ACFJettyRunner(jettyPort,crawlerWarPath,authorityserviceWarPath,apiWarPath); + // This will register a shutdown hook as well. + jetty.start(); + + System.err.println("Jetty started."); + + System.err.println("Starting crawler..."); + while (true) + { + // Any shutdown signal yet? + if (lockManager.checkGlobalFlag(agentShutdownSignal)) + break; + + // Start whatever agents need to be started + ACF.startAgents(tc); + + try + { + ACF.sleep(5000); + } + catch (InterruptedException e) + { + break; + } + } + System.err.println("Shutting down crawler..."); + } + catch (ACFException e) + { + if (Logging.root != null) + Logging.root.error("Exception: "+e.getMessage(),e); + e.printStackTrace(System.err); + System.exit(1); + } + } + +} + + Modified: incubator/lcf/trunk/modules/framework/jetty-runner/org/apache/acf/jettyrunner/Connectors.java URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/jetty-runner/org/apache/acf/jettyrunner/Connectors.java?rev=988237&r1=988236&r2=988237&view=diff ============================================================================== --- incubator/lcf/trunk/modules/framework/jetty-runner/org/apache/acf/jettyrunner/Connectors.java (original) +++ incubator/lcf/trunk/modules/framework/jetty-runner/org/apache/acf/jettyrunner/Connectors.java Mon Aug 23 18:08:32 2010 @@ -40,7 +40,7 @@ public class Connectors extends Configur *@param xmlStream is the input XML stream. */ public Connectors(InputStream xmlStream) - throws LCFException + throws ACFException { super("connectors"); fromXML(xmlStream); Modified: incubator/lcf/trunk/modules/framework/pull-agent/org/apache/acf/authorities/BaseAuthoritiesInitializationCommand.java URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/pull-agent/org/apache/acf/authorities/BaseAuthoritiesInitializationCommand.java?rev=988237&r1=988236&r2=988237&view=diff ============================================================================== --- incubator/lcf/trunk/modules/framework/pull-agent/org/apache/acf/authorities/BaseAuthoritiesInitializationCommand.java (original) +++ incubator/lcf/trunk/modules/framework/pull-agent/org/apache/acf/authorities/BaseAuthoritiesInitializationCommand.java Mon Aug 23 18:08:32 2010 @@ -2,10 +2,10 @@ package org.apache.acf.authorities; import org.apache.acf.authorities.interfaces.AuthorityConnectorManagerFactory; import org.apache.acf.authorities.interfaces.IAuthorityConnectorManager; -import org.apache.acf.authorities.system.LCF; +import org.apache.acf.authorities.system.ACF; import org.apache.acf.core.InitializationCommand; import org.apache.acf.core.interfaces.IThreadContext; -import org.apache.acf.core.interfaces.LCFException; +import org.apache.acf.core.interfaces.ACFException; import org.apache.acf.core.interfaces.ThreadContextFactory; /** @@ -13,14 +13,14 @@ import org.apache.acf.core.interfaces.Th */ public abstract class BaseAuthoritiesInitializationCommand implements InitializationCommand { - public void execute() throws LCFException + public void execute() throws ACFException { - LCF.initializeEnvironment(); + ACF.initializeEnvironment(); IThreadContext tc = ThreadContextFactory.make(); IAuthorityConnectorManager mgr = AuthorityConnectorManagerFactory.make(tc); doExecute(mgr); } - protected abstract void doExecute(IAuthorityConnectorManager mgr) throws LCFException; + protected abstract void doExecute(IAuthorityConnectorManager mgr) throws ACFException; } Modified: incubator/lcf/trunk/modules/framework/pull-agent/org/apache/acf/authorities/ChangeAuthSpec.java URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/pull-agent/org/apache/acf/authorities/ChangeAuthSpec.java?rev=988237&r1=988236&r2=988237&view=diff ============================================================================== --- incubator/lcf/trunk/modules/framework/pull-agent/org/apache/acf/authorities/ChangeAuthSpec.java (original) +++ incubator/lcf/trunk/modules/framework/pull-agent/org/apache/acf/authorities/ChangeAuthSpec.java Mon Aug 23 18:08:32 2010 @@ -48,7 +48,7 @@ public class ChangeAuthSpec try { - LCF.initializeEnvironment(); + ACF.initializeEnvironment(); IThreadContext tc = ThreadContextFactory.make(); IAuthorityConnectionManager connManager = AuthorityConnectionManagerFactory.make(tc); IAuthorityConnection conn = connManager.load(connectionName); Modified: incubator/lcf/trunk/modules/framework/pull-agent/org/apache/acf/authorities/CheckAll.java URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/pull-agent/org/apache/acf/authorities/CheckAll.java?rev=988237&r1=988236&r2=988237&view=diff ============================================================================== --- incubator/lcf/trunk/modules/framework/pull-agent/org/apache/acf/authorities/CheckAll.java (original) +++ incubator/lcf/trunk/modules/framework/pull-agent/org/apache/acf/authorities/CheckAll.java Mon Aug 23 18:08:32 2010 @@ -44,7 +44,7 @@ public class CheckAll try { - LCF.initializeEnvironment(); + ACF.initializeEnvironment(); IThreadContext tc = ThreadContextFactory.make(); // Now, get a list of the authority connections IAuthorityConnectionManager mgr = AuthorityConnectionManagerFactory.make(tc); @@ -85,7 +85,7 @@ public class CheckAll else connectionStatus = "Connector not installed"; } - catch (LCFException e) + catch (ACFException e) { connectionStatus = "Threw exception: '"+e.getMessage()+"'"; } Modified: incubator/lcf/trunk/modules/framework/pull-agent/org/apache/acf/authorities/CheckConfigured.java URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/pull-agent/org/apache/acf/authorities/CheckConfigured.java?rev=988237&r1=988236&r2=988237&view=diff ============================================================================== --- incubator/lcf/trunk/modules/framework/pull-agent/org/apache/acf/authorities/CheckConfigured.java (original) +++ incubator/lcf/trunk/modules/framework/pull-agent/org/apache/acf/authorities/CheckConfigured.java Mon Aug 23 18:08:32 2010 @@ -44,7 +44,7 @@ public class CheckConfigured try { - LCF.initializeEnvironment(); + ACF.initializeEnvironment(); IThreadContext tc = ThreadContextFactory.make(); // Now, get a list of the authority connections IAuthorityConnectionManager mgr = AuthorityConnectionManagerFactory.make(tc); Modified: incubator/lcf/trunk/modules/framework/pull-agent/org/apache/acf/authorities/DefineAuthorityConnection.java URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/pull-agent/org/apache/acf/authorities/DefineAuthorityConnection.java?rev=988237&r1=988236&r2=988237&view=diff ============================================================================== --- incubator/lcf/trunk/modules/framework/pull-agent/org/apache/acf/authorities/DefineAuthorityConnection.java (original) +++ incubator/lcf/trunk/modules/framework/pull-agent/org/apache/acf/authorities/DefineAuthorityConnection.java Mon Aug 23 18:08:32 2010 @@ -51,7 +51,7 @@ public class DefineAuthorityConnection try { - LCF.initializeEnvironment(); + ACF.initializeEnvironment(); IThreadContext tc = ThreadContextFactory.make(); IAuthorityConnectionManager mgr = AuthorityConnectionManagerFactory.make(tc); IAuthorityConnection conn = mgr.create(); @@ -67,7 +67,7 @@ public class DefineAuthorityConnection // Parse int pos = arg.indexOf("="); if (pos == -1) - throw new LCFException("Argument missing ="); + throw new ACFException("Argument missing ="); String name = arg.substring(0,pos); String value = arg.substring(pos+1); if (name.endsWith("assword")) Modified: incubator/lcf/trunk/modules/framework/pull-agent/org/apache/acf/authorities/DeleteAuthorityConnection.java URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/pull-agent/org/apache/acf/authorities/DeleteAuthorityConnection.java?rev=988237&r1=988236&r2=988237&view=diff ============================================================================== --- incubator/lcf/trunk/modules/framework/pull-agent/org/apache/acf/authorities/DeleteAuthorityConnection.java (original) +++ incubator/lcf/trunk/modules/framework/pull-agent/org/apache/acf/authorities/DeleteAuthorityConnection.java Mon Aug 23 18:08:32 2010 @@ -46,7 +46,7 @@ public class DeleteAuthorityConnection String connectionName = args[0]; try { - LCF.initializeEnvironment(); + ACF.initializeEnvironment(); IThreadContext tc = ThreadContextFactory.make(); IAuthorityConnectionManager mgr = AuthorityConnectionManagerFactory.make(tc); mgr.delete(connectionName); Modified: incubator/lcf/trunk/modules/framework/pull-agent/org/apache/acf/authorities/RegisterAuthority.java URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/pull-agent/org/apache/acf/authorities/RegisterAuthority.java?rev=988237&r1=988236&r2=988237&view=diff ============================================================================== --- incubator/lcf/trunk/modules/framework/pull-agent/org/apache/acf/authorities/RegisterAuthority.java (original) +++ incubator/lcf/trunk/modules/framework/pull-agent/org/apache/acf/authorities/RegisterAuthority.java Mon Aug 23 18:08:32 2010 @@ -35,7 +35,7 @@ public class RegisterAuthority extends B this.description = description; } - protected void doExecute(IAuthorityConnectorManager mgr) throws LCFException + protected void doExecute(IAuthorityConnectorManager mgr) throws ACFException { mgr.registerConnector(description,className); Logging.root.info("Successfully registered connector '"+className+"'"); @@ -58,7 +58,7 @@ public class RegisterAuthority extends B registerAuthority.execute(); System.err.println("Successfully registered connector '"+className+"'"); } - catch (LCFException e) + catch (ACFException e) { e.printStackTrace(); System.exit(1); Modified: incubator/lcf/trunk/modules/framework/pull-agent/org/apache/acf/authorities/SynchronizeAuthorities.java URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/pull-agent/org/apache/acf/authorities/SynchronizeAuthorities.java?rev=988237&r1=988236&r2=988237&view=diff ============================================================================== --- incubator/lcf/trunk/modules/framework/pull-agent/org/apache/acf/authorities/SynchronizeAuthorities.java (original) +++ incubator/lcf/trunk/modules/framework/pull-agent/org/apache/acf/authorities/SynchronizeAuthorities.java Mon Aug 23 18:08:32 2010 @@ -32,7 +32,7 @@ public class SynchronizeAuthorities exte } - protected void doExecute(IAuthorityConnectorManager mgr) throws LCFException + protected void doExecute(IAuthorityConnectorManager mgr) throws ACFException { IResultSet classNames = mgr.getConnectors(); int i = 0; @@ -44,7 +44,7 @@ public class SynchronizeAuthorities exte { AuthorityConnectorFactory.getConnectorNoCheck(classname); } - catch (LCFException e) + catch (ACFException e) { mgr.removeConnector(classname); } @@ -68,7 +68,7 @@ public class SynchronizeAuthorities exte synchronizeAuthorities.execute(); System.err.println("Successfully synchronized all authorities"); } - catch (LCFException e) + catch (ACFException e) { e.printStackTrace(); System.exit(1); Modified: incubator/lcf/trunk/modules/framework/pull-agent/org/apache/acf/authorities/UnRegisterAllAuthorities.java URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/pull-agent/org/apache/acf/authorities/UnRegisterAllAuthorities.java?rev=988237&r1=988236&r2=988237&view=diff ============================================================================== --- incubator/lcf/trunk/modules/framework/pull-agent/org/apache/acf/authorities/UnRegisterAllAuthorities.java (original) +++ incubator/lcf/trunk/modules/framework/pull-agent/org/apache/acf/authorities/UnRegisterAllAuthorities.java Mon Aug 23 18:08:32 2010 @@ -31,7 +31,7 @@ public class UnRegisterAllAuthorities ex { } - protected void doExecute(IAuthorityConnectorManager mgr) throws LCFException + protected void doExecute(IAuthorityConnectorManager mgr) throws ACFException { IResultSet classNames = mgr.getConnectors(); int i = 0; @@ -59,7 +59,7 @@ public class UnRegisterAllAuthorities ex unRegisterAllAuthorities.execute(); System.err.println("Successfully unregistered all connectors"); } - catch (LCFException e) + catch (ACFException e) { e.printStackTrace(); System.exit(1); Modified: incubator/lcf/trunk/modules/framework/pull-agent/org/apache/acf/authorities/UnRegisterAuthority.java URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/pull-agent/org/apache/acf/authorities/UnRegisterAuthority.java?rev=988237&r1=988236&r2=988237&view=diff ============================================================================== --- incubator/lcf/trunk/modules/framework/pull-agent/org/apache/acf/authorities/UnRegisterAuthority.java (original) +++ incubator/lcf/trunk/modules/framework/pull-agent/org/apache/acf/authorities/UnRegisterAuthority.java Mon Aug 23 18:08:32 2010 @@ -34,7 +34,7 @@ public class UnRegisterAuthority extends this.className = className; } - protected void doExecute(IAuthorityConnectorManager mgr) throws LCFException + protected void doExecute(IAuthorityConnectorManager mgr) throws ACFException { mgr.unregisterConnector(className); Logging.root.info("Successfully unregistered connector '"+className+"'"); @@ -56,7 +56,7 @@ public class UnRegisterAuthority extends unRegisterAuthority.execute(); System.err.println("Successfully unregistered connector '"+className+"'"); } - catch (LCFException e) + catch (ACFException e) { e.printStackTrace(); System.exit(1); Modified: incubator/lcf/trunk/modules/framework/pull-agent/org/apache/acf/authorities/authconnmgr/AuthorityConnectorManager.java URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/pull-agent/org/apache/acf/authorities/authconnmgr/AuthorityConnectorManager.java?rev=988237&r1=988236&r2=988237&view=diff ============================================================================== --- incubator/lcf/trunk/modules/framework/pull-agent/org/apache/acf/authorities/authconnmgr/AuthorityConnectorManager.java (original) +++ incubator/lcf/trunk/modules/framework/pull-agent/org/apache/acf/authorities/authconnmgr/AuthorityConnectorManager.java Mon Aug 23 18:08:32 2010 @@ -41,7 +41,7 @@ public class AuthorityConnectorManager e *@param database is the database handle. */ public AuthorityConnectorManager(IThreadContext threadContext, IDBInterface database) - throws LCFException + throws ACFException { super(database,"authconnectors"); this.threadContext = threadContext; @@ -51,7 +51,7 @@ public class AuthorityConnectorManager e /** Install or upgrade. */ public void install() - throws LCFException + throws ACFException { // Always use a loop, in case there's upgrade retries needed. while (true) @@ -100,7 +100,7 @@ public class AuthorityConnectorManager e /** Uninstall. This also unregisters all connectors. */ public void deinstall() - throws LCFException + throws ACFException { StringSet invKeys = new StringSet(getCacheKey()); @@ -119,7 +119,7 @@ public class AuthorityConnectorManager e } performDrop(invKeys); } - catch (LCFException e) + catch (ACFException e) { signalRollback(); throw e; @@ -141,7 +141,7 @@ public class AuthorityConnectorManager e *@param className is the class name. */ public void registerConnector(String description, String className) - throws LCFException + throws ACFException { StringSet invKeys = new StringSet(getCacheKey()); beginTransaction(); @@ -168,7 +168,7 @@ public class AuthorityConnectorManager e // Either way, we must do the install/upgrade itself. AuthorityConnectorFactory.install(threadContext,className); } - catch (LCFException e) + catch (ACFException e) { signalRollback(); throw e; @@ -189,7 +189,7 @@ public class AuthorityConnectorManager e *@param className is the class name of the connector to unregister. */ public void unregisterConnector(String className) - throws LCFException + throws ACFException { StringSet invKeys = new StringSet(getCacheKey()); beginTransaction(); @@ -200,7 +200,7 @@ public class AuthorityConnectorManager e removeConnector(className); } - catch (LCFException e) + catch (ACFException e) { signalRollback(); throw e; @@ -221,7 +221,7 @@ public class AuthorityConnectorManager e *@param className is the connector class to remove. */ public void removeConnector(String className) - throws LCFException + throws ACFException { StringSet invKeys = new StringSet(getCacheKey()); ArrayList list = new ArrayList(); @@ -234,7 +234,7 @@ public class AuthorityConnectorManager e * These will be ordered by description. */ public IResultSet getConnectors() - throws LCFException + throws ACFException { StringSet invKeys = new StringSet(getCacheKey()); @@ -247,7 +247,7 @@ public class AuthorityConnectorManager e *@return the description, or null if the class is not registered. */ public String getDescription(String className) - throws LCFException + throws ACFException { StringSet invKeys = new StringSet(getCacheKey()); @@ -266,7 +266,7 @@ public class AuthorityConnectorManager e *@return true if installed, false otherwise. */ public boolean isInstalled(String className) - throws LCFException + throws ACFException { // 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()); Modified: incubator/lcf/trunk/modules/framework/pull-agent/org/apache/acf/authorities/authorities/BaseAuthorityConnector.java URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/pull-agent/org/apache/acf/authorities/authorities/BaseAuthorityConnector.java?rev=988237&r1=988236&r2=988237&view=diff ============================================================================== --- incubator/lcf/trunk/modules/framework/pull-agent/org/apache/acf/authorities/authorities/BaseAuthorityConnector.java (original) +++ incubator/lcf/trunk/modules/framework/pull-agent/org/apache/acf/authorities/authorities/BaseAuthorityConnector.java Mon Aug 23 18:08:32 2010 @@ -40,7 +40,7 @@ public abstract class BaseAuthorityConne * (Should throws an exception only when a condition cannot be properly described within the authorization response object.) */ public AuthorizationResponse getAuthorizationResponse(String userName) - throws LCFException + throws ACFException { // Implementation for old-style behavior. Override this method for new-style behavior. try @@ -50,7 +50,7 @@ public abstract class BaseAuthorityConne return new AuthorizationResponse(new String[0],AuthorizationResponse.RESPONSE_USERNOTFOUND); return new AuthorizationResponse(accessTokens,AuthorizationResponse.RESPONSE_OK); } - catch (LCFException e) + catch (ACFException e) { // There's an authorization failure of some kind. String[] defaultAccessTokens = getDefaultAccessTokens(userName); @@ -82,7 +82,7 @@ public abstract class BaseAuthorityConne * (Throw an exception if access is denied, usually because the authority is down). */ public String[] getAccessTokens(String userName) - throws LCFException + throws ACFException { return null; } Modified: incubator/lcf/trunk/modules/framework/pull-agent/org/apache/acf/authorities/authority/AuthorityConnectionManager.java URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/pull-agent/org/apache/acf/authorities/authority/AuthorityConnectionManager.java?rev=988237&r1=988236&r2=988237&view=diff ============================================================================== --- incubator/lcf/trunk/modules/framework/pull-agent/org/apache/acf/authorities/authority/AuthorityConnectionManager.java (original) +++ incubator/lcf/trunk/modules/framework/pull-agent/org/apache/acf/authorities/authority/AuthorityConnectionManager.java Mon Aug 23 18:08:32 2010 @@ -22,7 +22,7 @@ import org.apache.acf.core.interfaces.*; import org.apache.acf.authorities.interfaces.*; import java.util.*; import org.apache.acf.authorities.interfaces.CacheKeyFactory; -import org.apache.acf.authorities.system.LCF; +import org.apache.acf.authorities.system.ACF; import org.apache.acf.crawler.interfaces.IRepositoryConnectionManager; import org.apache.acf.crawler.interfaces.RepositoryConnectionManagerFactory; @@ -51,7 +51,7 @@ public class AuthorityConnectionManager *@param threadContext is the thread context. */ public AuthorityConnectionManager(IThreadContext threadContext, IDBInterface database) - throws LCFException + throws ACFException { super(database,"authconnections"); @@ -62,7 +62,7 @@ public class AuthorityConnectionManager /** Install the manager. */ public void install() - throws LCFException + throws ACFException { // Always do a loop, in case upgrade needs it. while (true) @@ -93,51 +93,51 @@ public class AuthorityConnectionManager /** Uninstall the manager. */ public void deinstall() - throws LCFException + throws ACFException { performDrop(null); } /** Export configuration */ public void exportConfiguration(java.io.OutputStream os) - throws java.io.IOException, LCFException + throws java.io.IOException, ACFException { // Write a version indicator - LCF.writeDword(os,1); + ACF.writeDword(os,1); // Get the authority list IAuthorityConnection[] list = getAllConnections(); // Write the number of authorities - LCF.writeDword(os,list.length); + ACF.writeDword(os,list.length); // Loop through the list and write the individual authority info int i = 0; while (i < list.length) { IAuthorityConnection conn = list[i++]; - LCF.writeString(os,conn.getName()); - LCF.writeString(os,conn.getDescription()); - LCF.writeString(os,conn.getClassName()); - LCF.writeString(os,conn.getConfigParams().toXML()); - LCF.writeDword(os,conn.getMaxConnections()); + 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()); } } /** Import configuration */ public void importConfiguration(java.io.InputStream is) - throws java.io.IOException, LCFException + throws java.io.IOException, ACFException { - int version = LCF.readDword(is); + int version = ACF.readDword(is); if (version != 1) throw new java.io.IOException("Unknown authority configuration version: "+Integer.toString(version)); - int count = LCF.readDword(is); + int count = ACF.readDword(is); int i = 0; while (i < count) { IAuthorityConnection conn = create(); - conn.setName(LCF.readString(is)); - conn.setDescription(LCF.readString(is)); - conn.setClassName(LCF.readString(is)); - conn.getConfigParams().fromXML(LCF.readString(is)); - conn.setMaxConnections(LCF.readDword(is)); + 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)); // Attempt to save this connection save(conn); i++; @@ -148,7 +148,7 @@ public class AuthorityConnectionManager *@return an array of connection objects. */ public IAuthorityConnection[] getAllConnections() - throws LCFException + throws ACFException { beginTransaction(); try @@ -169,7 +169,7 @@ public class AuthorityConnectionManager } return loadMultiple(names); } - catch (LCFException e) + catch (ACFException e) { signalRollback(); throw e; @@ -190,7 +190,7 @@ public class AuthorityConnectionManager *@return the loaded connection object, or null if not found. */ public IAuthorityConnection load(String name) - throws LCFException + throws ACFException { return loadMultiple(new String[]{name})[0]; } @@ -200,7 +200,7 @@ public class AuthorityConnectionManager *@return the loaded connection objects. */ public IAuthorityConnection[] loadMultiple(String[] names) - throws LCFException + throws ACFException { // Build description objects AuthorityConnectionDescription[] objectDescriptions = new AuthorityConnectionDescription[names.length]; @@ -223,7 +223,7 @@ public class AuthorityConnectionManager *@return the new object. */ public IAuthorityConnection create() - throws LCFException + throws ACFException { AuthorityConnection rval = new AuthorityConnection(); return rval; @@ -233,7 +233,7 @@ public class AuthorityConnectionManager *@param object is the object to save. */ public void save(IAuthorityConnection object) - throws LCFException + throws ACFException { StringSetBuffer ssb = new StringSetBuffer(); ssb.add(getAuthorityConnectionsKey()); @@ -246,7 +246,7 @@ public class AuthorityConnectionManager try { performLock(); - LCF.noteConfigurationChange(); + ACF.noteConfigurationChange(); // See whether the instance exists ArrayList params = new ArrayList(); params.add(object.getName()); @@ -275,7 +275,7 @@ public class AuthorityConnectionManager cacheManager.invalidateKeys(ch); } - catch (LCFException e) + catch (ACFException e) { signalRollback(); throw e; @@ -301,7 +301,7 @@ public class AuthorityConnectionManager * name does not exist, no error is returned. */ public void delete(String name) - throws LCFException + throws ACFException { // Grab repository connection manager handle, to check on legality of deletion. IRepositoryConnectionManager repoManager = RepositoryConnectionManagerFactory.make(threadContext); @@ -318,14 +318,14 @@ public class AuthorityConnectionManager { // Check if anything refers to this connection name if (repoManager.isReferenced(name)) - throw new LCFException("Can't delete authority connection '"+name+"': existing repository connections refer to it"); - LCF.noteConfigurationChange(); + throw new ACFException("Can't delete authority connection '"+name+"': existing repository connections refer to it"); + ACF.noteConfigurationChange(); ArrayList params = new ArrayList(); params.add(name); performDelete("WHERE "+nameField+"=?",params,null); cacheManager.invalidateKeys(ch); } - catch (LCFException e) + catch (ACFException e) { signalRollback(); throw e; @@ -382,7 +382,7 @@ public class AuthorityConnectionManager *@return the corresponding repository connection objects. */ protected AuthorityConnection[] getAuthorityConnectionsMultiple(String[] connectionNames) - throws LCFException + throws ACFException { AuthorityConnection[] rval = new AuthorityConnection[connectionNames.length]; HashMap returnIndex = new HashMap(); @@ -426,7 +426,7 @@ public class AuthorityConnectionManager signalRollback(); throw e; } - catch (LCFException e) + catch (ACFException e) { signalRollback(); throw e; @@ -444,7 +444,7 @@ public class AuthorityConnectionManager *@param params is the set of parameters. */ protected void getAuthorityConnectionsChunk(AuthorityConnection[] rval, Map returnIndex, String idList, ArrayList params) - throws LCFException + throws ACFException { IResultSet set; set = performQuery("SELECT * FROM "+getTableName()+" WHERE "+ @@ -565,7 +565,7 @@ public class AuthorityConnectionManager * @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 LCFException + public Object[] create(ICacheDescription[] objectDescriptions) throws ACFException { // Turn the object descriptions into the parameters for the ToolInstance requests String[] connectionNames = new String[objectDescriptions.length]; @@ -588,7 +588,7 @@ public class AuthorityConnectionManager * @param objectDescription is the unique identifier of the object. * @param cachedObject is the cached object. */ - public void exists(ICacheDescription objectDescription, Object cachedObject) throws LCFException + public void exists(ICacheDescription objectDescription, Object cachedObject) throws ACFException { // Cast what came in as what it really is AuthorityConnectionDescription objectDesc = (AuthorityConnectionDescription)objectDescription; @@ -606,7 +606,7 @@ public class AuthorityConnectionManager /** Perform the desired operation. This method is called after either createGetObject() * or exists() is called for every requested object. */ - public void execute() throws LCFException + public void execute() throws ACFException { // Does nothing; we only want to fetch objects in this cacher. } Modified: incubator/lcf/trunk/modules/framework/pull-agent/org/apache/acf/authorities/interfaces/AuthorityConnectionManagerFactory.java URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/pull-agent/org/apache/acf/authorities/interfaces/AuthorityConnectionManagerFactory.java?rev=988237&r1=988236&r2=988237&view=diff ============================================================================== --- incubator/lcf/trunk/modules/framework/pull-agent/org/apache/acf/authorities/interfaces/AuthorityConnectionManagerFactory.java (original) +++ incubator/lcf/trunk/modules/framework/pull-agent/org/apache/acf/authorities/interfaces/AuthorityConnectionManagerFactory.java Mon Aug 23 18:08:32 2010 @@ -20,7 +20,7 @@ package org.apache.acf.authorities.inter import org.apache.acf.core.interfaces.*; import java.util.*; -import org.apache.acf.authorities.system.LCF; +import org.apache.acf.authorities.system.ACF; /** This is the factory class for authority connection manager objects. */ @@ -38,15 +38,15 @@ public class AuthorityConnectionManagerF *@return the handle. */ public static IAuthorityConnectionManager make(IThreadContext tc) - throws LCFException + throws ACFException { Object o = tc.get(objectName); if (o == null || !(o instanceof IAuthorityConnectionManager)) { IDBInterface database = DBInterfaceFactory.make(tc, - LCF.getMasterDatabaseName(), - LCF.getMasterDatabaseUsername(), - LCF.getMasterDatabasePassword()); + ACF.getMasterDatabaseName(), + ACF.getMasterDatabaseUsername(), + ACF.getMasterDatabasePassword()); o = new org.apache.acf.authorities.authority.AuthorityConnectionManager(tc,database); tc.save(objectName,o); Modified: incubator/lcf/trunk/modules/framework/pull-agent/org/apache/acf/authorities/interfaces/AuthorityConnectorFactory.java URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/pull-agent/org/apache/acf/authorities/interfaces/AuthorityConnectorFactory.java?rev=988237&r1=988236&r2=988237&view=diff ============================================================================== --- incubator/lcf/trunk/modules/framework/pull-agent/org/apache/acf/authorities/interfaces/AuthorityConnectorFactory.java (original) +++ incubator/lcf/trunk/modules/framework/pull-agent/org/apache/acf/authorities/interfaces/AuthorityConnectorFactory.java Mon Aug 23 18:08:32 2010 @@ -19,7 +19,7 @@ package org.apache.acf.authorities.interfaces; import org.apache.acf.core.interfaces.*; -import org.apache.acf.core.system.LCF; +import org.apache.acf.core.system.ACF; import java.util.*; import java.io.*; import java.lang.reflect.*; @@ -40,7 +40,7 @@ public class AuthorityConnectorFactory *@param className is the class name. */ public static void install(IThreadContext threadContext, String className) - throws LCFException + throws ACFException { IAuthorityConnector connector = getConnectorNoCheck(className); connector.install(threadContext); @@ -50,7 +50,7 @@ public class AuthorityConnectorFactory *@param className is the class name. */ public static void deinstall(IThreadContext threadContext, String className) - throws LCFException + throws ACFException { IAuthorityConnector connector = getConnectorNoCheck(className); connector.deinstall(threadContext); @@ -59,7 +59,7 @@ public class AuthorityConnectorFactory /** Get the default response from a connector. Called if the connection attempt fails. */ public static AuthorizationResponse getDefaultAuthorizationResponse(IThreadContext threadContext, String className, String userName) - throws LCFException + throws ACFException { IAuthorityConnector connector = getConnector(threadContext,className); if (connector == null) @@ -70,7 +70,7 @@ public class AuthorityConnectorFactory /** Output the configuration header section. */ public static void outputConfigurationHeader(IThreadContext threadContext, String className, IHTTPOutput out, ConfigParams parameters, ArrayList tabsArray) - throws LCFException, IOException + throws ACFException, IOException { IAuthorityConnector connector = getConnector(threadContext, className); if (connector == null) @@ -81,7 +81,7 @@ public class AuthorityConnectorFactory /** Output the configuration body section. */ public static void outputConfigurationBody(IThreadContext threadContext, String className, IHTTPOutput out, ConfigParams parameters, String tabName) - throws LCFException, IOException + throws ACFException, IOException { IAuthorityConnector connector = getConnector(threadContext, className); if (connector == null) @@ -92,7 +92,7 @@ public class AuthorityConnectorFactory /** Process configuration post data for a connector. */ public static String processConfigurationPost(IThreadContext threadContext, String className, IPostParameters variableContext, ConfigParams configParams) - throws LCFException + throws ACFException { IAuthorityConnector connector = getConnector(threadContext, className); if (connector == null) @@ -103,7 +103,7 @@ public class AuthorityConnectorFactory /** View connector configuration. */ public static void viewConfiguration(IThreadContext threadContext, String className, IHTTPOutput out, ConfigParams configParams) - throws LCFException, IOException + throws ACFException, IOException { IAuthorityConnector connector = getConnector(threadContext, className); // We want to be able to view connections even if they have unregistered connectors. @@ -117,18 +117,18 @@ public class AuthorityConnectorFactory *@return the instance. */ public static IAuthorityConnector getConnectorNoCheck(String className) - throws LCFException + throws ACFException { try { - Class theClass = LCF.findClass(className); + Class theClass = ACF.findClass(className); Class[] argumentClasses = new Class[0]; // Look for a constructor Constructor c = theClass.getConstructor(argumentClasses); Object[] arguments = new Object[0]; Object o = c.newInstance(arguments); if (!(o instanceof IAuthorityConnector)) - throw new LCFException("Class '"+className+"' does not implement IAuthorityConnector."); + throw new ACFException("Class '"+className+"' does not implement IAuthorityConnector."); return (IAuthorityConnector)o; } catch (InvocationTargetException e) @@ -137,41 +137,41 @@ public class AuthorityConnectorFactory if (z instanceof Error) throw (Error)z; else - throw (LCFException)z; + throw (ACFException)z; } catch (ClassNotFoundException e) { - throw new LCFException("No authority connector class '"+className+"' was found.", + throw new ACFException("No authority connector class '"+className+"' was found.", e); } catch (NoSuchMethodException e) { - throw new LCFException("No appropriate constructor for IAuthorityConnector implementation '"+ + throw new ACFException("No appropriate constructor for IAuthorityConnector implementation '"+ className+"'. Need xxx().", e); } catch (SecurityException e) { - throw new LCFException("Protected constructor for IAuthorityConnector implementation '"+className+"'", + throw new ACFException("Protected constructor for IAuthorityConnector implementation '"+className+"'", e); } catch (IllegalAccessException e) { - throw new LCFException("Unavailable constructor for IAuthorityConnector implementation '"+className+"'", + throw new ACFException("Unavailable constructor for IAuthorityConnector implementation '"+className+"'", e); } catch (IllegalArgumentException e) { - throw new LCFException("Shouldn't happen!!!",e); + throw new ACFException("Shouldn't happen!!!",e); } catch (InstantiationException e) { - throw new LCFException("InstantiationException for IAuthorityConnector implementation '"+className+"'", + throw new ACFException("InstantiationException for IAuthorityConnector implementation '"+className+"'", e); } catch (ExceptionInInitializerError e) { - throw new LCFException("ExceptionInInitializerError for IAuthorityConnector implementation '"+className+"'", + throw new ACFException("ExceptionInInitializerError for IAuthorityConnector implementation '"+className+"'", e); } @@ -182,7 +182,7 @@ public class AuthorityConnectorFactory *@return the instance. */ protected static IAuthorityConnector getConnector(IThreadContext threadContext, String className) - throws LCFException + throws ACFException { IAuthorityConnectorManager connMgr = AuthorityConnectorManagerFactory.make(threadContext); if (connMgr.isInstalled(className) == false) @@ -190,14 +190,14 @@ public class AuthorityConnectorFactory try { - Class theClass = LCF.findClass(className); + Class theClass = ACF.findClass(className); Class[] argumentClasses = new Class[0]; // Look for a constructor Constructor c = theClass.getConstructor(argumentClasses); Object[] arguments = new Object[0]; Object o = c.newInstance(arguments); if (!(o instanceof IAuthorityConnector)) - throw new LCFException("Class '"+className+"' does not implement IAuthorityConnector."); + throw new ACFException("Class '"+className+"' does not implement IAuthorityConnector."); return (IAuthorityConnector)o; } catch (InvocationTargetException e) @@ -206,7 +206,7 @@ public class AuthorityConnectorFactory if (z instanceof Error) throw (Error)z; else - throw (LCFException)z; + throw (ACFException)z; } catch (ClassNotFoundException e) { @@ -214,37 +214,37 @@ public class AuthorityConnectorFactory if (connMgr.isInstalled(className) == false) return null; - throw new LCFException("No authority connector class '"+className+"' was found.", + throw new ACFException("No authority connector class '"+className+"' was found.", e); } catch (NoSuchMethodException e) { - throw new LCFException("No appropriate constructor for IAuthorityConnector implementation '"+ + throw new ACFException("No appropriate constructor for IAuthorityConnector implementation '"+ className+"'. Need xxx().", e); } catch (SecurityException e) { - throw new LCFException("Protected constructor for IAuthorityConnector implementation '"+className+"'", + throw new ACFException("Protected constructor for IAuthorityConnector implementation '"+className+"'", e); } catch (IllegalAccessException e) { - throw new LCFException("Unavailable constructor for IAuthorityConnector implementation '"+className+"'", + throw new ACFException("Unavailable constructor for IAuthorityConnector implementation '"+className+"'", e); } catch (IllegalArgumentException e) { - throw new LCFException("Shouldn't happen!!!",e); + throw new ACFException("Shouldn't happen!!!",e); } catch (InstantiationException e) { - throw new LCFException("InstantiationException for IAuthorityConnector implementation '"+className+"'", + throw new ACFException("InstantiationException for IAuthorityConnector implementation '"+className+"'", e); } catch (ExceptionInInitializerError e) { - throw new LCFException("ExceptionInInitializerError for IAuthorityConnector implementation '"+className+"'", + throw new ACFException("ExceptionInInitializerError for IAuthorityConnector implementation '"+className+"'", e); } @@ -259,7 +259,7 @@ public class AuthorityConnectorFactory */ public static IAuthorityConnector grab(IThreadContext threadContext, String className, ConfigParams configInfo, int maxPoolSize) - throws LCFException + throws ACFException { // System.out.println("In AuthorityConnectorManager.grab()"); @@ -290,7 +290,7 @@ public class AuthorityConnectorFactory *@param connector is the connector to release. */ public static void release(IAuthorityConnector connector) - throws LCFException + throws ACFException { if (connector == null) return; @@ -312,7 +312,7 @@ public class AuthorityConnectorFactory * This method polls all inactive handles. */ public static void pollAllConnectors(IThreadContext threadContext) - throws LCFException + throws ACFException { // Go through the whole pool and notify everyone synchronized (poolHash) @@ -333,7 +333,7 @@ public class AuthorityConnectorFactory *@param threadContext is the local thread context. */ public static void closeAllConnectors(IThreadContext threadContext) - throws LCFException + throws ACFException { // Go through the whole pool and clean it out synchronized (poolHash) @@ -425,7 +425,7 @@ public class AuthorityConnectorFactory *@return the connector. */ public synchronized IAuthorityConnector getConnector(IThreadContext threadContext) - throws LCFException + throws ACFException { while (numFree == 0) { @@ -435,7 +435,7 @@ public class AuthorityConnectorFactory } catch (InterruptedException e) { - throw new LCFException("Interrupted",e,LCFException.INTERRUPTED); + throw new ACFException("Interrupted",e,ACFException.INTERRUPTED); } } @@ -451,14 +451,14 @@ public class AuthorityConnectorFactory try { - Class theClass = LCF.findClass(className); + Class theClass = ACF.findClass(className); Class[] argumentClasses = new Class[0]; // Look for a constructor Constructor c = theClass.getConstructor(argumentClasses); Object[] arguments = new Object[0]; Object o = c.newInstance(arguments); if (!(o instanceof IAuthorityConnector)) - throw new LCFException("Class '"+className+"' does not implement IAuthorityConnector."); + throw new ACFException("Class '"+className+"' does not implement IAuthorityConnector."); // System.out.println("Authority connector instantiated"); rc = (IAuthorityConnector)o; rc.connect(configParams); @@ -470,7 +470,7 @@ public class AuthorityConnectorFactory if (z instanceof Error) throw (Error)z; else - throw (LCFException)z; + throw (ACFException)z; } catch (ClassNotFoundException e) { @@ -478,37 +478,37 @@ public class AuthorityConnectorFactory if (connMgr.isInstalled(className) == false) return null; - throw new LCFException("No authority connector class '"+className+"' was found.", + throw new ACFException("No authority connector class '"+className+"' was found.", e); } catch (NoSuchMethodException e) { - throw new LCFException("No appropriate constructor for IAuthorityConnector implementation '"+ + throw new ACFException("No appropriate constructor for IAuthorityConnector implementation '"+ className+"'. Need xxx(ConfigParams).", e); } catch (SecurityException e) { - throw new LCFException("Protected constructor for IAuthorityConnector implementation '"+className+"'", + throw new ACFException("Protected constructor for IAuthorityConnector implementation '"+className+"'", e); } catch (IllegalAccessException e) { - throw new LCFException("Unavailable constructor for IAuthorityConnector implementation '"+className+"'", + throw new ACFException("Unavailable constructor for IAuthorityConnector implementation '"+className+"'", e); } catch (IllegalArgumentException e) { - throw new LCFException("Shouldn't happen!!!",e); + throw new ACFException("Shouldn't happen!!!",e); } catch (InstantiationException e) { - throw new LCFException("InstantiationException for IAuthorityConnector implementation '"+className+"'", + throw new ACFException("InstantiationException for IAuthorityConnector implementation '"+className+"'", e); } catch (ExceptionInInitializerError e) { - throw new LCFException("ExceptionInInitializerError for IAuthorityConnector implementation '"+className+"'", + throw new ACFException("ExceptionInInitializerError for IAuthorityConnector implementation '"+className+"'", e); } } @@ -528,7 +528,7 @@ public class AuthorityConnectorFactory *@param connector is the connector. */ public synchronized void releaseConnector(IAuthorityConnector connector) - throws LCFException + throws ACFException { if (connector == null) return; @@ -544,7 +544,7 @@ public class AuthorityConnectorFactory /** Notify all free connectors. */ public synchronized void pollAll(IThreadContext threadContext) - throws LCFException + throws ACFException { int i = 0; while (i < stack.size()) @@ -560,7 +560,7 @@ public class AuthorityConnectorFactory /** Release all free connectors. */ public synchronized void releaseAll(IThreadContext threadContext) - throws LCFException + throws ACFException { while (stack.size() > 0) { Modified: incubator/lcf/trunk/modules/framework/pull-agent/org/apache/acf/authorities/interfaces/AuthorityConnectorManagerFactory.java URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/pull-agent/org/apache/acf/authorities/interfaces/AuthorityConnectorManagerFactory.java?rev=988237&r1=988236&r2=988237&view=diff ============================================================================== --- incubator/lcf/trunk/modules/framework/pull-agent/org/apache/acf/authorities/interfaces/AuthorityConnectorManagerFactory.java (original) +++ incubator/lcf/trunk/modules/framework/pull-agent/org/apache/acf/authorities/interfaces/AuthorityConnectorManagerFactory.java Mon Aug 23 18:08:32 2010 @@ -20,7 +20,7 @@ package org.apache.acf.authorities.inter import org.apache.acf.core.interfaces.*; import java.util.*; -import org.apache.acf.authorities.system.LCF; +import org.apache.acf.authorities.system.ACF; /** This class is the factory for the Authority Connector Manager. */ @@ -37,16 +37,16 @@ public class AuthorityConnectorManagerFa *@return the connector manager handle. */ public static IAuthorityConnectorManager make(IThreadContext tc) - throws LCFException + throws ACFException { Object o = tc.get(connMgr); if (o == null || !(o instanceof IAuthorityConnectorManager)) { IDBInterface database = DBInterfaceFactory.make(tc, - LCF.getMasterDatabaseName(), - LCF.getMasterDatabaseUsername(), - LCF.getMasterDatabasePassword()); + ACF.getMasterDatabaseName(), + ACF.getMasterDatabaseUsername(), + ACF.getMasterDatabasePassword()); o = new org.apache.acf.authorities.authconnmgr.AuthorityConnectorManager(tc,database); tc.save(connMgr,o); Modified: incubator/lcf/trunk/modules/framework/pull-agent/org/apache/acf/authorities/interfaces/IAuthorityConnectionManager.java URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/pull-agent/org/apache/acf/authorities/interfaces/IAuthorityConnectionManager.java?rev=988237&r1=988236&r2=988237&view=diff ============================================================================== --- incubator/lcf/trunk/modules/framework/pull-agent/org/apache/acf/authorities/interfaces/IAuthorityConnectionManager.java (original) +++ incubator/lcf/trunk/modules/framework/pull-agent/org/apache/acf/authorities/interfaces/IAuthorityConnectionManager.java Mon Aug 23 18:08:32 2010 @@ -30,52 +30,52 @@ public interface IAuthorityConnectionMan /** Install the manager. */ public void install() - throws LCFException; + throws ACFException; /** Uninstall the manager. */ public void deinstall() - throws LCFException; + throws ACFException; /** Export configuration */ public void exportConfiguration(java.io.OutputStream os) - throws java.io.IOException, LCFException; + throws java.io.IOException, ACFException; /** Import configuration */ public void importConfiguration(java.io.InputStream is) - throws java.io.IOException, LCFException; + throws java.io.IOException, ACFException; /** Obtain a list of the authority connections, ordered by name. *@return an array of connection objects. */ public IAuthorityConnection[] getAllConnections() - throws LCFException; + throws ACFException; /** Load a authority connection by name. *@param name is the name of the authority connection. *@return the loaded connection object, or null if not found. */ public IAuthorityConnection load(String name) - throws LCFException; + throws ACFException; /** Create a new authority connection object. *@return the new object. */ public IAuthorityConnection create() - throws LCFException; + throws ACFException; /** Save an authority connection object. *@param object is the object to save. */ public void save(IAuthorityConnection object) - throws LCFException; + throws ACFException; /** Delete an authority connection. *@param name is the name of the connection to delete. If the * name does not exist, no error is returned. */ public void delete(String name) - throws LCFException; + throws ACFException; // Schema related Modified: incubator/lcf/trunk/modules/framework/pull-agent/org/apache/acf/authorities/interfaces/IAuthorityConnector.java URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/pull-agent/org/apache/acf/authorities/interfaces/IAuthorityConnector.java?rev=988237&r1=988236&r2=988237&view=diff ============================================================================== --- incubator/lcf/trunk/modules/framework/pull-agent/org/apache/acf/authorities/interfaces/IAuthorityConnector.java (original) +++ incubator/lcf/trunk/modules/framework/pull-agent/org/apache/acf/authorities/interfaces/IAuthorityConnector.java Mon Aug 23 18:08:32 2010 @@ -38,7 +38,7 @@ public interface IAuthorityConnector ext * (Should throws an exception only when a condition cannot be properly described within the authorization response object.) */ public AuthorizationResponse getAuthorizationResponse(String userName) - throws LCFException; + throws ACFException; /** Obtain the default access tokens for a given user name. *@param userName is the user name or identifier. Modified: incubator/lcf/trunk/modules/framework/pull-agent/org/apache/acf/authorities/interfaces/IAuthorityConnectorManager.java URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/pull-agent/org/apache/acf/authorities/interfaces/IAuthorityConnectorManager.java?rev=988237&r1=988236&r2=988237&view=diff ============================================================================== --- incubator/lcf/trunk/modules/framework/pull-agent/org/apache/acf/authorities/interfaces/IAuthorityConnectorManager.java (original) +++ incubator/lcf/trunk/modules/framework/pull-agent/org/apache/acf/authorities/interfaces/IAuthorityConnectorManager.java Mon Aug 23 18:08:32 2010 @@ -28,12 +28,12 @@ public interface IAuthorityConnectorMana /** Install. */ public void install() - throws LCFException; + throws ACFException; /** Uninstall. This also unregisters all connectors. */ public void deinstall() - throws LCFException; + throws ACFException; /** Register a new connector. * The connector's install method will also be called. @@ -41,41 +41,41 @@ public interface IAuthorityConnectorMana *@param className is the class name. */ public void registerConnector(String description, String className) - throws LCFException; + throws ACFException; /** Unregister a connector. * The connector's deinstall method will also be called. *@param className is the connector class to unregister. */ public void unregisterConnector(String className) - throws LCFException; + throws ACFException; /** Remove a connector. * Call this when the connector cannot be instantiated. *@param className is the connector class to remove. */ public void removeConnector(String className) - throws LCFException; + throws ACFException; /** Get ordered list of connectors. *@return a resultset with the columns "description" and "classname". * These will be ordered by description. */ public IResultSet getConnectors() - throws LCFException; + throws ACFException; /** Get a description given a class name. *@param className is the class name. *@return the description, or null if the class is not registered. */ public String getDescription(String className) - throws LCFException; + throws ACFException; /** Check if a particular connector is installed or not. *@param className is the class name of the connector. *@return true if installed, false otherwise. */ public boolean isInstalled(String className) - throws LCFException; + throws ACFException; }