You can subscribe to this list here.
2003 |
Jan
|
Feb
(14) |
Mar
(107) |
Apr
(211) |
May
(93) |
Jun
(158) |
Jul
(159) |
Aug
(368) |
Sep
(188) |
Oct
(151) |
Nov
(115) |
Dec
(98) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(25) |
Feb
|
Mar
(33) |
Apr
(28) |
May
(116) |
Jun
(2) |
Jul
(117) |
Aug
(19) |
Sep
(9) |
Oct
(2) |
Nov
|
Dec
(4) |
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
(9) |
Dec
|
2006 |
Jan
|
Feb
|
Mar
(22) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2007 |
Jan
|
Feb
|
Mar
(6) |
Apr
|
May
|
Jun
|
Jul
|
Aug
(267) |
Sep
|
Oct
|
Nov
(6) |
Dec
(512) |
2008 |
Jan
(187) |
Feb
|
Mar
|
Apr
|
May
|
Jun
(3) |
Jul
(6) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
|
2012 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: bruce m. <tr...@us...> - 2004-07-24 00:19:02
|
Update of /cvsroot/babeldoc/babeldoc/modules/sql/src/com/babeldoc/sql/config In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26389/modules/sql/src/com/babeldoc/sql/config Modified Files: SqlConfigService.java Log Message: Logging cleanups... 1. Created log instance variable instead of calling LogService.getInstance(). 2. All logs to debug check if debug level is set. Index: SqlConfigService.java =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/modules/sql/src/com/babeldoc/sql/config/SqlConfigService.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** SqlConfigService.java 3 Apr 2004 15:23:35 -0000 1.8 --- SqlConfigService.java 24 Jul 2004 00:18:53 -0000 1.9 *************** *** 179,183 **** } catch (Exception e) { log.logWarn(I18n.get("000051", e)); ! log.logDebug(e); } } --- 179,184 ---- } catch (Exception e) { log.logWarn(I18n.get("000051", e)); ! if(log.isDebugEnabled()) ! log.logDebug(e); } } *************** *** 201,205 **** // If using the driver directly try { ! log.logDebug( "Connection parms: url = " + dbUrl --- 202,207 ---- // If using the driver directly try { ! if(log.isDebugEnabled()) ! log.logDebug( "Connection parms: url = " + dbUrl *************** *** 216,220 **** } else if ((dbName != null) && (dbPasswd != null) && (dsName != null)) { // If using a data source object in a managed environment ! log.logDebug( "Connection parms: data source name = " + dsName --- 218,223 ---- } else if ((dbName != null) && (dbPasswd != null) && (dsName != null)) { // If using a data source object in a managed environment ! if(log.isDebugEnabled()) ! log.logDebug( "Connection parms: data source name = " + dsName *************** *** 222,226 **** + dbName); if (cacheConnection && (cachedConnection != null)) { ! log.logDebug("Connection cache hit"); con = cachedConnection; } else { --- 225,230 ---- + dbName); if (cacheConnection && (cachedConnection != null)) { ! if(log.isDebugEnabled()) ! log.logDebug("Connection cache hit"); con = cachedConnection; } else { *************** *** 240,244 **** } else { // Couldn't figure out what to use ! log.logDebug( "Connection parms: url = " + dbUrl --- 244,249 ---- } else { // Couldn't figure out what to use ! if(log.isDebugEnabled()) ! log.logDebug( "Connection parms: url = " + dbUrl *************** *** 327,335 **** String ckey = key.substring(nameLen); config.setString(ckey, value); ! log.logDebug(name + "+" + ckey + " = " + value); } } catch (Exception e) { log.logWarn(I18n.get("000051", e)); ! log.logDebug(e); } finally { try { --- 332,341 ---- String ckey = key.substring(nameLen); config.setString(ckey, value); ! if(log.isDebugEnabled()) log.logDebug(name + "+" + ckey + " = " + value); } } catch (Exception e) { log.logWarn(I18n.get("000051", e)); ! if(log.isDebugEnabled()) ! log.logDebug(e); } finally { try { *************** *** 354,358 **** ; } ! log.logDebug("Config requested: " + config); return config; } --- 360,365 ---- ; } ! if(log.isDebugEnabled()) ! log.logDebug("Config requested: " + config); return config; } *************** *** 407,411 **** } catch (Exception e) { log.logWarn(I18n.get("000051", e)); ! log.logDebug(e); } finally { try { --- 414,419 ---- } catch (Exception e) { log.logWarn(I18n.get("000051", e)); ! if(log.isDebugEnabled()) ! log.logDebug(e); } finally { try { |
From: bruce m. <tr...@us...> - 2004-07-24 00:19:02
|
Update of /cvsroot/babeldoc/babeldoc/modules/soap/src/com/babeldoc/soap/pipeline/servlet In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26389/modules/soap/src/com/babeldoc/soap/pipeline/servlet Modified Files: SoapPipelineFeeder.java Log Message: Logging cleanups... 1. Created log instance variable instead of calling LogService.getInstance(). 2. All logs to debug check if debug level is set. Index: SoapPipelineFeeder.java =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/modules/soap/src/com/babeldoc/soap/pipeline/servlet/SoapPipelineFeeder.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** SoapPipelineFeeder.java 17 Sep 2003 22:13:21 -0000 1.8 --- SoapPipelineFeeder.java 24 Jul 2004 00:18:53 -0000 1.9 *************** *** 69,72 **** --- 69,74 ---- import com.babeldoc.core.journal.JournalException; import com.babeldoc.core.journal.JournalFactory; + import com.babeldoc.core.pipeline.PipelineDocument; + import com.babeldoc.core.pipeline.PipelineException; import com.babeldoc.core.LogService; import com.babeldoc.core.I18n; *************** *** 101,104 **** --- 103,109 ---- MessageFactory msgFactory; + /** logging object */ + private LogService log = LogService.getInstance(SoapPipelineFeeder.class.getName()); + /** * doGet - this is illegal - must only accept posts. *************** *** 112,117 **** public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { ! com.babeldoc.core.LogService.getInstance().logWarn(com.babeldoc.core.I18n.get( ! "017004")); response.setStatus(HttpServletResponse.SC_BAD_REQUEST); } --- 117,121 ---- public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { ! log.logWarn(com.babeldoc.core.I18n.get("017004")); response.setStatus(HttpServletResponse.SC_BAD_REQUEST); } *************** *** 130,135 **** //debugHeader(request); String pipeline = getPipeline(request); ! LogService.getInstance().logDebug(com.babeldoc.core.I18n.get( ! "017006", pipeline)); if (pipeline != null) { --- 134,139 ---- //debugHeader(request); String pipeline = getPipeline(request); ! if(log.isDebugEnabled()) ! log.logDebug(I18n.get("017006", pipeline)); if (pipeline != null) { *************** *** 169,182 **** // } } catch (Exception e) { ! LogService.getInstance().logError(e); throw new ServletException("JAXM POST failed " + e.getMessage(), e); } } else { // TODO send SOAPFault ! LogService.getInstance().logError(I18n.get("017001"), null); } } else { // TODO send SOAPFault ! LogService.getInstance().logError(I18n.get("017003"), null); } } --- 173,186 ---- // } } catch (Exception e) { ! log.logError(e); throw new ServletException("JAXM POST failed " + e.getMessage(), e); } } else { // TODO send SOAPFault ! log.logError(I18n.get("017001"), null); } } else { // TODO send SOAPFault ! log.logError(I18n.get("017003"), null); } } *************** *** 273,279 **** */ private void debugHeader(HttpServletRequest request) { ! com.babeldoc.core.LogService.getInstance().logDebug("____________________________"); ! com.babeldoc.core.LogService.getInstance().logDebug("Received request."); ! com.babeldoc.core.LogService.getInstance().logDebug("-----------------------"); // Traverse the HTTP headers and show them on the screen --- 277,282 ---- */ private void debugHeader(HttpServletRequest request) { ! if(log.isDebugEnabled()) ! log.logDebug("----------------\nReceived request\n----------------"); // Traverse the HTTP headers and show them on the screen *************** *** 282,290 **** String value = request.getHeader(header); ! com.babeldoc.core.LogService.getInstance().logDebug(" " + header + ! " = " + value); } ! com.babeldoc.core.LogService.getInstance().logDebug("-----------------------"); } --- 285,294 ---- String value = request.getHeader(header); ! if(log.isDebugEnabled()) ! log.logDebug(" " + header + " = " + value); } ! if(log.isDebugEnabled()) ! log.logDebug("-----------------------"); } *************** *** 306,310 **** private IJournalTicket[] processSoapDocument(HttpServletRequest request, SOAPMessage msg, String pipeline) ! throws com.babeldoc.core.pipeline.PipelineException, JournalException, SOAPException, IOException { Vector vec = new Vector(); --- 310,314 ---- private IJournalTicket[] processSoapDocument(HttpServletRequest request, SOAPMessage msg, String pipeline) ! throws PipelineException, JournalException, SOAPException, IOException { Vector vec = new Vector(); *************** *** 312,316 **** for (Iterator it = SoapHelper.detachDocuments(msg); it.hasNext();) { ! com.babeldoc.core.pipeline.PipelineDocument pdoc = (com.babeldoc.core.pipeline.PipelineDocument) it.next(); // Apply the request parameters as document attributes --- 316,320 ---- for (Iterator it = SoapHelper.detachDocuments(msg); it.hasNext();) { ! PipelineDocument pdoc = (PipelineDocument) it.next(); // Apply the request parameters as document attributes *************** *** 329,334 **** pdoc, ticket, null); } catch (Exception e) { ! com.babeldoc.core.LogService.getInstance().logError("something went wrong", ! e); } } --- 333,337 ---- pdoc, ticket, null); } catch (Exception e) { ! log.logError("something went wrong", e); } } |
From: bruce m. <tr...@us...> - 2004-07-24 00:19:02
|
Update of /cvsroot/babeldoc/babeldoc/modules/scanner/src/com/babeldoc/scanner/jmx In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26389/modules/scanner/src/com/babeldoc/scanner/jmx Modified Files: ScannerService.java Log Message: Logging cleanups... 1. Created log instance variable instead of calling LogService.getInstance(). 2. All logs to debug check if debug level is set. Index: ScannerService.java =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/modules/scanner/src/com/babeldoc/scanner/jmx/ScannerService.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** ScannerService.java 29 Mar 2004 20:49:14 -0000 1.7 --- ScannerService.java 24 Jul 2004 00:18:52 -0000 1.8 *************** *** 70,73 **** --- 70,74 ---- import com.babeldoc.core.pipeline.PipelineFactoryFactory; import com.babeldoc.scanner.Scanner; + import com.babeldoc.scanner.ScannerException; import com.babeldoc.scanner.ScannerWorkerVO; *************** *** 106,110 **** public void setConfigUrl(String configUrl) throws Exception { this.configUrl = configUrl; ! getLog().logDebug("setConfigUrl: " + configUrl); } --- 107,112 ---- public void setConfigUrl(String configUrl) throws Exception { this.configUrl = configUrl; ! if(getLog().isDebugEnabled()) ! getLog().logDebug("setConfigUrl: " + configUrl); } *************** *** 117,121 **** */ public String getConfigUrl() throws Exception { ! getLog().logDebug("getConfigUrl: " + configUrl); return this.configUrl; } --- 119,124 ---- */ public String getConfigUrl() throws Exception { ! if(getLog().isDebugEnabled()) ! getLog().logDebug("getConfigUrl: " + configUrl); return this.configUrl; } *************** *** 130,134 **** public void setBabeldocHome(String home) throws Exception { System.setProperty("babeldoc.home", home); ! getLog().logDebug("setBabeldocHome: " + home); } --- 133,138 ---- public void setBabeldocHome(String home) throws Exception { System.setProperty("babeldoc.home", home); ! if(getLog().isDebugEnabled()) ! getLog().logDebug("setBabeldocHome: " + home); } *************** *** 142,146 **** public String getBabeldocHome() throws Exception { String home = System.getProperty("babeldoc.home"); ! getLog().logDebug("getBabeldocHome: " + home); return (home); } --- 146,151 ---- public String getBabeldocHome() throws Exception { String home = System.getProperty("babeldoc.home"); ! if(getLog().isDebugEnabled()) ! getLog().logDebug("getBabeldocHome: " + home); return (home); } *************** *** 149,158 **** public void setBabeldocUserHome(String home) throws Exception { System.setProperty("babeldoc.user", home); ! getLog().logDebug("setBabeldocUserHome: " + home); } public String getBabeldocUserHome() throws Exception { String home = System.getProperty("babeldoc.user"); ! getLog().logDebug("getBabeldocUserHome: " + home); return (home); } --- 154,165 ---- public void setBabeldocUserHome(String home) throws Exception { System.setProperty("babeldoc.user", home); ! if(getLog().isDebugEnabled()) ! getLog().logDebug("setBabeldocUserHome: " + home); } public String getBabeldocUserHome() throws Exception { String home = System.getProperty("babeldoc.user"); ! if(getLog().isDebugEnabled()) ! getLog().logDebug("getBabeldocUserHome: " + home); return (home); } *************** *** 168,175 **** public String getStateString() throws Exception { if (passedFirstStart) { ! getLog().logDebug("getStateString: " + com.babeldoc.core.I18n.get(stateDescriptions[state])); return (com.babeldoc.core.I18n.get(stateDescriptions[state])); } else { ! getLog().logDebug("getStateString: " + stateDescriptions[state]); return (stateDescriptions[state]); } --- 175,184 ---- public String getStateString() throws Exception { if (passedFirstStart) { ! if(getLog().isDebugEnabled()) ! getLog().logDebug("getStateString: " + com.babeldoc.core.I18n.get(stateDescriptions[state])); return (com.babeldoc.core.I18n.get(stateDescriptions[state])); } else { ! if(getLog().isDebugEnabled()) ! getLog().logDebug("getStateString: " + stateDescriptions[state]); return (stateDescriptions[state]); } *************** *** 206,210 **** scanner.start(); state = ScannerService.STATE_STARTED; ! getLog().logDebug(com.babeldoc.core.I18n.get(stateDescriptions[state])); } --- 215,220 ---- scanner.start(); state = ScannerService.STATE_STARTED; ! if(getLog().isDebugEnabled()) ! getLog().logDebug(com.babeldoc.core.I18n.get(stateDescriptions[state])); } *************** *** 222,227 **** scanner.finishUp(); } ! state = ScannerService.STATE_STOPPED; ! getLog().logDebug(com.babeldoc.core.I18n.get(stateDescriptions[state])); } --- 232,238 ---- scanner.finishUp(); } ! state = ScannerService.STATE_STOPPED; ! if(getLog().isDebugEnabled()) ! getLog().logDebug(com.babeldoc.core.I18n.get(stateDescriptions[state])); } *************** *** 237,246 **** if (passedFirstStart) { if (state == ScannerService.STATE_STOPPED) { ! getLog().logDebug("Refreshing scanner configuration"); scanner.refreshConfig(); IPipelineFactory pf = PipelineFactoryFactory.getPipelineFactory(); pf.clearCache(); } else { ! throw new com.babeldoc.scanner.ScannerException("Invalid state for operation"); } } --- 248,258 ---- if (passedFirstStart) { if (state == ScannerService.STATE_STOPPED) { ! if(getLog().isDebugEnabled()) ! getLog().logDebug("Refreshing scanner configuration"); scanner.refreshConfig(); IPipelineFactory pf = PipelineFactoryFactory.getPipelineFactory(); pf.clearCache(); } else { ! throw new ScannerException("Invalid state for operation"); } } |
From: bruce m. <tr...@us...> - 2004-07-23 22:40:45
|
Update of /cvsroot/babeldoc/babeldoc/modules/core/config/feeder In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11660/modules/core/config/feeder Modified Files: config.properties Log Message: javadoc and formatting here. Index: config.properties =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/modules/core/config/feeder/config.properties,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** config.properties 30 Jun 2003 22:14:56 -0000 1.1 --- config.properties 23 Jul 2004 22:40:31 -0000 1.2 *************** *** 1,12 **** ! # The generic feeders: synchronous ! sync.type=synchronous ! ! # The generic feeders: asynchronous - with an in-memory queue ! async.type=asynchronous ! async.queue=memory ! ! # The "specific" feeders: asynchronous - with disk queue ! #async-d.type=asynchronous ! #async-d.queue=disk ! #async-d.queueDir=/tmp ! #async-d.queueName=async-d --- 1,12 ---- ! # The generic feeders: synchronous ! sync.type=synchronous ! ! # The generic feeders: asynchronous - with an in-memory queue ! async.type=asynchronous ! async.queue=memory ! ! # The "specific" feeders: asynchronous - with disk queue ! #async-d.type=asynchronous ! #async-d.queue=disk ! #async-d.queueDir=/tmp ! #async-d.queueName=async-d |
From: bruce m. <tr...@us...> - 2004-07-23 22:40:45
|
Update of /cvsroot/babeldoc/babeldoc/modules/core/config/i18n In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11660/modules/core/config/i18n Modified Files: messages.properties Log Message: javadoc and formatting here. Index: messages.properties =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/modules/core/config/i18n/messages.properties,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** messages.properties 28 May 2004 10:31:12 -0000 1.26 --- messages.properties 23 Jul 2004 22:40:31 -0000 1.27 *************** *** 61,70 **** 001004=-v Verbose output 001005=-h Display this message ! 001006=Babeldoc {0} Copyright (C) 2002 Bruce McDonald, Dejan Krsmanovic, et al. 001007=Babeldoc comes with ABSOLUTELY NO WARRANTY; 001008=This is free software, and you are welcome to redistribute ! 001009=it under certain conditions 001011=Command: {0} not found ! 001012=Usage: babeldoc <command>\nwhere command must be one of: # com.babeldoc.core.ResourceLoader --- 61,70 ---- 001004=-v Verbose output 001005=-h Display this message ! 001006=Babeldoc {0} Copyright (C) 2002,2003,2004 The Babeldoc Team!! 001007=Babeldoc comes with ABSOLUTELY NO WARRANTY; 001008=This is free software, and you are welcome to redistribute ! 001009=it under certain conditions. See the Apache Public License. 001011=Command: {0} not found ! 001012=*** This is Babeldoc! ***\n\nUsage: babeldoc <command>\n\nwhere command must be one of:\n # com.babeldoc.core.ResourceLoader *************** *** 425,426 **** --- 425,433 ---- core.pipeline.processor.threadpool.option.poolSize=The number of threads in the thread pool. This sets the maximum number of documents to process at one time. Default is 5. core.pipeline.processor.threadpool.option.keepAlive=The number of milliseconds that an idle thread in the threadpool will remain alive before being reclaimed. Default is 15000. + + core.pipeline.feeder.asyncfeeder.disk.queuename=Disk queues must have a 'queueName' configuration option + core.pipeline.feeder.asyncfeeder.disk.queuedir=Disk queues must have a 'queueDir' configuration option + core.pipeline.feeder.asyncfeeder.disk.error=Trying to create a disk queue + core.pipeline.feeder.asyncfeeder.config.desc=Asynchronously feed the documents to the pipeline with a configurable queuing strategy + core.pipeline.feeder.asyncfeeder.config.poolsize=The number of threads to create in the threadpool - this determines the possible number of concurrent pipeline executing. + core.pipeline.feeder.asyncfeeder.config.inactivetime=The length of time to keep idle threads in the threadpool alive |
From: bruce m. <tr...@us...> - 2004-07-23 22:39:57
|
Update of /cvsroot/babeldoc/babeldoc/readme In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11501/readme Modified Files: style.css Log Message: javadoc and formatting here. Index: style.css =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/readme/style.css,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** style.css 8 Aug 2003 23:43:11 -0000 1.2 --- style.css 23 Jul 2004 22:39:48 -0000 1.3 *************** *** 1,79 **** ! P.note { ! font-family: Helvetica,Arial; ! } ! H3.note { ! font-family: Helvetica,Arial; ! font-weight: bold; ! font-size: 12; ! } ! ! .productname { ! text-transform: none; ! font-variant: small-caps; ! text-decoration: underline ! } ! ! BODY { ! font-family: Verdana, Helvetica, Arial, sans-serif; ! font-size: 10pt; ! background-color: #fffdf0; ! padding-left: 20px ! } ! ! div.toc { ! background-color: #eeeeee; ! border: 1px dotted #333; ! padding-top: 10px; ! padding-left: 20px; ! padding-bottom: 10px; ! padding-right: 20px; ! margin-right: 30px; ! margin-left: 30px; ! margin-bottom: 10px; ! margin-top: 10px; ! } ! ! div.list-of-examples { ! background-color: #eeeeee; ! border: 1px dotted #333; ! padding-top: 10px; ! padding-left: 20px; ! padding-bottom: 10px; ! padding-right: 20px; ! margin-right: 30px; ! margin-left: 30px; ! margin-bottom: 10px; ! margin-top: 10px; ! } ! ! div.chapter { ! border-top-color: black; ! border-top-width: 10px; ! border-top-style: groove; ! padding-top: 20px; ! margin-top: 60px; ! } ! ! b.userinput { ! font-family: 'Andale Mono', Courier, monospace; ! color: #be1b33; ! font-size: 11pt; ! } ! ! tt.computeroutput { ! font-family: 'Andale Mono', Courier, monospace; ! background-color: #eeeeee; ! font-size: 9pt; ! } ! ! tt.computeroutput table.simplelist { ! font-family: 'Andale Mono', Courier, monospace; ! background-color: #eeeeee; ! font-size: 9pt; ! } ! ! div.informaltable table { ! background-color: #eeeeee; ! font-family: Verdana, Helvetica, Arial, sans-serif; ! font-size: 10pt; ! } --- 1,83 ---- ! P.note { ! font-family: Helvetica,Arial; ! } ! H3.note { ! font-family: Helvetica,Arial; ! font-weight: bold; ! font-size: 12; ! } ! ! .productname { ! text-transform: none; ! font-variant: small-caps; ! text-decoration: underline ! } ! ! BODY { ! font-family: Verdana, Helvetica, Arial, sans-serif; ! font-size: 10pt; ! background-color: #fffdf0; ! padding-left: 20px ! } ! ! code { ! background-color: #CCCCCC; ! } ! ! div.toc { ! background-color: #eeeeee; ! border: 1px dotted #333; ! padding-top: 10px; ! padding-left: 20px; ! padding-bottom: 10px; ! padding-right: 20px; ! margin-right: 30px; ! margin-left: 30px; ! margin-bottom: 10px; ! margin-top: 10px; ! } ! ! div.list-of-examples { ! background-color: #eeeeee; ! border: 1px dotted #333; ! padding-top: 10px; ! padding-left: 20px; ! padding-bottom: 10px; ! padding-right: 20px; ! margin-right: 30px; ! margin-left: 30px; ! margin-bottom: 10px; ! margin-top: 10px; ! } ! ! div.chapter { ! border-top-color: black; ! border-top-width: 10px; ! border-top-style: groove; ! padding-top: 20px; ! margin-top: 60px; ! } ! ! b.userinput { ! font-family: 'Andale Mono', Courier, monospace; ! color: #be1b33; ! font-size: 11pt; ! } ! ! tt.computeroutput { ! font-family: 'Andale Mono', Courier, monospace; ! background-color: #eeeeee; ! font-size: 9pt; ! } ! ! tt.computeroutput table.simplelist { ! font-family: 'Andale Mono', Courier, monospace; ! background-color: #eeeeee; ! font-size: 9pt; ! } ! ! div.informaltable table { ! background-color: #eeeeee; ! font-family: Verdana, Helvetica, Arial, sans-serif; ! font-size: 10pt; ! } |
From: bruce m. <tr...@us...> - 2004-07-23 22:38:19
|
Update of /cvsroot/babeldoc/babeldoc/modules/core/src/com/babeldoc/core/pipeline In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11263/modules/core/src/com/babeldoc/core/pipeline Modified Files: PipelineDocument.java PipelineFactory.java PipelineFactoryFactory.java Log Message: javadoc and formatting here. Index: PipelineDocument.java =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/modules/core/src/com/babeldoc/core/pipeline/PipelineDocument.java,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** PipelineDocument.java 2 Jul 2004 14:49:56 -0000 1.21 --- PipelineDocument.java 23 Jul 2004 22:38:07 -0000 1.22 *************** *** 67,71 **** import com.babeldoc.core.INamed; - import com.babeldoc.core.LogService; import com.babeldoc.core.config.ConfigService; import com.babeldoc.core.config.IConfig; --- 67,70 ---- *************** *** 108,112 **** /** Here is the mappings */ private static MimetypesFileTypeMap mimeTypes = null; ! private HashMap map; private byte[] buffer; private String encoding; --- 107,111 ---- /** Here is the mappings */ private static MimetypesFileTypeMap mimeTypes = null; ! private Map map; private byte[] buffer; private String encoding; Index: PipelineFactory.java =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/modules/core/src/com/babeldoc/core/pipeline/PipelineFactory.java,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** PipelineFactory.java 7 Nov 2003 02:29:52 -0000 1.14 --- PipelineFactory.java 23 Jul 2004 22:38:07 -0000 1.15 *************** *** 84,88 **** /** * Important class which is used by pipeline feeders (and the like) to getChild data ! * into the pipeline. Most interesting method is process. * * @author Bmcdonald --- 84,89 ---- /** * Important class which is used by pipeline feeders (and the like) to getChild data ! * into the pipeline. Most interesting method is process. This class finds and ! * initializes the <code>PipelineStageFactory</code> objects. * * @author Bmcdonald *************** *** 175,180 **** public synchronized IPipelineStageFactory getPipelineStageFactory(String pname) throws PipelineException { ! IPipelineStageFactory pipelineStageFactory = PipelineStageCompiler.getInstance() ! .getPipelineStageFactory(this, pname); if (pipelineStageFactory != null) { --- 176,182 ---- public synchronized IPipelineStageFactory getPipelineStageFactory(String pname) throws PipelineException { ! IPipelineStageFactory pipelineStageFactory = ! PipelineStageCompiler.getInstance(). ! getPipelineStageFactory(this, pname); if (pipelineStageFactory != null) { *************** *** 190,194 **** * the compiler to getChild the pipeline stage. * ! * @param pname the name of the pipeline stage to search for * * @return the pipelinestagefactory found. --- 192,196 ---- * the compiler to getChild the pipeline stage. * ! * @param pname the name of the pipeline stage factory to search for * * @return the pipelinestagefactory found. *************** *** 244,250 **** * Process a document. This is intended as the main entry point for * processing documents. The name passed into this method must be of the ! * form: <pipeline-name>.[pipeline-stage-name]. If the stage-name is ! * not provided, then it is assumed that the stage name is the main entry ! * (see the IPipelineStageFactory) * * @param name the name of the pipeline.stage --- 246,252 ---- * Process a document. This is intended as the main entry point for * processing documents. The name passed into this method must be of the ! * form: <code><pipeline-name>.[pipeline-stage-name]</code>. If ! * the stage-name is not provided, then it is assumed that the stage name ! * is the main entry (see the IPipelineStageFactory) * * @param name the name of the pipeline.stage Index: PipelineFactoryFactory.java =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/modules/core/src/com/babeldoc/core/pipeline/PipelineFactoryFactory.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** PipelineFactoryFactory.java 12 Aug 2003 23:44:44 -0000 1.6 --- PipelineFactoryFactory.java 23 Jul 2004 22:38:07 -0000 1.7 *************** *** 72,76 **** /** ! * PipelineFactory. Important class which is used by pipeline feeders (and the * like) to getChild data into the pipeline. Most interesting method is process. * --- 72,76 ---- /** ! * PipelineFactoryFactory. Important class which is used by pipeline feeders (and the * like) to getChild data into the pipeline. Most interesting method is process. * *************** *** 80,88 **** public class PipelineFactoryFactory { /** the singleton object */ ! private static IPipelineFactory pipelineFactory; ! ! static { ! pipelineFactory = new PipelineFactory(); ! } /** --- 80,84 ---- public class PipelineFactoryFactory { /** the singleton object */ ! private static IPipelineFactory pipelineFactory = null; /** *************** *** 92,96 **** */ public static String[] getAllPipelineNames() { ! return pipelineFactory.getAllPipelineNames(); } --- 88,92 ---- */ public static String[] getAllPipelineNames() { ! return getPipelineFactory().getAllPipelineNames(); } *************** *** 98,104 **** * Returns the internally used static instance of the pipelineFactory. * ! * @return DOCUMENT ME! */ public static IPipelineFactory getPipelineFactory() { return pipelineFactory; } --- 94,103 ---- * Returns the internally used static instance of the pipelineFactory. * ! * @return the pipelinefactory */ public static IPipelineFactory getPipelineFactory() { + if(pipelineFactory == null) { + pipelineFactory = new PipelineFactory(); + } return pipelineFactory; } *************** *** 115,119 **** public static IPipelineStageFactory getPipelineStageFactory(String pname) throws PipelineException { ! return pipelineFactory.getPipelineStageFactory(pname); } --- 114,118 ---- public static IPipelineStageFactory getPipelineStageFactory(String pname) throws PipelineException { ! return getPipelineFactory().getPipelineStageFactory(pname); } *************** *** 121,125 **** * Process a document. This is intended as the main entry point for * processing documents. The name passed into this method must be of the ! * form: <pipeline-name>.[pipeline-stage-name]. If the stage-name is * not provided, then it is assumed that the stage name is the main entry * (see the IPipelineStageFactory) --- 120,124 ---- * Process a document. This is intended as the main entry point for * processing documents. The name passed into this method must be of the ! * form: <code><pipeline-name>.[pipeline-stage-name]</code>. If the stage-name is * not provided, then it is assumed that the stage name is the main entry * (see the IPipelineStageFactory) *************** *** 128,138 **** * @param document the document to process * @param ticket the ticket to process. ! * @param results DOCUMENT ME! * ! * @throws PipelineException DOCUMENT ME! */ public static void process(String name, PipelineDocument document, IJournalTicket ticket, Collection results) throws PipelineException { ! pipelineFactory.process(name, document, ticket, results); } } --- 127,137 ---- * @param document the document to process * @param ticket the ticket to process. ! * @param results collection of results to fill once processing is complete * ! * @throws PipelineException pipeline exceptions */ public static void process(String name, PipelineDocument document, IJournalTicket ticket, Collection results) throws PipelineException { ! getPipelineFactory().process(name, document, ticket, results); } } |
From: bruce m. <tr...@us...> - 2004-07-23 22:38:18
|
Update of /cvsroot/babeldoc/babeldoc/modules/core/src/com/babeldoc/core/pipeline/feeder In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11263/modules/core/src/com/babeldoc/core/pipeline/feeder Modified Files: FeederFactory.java Log Message: javadoc and formatting here. Index: FeederFactory.java =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/modules/core/src/com/babeldoc/core/pipeline/feeder/FeederFactory.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** FeederFactory.java 22 Jul 2004 02:40:28 -0000 1.5 --- FeederFactory.java 23 Jul 2004 22:38:09 -0000 1.6 *************** *** 1 **** ! /* ==================================================================== * The Apache Software License, Version 1.1 * * Copyright (c) 2000 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "Apache" and "Apache Software Foundation" must * not be used to endorse or promote products derived from this * software without prior written permission. For written * permission, please contact ap...@ap.... * * 5. Products derived from this software may not be called "Apache", * nor may "Apache" appear in their name, without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * <http://www.apache.org/>. * * Portions of this software are based upon public domain software * originally written at the National Center for Supercomputing Applications, * University of Illinois, Urbana-Champaign. * ==================================================================== * * Babeldoc: The Universal Document Processor * * $Header$ * $Author$ * */ package com.babeldoc.core.pipeline.feeder; import com.babeldoc.core.GeneralException; import com.babeldoc.core.LogService; import com.babeldoc.core.option.IConfigData; import com.babeldoc.core.option.ConfigData; import com.babeldoc.core.service.ServiceFactory; import com.babeldoc.core.service.ServiceException; import java.util.Collection; import java.util.Map; import java.util.HashMap; /** * The feeder factory provides an easy way to feed documents into the pipelines in * babeldoc. There exists a number of "feeders" which are implemented in a number of * generally useful ways. Each of the feeders have a name and are stored in the * feeder/config configuration file. Each feeder has to have a type associated with it. * There are two defined feeders in the system: sync & async. The sync feeder * synchronously feeds each document to the pipeline. The async feeder uses a multithread * queue with producer/collector pattern to separate the feedign from thr processing. * * Please look at the process methods which provide a number of generally useful and easy * methods of getting data into the system. * * @author bmcdonald * @version 1.1 */ public class FeederFactory { private static FeederFactory instance; /** List of feeders loaded by the factory */ private Map feeders; public static final String FEEDER_CONFIG = "feeder/config"; public static final String FEEDER_TYPE = "type"; public static final String SERVICE_FEEDER = "Feeder."; public static final String SYNC = "sync"; public static final String ASYNC = "async"; /** * Private constructor - this must be instantiated through the feeder factory * getInstance method. Singleton creation happens there. */ private FeederFactory() { feeders = new HashMap(); } /** * Get the current instance of this singleton class. If there is not a current * implementation, create a new implementation. * * @return */ public static FeederFactory getInstance() { if (instance == null) { instance = new FeederFactory(); } return instance; } /** * Get the feeder with this name. If this feeder does not exist, then * create it. This is done by reading the feeder/config configuration file. * This file is arranged as follows: *<code> feeder-name.type=Synchonous|Asynchronous|etc feeder-name.cfg-1=value-1 ... feeder-name.cfg-n=value-n </code> * @param name * @return * @throws ServiceException */ public IFeeder getFeeder(String name) throws GeneralException { // System.out.println("Getting feeder)"); IFeeder feeder = (IFeeder) feeders.get(name); if (feeder == null) { // System.out.println("Creating feeder)"); IConfigData feederConfig = ConfigData.getConfigData("root", FEEDER_CONFIG).getChild(name); if (feederConfig != null) { // System.out.println("config data not null: "+feederConfig.toString()); String feederType = feederConfig.getValue(FEEDER_TYPE); feeder = (IFeeder) (ServiceFactory .getService(SERVICE_FEEDER + feederType)); feeder.initialize(feederConfig); } } return feeder; } /** * Feed the document according to the name of the feeder. This method takes a * feed document. * * @param name feeder name * @param feedDoc document to feed * @return * @throws GeneralException */ public Collection process(String name, FeedDocument feedDoc) throws GeneralException { return getFeeder(name).process(feedDoc); } /** * Feed the document according to the name of the feeder. This method takes * all the data to construct a full feed document * * @param name feeder name * @param pipelineName name of the pipeline * @param data array of bytes that is the document to process * @param attributes map of attributes * @param isBinary sets the isBinary flag on the document * @param noJournal allows for the journal to be turned on or off for this processing. * @return Collection of resultant documents from processing * @throws GeneralException */ public Collection process( String name, String pipelineName, byte[] data, Map attributes, boolean isBinary, boolean noJournal) throws GeneralException { return getFeeder(name).process( new FeedDocument( pipelineName, data, attributes, isBinary, noJournal)); } /** * Feed the document according to the name of the feeder. This method constructs * a feed document with the data BUT assumes that the data is NOT binary and * that the journalling is ENABLED. * * @param name feeder name * @param pipelineName name of the pipeline * @param data array of bytes that is the document to process * @param attributes map of attributes * @return Collection of resultant documents from processing * @throws GeneralException */ public Collection process( String name, String pipelineName, byte[] data, Map attributes) throws GeneralException { return getFeeder(name).process( new FeedDocument(pipelineName, data, attributes, false, false)); } /** * Feed the document according to the name of the feeder. This method constructs * a feed document with the data BUT assumes that the data is NOT binary and * that the journalling is ENABLED and NO attributes. * * @param name feeder name * @param pipelineName name of the pipeline * @param data array of bytes that is the document to process * @return Collection of resultant documents from processing * @throws GeneralException */ public Collection process(String name, String pipelineName, byte[] data) throws GeneralException { return getFeeder(name).process( new FeedDocument(pipelineName, data, new HashMap(), false, false)); } /** * Terminate the named feeder. This stops the feeder and then removes it from * the list of loaded feeders. This means that any subsequent references to * this feeder will result in a completely new implementation being created. * * @param name feeder to terminate */ public void terminate(String name) { try { getFeeder(name).terminate(); feeders.remove(name); } catch (GeneralException e) { LogService.getInstance().logError(e); } } } \ No newline at end of file --- 1 ---- ! /* ==================================================================== * The Apache Software License, Version 1.1 * * Copyright (c) 2000 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "Apache" and "Apache Software Foundation" must * not be used to endorse or promote products derived from this * software without prior written permission. For written * permission, please contact ap...@ap.... * * 5. Products derived from this software may not be called "Apache", * nor may "Apache" appear in their name, without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * <http://www.apache.org/>. * * Portions of this software are based upon public domain software * originally written at the National Center for Supercomputing Applications, * University of Illinois, Urbana-Champaign. * ==================================================================== * * Babeldoc: The Universal Document Processor * * $Header$ * $Author$ * */ package com.babeldoc.core.pipeline.feeder; import com.babeldoc.core.GeneralException; import com.babeldoc.core.LogService; import com.babeldoc.core.option.IConfigData; import com.babeldoc.core.option.ConfigData; import com.babeldoc.core.service.ServiceFactory; import java.util.Collection; import java.util.Map; import java.util.HashMap; /** * The feeder factory provides an easy way to feed documents into the pipelines in * babeldoc. There exists a number of "feeders" which are implemented in a number of * generally useful ways. Each of the feeders have a name and are stored in the * feeder/config configuration file. Each feeder has to have a type associated with it. * There are two defined feeders in the system: sync & async. The sync feeder * synchronously feeds each document to the pipeline. The async feeder uses a multithread * queue with producer/collector pattern to separate the feedign from thr processing. * * Please look at the process methods which provide a number of generally useful and easy * methods of getting data into the system. * * @author bmcdonald * @version 1.1 */ public class FeederFactory { private static FeederFactory instance; /** List of feeders loaded by the factory */ private Map feeders; public static final String FEEDER_CONFIG = "feeder/config"; public static final String FEEDER_TYPE = "type"; public static final String SERVICE_FEEDER = "Feeder."; public static final String SYNC = "sync"; public static final String ASYNC = "async"; /** * Private constructor - this must be instantiated through the feeder factory * getInstance method. Singleton creation happens there. */ private FeederFactory() { feeders = new HashMap(); } /** * Get the current instance of this singleton class. If there is not a current * implementation, create a new implementation. * * @return */ public static FeederFactory getInstance() { if (instance == null) { instance = new FeederFactory(); } return instance; } /** * Get the feeder with this name. If this feeder does not exist, then * create it. This is done by reading the feeder/config configuration file. * This file is arranged as follows: *<code> feeder-name.type=Synchonous|Asynchronous|etc feeder-name.cfg-1=value-1 ... feeder-name.cfg-n=value-n </code> * @param name * @return * @throws ServiceException */ public IFeeder getFeeder(String name) throws GeneralException { // System.out.println("Getting feeder)"); IFeeder feeder = (IFeeder) feeders.get(name); if (feeder == null) { // System.out.println("Creating feeder)"); IConfigData feederConfig = ConfigData.getConfigData("root", FEEDER_CONFIG).getChild(name); if (feederConfig != null) { // System.out.println("config data not null: "+feederConfig.toString()); String feederType = feederConfig.getValue(FEEDER_TYPE); feeder = (IFeeder) (ServiceFactory .getService(SERVICE_FEEDER + feederType)); feeder.initialize(feederConfig); } } return feeder; } /** * Feed the document according to the name of the feeder. This method takes a * feed document. * * @param name feeder name * @param feedDoc document to feed * @return * @throws GeneralException */ public Collection process(String name, FeedDocument feedDoc) throws GeneralException { return getFeeder(name).process(feedDoc); } /** * Feed the document according to the name of the feeder. This method takes * all the data to construct a full feed document * * @param name feeder name * @param pipelineName name of the pipeline * @param data array of bytes that is the document to process * @param attributes map of attributes * @param isBinary sets the isBinary flag on the document * @param noJournal allows for the journal to be turned on or off for this processing. * @return Collection of resultant documents from processing * @throws GeneralException */ public Collection process( String name, String pipelineName, byte[] data, Map attributes, boolean isBinary, boolean noJournal) throws GeneralException { return getFeeder(name).process( new FeedDocument( pipelineName, data, attributes, isBinary, noJournal)); } /** * Feed the document according to the name of the feeder. This method constructs * a feed document with the data BUT assumes that the data is NOT binary and * that the journalling is ENABLED. * * @param name feeder name * @param pipelineName name of the pipeline * @param data array of bytes that is the document to process * @param attributes map of attributes * @return Collection of resultant documents from processing * @throws GeneralException */ public Collection process( String name, String pipelineName, byte[] data, Map attributes) throws GeneralException { return getFeeder(name).process( new FeedDocument(pipelineName, data, attributes, false, false)); } /** * Feed the document according to the name of the feeder. This method constructs * a feed document with the data BUT assumes that the data is NOT binary and * that the journalling is ENABLED and NO attributes. * * @param name feeder name * @param pipelineName name of the pipeline * @param data array of bytes that is the document to process * @return Collection of resultant documents from processing * @throws GeneralException */ public Collection process(String name, String pipelineName, byte[] data) throws GeneralException { return getFeeder(name).process( new FeedDocument(pipelineName, data, new HashMap(), false, false)); } /** * Terminate the named feeder. This stops the feeder and then removes it from * the list of loaded feeders. This means that any subsequent references to * this feeder will result in a completely new implementation being created. * * @param name feeder to terminate */ public void terminate(String name) { try { getFeeder(name).terminate(); feeders.remove(name); } catch (GeneralException e) { LogService.getInstance().logError(e); } } } \ No newline at end of file |
From: bruce m. <tr...@us...> - 2004-07-23 22:38:18
|
Update of /cvsroot/babeldoc/babeldoc/modules/core/src/com/babeldoc/core/pipeline/command In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11263/modules/core/src/com/babeldoc/core/pipeline/command Modified Files: PipelineFeeder.java Log Message: javadoc and formatting here. Index: PipelineFeeder.java =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/modules/core/src/com/babeldoc/core/pipeline/command/PipelineFeeder.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** PipelineFeeder.java 7 Aug 2003 08:46:34 -0000 1.10 --- PipelineFeeder.java 23 Jul 2004 22:38:08 -0000 1.11 *************** *** 66,69 **** --- 66,70 ---- package com.babeldoc.core.pipeline.command; + import com.babeldoc.core.BabeldocCommand; import com.babeldoc.core.I18n; import com.babeldoc.core.LogService; *************** *** 93,99 **** * @version 1.0 */ ! public class PipelineFeeder extends com.babeldoc.core.BabeldocCommand { /** constant attribute name for the filename */ public static final String FILE_NAME = "file_name"; /** --- 94,102 ---- * @version 1.0 */ ! public class PipelineFeeder extends BabeldocCommand { /** constant attribute name for the filename */ public static final String FILE_NAME = "file_name"; + + private static LogService log = LogService.getInstance(PipelineFeeder.class.getName()); /** *************** *** 103,107 **** */ public PipelineFeeder(String[] args) { ! super("process", com.babeldoc.core.I18n.get("009010"), args); } --- 106,110 ---- */ public PipelineFeeder(String[] args) { ! super("process", I18n.get("009010"), args); } *************** *** 146,156 **** boolean nojournal = commandLine.hasOption('n'); String[] attrs = commandLine.getOptionValues('a'); ! ! LogService.getInstance().logDebug("-p = " + pipelineName); ! LogService.getInstance().logDebug("-f = " + fileName); if (attrs != null) { for (int i = 0; i < attrs.length; ++i) { ! LogService.getInstance().logDebug(I18n.get("009013", attrs[i])); } } --- 149,162 ---- boolean nojournal = commandLine.hasOption('n'); String[] attrs = commandLine.getOptionValues('a'); ! ! if(log.isDebugEnabled()) { ! log.logDebug("-p = " + pipelineName); ! log.logDebug("-f = " + fileName); ! } if (attrs != null) { for (int i = 0; i < attrs.length; ++i) { ! if(log.isDebugEnabled()) ! log.logDebug(I18n.get("009013", attrs[i])); } } *************** *** 159,165 **** process(pipelineName, fileName, attrs, bindata, nojournal); } catch (PipelineException pipex) { ! LogService.getInstance().logError(I18n.get("009003"), pipex); } catch (Exception x) { ! LogService.getInstance().logError(I18n.get("009005"), x); } } --- 165,171 ---- process(pipelineName, fileName, attrs, bindata, nojournal); } catch (PipelineException pipex) { ! log.logError(I18n.get("009003"), pipex); } catch (Exception x) { ! log.logError(I18n.get("009005"), x); } } *************** *** 175,188 **** /** ! * Process the filename and the attributes to the pipeline stage as named. * ! * @param pipelineName ! * @param fileName ! * @param attrs ! * @param bindata DOCUMENT ME! ! * @param nojournal DOCUMENT ME! * ! * @throws PipelineException ! * @throws IOException DOCUMENT ME! */ public static void process(String pipelineName, String fileName, --- 181,195 ---- /** ! * Process the filename and the attributes to the pipeline stage as named. This ! * method is the simplest way to process a document through the pipelines. * ! * @param pipelineName name of pipeline ! * @param fileName name of file to read ! * @param attrs attribute map to add to the document ! * @param bindata is data binary? ! * @param nojournal use a journal? * ! * @throws PipelineException pipeline processing problems ! * @throws IOException problems reading the file */ public static void process(String pipelineName, String fileName, *************** *** 206,210 **** attrMap, bindata, nojournal); } catch (GeneralException e) { ! LogService.getInstance().logError(e); } } --- 213,217 ---- attrMap, bindata, nojournal); } catch (GeneralException e) { ! log.logError(e); } } |
Update of /cvsroot/babeldoc/babeldoc/modules/core/src/com/babeldoc/core/option In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10814/modules/core/src/com/babeldoc/core/option Modified Files: BooleanConfigOptionType.java ComplexConfigOptionType.java DirectoryConfigOptionType.java FilenameConfigOptionType.java IConfigOptionType.java IntegerConfigOptionType.java MultiLineConfigOptionType.java ServiceTypeConfigOptionType.java StringConfigOptionType.java UrlConfigOptionType.java ValueListConfigOptionType.java XpathConfigOptionType.java Log Message: Now this ConfigOptionTypes extend Named for naming purposes. Javadoc cleanup too Index: MultiLineConfigOptionType.java =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/modules/core/src/com/babeldoc/core/option/MultiLineConfigOptionType.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** MultiLineConfigOptionType.java 12 Aug 2003 23:44:43 -0000 1.3 --- MultiLineConfigOptionType.java 23 Jul 2004 22:34:56 -0000 1.4 *************** *** 66,69 **** --- 66,71 ---- package com.babeldoc.core.option; + import com.babeldoc.core.Named; + /** * Strings config options type *************** *** 72,87 **** * @version 1.0 */ ! public class MultiLineConfigOptionType implements IConfigOptionType { /** - * getChild the name - * - * @return */ ! public String getName() { ! return "multiline"; } /** ! * All values are valid * * @param value --- 74,86 ---- * @version 1.0 */ ! public class MultiLineConfigOptionType extends Named implements IConfigOptionType { /** */ ! MultiLineConfigOptionType() { ! super("multiline"); } /** ! * All values are valid as long as they are strings * * @param value Index: DirectoryConfigOptionType.java =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/modules/core/src/com/babeldoc/core/option/DirectoryConfigOptionType.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** DirectoryConfigOptionType.java 16 Sep 2003 05:19:00 -0000 1.4 --- DirectoryConfigOptionType.java 23 Jul 2004 22:34:56 -0000 1.5 *************** *** 66,69 **** --- 66,71 ---- package com.babeldoc.core.option; + import com.babeldoc.core.Named; + /** * Directory option type - this represents a value that is a directory on a *************** *** 73,83 **** * @version 1.0 */ ! public class DirectoryConfigOptionType implements IConfigOptionType { ! /** ! * @return Get the name of option type ! */ ! public String getName() { ! return "directory-path"; } --- 75,85 ---- * @version 1.0 */ ! public class DirectoryConfigOptionType extends Named implements IConfigOptionType { ! /** ! * package ! */ ! DirectoryConfigOptionType() { ! super("directory-path"); } *************** *** 85,91 **** * Is this object valid? * ! * @param value * ! * @return */ public boolean isValid(Object value) { --- 87,93 ---- * Is this object valid? * ! * @param value to test * ! * @return validity */ public boolean isValid(Object value) { *************** *** 94,100 **** /** ! * Get the valide types * ! * @return */ public String[] getValidTypes() { --- 96,102 ---- /** ! * Get the valid types * ! * @return list of valid types */ public String[] getValidTypes() { Index: IConfigOptionType.java =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/modules/core/src/com/babeldoc/core/option/IConfigOptionType.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** IConfigOptionType.java 27 Jun 2003 02:19:58 -0000 1.5 --- IConfigOptionType.java 23 Jul 2004 22:34:56 -0000 1.6 *************** *** 68,71 **** --- 68,73 ---- import java.io.Serializable; + import com.babeldoc.core.INamed; + /** *************** *** 75,79 **** * @version 1.0 */ ! public interface IConfigOptionType extends Serializable { /** constants: use these */ public static final BooleanConfigOptionType BOOLEAN = new BooleanConfigOptionType(); --- 77,81 ---- * @version 1.0 */ ! public interface IConfigOptionType extends INamed, Serializable { /** constants: use these */ public static final BooleanConfigOptionType BOOLEAN = new BooleanConfigOptionType(); *************** *** 87,102 **** /** - * Get the name of the option - * - * @return - */ - public String getName(); - - /** * Is this value valid * ! * @param value * ! * @return */ public boolean isValid(Object value); --- 89,97 ---- /** * Is this value valid * ! * @param value to check * ! * @return validity flag */ public boolean isValid(Object value); *************** *** 106,110 **** * enumerated types. * ! * @return */ public String[] getValidTypes(); --- 101,105 ---- * enumerated types. * ! * @return all the valid types */ public String[] getValidTypes(); Index: ComplexConfigOptionType.java =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/modules/core/src/com/babeldoc/core/option/ComplexConfigOptionType.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** ComplexConfigOptionType.java 12 Aug 2003 23:44:43 -0000 1.6 --- ComplexConfigOptionType.java 23 Jul 2004 22:34:55 -0000 1.7 *************** *** 70,84 **** import java.util.Iterator; /** * This configuration option is basically any thing that cannot be managed by ! * the other options. * * @author bmcdonald / dejank * @version 1.0 */ ! public class ComplexConfigOptionType implements IConfigOptionType { ArrayList suboptions = new ArrayList(); /** * Create a suboptions type with a bunch of suboptions --- 70,91 ---- import java.util.Iterator; + import com.babeldoc.core.Named; + /** * This configuration option is basically any thing that cannot be managed by ! * the other options. This kind of option can contain other options, in a nested ! * fashion. * * @author bmcdonald / dejank * @version 1.0 */ ! public class ComplexConfigOptionType extends Named implements IConfigOptionType { ArrayList suboptions = new ArrayList(); + ComplexConfigOptionType() { + super("complex"); + } + /** * Create a suboptions type with a bunch of suboptions *************** *** 104,124 **** /** - * The this type handles complex options. A complex option contains a hash - * map for the object. - * - * @return - */ - public String getName() { - return "complex"; - } - - /** * Get the validity. This iterates over the list of suboptions and checks * each type for the validity of that type. If the type is an other * suboption, it too iterates. * ! * @param value * ! * @return */ public boolean isValid(Object value) { --- 111,121 ---- /** * Get the validity. This iterates over the list of suboptions and checks * each type for the validity of that type. If the type is an other * suboption, it too iterates. * ! * @param value to check against * ! * @return validity flag */ public boolean isValid(Object value) { *************** *** 146,152 **** * add a subconfigoption for this option. * ! * @param configoption * ! * @return */ public ComplexConfigOptionType add(ConfigOption configoption) { --- 143,149 ---- * add a subconfigoption for this option. * ! * @param configoption add this configuration * ! * @return the type */ public ComplexConfigOptionType add(ConfigOption configoption) { *************** *** 159,163 **** * Get an iterator to the suboptions. * ! * @return */ public Iterator suboptions() { --- 156,160 ---- * Get an iterator to the suboptions. * ! * @return iterator over the suboptions */ public Iterator suboptions() { Index: BooleanConfigOptionType.java =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/modules/core/src/com/babeldoc/core/option/BooleanConfigOptionType.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** BooleanConfigOptionType.java 16 Sep 2003 05:19:00 -0000 1.6 --- BooleanConfigOptionType.java 23 Jul 2004 22:34:55 -0000 1.7 *************** *** 66,69 **** --- 66,71 ---- package com.babeldoc.core.option; + import com.babeldoc.core.Named; + /** * Boolean option type. It constrains the value to either true or false. *************** *** 72,86 **** * @version 1.0 */ ! public class BooleanConfigOptionType implements IConfigOptionType { public static final String TRUE = Boolean.TRUE.toString(); public static final String FALSE = Boolean.FALSE.toString(); ! ! /** ! * Get the name of the boolean option type ! * ! * @return name of the boolean ! */ ! public String getName() { ! return "boolean"; } --- 74,86 ---- * @version 1.0 */ ! public class BooleanConfigOptionType extends Named implements IConfigOptionType { public static final String TRUE = Boolean.TRUE.toString(); public static final String FALSE = Boolean.FALSE.toString(); ! ! /** ! * package private. ! */ ! BooleanConfigOptionType() { ! super("boolean"); } Index: XpathConfigOptionType.java =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/modules/core/src/com/babeldoc/core/option/XpathConfigOptionType.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** XpathConfigOptionType.java 12 Aug 2003 23:44:43 -0000 1.4 --- XpathConfigOptionType.java 23 Jul 2004 22:34:56 -0000 1.5 *************** *** 66,69 **** --- 66,71 ---- package com.babeldoc.core.option; + import com.babeldoc.core.Named; + /** * xpath config options type. *************** *** 72,83 **** * @version 1.0 */ ! public class XpathConfigOptionType implements IConfigOptionType { /** - * getChild the name - * - * @return */ ! public String getName() { ! return "xpath"; } --- 74,82 ---- * @version 1.0 */ ! public class XpathConfigOptionType extends Named implements IConfigOptionType { /** */ ! XpathConfigOptionType() { ! super("xpath"); } Index: ValueListConfigOptionType.java =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/modules/core/src/com/babeldoc/core/option/ValueListConfigOptionType.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** ValueListConfigOptionType.java 12 Aug 2003 23:44:43 -0000 1.5 --- ValueListConfigOptionType.java 23 Jul 2004 22:34:56 -0000 1.6 *************** *** 66,69 **** --- 66,71 ---- package com.babeldoc.core.option; + import com.babeldoc.core.Named; + /** * This class represents option type which can take one of values defined in *************** *** 74,78 **** * @version 1.0 */ ! public class ValueListConfigOptionType implements IConfigOptionType { /** hold the values */ protected String[] values; --- 76,80 ---- * @version 1.0 */ ! public class ValueListConfigOptionType extends Named implements IConfigOptionType { /** hold the values */ protected String[] values; *************** *** 84,105 **** */ public ValueListConfigOptionType(String[] values) { this.values = values; } //Create empty value list type ! protected ValueListConfigOptionType() { //this.values = values; } /** - * getChild the name - * - * @return - */ - public String getName() { - return "enumeration"; - } - - /** * Check if the given value is valid. It is just checked against the values * from list --- 86,100 ---- */ public ValueListConfigOptionType(String[] values) { + super("enumeration"); this.values = values; } //Create empty value list type ! ValueListConfigOptionType() { ! super("enumeration"); //this.values = values; } /** * Check if the given value is valid. It is just checked against the values * from list Index: StringConfigOptionType.java =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/modules/core/src/com/babeldoc/core/option/StringConfigOptionType.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** StringConfigOptionType.java 12 Aug 2003 23:44:43 -0000 1.4 --- StringConfigOptionType.java 23 Jul 2004 22:34:56 -0000 1.5 *************** *** 66,69 **** --- 66,71 ---- package com.babeldoc.core.option; + import com.babeldoc.core.Named; + /** * Strings config options type *************** *** 72,83 **** * @version 1.0 */ ! public class StringConfigOptionType implements IConfigOptionType { /** - * getChild the name - * - * @return */ ! public String getName() { ! return "string"; } --- 74,82 ---- * @version 1.0 */ ! public class StringConfigOptionType extends Named implements IConfigOptionType { /** */ ! StringConfigOptionType() { ! super("string"); } *************** *** 85,91 **** * All values are valid * ! * @param value * ! * @return */ public boolean isValid(Object value) { --- 84,90 ---- * All values are valid * ! * @param value to test * ! * @return always valid */ public boolean isValid(Object value) { Index: UrlConfigOptionType.java =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/modules/core/src/com/babeldoc/core/option/UrlConfigOptionType.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** UrlConfigOptionType.java 12 Aug 2003 23:44:43 -0000 1.4 --- UrlConfigOptionType.java 23 Jul 2004 22:34:56 -0000 1.5 *************** *** 69,72 **** --- 69,74 ---- import java.net.URL; + import com.babeldoc.core.Named; + /** *************** *** 76,80 **** * @version 1.0 */ ! public class UrlConfigOptionType implements IConfigOptionType { /** * getChild the name --- 78,82 ---- * @version 1.0 */ ! public class UrlConfigOptionType extends Named implements IConfigOptionType { /** * getChild the name *************** *** 82,87 **** * @return */ ! public String getName() { ! return "url"; } --- 84,89 ---- * @return */ ! UrlConfigOptionType() { ! super("url"); } Index: FilenameConfigOptionType.java =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/modules/core/src/com/babeldoc/core/option/FilenameConfigOptionType.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** FilenameConfigOptionType.java 12 Aug 2003 23:44:43 -0000 1.4 --- FilenameConfigOptionType.java 23 Jul 2004 22:34:56 -0000 1.5 *************** *** 66,69 **** --- 66,71 ---- package com.babeldoc.core.option; + import com.babeldoc.core.Named; + /** * Filename option type. This represents filename options. *************** *** 72,83 **** * @version 1.0 */ ! public class FilenameConfigOptionType implements IConfigOptionType { /** - * getChild the name - * - * @return */ ! public String getName() { ! return "directory-path"; } --- 74,82 ---- * @version 1.0 */ ! public class FilenameConfigOptionType extends Named implements IConfigOptionType { /** */ ! FilenameConfigOptionType() { ! super("directory-path"); } *************** *** 85,91 **** * Is this object valid? * ! * @param value * ! * @return */ public boolean isValid(Object value) { --- 84,90 ---- * Is this object valid? * ! * @param value to check * ! * @return validity flag */ public boolean isValid(Object value) { *************** *** 94,100 **** /** ! * DOCUMENT ME! ! * ! * @return */ public String[] getValidTypes() { --- 93,97 ---- /** ! * @return names of valid types */ public String[] getValidTypes() { Index: ServiceTypeConfigOptionType.java =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/modules/core/src/com/babeldoc/core/option/ServiceTypeConfigOptionType.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** ServiceTypeConfigOptionType.java 12 Aug 2003 23:44:43 -0000 1.6 --- ServiceTypeConfigOptionType.java 23 Jul 2004 22:34:56 -0000 1.7 *************** *** 81,90 **** */ public class ServiceTypeConfigOptionType extends ValueListConfigOptionType { /** * Construct as a service type - which is list. * ! * @param serviceType */ public ServiceTypeConfigOptionType(String serviceType) { if (serviceType != null) { Map services = ServiceFactory.getAllServices(serviceType); --- 81,102 ---- */ public class ServiceTypeConfigOptionType extends ValueListConfigOptionType { + + /** + * getChild the name + * + * @return + */ + ServiceTypeConfigOptionType() { + setName("service-name"); + } + /** * Construct as a service type - which is list. * ! * @param serviceType servicetype to wrap */ public ServiceTypeConfigOptionType(String serviceType) { + setName("service-name"); + if (serviceType != null) { Map services = ServiceFactory.getAllServices(serviceType); *************** *** 107,123 **** * Creates a new ServiceTypeConfigOptionType object. * ! * @param aType DOCUMENT ME! */ public ServiceTypeConfigOptionType(Type aType) { this(aType.getServicePrefix()); } - - /** - * getChild the name - * - * @return - */ - public String getName() { - return "service-name"; - } } --- 119,126 ---- * Creates a new ServiceTypeConfigOptionType object. * ! * @param aType type */ public ServiceTypeConfigOptionType(Type aType) { this(aType.getServicePrefix()); } } Index: IntegerConfigOptionType.java =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/modules/core/src/com/babeldoc/core/option/IntegerConfigOptionType.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** IntegerConfigOptionType.java 12 Aug 2003 23:44:43 -0000 1.4 --- IntegerConfigOptionType.java 23 Jul 2004 22:34:56 -0000 1.5 *************** *** 66,69 **** --- 66,71 ---- package com.babeldoc.core.option; + import com.babeldoc.core.Named; + /** * This represents a integer option type. *************** *** 72,83 **** * @version 1.0 */ ! public class IntegerConfigOptionType implements IConfigOptionType { /** - * getChild the name - * - * @return */ ! public String getName() { ! return "integer"; } --- 74,82 ---- * @version 1.0 */ ! public class IntegerConfigOptionType extends Named implements IConfigOptionType { /** */ ! IntegerConfigOptionType() { ! super("integer"); } |
From: bruce m. <tr...@us...> - 2004-07-23 22:32:46
|
Update of /cvsroot/babeldoc/babeldoc/modules/core/src/com/babeldoc/core/module In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10516/modules/core/src/com/babeldoc/core/module Modified Files: BabeldocModule.java BabeldocModuleList.java Log Message: javadoc and formatting here. Index: BabeldocModuleList.java =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/modules/core/src/com/babeldoc/core/module/BabeldocModuleList.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** BabeldocModuleList.java 29 Aug 2003 02:03:22 -0000 1.5 --- BabeldocModuleList.java 23 Jul 2004 22:32:37 -0000 1.6 *************** *** 102,106 **** * Get the instance variable. Instantiate the object if necessary. * ! * @return */ public static BabeldocModuleList getInstance() { --- 102,106 ---- * Get the instance variable. Instantiate the object if necessary. * ! * @return singleton */ public static BabeldocModuleList getInstance() { *************** *** 113,140 **** /** ! * Get the module with the name, depName * ! * @param depName * ! * @return */ ! public BabeldocModule getModule(String depName) { ! return (BabeldocModule) this.map.get(depName); } ! private static RuntimeException makeCircularException(String end, Stack stk) { ! StringBuffer sb = new StringBuffer("Circular dependency: "); ! sb.append(end); ! String c; ! do { ! c = (String) stk.pop(); ! sb.append(" <- "); ! sb.append(c); ! } while (!c.equals(end)); ! return new RuntimeException(new String(sb)); } ! /** * Get the sorted list from the least dependant to the most dependant. * --- 113,153 ---- /** ! * Get the module with the name, aModule * ! * @param aModule module name * ! * @return the module */ ! public BabeldocModule getModule(String aModule) { ! return (BabeldocModule) this.map.get(aModule); } ! /** ! * Add the module to the list of modules. It initializes the module ! * before it adds it to the map. The cached modules get killed. ! * ! * @param module to add to Babeldoc ! */ ! public void addModule(BabeldocModule module) { ! module.initialize(); ! map.put(module.getName(), module); ! modules = null; // Set the cached list of modules to null. ! } ! /** ! * Load the module list using the jakarta-discovery services methods. ! * Initialize the modules as we go. ! */ ! private void loadDynamicModules() { ! for (Enumeration i = Service.providers(BabeldocModule.class); ! i.hasMoreElements();) { ! BabeldocModule module = (BabeldocModule) i.nextElement(); ! ! // System.out.println("Module found: "+module.getName()); ! addModule(module); ! } } ! /** * Get the sorted list from the least dependant to the most dependant. * *************** *** 237,263 **** } ! /** ! * Add the module to the list of modules ! * ! * @param module ! */ ! public void addModule(BabeldocModule module) { ! module.initialize(); ! map.put(module.getName(), module); ! modules = null; // Set the cached list of modules to null. ! } ! ! /** ! * Load the module list using the jakarta-discovery services methods. ! * Initialize the modules as we go. ! */ ! private void loadDynamicModules() { ! for (Enumeration i = Service.providers(BabeldocModule.class); ! i.hasMoreElements();) { ! BabeldocModule module = (BabeldocModule) i.nextElement(); ! // System.out.println("Module found: "+module.getName()); ! addModule(module); ! } } } --- 250,265 ---- } ! private static RuntimeException makeCircularException(String end, Stack stk) { ! StringBuffer sb = new StringBuffer("Circular dependency: "); ! sb.append(end); ! String c; ! do { ! c = (String) stk.pop(); ! sb.append(" <- "); ! sb.append(c); ! } while (!c.equals(end)); ! return new RuntimeException(new String(sb)); } + } Index: BabeldocModule.java =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/modules/core/src/com/babeldoc/core/module/BabeldocModule.java,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** BabeldocModule.java 29 Aug 2003 02:03:22 -0000 1.16 --- BabeldocModule.java 23 Jul 2004 22:32:37 -0000 1.17 *************** *** 83,87 **** * module does not depend on return a null set or a null object. * ! * @return */ public abstract Set getDependsOn(); --- 83,87 ---- * module does not depend on return a null set or a null object. * ! * @return set of dependant modules */ public abstract Set getDependsOn(); *************** *** 92,96 **** * numbers. * ! * @return */ public abstract String getName(); --- 92,96 ---- * numbers. * ! * @return module name */ public abstract String getName(); |
From: bruce m. <tr...@us...> - 2004-07-23 22:32:05
|
Update of /cvsroot/babeldoc/babeldoc/modules/core/src/com/babeldoc/core/journal In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10367/modules/core/src/com/babeldoc/core/journal Modified Files: Journal.java JournalFactory.java JournalOperation.java JournalStatus.java JournalType.java Log Message: javadoc and formatting here. Index: JournalType.java =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/modules/core/src/com/babeldoc/core/journal/JournalType.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** JournalType.java 3 Sep 2003 03:25:30 -0000 1.5 --- JournalType.java 23 Jul 2004 22:31:54 -0000 1.6 *************** *** 83,87 **** * Private constructor - do not use this - use the constants above. * ! * @param journalType DOCUMENT ME! */ private JournalType(String journalType) { --- 83,87 ---- * Private constructor - do not use this - use the constants above. * ! * @param journalType journal type name */ private JournalType(String journalType) { *************** *** 92,96 **** * Get the class of the factory that implements the named factory type * ! * @param journalType DOCUMENT ME! * * @return class of the user factory --- 92,96 ---- * Get the class of the factory that implements the named factory type * ! * @param journalType journal name! * * @return class of the user factory *************** *** 101,107 **** /** ! * Make the service prefix ! * ! * @return */ public String getServicePrefix() { --- 101,105 ---- /** ! * @return service prefix for this type */ public String getServicePrefix() { Index: Journal.java =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/modules/core/src/com/babeldoc/core/journal/Journal.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Journal.java 3 Sep 2003 03:25:30 -0000 1.8 --- Journal.java 23 Jul 2004 22:31:54 -0000 1.9 *************** *** 68,71 **** --- 68,74 ---- import com.babeldoc.core.I18n; import com.babeldoc.core.journal.query.QueryTicket; + import com.babeldoc.core.pipeline.PipelineDocument; + import com.babeldoc.core.pipeline.PipelineException; + import com.babeldoc.core.pipeline.PipelineFactoryFactory; *************** *** 172,180 **** * Log string to the log file. This MUST be overriden. * ! * @param ticket ! * @param operation ! * @param other ! * @param stage ! * @param data * * @throws JournalException --- 175,183 ---- * Log string to the log file. This MUST be overriden. * ! * @param ticket log this ticket ! * @param operation journal operation ! * @param other other information ! * @param stage stage name ! * @param data other data * * @throws JournalException *************** *** 189,193 **** * replayJournalStep replay journal step * ! * @param queryTicket * * @throws JournalException DOCUMENT ME! --- 192,196 ---- * replayJournalStep replay journal step * ! * @param queryTicket replay from here * * @throws JournalException DOCUMENT ME! *************** *** 204,213 **** try { ! com.babeldoc.core.pipeline.PipelineDocument doc = getDocumentAtTicketStep(ticket, ! step); ! com.babeldoc.core.pipeline.PipelineFactoryFactory.process(pstage, doc, ! ticket, null); ! } catch (Exception e) { ! throw new JournalException("", e); } } --- 207,214 ---- try { ! PipelineDocument doc = getDocumentAtTicketStep(ticket, step); ! PipelineFactoryFactory.process(pstage, doc, ticket, null); ! } catch (PipelineException e) { ! throw new JournalException("Exception replaying ticket", e); } } Index: JournalStatus.java =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/modules/core/src/com/babeldoc/core/journal/JournalStatus.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** JournalStatus.java 27 Jun 2003 02:19:57 -0000 1.3 --- JournalStatus.java 23 Jul 2004 22:31:54 -0000 1.4 *************** *** 69,85 **** * <strong>JournalStatus</strong> represents a journal status document. * ! * <p> ! * Title: babel ! * </p> ! * ! * <p> ! * Description: universal document processor the more complicated stuff like ! * reading and writing the deltas are left to the children ! * </p> * - * <p> - * Copyright: Copyright (c) 2002 - * </p> - * * @author bmcdonald * @version 1.0 --- 69,75 ---- * <strong>JournalStatus</strong> represents a journal status document. * ! * <p>Description: universal document processor the more complicated stuff like ! * reading and writing the deltas are left to the children</p> * * @author bmcdonald * @version 1.0 *************** *** 102,106 **** * constructor. * ! * @param status DOCUMENT ME! */ private JournalStatus(String status) { --- 92,96 ---- * constructor. * ! * @param status status literal */ private JournalStatus(String status) { *************** *** 111,115 **** * Set the additional information for this status * ! * @param additionalInfo */ public void setAdditionalInfo(String additionalInfo) { --- 101,105 ---- * Set the additional information for this status * ! * @param additionalInfo extra information on this status */ public void setAdditionalInfo(String additionalInfo) { *************** *** 120,124 **** * Get the additional information for this status * ! * @return */ public String getAdditionalInfo() { --- 110,114 ---- * Get the additional information for this status * ! * @return addition information */ public String getAdditionalInfo() { *************** *** 133,137 **** * toString * ! * @return DOCUMENT ME! */ public String toString() { --- 123,127 ---- * toString * ! * @return stringified object */ public String toString() { Index: JournalFactory.java =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/modules/core/src/com/babeldoc/core/journal/JournalFactory.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** JournalFactory.java 3 Sep 2003 03:25:30 -0000 1.7 --- JournalFactory.java 23 Jul 2004 22:31:54 -0000 1.8 *************** *** 70,75 **** import com.babeldoc.core.option.ConfigData; import com.babeldoc.core.option.IConfigData; - import com.babeldoc.core.config.ConfigService; - import com.babeldoc.core.config.IConfig; --- 70,73 ---- *************** *** 90,94 **** /** static: holds singleton reference */ ! private static JournalFactory instance = new JournalFactory(); /** instance: the singletons actual reference to the implementing journal */ --- 88,92 ---- /** static: holds singleton reference */ ! private static JournalFactory instance = null; /** instance: the singletons actual reference to the implementing journal */ *************** *** 102,106 **** IConfigData data = ConfigData.getConfigData("root", CONFIG_NAME); String journalType = data.getValue(JOURNAL_TYPE); ! LogService.getInstance().logDebug(I18n.get("016001", journalType)); try { --- 100,105 ---- IConfigData data = ConfigData.getConfigData("root", CONFIG_NAME); String journalType = data.getValue(JOURNAL_TYPE); ! if(LogService.getInstance().isDebugEnabled()) ! LogService.getInstance().logDebug(I18n.get("016001", journalType)); try { *************** *** 121,124 **** --- 120,126 ---- */ public static JournalFactory getInstance() { + if(instance==null) { + instance = new JournalFactory(); + } return instance; } Index: JournalOperation.java =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/modules/core/src/com/babeldoc/core/journal/JournalOperation.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** JournalOperation.java 17 Aug 2003 22:34:47 -0000 1.4 --- JournalOperation.java 23 Jul 2004 22:31:54 -0000 1.5 *************** *** 70,90 **** /** ! * <strong>JournalOperation</strong> set of journal operations. ! * ! * <p> ! * Title: Babel ! * </p> ! * ! * <p> ! * Description: Universal Document Processor ! * </p> ! * ! * <p> ! * Copyright: Copyright (c) 2002 ! * </p> ! * ! * <p> ! * Company: ! * </p> * * @author Bmcdonald --- 70,84 ---- /** ! * <strong>JournalOperation</strong> set of journal operations. The set ! * of valid operations are: ! * <ul> ! * <li><i>newTicket</i> a new ticket has been created.</li> ! * <li><i>forkTicket</i> a new ticket has been forked from an existing ticket.</li> ! * <li><i>updateStatus</i> a new ticket has been updated.</li> ! * <li><i>updateDocument</i> the document has been persisted.</li> ! * <li><i>updateJournal</i> the journal has been updated.</li> ! * </ul> ! * Access to the various methods are obtained by the static instances ! * of the JournalOperation. * * @author Bmcdonald *************** *** 125,137 **** */ public static JournalOperation getJournalOperation(String op) { ! if (op.equals(NEW_TICKET)) { return newTicket; ! } else if (op.equals(FORK_TICKET)) { return forkTicket; ! } else if (op.equals(UPDATE_STATUS)) { return updateStatus; ! } else if (op.equals(UPDATE_DOCUMENT)) { return updateDocument; ! } else if (op.equals(UPDATE_JOURNAL)) { return updateJournal; } else { --- 119,131 ---- */ public static JournalOperation getJournalOperation(String op) { ! if (NEW_TICKET.equals(op)) { return newTicket; ! } else if (FORK_TICKET.equals(op)) { return forkTicket; ! } else if (UPDATE_STATUS.equals(op)) { return updateStatus; ! } else if (UPDATE_DOCUMENT.equals(op)) { return updateDocument; ! } else if (UPDATE_JOURNAL.equals(op)) { return updateJournal; } else { *************** *** 143,147 **** * equality operation * ! * @param obj * * @return --- 137,141 ---- * equality operation * ! * @param obj comparison object * * @return *************** *** 159,175 **** switch (operation) { case 0: ! return "newTicket"; case 1: ! return "forkTicket"; case 2: ! return "updateStatus"; case 3: ! return "updateDocument"; ! case 4: ! return "updateJournal"; } --- 153,169 ---- switch (operation) { case 0: ! return NEW_TICKET; case 1: ! return FORK_TICKET; case 2: ! return UPDATE_STATUS; case 3: ! return UPDATE_DOCUMENT; ! case 4: ! return UPDATE_JOURNAL; } |
From: bruce m. <tr...@us...> - 2004-07-23 22:32:05
|
Update of /cvsroot/babeldoc/babeldoc/modules/core/src/com/babeldoc/core/journal/dummy In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10367/modules/core/src/com/babeldoc/core/journal/dummy Modified Files: DummyJournal.java Log Message: javadoc and formatting here. Index: DummyJournal.java =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/modules/core/src/com/babeldoc/core/journal/dummy/DummyJournal.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** DummyJournal.java 2 Jul 2004 15:25:14 -0000 1.3 --- DummyJournal.java 23 Jul 2004 22:31:55 -0000 1.4 *************** *** 11,15 **** /** ! * A dummy journal - this journal does nothing * * @author bmcdonald --- 11,17 ---- /** ! * A dummy journal - this journal does nothing. All logging and queries ! * do nothing and return nothing. Use this journal if you want to ! * <strong>not</strong> do any logging. * * @author bmcdonald |
From: bruce m. <tr...@us...> - 2004-07-23 22:32:04
|
Update of /cvsroot/babeldoc/babeldoc/modules/core/src/com/babeldoc/core/journal/command In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10367/modules/core/src/com/babeldoc/core/journal/command Modified Files: JournalCommand.java Log Message: javadoc and formatting here. Index: JournalCommand.java =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/modules/core/src/com/babeldoc/core/journal/command/JournalCommand.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** JournalCommand.java 16 Sep 2003 05:19:00 -0000 1.6 --- JournalCommand.java 23 Jul 2004 22:31:54 -0000 1.7 *************** *** 66,69 **** --- 66,70 ---- package com.babeldoc.core.journal.command; + import com.babeldoc.core.BabeldocCommand; import com.babeldoc.core.I18n; import com.babeldoc.core.LogService; *************** *** 75,78 **** --- 76,80 ---- import com.babeldoc.core.journal.query.QueryOption; import com.babeldoc.core.journal.query.QueryTicket; + import com.babeldoc.core.pipeline.PipelineDocument; import com.mindprod.csv.CSVWriter; *************** *** 99,103 **** * @version 1.0 */ ! public class JournalCommand extends com.babeldoc.core.BabeldocCommand { /** constants: display xml */ private static final int XML_DISP = 1; --- 101,105 ---- * @version 1.0 */ ! public class JournalCommand extends BabeldocCommand { /** constants: display xml */ private static final int XML_DISP = 1; *************** *** 108,111 **** --- 110,115 ---- /** instance: display mode */ private int dispMode = 0; + + private LogService log = LogService.getInstance(this.getClass().getName()); /** *************** *** 135,141 **** try { ! com.babeldoc.core.pipeline.PipelineDocument doc = JournalFactory.getJournal() ! .getDocumentAtTicketStep(ticket, ! step); if (doc != null) { --- 139,144 ---- try { ! PipelineDocument doc = JournalFactory. ! getJournal().getDocumentAtTicketStep(ticket, step); if (doc != null) { *************** *** 148,155 **** } } else { ! System.out.println(com.babeldoc.core.I18n.get("012004")); } } catch (Exception e) { ! System.err.println(I18n.get("000051", e)); } --- 151,158 ---- } } else { ! log.logWarn(I18n.get("012004")); } } catch (Exception e) { ! log.logWarn(I18n.get("000051", e)); } *************** *** 186,191 **** max = Integer.parseInt(cmdLine.getOptionValue('n')); } catch (Exception e) { ! com.babeldoc.core.LogService.getInstance().logError(I18n.get("012002"), ! null); } } --- 189,193 ---- max = Integer.parseInt(cmdLine.getOptionValue('n')); } catch (Exception e) { ! log.logError(I18n.get("012002"), e); } } *************** *** 195,199 **** index = Integer.parseInt(cmdLine.getOptionValue('i')); } catch (Exception e) { ! com.babeldoc.core.LogService.getInstance().logError(I18n.get("012003"), null); } --- 197,201 ---- index = Integer.parseInt(cmdLine.getOptionValue('i')); } catch (Exception e) { ! LogService.getInstance().logError(I18n.get("012003"), null); } *************** *** 227,231 **** renderQueryTickets(qts); } catch (Exception e) { ! System.err.println(com.babeldoc.core.I18n.get("000051", e)); } --- 229,233 ---- renderQueryTickets(qts); } catch (Exception e) { ! log.logWarn(I18n.get("000051", e)); } *************** *** 252,256 **** JournalFactory.getJournal().replayTicket(ticket, step); } catch (Exception e) { ! System.err.println(I18n.get("000051", e)); } --- 254,258 ---- JournalFactory.getJournal().replayTicket(ticket, step); } catch (Exception e) { ! log.logWarn(I18n.get("000051", e)); } *************** *** 276,280 **** renderQueryTickets(qts); } catch (Exception e) { ! System.err.println(I18n.get("000051", e)); } --- 278,282 ---- renderQueryTickets(qts); } catch (Exception e) { ! log.logWarn(I18n.get("000051", e)); } |
Update of /cvsroot/babeldoc/babeldoc/modules/core/src/com/babeldoc/core/config In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10245/modules/core/src/com/babeldoc/core/config Modified Files: ConfigChangeEvent.java ConfigChangeNotifier.java DefaultConfig.java IConfigChangeListener.java IConfigChangeNotifier.java Log Message: javadoc and formatting here. Index: IConfigChangeListener.java =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/modules/core/src/com/babeldoc/core/config/IConfigChangeListener.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** IConfigChangeListener.java 3 Apr 2004 15:11:33 -0000 1.1 --- IConfigChangeListener.java 23 Jul 2004 22:31:05 -0000 1.2 *************** *** 1,83 **** ! /* ==================================================================== ! * The Apache Software License, Version 1.1 ! * ! * Copyright (c) 2000 The Apache Software Foundation. All rights ! * reserved. ! * ! * Redistribution and use in source and binary forms, with or without ! * modification, are permitted provided that the following conditions ! * are met: ! * ! * 1. Redistributions of source code must retain the above copyright ! * notice, this list of conditions and the following disclaimer. ! * ! * 2. Redistributions in binary form must reproduce the above copyright ! * notice, this list of conditions and the following disclaimer in ! * the documentation and/or other materials provided with the ! * distribution. ! * ! * 3. The end-user documentation included with the redistribution, ! * if any, must include the following acknowledgment: ! * "This product includes software developed by the ! * Apache Software Foundation (http://www.apache.org/)." ! * Alternately, this acknowledgment may appear in the software itself, ! * if and wherever such third-party acknowledgments normally appear. ! * ! * 4. The names "Apache" and "Apache Software Foundation" must ! * not be used to endorse or promote products derived from this ! * software without prior written permission. For written ! * permission, please contact ap...@ap.... ! * ! * 5. Products derived from this software may not be called "Apache", ! * nor may "Apache" appear in their name, without prior written ! * permission of the Apache Software Foundation. ! * ! * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED ! * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES ! * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE ! * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR ! * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, ! * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT ! * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF ! * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ! * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, ! * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT ! * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF ! * SUCH DAMAGE. ! * ==================================================================== ! * ! * This software consists of voluntary contributions made by many ! * individuals on behalf of the Apache Software Foundation. For more ! * information on the Apache Software Foundation, please see ! * <http://www.apache.org/>. ! * ! * Portions of this software are based upon public domain software ! * originally written at the National Center for Supercomputing Applications, ! * University of Illinois, Urbana-Champaign. ! * ==================================================================== ! * ! * Babeldoc: The Universal Document Processor ! * ! * $Header$ ! * $DateTime$ ! * $Author$ ! * ! */ ! package com.babeldoc.core.config; ! ! /** ! * <p>An interface for classes that wish to recieve events when a configuration ! * object changes</p> ! * ! * @author Bmcdonald ! * @version 1.3 ! */ ! public interface IConfigChangeListener { ! /** ! * Method called when the configuration data changes for a configuration ! * object. ! * ! * @param event the configuration change event ! */ ! public void configChanged(ConfigChangeEvent event); ! } --- 1 ---- ! /* ==================================================================== * The Apache Software License, Version 1.1 * * Copyright (c) 2000 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "Apache" and "Apache Software Foundation" must * not be used to endorse or promote products derived from this * software without prior written permission. For written * permission, please contact ap...@ap.... * * 5. Products derived from this software may not be called "Apache", * nor may "Apache" appear in their name, without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * <http://www.apache.org/>. * * Portions of this software are based upon public domain software * originally written at the National Center for Supercomputing Applications, * University of Illinois, Urbana-Champaign. * ==================================================================== * * Babeldoc: The Universal Document Processor * * $Header$ * $DateTime$ * $Author$ * */ package com.babeldoc.core.config; /** * <p>An interface for classes that wish to recieve events when a configuration * object changes</p> * * @author Bmcdonald * @version 1.3 */ public interface IConfigChangeListener { /** * Method called when the configuration data changes for a configuration * object. * * @param event the configuration change event */ public void configChanged(ConfigChangeEvent event); } \ No newline at end of file Index: DefaultConfig.java =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/modules/core/src/com/babeldoc/core/config/DefaultConfig.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** DefaultConfig.java 3 Apr 2004 15:11:32 -0000 1.1 --- DefaultConfig.java 23 Jul 2004 22:31:05 -0000 1.2 *************** *** 68,72 **** import java.util.HashMap; import java.util.Map; - import java.util.Properties; import java.util.Set; --- 68,71 ---- Index: IConfigChangeNotifier.java =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/modules/core/src/com/babeldoc/core/config/IConfigChangeNotifier.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** IConfigChangeNotifier.java 3 Apr 2004 15:11:32 -0000 1.1 --- IConfigChangeNotifier.java 23 Jul 2004 22:31:05 -0000 1.2 *************** *** 1,114 **** ! /* ==================================================================== ! * The Apache Software License, Version 1.1 ! * ! * Copyright (c) 2000 The Apache Software Foundation. All rights ! * reserved. ! * ! * Redistribution and use in source and binary forms, with or without ! * modification, are permitted provided that the following conditions ! * are met: ! * ! * 1. Redistributions of source code must retain the above copyright ! * notice, this list of conditions and the following disclaimer. ! * ! * 2. Redistributions in binary form must reproduce the above copyright ! * notice, this list of conditions and the following disclaimer in ! * the documentation and/or other materials provided with the ! * distribution. ! * ! * 3. The end-user documentation included with the redistribution, ! * if any, must include the following acknowledgment: ! * "This product includes software developed by the ! * Apache Software Foundation (http://www.apache.org/)." ! * Alternately, this acknowledgment may appear in the software itself, ! * if and wherever such third-party acknowledgments normally appear. ! * ! * 4. The names "Apache" and "Apache Software Foundation" must ! * not be used to endorse or promote products derived from this ! * software without prior written permission. For written ! * permission, please contact ap...@ap.... ! * ! * 5. Products derived from this software may not be called "Apache", ! * nor may "Apache" appear in their name, without prior written ! * permission of the Apache Software Foundation. ! * ! * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED ! * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES ! * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE ! * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR ! * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, ! * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT ! * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF ! * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ! * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, ! * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT ! * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF ! * SUCH DAMAGE. ! * ==================================================================== ! * ! * This software consists of voluntary contributions made by many ! * individuals on behalf of the Apache Software Foundation. For more ! * information on the Apache Software Foundation, please see ! * <http://www.apache.org/>. ! * ! * Portions of this software are based upon public domain software ! * originally written at the National Center for Supercomputing Applications, ! * University of Illinois, Urbana-Champaign. ! * ==================================================================== ! * ! * Babeldoc: The Universal Document Processor ! * ! * $Header$ ! * $DateTime$ ! * $Author$ ! * ! */ ! package com.babeldoc.core.config; ! ! /** ! * <p>An interface for classes that wish to recieve events when a configuration ! * object changes</p> ! * ! * @author Bmcdonald ! * @version 1.3 ! */ ! public interface IConfigChangeNotifier { ! /** ! * Add a configuration change listener to this ! * ! * @param listener ! */ ! public void addConfigChangeListener(IConfigChangeListener listener) throws ConfigException; ! ! /** ! * Add a configuration change listener to this object and a configuration ! * that this listener is interested in. ! * ! * @param listener the listener to recieve notifications ! * @param config the configuration of interest ! */ ! public void addConfigChangeListener(IConfigChangeListener listener, String config) throws ConfigException; ! ! /** ! * Add a configuration change listener to this object and a configuration ! * that this listener is interested in. ! * ! * @param listener the listener to recieve notifications ! * @param configs the configurations of interest ! */ ! public void addConfigChangeListener(IConfigChangeListener listener, String [] configs) throws ConfigException; ! ! /** ! * remove the listener from the list of configuration change listeners. ! * ! * @param listener the listener to remove ! */ ! public void removeConfigChangeListener(IConfigChangeListener listener); ! ! /** ! * Fire event to all the configurations that are interested in this event. ! * ! * @param config ! */ ! public void configChanged(String config); ! } --- 1 ---- ! /* ==================================================================== * The Apache Software License, Version 1.1 * * Copyright (c) 2000 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "Apache" and "Apache Software Foundation" must * not be used to endorse or promote products derived from this * software without prior written permission. For written * permission, please contact ap...@ap.... * * 5. Products derived from this software may not be called "Apache", * nor may "Apache" appear in their name, without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * <http://www.apache.org/>. * * Portions of this software are based upon public domain software * originally written at the National Center for Supercomputing Applications, * University of Illinois, Urbana-Champaign. * ==================================================================== * * Babeldoc: The Universal Document Processor * * $Header$ * $DateTime$ * $Author$ * */ package com.babeldoc.core.config; /** * <p>An interface for classes that wish to recieve events when a configuration * object changes</p> * * @author Bmcdonald * @version 1.3 */ public interface IConfigChangeNotifier { /** * Add a configuration change listener to this * * @param listener */ public void addConfigChangeListener(IConfigChangeListener listener) throws ConfigException; /** * Add a configuration change listener to this object and a configuration * that this listener is interested in. * * @param listener the listener to recieve notifications * @param config the configuration of interest */ public void addConfigChangeListener( IConfigChangeListener listener, String config) throws ConfigException; /** * Add a configuration change listener to this object and a configuration * that this listener is interested in. * * @param listener the listener to recieve notifications * @param configs the configurations of interest */ public void addConfigChangeListener( IConfigChangeListener listener, String[] configs) throws ConfigException; /** * remove the listener from the list of configuration change listeners. * * @param listener the listener to remove */ public void removeConfigChangeListener(IConfigChangeListener listener); /** * Fire event to all the configurations that are interested in this event. * * @param config */ public void configChanged(String config); } \ No newline at end of file Index: ConfigChangeEvent.java =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/modules/core/src/com/babeldoc/core/config/ConfigChangeEvent.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ConfigChangeEvent.java 3 Apr 2004 15:11:32 -0000 1.1 --- ConfigChangeEvent.java 23 Jul 2004 22:31:05 -0000 1.2 *************** *** 1,86 **** ! /* ==================================================================== ! * The Apache Software License, Version 1.1 ! * ! * Copyright (c) 2000 The Apache Software Foundation. All rights ! * reserved. ! * ! * Redistribution and use in source and binary forms, with or without ! * modification, are permitted provided that the following conditions ! * are met: ! * ! * 1. Redistributions of source code must retain the above copyright ! * notice, this list of conditions and the following disclaimer. ! * ! * 2. Redistributions in binary form must reproduce the above copyright ! * notice, this list of conditions and the following disclaimer in ! * the documentation and/or other materials provided with the ! * distribution. ! * ! * 3. The end-user documentation included with the redistribution, ! * if any, must include the following acknowledgment: ! * "This product includes software developed by the ! * Apache Software Foundation (http://www.apache.org/)." ! * Alternately, this acknowledgment may appear in the software itself, ! * if and wherever such third-party acknowledgments normally appear. ! * ! * 4. The names "Apache" and "Apache Software Foundation" must ! * not be used to endorse or promote products derived from this ! * software without prior written permission. For written ! * permission, please contact ap...@ap.... ! * ! * 5. Products derived from this software may not be called "Apache", ! * nor may "Apache" appear in their name, without prior written ! * permission of the Apache Software Foundation. ! * ! * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED ! * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES ! * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE ! * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR ! * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, ! * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT ! * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF ! * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ! * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, ! * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT ! * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF ! * SUCH DAMAGE. ! * ==================================================================== ! * ! * This software consists of voluntary contributions made by many ! * individuals on behalf of the Apache Software Foundation. For more ! * information on the Apache Software Foundation, please see ! * <http://www.apache.org/>. ! * ! * Portions of this software are based upon public domain software ! * originally written at the National Center for Supercomputing Applications, ! * University of Illinois, Urbana-Champaign. ! * ==================================================================== ! * ! * Babeldoc: The Universal Document Processor ! * ! * $Header$ ! * $DateTime$ ! * $Author$ ! * ! */ ! package com.babeldoc.core.config; ! ! /** ! * Change event that is sent when a configuration change is detected by the ! * configuration server ! * ! * @author bmcdonald ! * @version 1.3 ! */ ! public class ConfigChangeEvent { ! public String config; ! ! /** ! * Construct this configuration. ! * ! * @param config ! */ ! public ConfigChangeEvent(String config) { ! this.config = config; ! } ! } --- 1 ---- ! /* ==================================================================== * The Apache Software License, Version 1.1 * * Copyright (c) 2000 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "Apache" and "Apache Software Foundation" must * not be used to endorse or promote products derived from this * software without prior written permission. For written * permission, please contact ap...@ap.... * * 5. Products derived from this software may not be called "Apache", * nor may "Apache" appear in their name, without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * <http://www.apache.org/>. * * Portions of this software are based upon public domain software * originally written at the National Center for Supercomputing Applications, * University of Illinois, Urbana-Champaign. * ==================================================================== * * Babeldoc: The Universal Document Processor * * $Header$ * $DateTime$ * $Author$ * */ package com.babeldoc.core.config; /** * Change event that is sent when a configuration change is detected by the * configuration server * * @author bmcdonald * @version 1.3 */ public class ConfigChangeEvent { public String config; /** * Construct this configuration. * * @param config */ public ConfigChangeEvent(String config) { this.config = config; } } \ No newline at end of file Index: ConfigChangeNotifier.java =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/modules/core/src/com/babeldoc/core/config/ConfigChangeNotifier.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ConfigChangeNotifier.java 3 Apr 2004 15:11:32 -0000 1.1 --- ConfigChangeNotifier.java 23 Jul 2004 22:31:05 -0000 1.2 *************** *** 1,148 **** ! /* ==================================================================== ! * The Apache Software License, Version 1.1 ! * ! * Copyright (c) 2000 The Apache Software Foundation. All rights ! * reserved. ! * ! * Redistribution and use in source and binary forms, with or without ! * modification, are permitted provided that the following conditions ! * are met: ! * ! * 1. Redistributions of source code must retain the above copyright ! * notice, this list of conditions and the following disclaimer. ! * ! * 2. Redistributions in binary form must reproduce the above copyright ! * notice, this list of conditions and the following disclaimer in ! * the documentation and/or other materials provided with the ! * distribution. ! * ! * 3. The end-user documentation included with the redistribution, ! * if any, must include the following acknowledgment: ! * "This product includes software developed by the ! * Apache Software Foundation (http://www.apache.org/)." ! * Alternately, this acknowledgment may appear in the software itself, ! * if and wherever such third-party acknowledgments normally appear. ! * ! * 4. The names "Apache" and "Apache Software Foundation" must ! * not be used to endorse or promote products derived from this ! * software without prior written permission. For written ! * permission, please contact ap...@ap.... ! * ! * 5. Products derived from this software may not be called "Apache", ! * nor may "Apache" appear in their name, without prior written ! * permission of the Apache Software Foundation. ! * ! * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED ! * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES ! * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE ! * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR ! * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, ! * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT ! * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF ! * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ! * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, ! * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT ! * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF ! * SUCH DAMAGE. ! * ==================================================================== ! * ! * This software consists of voluntary contributions made by many ! * individuals on behalf of the Apache Software Foundation. For more ! * information on the Apache Software Foundation, please see ! * <http://www.apache.org/>. ! * ! * Portions of this software are based upon public domain software ! * originally written at the National Center for Supercomputing Applications, ! * University of Illinois, Urbana-Champaign. ! * ==================================================================== ! * ! * Babeldoc: The Universal Document Processor ! * ! * $Header$ ! * $DateTime$ ! * $Author$ ! * ! */ ! package com.babeldoc.core.config; ! ! import java.util.Map; ! import java.util.HashMap; ! import java.util.Iterator; ! ! /** ! * <p>An implementation for the IConfigChangeNotifier</p> ! * ! * @author Bmcdonald ! * @version 1.3 ! */ ! public class ConfigChangeNotifier { ! Map listeners = new HashMap(); ! ! /** ! * Add a configuration change listener. This configuration change listener is ! * always fired when a configuration changes - it responds to changes in any ! * configuration. ! * ! * @param listener ! */ ! public void addConfigChangeListener(IConfigChangeListener listener) { ! listeners.put(listener, new String[] {}); ! } ! ! /** ! * Add a configuration change listener to this object and a configuration ! * that this listener is interested in. ! * ! * @param listener the listener to recieve notifications ! * @param config the configuration of interest ! */ ! public void addConfigChangeListener(IConfigChangeListener listener, String config) { ! listeners.put(listener, new String[] {config}); ! } ! ! /** ! * Add a configuration change listener to this object and a configuration ! * that this listener is interested in. ! * ! * @param listener the listener to recieve notifications ! * @param configs the configurations of interest ! */ ! public void addConfigChangeListener(IConfigChangeListener listener, String [] configs) { ! listeners.put(listener, configs); ! } ! ! /** ! * remove the listener from the list of configuration change listeners. ! * ! * @param listener the listener to remove ! */ ! public void removeConfigChangeListener(IConfigChangeListener listener) { ! listeners.remove(listener); ! } ! ! /** ! * Fire event to all the configurations that are interested in this event. ! * ! * @param config ! */ ! public void configChanged(String config) { ! for(Iterator keys = listeners.keySet().iterator(); keys.hasNext();) { ! IConfigChangeListener listener = (IConfigChangeListener)keys.next(); ! String [] configs = (String[])listeners.get(listener); ! ! // If the config is null or the list of interested configs for this ! // listener is null, then fire the change ! if(config==null||configs==null||configs.length == 0) { ! listener.configChanged(new ConfigChangeEvent(config)); ! } else { ! // Otherwise try and find the changed configuration in the ! // list of configs that this listener is interested in. ! for(int i = 0; i < configs.length; ++i) { ! if(config.equals(configs[i])) { ! listener.configChanged(new ConfigChangeEvent(config)); ! } ! } ! } ! } ! } ! } --- 1 ---- ! /* ==================================================================== * The Apache Software License, Version 1.1 * * Copyright (c) 2000 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "Apache" and "Apache Software Foundation" must * not be used to endorse or promote products derived from this * software without prior written permission. For written * permission, please contact ap...@ap.... * * 5. Products derived from this software may not be called "Apache", * nor may "Apache" appear in their name, without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * <http://www.apache.org/>. * * Portions of this software are based upon public domain software * originally written at the National Center for Supercomputing Applications, * University of Illinois, Urbana-Champaign. * ==================================================================== * * Babeldoc: The Universal Document Processor * * $Header$ * $DateTime$ * $Author$ * */ package com.babeldoc.core.config; import java.util.Map; import java.util.HashMap; import java.util.Iterator; /** * <p>An implementation for the IConfigChangeNotifier</p> * * @author Bmcdonald * @version 1.3 */ public class ConfigChangeNotifier { Map listeners = new HashMap(); /** * Add a configuration change listener. This configuration change listener is * always fired when a configuration changes - it responds to changes in any * configuration. * * @param listener */ public void addConfigChangeListener(IConfigChangeListener listener) { listeners.put(listener, new String[] { }); } /** * Add a configuration change listener to this object and a configuration * that this listener is interested in. * * @param listener the listener to recieve notifications * @param config the configuration of interest */ public void addConfigChangeListener( IConfigChangeListener listener, String config) { listeners.put(listener, new String[] { config }); } /** * Add a configuration change listener to this object and a configuration * that this listener is interested in. * * @param listener the listener to recieve notifications * @param configs the configurations of interest */ public void addConfigChangeListener( IConfigChangeListener listener, String[] configs) { listeners.put(listener, configs); } /** * remove the listener from the list of configuration change listeners. * * @param listener the listener to remove */ public void removeConfigChangeListener(IConfigChangeListener listener) { listeners.remove(listener); } /** * Fire event to all the configurations that are interested in this event. * * @param config */ public void configChanged(String config) { for (Iterator keys = listeners.keySet().iterator(); keys.hasNext();) { IConfigChangeListener listener = (IConfigChangeListener) keys.next(); String[] configs = (String[]) listeners.get(listener); // If the config is null or the list of interested configs for this // listener is null, then fire the change if (config == null || configs == null || configs.length == 0) { listener.configChanged(new ConfigChangeEvent(config)); } else { // Otherwise try and find the changed configuration in the // list of configs that this listener is interested in. for (int i = 0; i < configs.length; ++i) { if (config.equals(configs[i])) { listener.configChanged(new ConfigChangeEvent(config)); } } } } } } \ No newline at end of file |
Update of /cvsroot/babeldoc/babeldoc/modules/core/src/com/babeldoc/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9437/modules/core/src/com/babeldoc/core Modified Files: BabeldocCommand.java EnvironmentLoader.java GeneralException.java I18n.java IShutdownListener.java Main.java Type.java Log Message: javadoc and formatting here. Index: BabeldocCommand.java =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/modules/core/src/com/babeldoc/core/BabeldocCommand.java,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** BabeldocCommand.java 16 Sep 2003 05:19:00 -0000 1.17 --- BabeldocCommand.java 23 Jul 2004 22:28:09 -0000 1.18 *************** *** 90,94 **** * @version 1.0 */ ! public abstract class BabeldocCommand { /** Options */ private Options options = new Options(); --- 90,95 ---- * @version 1.0 */ ! public abstract class BabeldocCommand ! extends Named { /** Options */ private Options options = new Options(); *************** *** 97,103 **** private String desc; - /** The name of the command */ - private String name; - /** instance: is this verbose */ private boolean verbose = false; --- 98,101 ---- *************** *** 113,122 **** * construct the object. The arguments from the command line. * ! * @param name DOCUMENT ME! ! * @param desc DOCUMENT ME! ! * @param args the array of strings */ protected BabeldocCommand(String name, String desc, String[] args) { ! this.name = name; this.desc = desc; --- 111,120 ---- * construct the object. The arguments from the command line. * ! * @param name command name ! * @param desc command description ! * @param args command line arguments */ protected BabeldocCommand(String name, String desc, String[] args) { ! setName(name); this.desc = desc; *************** *** 141,145 **** * Set the verbose flag * ! * @param verbose */ public void setVerbose(boolean verbose) { --- 139,143 ---- * Set the verbose flag * ! * @param verbose flag */ public void setVerbose(boolean verbose) { *************** *** 148,154 **** /** ! * get the verbose flag ! * ! * @return */ public boolean isVerbose() { --- 146,150 ---- /** ! * @return get the verbose flag */ public boolean isVerbose() { *************** *** 160,164 **** * line options * ! * @param commandLine the command line options that have been detectected */ public void executeCommand(CommandLine commandLine) { --- 156,160 ---- * line options * ! * @param commandLine the command line options that have been detected */ public void executeCommand(CommandLine commandLine) { *************** *** 194,209 **** */ public void printUsage() { ! System.out.println(name); System.out.println(desc); ! new HelpFormatter().printHelp(name, options); String version = ConfigService.getString("env/build", "babeldoc_version"); ! System.out.println( ! "\n" + com.babeldoc.core.I18n.get("001006", version)); ! System.out.println(com.babeldoc.core.I18n.get("001007")); ! System.out.println(com.babeldoc.core.I18n.get("001008")); ! System.out.println(com.babeldoc.core.I18n.get("001009")); } --- 190,204 ---- */ public void printUsage() { ! System.out.println(getName()); System.out.println(desc); ! new HelpFormatter().printHelp(getName(), options); String version = ConfigService.getString("env/build", "babeldoc_version"); ! System.out.println("\n" + I18n.get("001006", version)); ! System.out.println(I18n.get("001007")); ! System.out.println(I18n.get("001008")); ! System.out.println(I18n.get("001009")); } *************** *** 253,262 **** "verbose", false, ! com.babeldoc.core.I18n.get("001002")); options.addOption( "h", "help", false, ! com.babeldoc.core.I18n.get("001003")); options.addOption("d", "debug", false, "Write config info to stdout"); } --- 248,257 ---- "verbose", false, ! I18n.get("001002")); options.addOption( "h", "help", false, ! I18n.get("001003")); options.addOption("d", "debug", false, "Write config info to stdout"); } *************** *** 294,301 **** /** ! * Setup */ protected void setup() { ! EnvironmentLoader.loadEnvironment(); } } --- 289,297 ---- /** ! * Setup - calls the Environment loader which bootstraps the ! * <sttrong>Babeldoc</strong> environment. */ protected void setup() { ! // EnvironmentLoader.loadEnvironment(); } } Index: Main.java =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/modules/core/src/com/babeldoc/core/Main.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** Main.java 9 Aug 2003 00:21:13 -0000 1.9 --- Main.java 23 Jul 2004 22:28:09 -0000 1.10 *************** *** 78,84 **** /** ! * <p> ! * This is main entry point for executing the various babeldoc commands ! * </p> * * @author dejank --- 78,88 ---- /** ! * <p>This is main entry point for Babeldoc. This will then identify those ! * commands by inspecting all those modules that provide commands ! * and that have a service file in the META-INF that will initialize itself.</p> ! * <p>Babeldoc bootstraps itself from here. Its all about setting up ! * the configurations through-out the system. The modules participate in ! * that process for the initialization carried out in this file and ! * collaborators.</p> * * @author dejank *************** *** 89,95 **** /** ! * Do the call of the process. * ! * @param args */ public static void handleCommand(String[] args) { --- 93,103 ---- /** ! * <p>This method initializes the environment by loading the ! * <code>System.properties</code> from the env/configuration. ! * It then takes the first argument on the command line and ! * finds the service that corresponds to it. It then calls ! * that service. * ! * @param args command line arguments */ public static void handleCommand(String[] args) { *************** *** 142,147 **** System.out.println(I18n.get("001012")); listCommandServices(); ! System.out.println(""); ! } } --- 150,159 ---- System.out.println(I18n.get("001012")); listCommandServices(); ! ! String version = ConfigService.getString("env/build", "babeldoc_version"); ! System.out.println("\n\n" + I18n.get("001006", version)); ! System.out.println(I18n.get("001007")); ! System.out.println(I18n.get("001008")); ! System.out.println(I18n.get("001009")); } } *************** *** 160,173 **** System.out.print(objectArray[i] + ", "); } else { ! System.out.print(objectArray[i] + "."); } } } - String version = ConfigService.getString("env/build", "babeldoc_version"); - System.out.println("\n" + com.babeldoc.core.I18n.get("001006", version)); - System.out.println(I18n.get("001007")); - System.out.println(I18n.get("001008")); - System.out.println(I18n.get("001009")); } --- 172,180 ---- System.out.print(objectArray[i] + ", "); } else { ! System.out.print("or "+objectArray[i] + "."); } } } } *************** *** 179,183 **** * command to run any other command in babeldoc. * ! * @param args */ public static void main(String[] args) { --- 186,190 ---- * command to run any other command in babeldoc. * ! * @param args command line arguments */ public static void main(String[] args) { Index: IShutdownListener.java =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/modules/core/src/com/babeldoc/core/IShutdownListener.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** IShutdownListener.java 12 Aug 2003 00:28:29 -0000 1.1 --- IShutdownListener.java 23 Jul 2004 22:28:09 -0000 1.2 *************** *** 1,83 **** ! /* ==================================================================== ! * The Apache Software License, Version 1.1 ! * ! * Copyright (c) 2000 The Apache Software Foundation. All rights ! * reserved. ! * ! * Redistribution and use in source and binary forms, with or without ! * modification, are permitted provided that the following conditions ! * are met: ! * ! * 1. Redistributions of source code must retain the above copyright ! * notice, this list of conditions and the following disclaimer. ! * ! * 2. Redistributions in binary form must reproduce the above copyright ! * notice, this list of conditions and the following disclaimer in ! * the documentation and/or other materials provided with the ! * distribution. ! * ! * 3. The end-user documentation included with the redistribution, ! * if any, must include the following acknowledgment: ! * "This product includes software developed by the ! * Apache Software Foundation (http://www.apache.org/)." ! * Alternately, this acknowledgment may appear in the software itself, ! * if and wherever such third-party acknowledgments normally appear. ! * ! * 4. The names "Apache" and "Apache Software Foundation" must ! * not be used to endorse or promote products derived from this ! * software without prior written permission. For written ! * permission, please contact ap...@ap.... ! * ! * 5. Products derived from this software may not be called "Apache", ! * nor may "Apache" appear in their name, without prior written ! * permission of the Apache Software Foundation. ! * ! * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED ! * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES ! * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE ! * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR ! * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, ! * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT ! * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF ! * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ! * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, ! * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT ! * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF ! * SUCH DAMAGE. ! * ==================================================================== ! * ! * This software consists of voluntary contributions made by many ! * individuals on behalf of the Apache Software Foundation. For more ! * information on the Apache Software Foundation, please see ! * <http://www.apache.org/>. ! * ! * Portions of this software are based upon public domain software ! * originally written at the National Center for Supercomputing Applications, ! * University of Illinois, Urbana-Champaign. ! * ==================================================================== ! * ! * Babeldoc: The Universal Document Processor ! * ! * $Header$ ! * $DateTime$ ! * $Author$ ! * ! */ ! package com.babeldoc.core; ! ! /** ! * This interface can be implemented by all classes that need to be told about ! * when babeldoc is about to stutdown. All services, etc that what to be called when ! * babeldoc is about to be shutdown, need to implement this interface and then call the ! * EnvironmentLoader.addShutdownListener method with 'this'. ! * ! * @author bmcdonald ! * @version 1.1 ! */ ! public interface IShutdownListener { ! /** ! * Callback method from the loader to signal that the babeldoc ! * wants to shutdown. Please finalize, etc. ! */ ! public void shutdown(); ! } --- 1 ---- ! /* ==================================================================== * The Apache Software License, Version 1.1 * * Copyright (c) 2000 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "Apache" and "Apache Software Foundation" must * not be used to endorse or promote products derived from this * software without prior written permission. For written * permission, please contact ap...@ap.... * * 5. Products derived from this software may not be called "Apache", * nor may "Apache" appear in their name, without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * <http://www.apache.org/>. * * Portions of this software are based upon public domain software * originally written at the National Center for Supercomputing Applications, * University of Illinois, Urbana-Champaign. * ==================================================================== * * Babeldoc: The Universal Document Processor * * $Header$ * $DateTime$ * $Author$ * */ package com.babeldoc.core; /** * <p>This interface can be implemented by all classes that need to be told about * when babeldoc is about to stutdown. All services, etc that what to be called when * babeldoc is about to be shutdown, need to implement this interface and then call the * EnvironmentLoader.addShutdownListener method with 'this'.</p> * * @author bmcdonald * @version 1.1 */ public interface IShutdownListener { /** * Callback method from the loader to signal that the babeldoc * wants to shutdown. Please finalize, etc. */ public void shutdown(); } \ No newline at end of file Index: EnvironmentLoader.java =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/modules/core/src/com/babeldoc/core/EnvironmentLoader.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** EnvironmentLoader.java 26 Aug 2003 22:23:32 -0000 1.11 --- EnvironmentLoader.java 23 Jul 2004 22:28:09 -0000 1.12 *************** *** 79,87 **** /** ! * The environment loader is a streamlined way to getChild a set of name/values ! * pairs from a configuration into the system.properties. Certain third party ! * libraries relie on this explicitly and instead of doing thing from the ! * startup script, they are done using configuration properties. This makes ! * it easier when using merging , etc. * * @author Bmcdonald --- 79,92 ---- /** ! * EnvironmentLoader provides two major functions. ! * <ul> ! * <li>Bootstraps the configuration system</li> ! * <li>copys configurations to the <code>System.properties</code>. ! * Certain third party libraries rely on specific defines. This provides ! * an alternative to passing in large numbers of arcane defines to the ! * babeldoc script. Its better to do this using configuration properties.</li> ! * </ul> ! * This important class needs to be called early in the bootstrapping ! * process in order to allow access to configuration data. * * @author Bmcdonald *************** *** 106,110 **** * Get a copy of the the search paths. * ! * @return the array lists of search paths */ public static synchronized ArrayList getSearchPaths() { --- 111,115 ---- * Get a copy of the the search paths. * ! * @return the array list of search paths */ public static synchronized ArrayList getSearchPaths() { *************** *** 120,124 **** /** * Get the search paths and NOT a copy of them like the method of derivative ! * name. */ private static Collection loadSearchPaths() { --- 125,132 ---- /** * Get the search paths and NOT a copy of them like the method of derivative ! * name. This does not overwrite or append to the existing searchpaths. In ! * that case the existing searchpaths are returned. ! * ! * @return collection of all the search paths as strings. */ private static Collection loadSearchPaths() { *************** *** 141,145 **** * are completely flushed. * ! * @param dir */ public static synchronized void addSearchPath(String dir) { --- 149,153 ---- * are completely flushed. * ! * @param dir directory to be added to the */ public static synchronized void addSearchPath(String dir) { Index: I18n.java =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/modules/core/src/com/babeldoc/core/I18n.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** I18n.java 27 Jun 2003 02:19:57 -0000 1.6 --- I18n.java 23 Jul 2004 22:28:09 -0000 1.7 *************** *** 143,147 **** * @param args An array of replacement parameters for placeholders * ! * @return DOCUMENT ME! */ public static String get(String key, Object[] args) { --- 143,147 ---- * @param args An array of replacement parameters for placeholders * ! * @return i18n string */ public static String get(String key, Object[] args) { *************** *** 165,169 **** * @param param * ! * @return */ public static String get(String key, Object param) { --- 165,169 ---- * @param param * ! * @return i18n string */ public static String get(String key, Object param) { *************** *** 178,182 **** * @param param2 * ! * @return */ public static String get(String key, Object param1, Object param2) { --- 178,182 ---- * @param param2 * ! * @return i18n string */ public static String get(String key, Object param1, Object param2) { *************** *** 192,196 **** * @param param3 * ! * @return */ public static String get(String key, Object param1, Object param2, --- 192,196 ---- * @param param3 * ! * @return i18n string */ public static String get(String key, Object param1, Object param2, *************** *** 208,212 **** * @param param4 * ! * @return */ public static String get(String key, Object param1, Object param2, --- 208,212 ---- * @param param4 * ! * @return i18n string */ public static String get(String key, Object param1, Object param2, *************** *** 225,229 **** * @param param5 * ! * @return */ public static String get(String key, Object param1, Object param2, --- 225,229 ---- * @param param5 * ! * @return i18n string */ public static String get(String key, Object param1, Object param2, *************** *** 255,259 **** * @param string The string to be escaped * ! * @return DOCUMENT ME! */ protected static String escape(String string) { --- 255,259 ---- * @param string The string to be escaped * ! * @return escaped string */ protected static String escape(String string) { Index: GeneralException.java =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/modules/core/src/com/babeldoc/core/GeneralException.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** GeneralException.java 16 Jul 2003 02:26:05 -0000 1.8 --- GeneralException.java 23 Jul 2004 22:28:09 -0000 1.9 *************** *** 70,75 **** /** ! * Base exception class for the babel project. Wraps another exception and ! * provides a toString. * * @author Bmcdonald --- 70,75 ---- /** ! * Base exception class for <strong>Babeldoc</strong>. Provides nestable exceptions ! * as it extends the jakarta commons lang <code>NestableException</code> class. * * @author Bmcdonald Index: Type.java =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/modules/core/src/com/babeldoc/core/Type.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Type.java 3 Apr 2004 15:11:33 -0000 1.8 --- Type.java 23 Jul 2004 22:28:09 -0000 1.9 *************** *** 76,80 **** /** ! * There are a number of "Types" in babeldoc - each of them encode something * found in the services. This class is intended as a parent class for those * types. It standardizes the way these types are used - this is a good --- 76,80 ---- /** ! * There are a number of <i>Types</i> in <strong>Babeldoc</strong> - each of them encode something * found in the services. This class is intended as a parent class for those * types. It standardizes the way these types are used - this is a good *************** *** 112,119 **** * be overriden by client classes * ! * @return */ public String getServiceName() { ! log.logDebug("Service: " + getServicePrefix() + "." + getTypeName()); return getServicePrefix() + "." + getTypeName(); } --- 112,120 ---- * be overriden by client classes * ! * @return name of service */ public String getServiceName() { ! if(log.isDebugEnabled()) ! log.logDebug("Service: " + getServicePrefix() + "." + getTypeName()); return getServicePrefix() + "." + getTypeName(); } *************** *** 122,126 **** * Get the class represented by this type * ! * @return */ public Class getTypeClass() { --- 123,127 ---- * Get the class represented by this type * ! * @return type class reference */ public Class getTypeClass() { *************** *** 135,139 **** * Get an instance of this type. * ! * @return * * @throws ServiceException DOCUMENT ME! --- 136,140 ---- * Get an instance of this type. * ! * @return instance * * @throws ServiceException DOCUMENT ME! *************** *** 146,150 **** * Get the name of the type * ! * @return */ public String getTypeName() { --- 147,151 ---- * Get the name of the type * ! * @return type name */ public String getTypeName() { *************** *** 155,161 **** * Do a comparison between these two types * ! * @param o * ! * @return */ public boolean equals(Object o) { --- 156,162 ---- * Do a comparison between these two types * ! * @param o comparison object * ! * @return equality */ public boolean equals(Object o) { *************** *** 174,178 **** * Make a nice string here. * ! * @return */ public String toString() { --- 175,179 ---- * Make a nice string here. * ! * @return stringified */ public String toString() { |
From: bruce m. <tr...@us...> - 2004-07-23 22:27:24
|
Update of /cvsroot/babeldoc/babeldoc/modules/core/src/com/babeldoc/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9138/modules/core/src/com/babeldoc/core Modified Files: LogService.java Log Message: Changed the way exceptions are logged when *not* in debug log leve. They just print the root cause - it makes finding the problem a lot simpler. Index: LogService.java =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/modules/core/src/com/babeldoc/core/LogService.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** LogService.java 27 Jun 2003 02:19:57 -0000 1.10 --- LogService.java 23 Jul 2004 22:27:14 -0000 1.11 *************** *** 68,72 **** import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; ! import java.util.HashMap; --- 68,72 ---- import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; ! import org.apache.commons.lang.exception.*; import java.util.HashMap; *************** *** 75,79 **** /** ! * Singleton for all logging operations. * * @author Bmcdonald --- 75,82 ---- /** ! * Singleton for all logging operations. This is a thin interface ! * over the <strong>Apache Jakarta Commons Logging</strong> interface with some ! * extras for Babeldoc like automatic logging differentiation based ! * on calling classname. * * @author Bmcdonald *************** *** 91,95 **** * Private constructor for this singleton. See getinstance * ! * @param logName DOCUMENT ME! */ private LogService(String logName) { --- 94,98 ---- * Private constructor for this singleton. See getinstance * ! * @param logName logger name */ private LogService(String logName) { *************** *** 103,109 **** /** ! * Get the stack * ! * @return DOCUMENT ME! */ public static StackTraceElement[] getCallStack() { --- 106,114 ---- /** ! * Get the StackTrace at the time of calling. This ! * Will be useful to determine the calling class name ! * for things like customized logging on a class basis. * ! * @return stack trace */ public static StackTraceElement[] getCallStack() { *************** *** 112,120 **** /** ! * Get the appropriate calling method * ! * @param i * ! * @return */ public static String getClassMethod(int i) { --- 117,127 ---- /** ! * Get the name of the class at a specific index ! * in the stack trace. This is useful for tracing ! * back the call stack. * ! * @param i the index into the stack trace * ! * @return name of the class */ public static String getClassMethod(int i) { *************** *** 127,133 **** /** ! * Return the debug level * ! * @return */ public boolean isDebugEnabled() { --- 134,140 ---- /** ! * Is the debug level enabled? * ! * @return debug enabled? */ public boolean isDebugEnabled() { *************** *** 136,142 **** /** ! * is error level enabled * ! * @return */ public boolean isErrorEnabled() { --- 143,149 ---- /** ! * is error level enabled? * ! * @return error enabled. */ public boolean isErrorEnabled() { *************** *** 145,151 **** /** ! * Is info enabled * ! * @return */ public boolean isInfoEnabled() { --- 152,158 ---- /** ! * Is info level enabled? * ! * @return info enabled */ public boolean isInfoEnabled() { *************** *** 154,160 **** /** ! * Get instance - get the singleton or create it. * ! * @return */ public static LogService getInstance() { --- 161,167 ---- /** ! * Get instance - get the reference or create it. * ! * @return instance log service */ public static LogService getInstance() { *************** *** 165,171 **** * Get the static instance of the log service * ! * @param logName * ! * @return */ public static LogService getInstance(String logName) { --- 172,178 ---- * Get the static instance of the log service * ! * @param logName logService name * ! * @return logService of name */ public static LogService getInstance(String logName) { *************** *** 183,187 **** * is Warning enabled * ! * @return */ public boolean isWarnEnabled() { --- 190,194 ---- * is Warning enabled * ! * @return warning enabled */ public boolean isWarnEnabled() { *************** *** 192,196 **** * log a warning message * ! * @param message */ public void logDebug(Object message) { --- 199,203 ---- * log a warning message * ! * @param message log message */ public void logDebug(Object message) { *************** *** 199,209 **** /** ! * log an error condition * ! * @param message ! * @param e */ public void logError(String message, Throwable e) { ! logger.error(getClassMethod(3) + message, e); } --- 206,224 ---- /** ! * log an error condition. If debug is enabled, then print a stack ! * trace, otherwise just the exception. * ! * @param message log message ! * @param e exception that caused this log */ public void logError(String message, Throwable e) { ! Throwable rootcause = e==null?null:getRootCause(e); ! ! if(logger.isDebugEnabled()) { ! logger.error(getClassMethod(3) + message, rootcause); ! } else { ! String rootCauseMsg = rootcause==null?"":rootcause.getMessage(); ! logger.error(message+rootCauseMsg); ! } } *************** *** 211,218 **** * log an error condition * ! * @param e */ public void logError(Throwable e) { ! logger.error(getClassMethod(3), e); } --- 226,253 ---- * log an error condition * ! * @param e exception that caused this log */ public void logError(Throwable e) { ! // if(logger.isDebugEnabled()) { ! // logger.error(getClassMethod(3), getRootCause(e)); ! // } else { ! logger.error(getRootCause(e)); ! // } ! } ! ! /** ! * Gets the root cause in all the nestable exceptions ! * @param e ! * @return ! */ ! public Throwable getRootCause(Throwable e) { ! return ExceptionUtils.getRootCause(e); ! ! // if(e instanceof GeneralException) { ! // GeneralException ge = (GeneralException)e; ! // return getRootCause(ge.getCause()); ! // } else { ! // return e; ! // } } *************** *** 220,224 **** * log an informational message * ! * @param message */ public void logInfo(Object message) { --- 255,259 ---- * log an informational message * ! * @param message log message */ public void logInfo(Object message) { *************** *** 229,233 **** * log a warning message * ! * @param message */ public void logWarn(Object message) { --- 264,268 ---- * log a warning message * ! * @param message log message */ public void logWarn(Object message) { *************** *** 238,242 **** * Main * ! * @param args DOCUMENT ME! */ public static void main(String[] args) { --- 273,277 ---- * Main * ! * @param args command line args */ public static void main(String[] args) { |
From: bruce m. <tr...@us...> - 2004-07-23 22:24:51
|
Update of /cvsroot/babeldoc/babeldoc/modules/core/src/com/babeldoc/core/option In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8089/modules/core/src/com/babeldoc/core/option Modified Files: package.html Log Message: Added and updated the package.html files. Index: package.html =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/modules/core/src/com/babeldoc/core/option/package.html,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** package.html 29 Aug 2003 01:23:39 -0000 1.2 --- package.html 23 Jul 2004 22:24:12 -0000 1.3 *************** *** 3,12 **** The option package contains all the classes for <strong>Babeldoc</strong> to handle configuration data in a sane and consistent fashion. Each class that wants to participate needs to implement ! IConfigurable. This provides the method getInfo. This means that the implementing class is willing to describe all its configuration options. To these configuration options, configuration data is applied and then the implementing class can get the data associated with the option directly from the option. <h2>Configuration Options</h2> ! The configuration information object (IConfigInfo) and its initial implementation, ConfigInfo, provides a placeholder for the configuration data. Each type of class (eg. PipelineStages, Jounal, etc) has a set of general options and a set of specific options. This is directly modelled --- 3,13 ---- The option package contains all the classes for <strong>Babeldoc</strong> to handle configuration data in a sane and consistent fashion. Each class that wants to participate needs to implement ! <code>IConfigurable</code>. This provides the method getInfo. This means that the implementing class is willing to describe all its configuration options. To these configuration options, configuration data is applied and then the implementing class can get the data associated with the option directly from the option. + <h2>Configuration Options</h2> ! The configuration information object <code>IConfigInfo</code> and its initial implementation, ConfigInfo, provides a placeholder for the configuration data. Each type of class (eg. PipelineStages, Jounal, etc) has a set of general options and a set of specific options. This is directly modelled *************** *** 15,18 **** --- 16,20 ---- These collections of configuration options are created in the getInfo method of each IConfigurable implementing class. + <h2>Configuration Data</h2> The configuration data is derived from the IConfig classes in the ConfigData class by a number *************** *** 20,22 **** --- 22,28 ---- applyConfigData method. This will result in a "marrying" of the configuration options and the configuration data. + + <h2>Configuration Option Types</h2> + Each of the <code>ConfigOption</code> objects must be associated with a type. The type provides + information to the assembler as the legal values and the provides some kind of validity checking. </body> \ No newline at end of file |
From: bruce m. <tr...@us...> - 2004-07-23 22:24:50
|
Update of /cvsroot/babeldoc/babeldoc/modules/core/src/com/babeldoc/core/module In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8089/modules/core/src/com/babeldoc/core/module Modified Files: package.html Log Message: Added and updated the package.html files. Index: package.html =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/modules/core/src/com/babeldoc/core/module/package.html,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** package.html 21 Jul 2004 23:16:48 -0000 1.2 --- package.html 23 Jul 2004 22:24:11 -0000 1.3 *************** *** 6,11 **** <h2>A Babeldoc module</h2> A Babeldoc runtime module is a jar file. Each module jar has a file in the services ! directory in the META-INF directory called com.babeldoc.core.module.BabeldocModule. This has a single line in it that is the name of the concrete implementation of the ! BabeldocModule class that describes that module. This module definition class gives the formal name of the module as well as any modules that this module depends on. --- 6,12 ---- <h2>A Babeldoc module</h2> A Babeldoc runtime module is a jar file. Each module jar has a file in the services ! directory in the META-INF directory called <code>com.babeldoc.core.module.BabeldocModule</code>. This has a single line in it that is the name of the concrete implementation of the ! <code>BabeldocModule</code> class that describes that module. This module definition class gives the formal name of the module as well as any modules that this module depends on. + </body> |
From: bruce m. <tr...@us...> - 2004-07-23 22:24:32
|
Update of /cvsroot/babeldoc/babeldoc/modules/core/src/com/babeldoc/core/pipeline/feeder In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8089/modules/core/src/com/babeldoc/core/pipeline/feeder Added Files: package.html Log Message: Added and updated the package.html files. --- NEW FILE: package.html --- <body> <h2>Introduction</h2> The feeders are the means whereby documents are submitted into pipelines. The feeders themselves are created by the factory class <code>FeederFactory</code>. <h2>FeederFactory</h2> The available feeders and their configurations are found in the feeder/config.properties configuration file. This configuration is read by the feeder factory and used to instantiate the actual feeder implementations. <h2>SynchronousFeeder</h2> The <code>SynchronousFeeder</code> is the simplest feeder. It submits a document for processing and blocks until the processing is complete. <H2>AsynchronousFeeder</H2> This feeder allows for the queuing of documents so that there is no block on the submittal of new documents waiting for the prior document to complete. The implementation of the queueing is interesting. There are two implementations available: <ul> <li>MemoryQueue an in memory queue - fast but insecure.</li> <li>DiskQueue a queue of disk files - slower but more secure.</li> </ul> </body> |
From: bruce m. <tr...@us...> - 2004-07-23 22:24:30
|
Update of /cvsroot/babeldoc/babeldoc/modules/core/src/com/babeldoc/core/pipeline/processor In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8089/modules/core/src/com/babeldoc/core/pipeline/processor Added Files: package.html Log Message: Added and updated the package.html files. --- NEW FILE: package.html --- <body> <h2>Introduction</h2> Processors are similar to feeders except that they govern the implementation of how <code>PipelineDocuments</code> move from pipeline stage to pipeline stage within a pipeline. Feeder are purely concerned with getting documents into a pipeline. Processors only come into play when a pipelinestage produces more than one result document for an input document. when a document in results in a single document out - there is no benefit to using the threaded processors. <h2>Processors</h2> The <code>PipelineStageProcessorFactory</code> code produces processors. The type of the processor depends on the setting for the pipeline stage factory. There are three basic types: <ul> <li>Sync - each pipelinestage processes runs sequentially through the result documents</li> <LI>ThreadPooled - pool of threads waiting to run.</LI> <LI>Async - threads are spawned to handle multiple result documents.</LI> </ul> </body> |
From: bruce m. <tr...@us...> - 2004-07-23 22:24:29
|
Update of /cvsroot/babeldoc/babeldoc/modules/core/src/com/babeldoc/core/pipeline/stage In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8089/modules/core/src/com/babeldoc/core/pipeline/stage Added Files: package.html Log Message: Added and updated the package.html files. --- NEW FILE: package.html --- <body> <h2>Introduction</h2> Here is where all of the pipeline stages in the core module are. All of these extend <code>PipelineStage</code> and so should yours. </body> |
From: bruce m. <tr...@us...> - 2004-07-23 22:24:29
|
Update of /cvsroot/babeldoc/babeldoc/modules/core/src/com/babeldoc/core/pipeline In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8089/modules/core/src/com/babeldoc/core/pipeline Added Files: package.html Log Message: Added and updated the package.html files. --- NEW FILE: package.html --- <body> <h2>Introduction</h2> Pipeline processing is the heart of <STRONG>Babeldoc</STRONG>. The concept of data moving through a pipeline of assembled pipeline stages is central. This package and its subpackages provide this functionality. <h2>Quick Start to Pipeline Processing</h2> The quickest and easiest way to programmatically process a document through the configured pipelines is to call the static methods <code>process</code> on the <code>com.babeldoc.core.pipeline.command.PipelineFeeder</code>. Check out the overloaded methods for the one that fits. This pipeline feeder feeds the documents serially to the pipeline. <strong>REMEMBER</strong> to initialize the environment by calling <code>EnvironmentLoader.loadEnvironment()</code> if you are NOT coming through the <code>com.babeldoc.core.Main</code> class. <H2>Next Quickest way to process documents</H2> The <code>com.babeldoc.core.pipeline.feeder.FeederFactory</code> is a factory class for the production of <code>IPipelineFeeder</code> objects. These provide more flexiblitiy in choosing the kind of pipeline feeder - you can choose asyncronous or synchronous. If you choose the asynchronous feeder, you can also choose the queue implementation. <H2>PipelineFactories, -FactoryFactories and -StageFactories</H2> Its simple: Use the static methods on the <code>PipelineFactoryFactory</code> to get a reference to the <code>PipelineFactory</code>. The <code>PipelineFactory</code> reads the pipeline configuration in <code>pipeline/config.properties</code> to configure the pipelines themselves. The actual handling of the individual pipelines is done by the <code>PipelineStageFactory</code> objects (which are loaded by the <CODE>PipelineFactory</CODE> object based on the pipeline type in the configuration information.) The <code>PipelineFactory</code> has a <code>process</code> method with calls the <CODE>process</CODE> method on the application stage factory. This is how pipeline processing proceeds towards the pipeline stages. <h2>Resolvers<h2> Resolvers are the means whereby pipeline stage factories abstract the configuration information. The resolvers bridge the world of configdata to the pipeline stage world. There are two implementations: <ul> <li>simple</li> regular properties loaded through the configuration service <li>xml<li> pipelines defined by XML files </ul> Each of these two Resolvers are actually provided by their own implementation of a <code>PipelineStageFactory</code>. The only really important thing that these implementations do is to provide a reference to a concrete resolver in the <code>getResolver</code> method. <h2>Processors</h2> The pipeline stage factory does not actually process the pipeline stages(!). This is handled by implementations of the <code>IPipelineStageProcessor</code>. The reason for this is to separate the implementation of the processor from its interface. We can implement a number of processing policies (multithreaded or singlethreaded for instance). The <code>PipelineStageProcessor</code> determines which processor to use based on configuration options. <h2>PipelineStages</h2> A pipeline consists of pipeline stages. These are the smallest unit of processing in <strong>Babeldoc</strong>. Each pipeline stage is created by a pipeline stage factory. All pipeline stages must implement the interface <code>IPipelineStage</code> but should really extend the class <code>PipelineStage</code>. Objects of this class handle all the default options, journalling, error handling, templatizing, return documents, etc, etc. In fact all that it does not do is do the actual processing that is required by the pipeline stage in question. To do this, the <code>process</code> must be implemented. <h2>PipelineDocument and PipelineStageResults</h2> A <code>PipelineDocument</code> is the data that moves through the pipeline. It is an array of bytes and a map of attributes. It knows it mime-type and its binary-ness. A <code>PipelineStageResult</code> is what drops off after a pipeline has finished processing a pipeline document. It is a pipeline document, a journal ticket and the name of the next pipeline stage. Actually when the <code>process</code> method completes (thats the one you have to write for your pipeline stage), an array of these pipeline stage results returns. The easiest way to create them is to use the overloaded methods <code>PipelineStage.process</code>. </body> |
From: bruce m. <tr...@us...> - 2004-07-23 22:24:28
|
Update of /cvsroot/babeldoc/babeldoc/modules/core/src/com/babeldoc/core/pipeline/command In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8089/modules/core/src/com/babeldoc/core/pipeline/command Added Files: package.html Log Message: Added and updated the package.html files. --- NEW FILE: package.html --- <body> <h2>Introduction</h2> This package provides the implementation of the <code>process</code> command. This allows for the execution of documents through the pipeline from the command line. <h2>PipelineFeeder</h2> Use the <code>process</code> on this class to quickly run documents through your pipelines. </body> |
From: bruce m. <tr...@us...> - 2004-07-23 22:24:28
|
Update of /cvsroot/babeldoc/babeldoc/modules/core/src/com/babeldoc/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8089/modules/core/src/com/babeldoc/core Added Files: package.html Log Message: Added and updated the package.html files. --- NEW FILE: package.html --- <body> <h2>Introduction</h2> This is root of the <STRONG>Babeldoc core</STRONG> module. Herein are classes that are centrally useful to Babeldoc. <H2>INamed and Named</H2> All classes that are <I>named</I> must implement <CODE>INamed</CODE> and can optionally extend <CODE>Named</CODE>. <H2>LogService</H2> Provide an interface to the logging service. Provides a number of interfaces to streamline usage. Largely a lightweight wrapper around the commons logging services. <H2>I18n</H2> Internationalization class. Allows developers to place strings in the configuration properties instead of hardcoding into the java code. This makes internationalization easier. Lots of useful methods here. <H2>Pair</H2> Pairs are mainly used as Name-Value pairs (but not exclusively) throughout <STRONG>Babeldoc.</STRONG>. See also <CODE>NameValuePair.</CODE> <H2>Type</H2> An abstract class that encodes type information that works closely with the <code>ServiceFactory</code> to manage class discovery, etc. <H2>BabeldocCommand</H2> You <STRONG>MUST</STRONG> override this class if you wish to provide a command line interface to some functionality. You also need to add a services entry to support this. <H2>Main</H2> Second point after the init module has loaded the class path. Delegates to those services that provide commandline interfaces. Important bootstrap class. <H2>EnvironmentLoader</H2> Bootstraps the environment and configuration so that all the configuration properties become available. <h2>ResourceLoader</h2> This class provides the overlaid configuration properties and the means to load properties and resources from the classpath, the BABELDOC_USER path and the configuration modules. <H2>VariableProcessor</H2> Provides access to Velocity macros inside configuration and other locations. Can load external macros so that complex functionality can be reused. <H2>VelocityUtilityContext</H2> Number of useful methods available to Velocity macros. </body> |