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: David G. <dg...@co...> - 2003-08-12 15:52:50
|
I suppose the next thing you're going to tell me is that the JVM makes a
difference, right...? :-)
Switching back to 1.4.1 fixed it. Thanks!
David
On Tuesday 12 August 2003 8:35 am, McDonald, Bruce wrote:
> What jvm are you running?
>
> -----Original Message-----
> From: David Glick [mailto:dg...@co...]
> Sent: Tuesday, August 12, 2003 10:51 AM
> To: bab...@li...
> Subject: [Babeldoc-devel] Build fails (and how was your morning?)
>
>
> Hello to the great and powerful list,
>
> I started having problems building last night after a cvs update, so this
> morning I got ambitious and did a full checkout. Running the build yields
> the attached messages.
>
>
> Thanks,
>
> David
>
>
> build:
> [echo] Building core
> [javac] Compiling 168 source files to
> /home/dglick/Documents/cvs/babeldoc/modules/core/build
> [moduleRunner]
> /home/dglick/Documents/cvs/babeldoc/modules/core/src/com/babeldoc/core/LogS
>ervice.java:109: cannot resolve symbol
> [moduleRunner] symbol : class StackTraceElement
> [moduleRunner] location: class com.babeldoc.core.LogService
> [moduleRunner] public static StackTraceElement[] getCallStack() {
> [moduleRunner] ^
> [moduleRunner]
> /home/dglick/Documents/cvs/babeldoc/modules/core/src/com/babeldoc/core/pipe
>line/stage/JavaXmlDecoderPipelineStage.java:72: cannot resolve symbol
> [moduleRunner] symbol : class XMLDecoder
> [moduleRunner] location: package beans
> [moduleRunner] import java.beans.XMLDecoder;
> [moduleRunner] ^
> [moduleRunner]
> /home/dglick/Documents/cvs/babeldoc/modules/core/src/com/babeldoc/core/pipe
>line/stage/EntityResolverMemoryCache.java:182: cannot resolve symbol
> [moduleRunner] symbol : class LinkedHashMap
> [moduleRunner] location: class
> com.babeldoc.core.pipeline.stage.EntityResolverMemoryCache
> [moduleRunner] LinkedHashMap cache = new LinkedHashMap();
> [moduleRunner] ^
> [moduleRunner]
> /home/dglick/Documents/cvs/babeldoc/modules/core/src/com/babeldoc/core/LogS
>ervice.java:110: cannot resolve symbol
> [moduleRunner] symbol : method getStackTrace ()
> [moduleRunner] location: class java.lang.Throwable
> [moduleRunner] return new Throwable().getStackTrace();
> [moduleRunner] ^
> [moduleRunner]
> /home/dglick/Documents/cvs/babeldoc/modules/core/src/com/babeldoc/core/LogS
>ervice.java:121: cannot resolve symbol
> [moduleRunner] symbol : class StackTraceElement
> [moduleRunner] location: class com.babeldoc.core.LogService
> [moduleRunner] StackTraceElement element = getCallStack()[i];
> [moduleRunner] ^
> [moduleRunner]
> /home/dglick/Documents/cvs/babeldoc/modules/core/src/com/babeldoc/core/pipe
>line/xml/XmlPipelineStageResolver.java:103: cannot resolve symbol
> [moduleRunner] symbol : constructor RuntimeException
> (java.io.FileNotFoundException)
> [moduleRunner] location: class java.lang.RuntimeException
> [moduleRunner] throw new RuntimeException(new
> FileNotFoundException(xmlFile));
> [moduleRunner] ^
> [moduleRunner]
> /home/dglick/Documents/cvs/babeldoc/modules/core/src/com/babeldoc/core/pipe
>line/stage/ExternalApplicationPipelineStage.java:151:
> valueOf(java.lang.String) in java.lang.Boolean cannot be applied to
> (boolean) [moduleRunner]
> getOptions(PIPE_OUT_DOCUMENT).equals(Boolean.valueOf(true));
> [moduleRunner] ^
> [moduleRunner]
> /home/dglick/Documents/cvs/babeldoc/modules/core/src/com/babeldoc/core/pipe
>line/stage/JavaXmlDecoderPipelineStage.java:117: cannot resolve symbol
> [moduleRunner] symbol : class XMLDecoder
> [moduleRunner] location: class
> com.babeldoc.core.pipeline.stage.JavaXmlDecoderPipelineStage
> [moduleRunner] XMLDecoder d = new XMLDecoder(doc.getInputStream());
> [moduleRunner] ^
> [moduleRunner]
> /home/dglick/Documents/cvs/babeldoc/modules/core/src/com/babeldoc/core/pipe
>line/stage/JavaXmlDecoderPipelineStage.java:117: cannot resolve symbol
> [moduleRunner] symbol : class XMLDecoder
> [moduleRunner] location: class
> com.babeldoc.core.pipeline.stage.JavaXmlDecoderPipelineStage
> [moduleRunner] XMLDecoder d = new XMLDecoder(doc.getInputStream());
> [moduleRunner] ^
> [moduleRunner]
> /home/dglick/Documents/cvs/babeldoc/modules/core/src/com/babeldoc/core/pipe
>line/stage/EntityResolverMemoryCache.java:93: cannot resolve symbol
> [moduleRunner] symbol : constructor RuntimeException
> (java.lang.Exception) [moduleRunner] location: class
> java.lang.RuntimeException
> [moduleRunner] throw new RuntimeException(e);
> [moduleRunner] ^
> [moduleRunner]
> /home/dglick/Documents/cvs/babeldoc/modules/core/src/com/babeldoc/core/pipe
>line/stage/EntityResolverMemoryCache.java:182: cannot resolve symbol
> [moduleRunner] symbol : class LinkedHashMap
> [moduleRunner] location: class
> com.babeldoc.core.pipeline.stage.EntityResolverMemoryCache
> [moduleRunner] LinkedHashMap cache = new LinkedHashMap();
> [moduleRunner] ^
> [moduleRunner]
> /home/dglick/Documents/cvs/babeldoc/modules/core/src/com/babeldoc/core/pipe
>line/PipelineFactory.java:227: cannot resolve symbol
> [moduleRunner] symbol : method getCause ()
> [moduleRunner] location: class java.lang.RuntimeException
> [moduleRunner] Throwable cause = re.getCause();
> [moduleRunner] ^
> [moduleRunner] 12 errors
--
David Glick
Transmit Consulting, Inc
619-475-4052
dg...@tr...
|
|
From: McDonald, B. <Bru...@ba...> - 2003-08-12 15:42:37
|
What jvm are you running?
-----Original Message-----
From: David Glick [mailto:dg...@co...]
Sent: Tuesday, August 12, 2003 10:51 AM
To: bab...@li...
Subject: [Babeldoc-devel] Build fails (and how was your morning?)
Hello to the great and powerful list,
I started having problems building last night after a cvs update, so this
morning I got ambitious and did a full checkout. Running the build yields
the attached messages.
Thanks,
David
build:
[echo] Building core
[javac] Compiling 168 source files to
/home/dglick/Documents/cvs/babeldoc/modules/core/build
[moduleRunner]
/home/dglick/Documents/cvs/babeldoc/modules/core/src/com/babeldoc/core/LogService.java:109:
cannot resolve symbol
[moduleRunner] symbol : class StackTraceElement
[moduleRunner] location: class com.babeldoc.core.LogService
[moduleRunner] public static StackTraceElement[] getCallStack() {
[moduleRunner] ^
[moduleRunner]
/home/dglick/Documents/cvs/babeldoc/modules/core/src/com/babeldoc/core/pipeline/stage/JavaXmlDecoderPipelineStage.java:72:
cannot resolve symbol
[moduleRunner] symbol : class XMLDecoder
[moduleRunner] location: package beans
[moduleRunner] import java.beans.XMLDecoder;
[moduleRunner] ^
[moduleRunner]
/home/dglick/Documents/cvs/babeldoc/modules/core/src/com/babeldoc/core/pipeline/stage/EntityResolverMemoryCache.java:182:
cannot resolve symbol
[moduleRunner] symbol : class LinkedHashMap
[moduleRunner] location: class
com.babeldoc.core.pipeline.stage.EntityResolverMemoryCache
[moduleRunner] LinkedHashMap cache = new LinkedHashMap();
[moduleRunner] ^
[moduleRunner]
/home/dglick/Documents/cvs/babeldoc/modules/core/src/com/babeldoc/core/LogService.java:110:
cannot resolve symbol
[moduleRunner] symbol : method getStackTrace ()
[moduleRunner] location: class java.lang.Throwable
[moduleRunner] return new Throwable().getStackTrace();
[moduleRunner] ^
[moduleRunner]
/home/dglick/Documents/cvs/babeldoc/modules/core/src/com/babeldoc/core/LogService.java:121:
cannot resolve symbol
[moduleRunner] symbol : class StackTraceElement
[moduleRunner] location: class com.babeldoc.core.LogService
[moduleRunner] StackTraceElement element = getCallStack()[i];
[moduleRunner] ^
[moduleRunner]
/home/dglick/Documents/cvs/babeldoc/modules/core/src/com/babeldoc/core/pipeline/xml/XmlPipelineStageResolver.java:103:
cannot resolve symbol
[moduleRunner] symbol : constructor RuntimeException
(java.io.FileNotFoundException)
[moduleRunner] location: class java.lang.RuntimeException
[moduleRunner] throw new RuntimeException(new
FileNotFoundException(xmlFile));
[moduleRunner] ^
[moduleRunner]
/home/dglick/Documents/cvs/babeldoc/modules/core/src/com/babeldoc/core/pipeline/stage/ExternalApplicationPipelineStage.java:151:
valueOf(java.lang.String) in java.lang.Boolean cannot be applied to (boolean)
[moduleRunner]
getOptions(PIPE_OUT_DOCUMENT).equals(Boolean.valueOf(true));
[moduleRunner] ^
[moduleRunner]
/home/dglick/Documents/cvs/babeldoc/modules/core/src/com/babeldoc/core/pipeline/stage/JavaXmlDecoderPipelineStage.java:117:
cannot resolve symbol
[moduleRunner] symbol : class XMLDecoder
[moduleRunner] location: class
com.babeldoc.core.pipeline.stage.JavaXmlDecoderPipelineStage
[moduleRunner] XMLDecoder d = new XMLDecoder(doc.getInputStream());
[moduleRunner] ^
[moduleRunner]
/home/dglick/Documents/cvs/babeldoc/modules/core/src/com/babeldoc/core/pipeline/stage/JavaXmlDecoderPipelineStage.java:117:
cannot resolve symbol
[moduleRunner] symbol : class XMLDecoder
[moduleRunner] location: class
com.babeldoc.core.pipeline.stage.JavaXmlDecoderPipelineStage
[moduleRunner] XMLDecoder d = new XMLDecoder(doc.getInputStream());
[moduleRunner] ^
[moduleRunner]
/home/dglick/Documents/cvs/babeldoc/modules/core/src/com/babeldoc/core/pipeline/stage/EntityResolverMemoryCache.java:93:
cannot resolve symbol
[moduleRunner] symbol : constructor RuntimeException (java.lang.Exception)
[moduleRunner] location: class java.lang.RuntimeException
[moduleRunner] throw new RuntimeException(e);
[moduleRunner] ^
[moduleRunner]
/home/dglick/Documents/cvs/babeldoc/modules/core/src/com/babeldoc/core/pipeline/stage/EntityResolverMemoryCache.java:182:
cannot resolve symbol
[moduleRunner] symbol : class LinkedHashMap
[moduleRunner] location: class
com.babeldoc.core.pipeline.stage.EntityResolverMemoryCache
[moduleRunner] LinkedHashMap cache = new LinkedHashMap();
[moduleRunner] ^
[moduleRunner]
/home/dglick/Documents/cvs/babeldoc/modules/core/src/com/babeldoc/core/pipeline/PipelineFactory.java:227:
cannot resolve symbol
[moduleRunner] symbol : method getCause ()
[moduleRunner] location: class java.lang.RuntimeException
[moduleRunner] Throwable cause = re.getCause();
[moduleRunner] ^
[moduleRunner] 12 errors
--
David Glick
Transmit Consulting, Inc
619-475-4052
dg...@tr...
-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
_______________________________________________
Babeldoc-devel mailing list
Bab...@li...
https://lists.sourceforge.net/lists/listinfo/babeldoc-devel
|
|
From: David G. <dg...@co...> - 2003-08-12 15:31:58
|
Hello to the great and powerful list,
I started having problems building last night after a cvs update, so this
morning I got ambitious and did a full checkout. Running the build yields
the attached messages.
Thanks,
David
build:
[echo] Building core
[javac] Compiling 168 source files to
/home/dglick/Documents/cvs/babeldoc/modules/core/build
[moduleRunner]
/home/dglick/Documents/cvs/babeldoc/modules/core/src/com/babeldoc/core/LogService.java:109:
cannot resolve symbol
[moduleRunner] symbol : class StackTraceElement
[moduleRunner] location: class com.babeldoc.core.LogService
[moduleRunner] public static StackTraceElement[] getCallStack() {
[moduleRunner] ^
[moduleRunner]
/home/dglick/Documents/cvs/babeldoc/modules/core/src/com/babeldoc/core/pipeline/stage/JavaXmlDecoderPipelineStage.java:72:
cannot resolve symbol
[moduleRunner] symbol : class XMLDecoder
[moduleRunner] location: package beans
[moduleRunner] import java.beans.XMLDecoder;
[moduleRunner] ^
[moduleRunner]
/home/dglick/Documents/cvs/babeldoc/modules/core/src/com/babeldoc/core/pipeline/stage/EntityResolverMemoryCache.java:182:
cannot resolve symbol
[moduleRunner] symbol : class LinkedHashMap
[moduleRunner] location: class
com.babeldoc.core.pipeline.stage.EntityResolverMemoryCache
[moduleRunner] LinkedHashMap cache = new LinkedHashMap();
[moduleRunner] ^
[moduleRunner]
/home/dglick/Documents/cvs/babeldoc/modules/core/src/com/babeldoc/core/LogService.java:110:
cannot resolve symbol
[moduleRunner] symbol : method getStackTrace ()
[moduleRunner] location: class java.lang.Throwable
[moduleRunner] return new Throwable().getStackTrace();
[moduleRunner] ^
[moduleRunner]
/home/dglick/Documents/cvs/babeldoc/modules/core/src/com/babeldoc/core/LogService.java:121:
cannot resolve symbol
[moduleRunner] symbol : class StackTraceElement
[moduleRunner] location: class com.babeldoc.core.LogService
[moduleRunner] StackTraceElement element = getCallStack()[i];
[moduleRunner] ^
[moduleRunner]
/home/dglick/Documents/cvs/babeldoc/modules/core/src/com/babeldoc/core/pipeline/xml/XmlPipelineStageResolver.java:103:
cannot resolve symbol
[moduleRunner] symbol : constructor RuntimeException
(java.io.FileNotFoundException)
[moduleRunner] location: class java.lang.RuntimeException
[moduleRunner] throw new RuntimeException(new
FileNotFoundException(xmlFile));
[moduleRunner] ^
[moduleRunner]
/home/dglick/Documents/cvs/babeldoc/modules/core/src/com/babeldoc/core/pipeline/stage/ExternalApplicationPipelineStage.java:151:
valueOf(java.lang.String) in java.lang.Boolean cannot be applied to (boolean)
[moduleRunner]
getOptions(PIPE_OUT_DOCUMENT).equals(Boolean.valueOf(true));
[moduleRunner] ^
[moduleRunner]
/home/dglick/Documents/cvs/babeldoc/modules/core/src/com/babeldoc/core/pipeline/stage/JavaXmlDecoderPipelineStage.java:117:
cannot resolve symbol
[moduleRunner] symbol : class XMLDecoder
[moduleRunner] location: class
com.babeldoc.core.pipeline.stage.JavaXmlDecoderPipelineStage
[moduleRunner] XMLDecoder d = new XMLDecoder(doc.getInputStream());
[moduleRunner] ^
[moduleRunner]
/home/dglick/Documents/cvs/babeldoc/modules/core/src/com/babeldoc/core/pipeline/stage/JavaXmlDecoderPipelineStage.java:117:
cannot resolve symbol
[moduleRunner] symbol : class XMLDecoder
[moduleRunner] location: class
com.babeldoc.core.pipeline.stage.JavaXmlDecoderPipelineStage
[moduleRunner] XMLDecoder d = new XMLDecoder(doc.getInputStream());
[moduleRunner] ^
[moduleRunner]
/home/dglick/Documents/cvs/babeldoc/modules/core/src/com/babeldoc/core/pipeline/stage/EntityResolverMemoryCache.java:93:
cannot resolve symbol
[moduleRunner] symbol : constructor RuntimeException (java.lang.Exception)
[moduleRunner] location: class java.lang.RuntimeException
[moduleRunner] throw new RuntimeException(e);
[moduleRunner] ^
[moduleRunner]
/home/dglick/Documents/cvs/babeldoc/modules/core/src/com/babeldoc/core/pipeline/stage/EntityResolverMemoryCache.java:182:
cannot resolve symbol
[moduleRunner] symbol : class LinkedHashMap
[moduleRunner] location: class
com.babeldoc.core.pipeline.stage.EntityResolverMemoryCache
[moduleRunner] LinkedHashMap cache = new LinkedHashMap();
[moduleRunner] ^
[moduleRunner]
/home/dglick/Documents/cvs/babeldoc/modules/core/src/com/babeldoc/core/pipeline/PipelineFactory.java:227:
cannot resolve symbol
[moduleRunner] symbol : method getCause ()
[moduleRunner] location: class java.lang.RuntimeException
[moduleRunner] Throwable cause = re.getCause();
[moduleRunner] ^
[moduleRunner] 12 errors
--
David Glick
Transmit Consulting, Inc
619-475-4052
dg...@tr...
|
Update of /cvsroot/babeldoc/www.babeldoc.com/html/images In directory sc8-pr-cvs1:/tmp/cvs-serv8399/html/images Modified Files: pipelines.png Added Files: base.gif cd.gif empty.gif folder.gif folderopen.gif globe.gif imgfolder.gif join.gif joinbottom.gif line.gif minus.gif minusbottom.gif musicfolder.gif nolines_minus.gif nolines_plus.gif page.gif plus.gif plusbottom.gif question.gif trash.gif Log Message: Lots of changes to the website - now with nice menu --- NEW FILE: base.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: cd.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: empty.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: folder.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: folderopen.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: globe.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: imgfolder.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: join.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: joinbottom.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: line.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: minus.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: minusbottom.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: musicfolder.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: nolines_minus.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: nolines_plus.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: page.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: plus.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: plusbottom.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: question.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: trash.gif --- (This appears to be a binary file; contents omitted.) Index: pipelines.png =================================================================== RCS file: /cvsroot/babeldoc/www.babeldoc.com/html/images/pipelines.png,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 Binary files /tmp/cvsE8vGAu and /tmp/cvsmWKzSO differ |
|
From: <tr...@us...> - 2003-08-12 02:14:31
|
Update of /cvsroot/babeldoc/www.babeldoc.com/html/js In directory sc8-pr-cvs1:/tmp/cvs-serv8399/html/js Added Files: dtree.js Log Message: Lots of changes to the website - now with nice menu --- NEW FILE: dtree.js --- /*--------------------------------------------------| | dTree 2.05 | www.destroydrop.com/javascript/tree/ | |---------------------------------------------------| | Copyright (c) 2002-2003 Geir Landrö | | | | This script can be used freely as long as all | | copyright messages are intact. | | | | Updated: 17.04.2003 | |--------------------------------------------------*/ // Node object function Node(id, pid, name, url, title, target, icon, iconOpen, open) { this.id = id; this.pid = pid; this.name = name; this.url = url; this.title = title; this.target = target; this.icon = icon; this.iconOpen = iconOpen; this._io = open || false; this._is = false; this._ls = false; this._hc = false; this._ai = 0; this._p; }; // Tree object function dTree(objName) { this.config = { target : null, folderLinks : true, useSelection : true, useCookies : true, useLines : true, useIcons : true, useStatusText : false, closeSameLevel : false, inOrder : false } this.icon = { root : 'images/base.gif', folder : 'images/folder.gif', folderOpen : 'images/folderopen.gif', node : 'images/page.gif', empty : 'images/empty.gif', line : 'images/line.gif', join : 'images/join.gif', joinBottom : 'images/joinbottom.gif', plus : 'images/plus.gif', plusBottom : 'images/plusbottom.gif', minus : 'images/minus.gif', minusBottom : 'images/minusbottom.gif', nlPlus : 'images/nolines_plus.gif', nlMinus : 'images/nolines_minus.gif' }; this.obj = objName; this.aNodes = []; this.aIndent = []; this.root = new Node(-1); this.selectedNode = null; this.selectedFound = false; this.completed = false; }; // Adds a new node to the node array dTree.prototype.add = function(id, pid, name, url, title, target, icon, iconOpen, open) { this.aNodes[this.aNodes.length] = new Node(id, pid, name, url, title, target, icon, iconOpen, open); }; // Open/close all nodes dTree.prototype.openAll = function() { this.oAll(true); }; dTree.prototype.closeAll = function() { this.oAll(false); }; // Outputs the tree to the page dTree.prototype.toString = function() { var str = '<div class="dtree">\n'; if (document.getElementById) { if (this.config.useCookies) this.selectedNode = this.getSelected(); str += this.addNode(this.root); } else str += 'Browser not supported.'; str += '</div>'; if (!this.selectedFound) this.selectedNode = null; this.completed = true; return str; }; // Creates the tree structure dTree.prototype.addNode = function(pNode) { var str = ''; var n=0; if (this.config.inOrder) n = pNode._ai; for (n; n<this.aNodes.length; n++) { if (this.aNodes[n].pid == pNode.id) { var cn = this.aNodes[n]; cn._p = pNode; cn._ai = n; this.setCS(cn); if (!cn.target && this.config.target) cn.target = this.config.target; if (cn._hc && !cn._io && this.config.useCookies) cn._io = this.isOpen(cn.id); if (!this.config.folderLinks && cn._hc) cn.url = null; if (this.config.useSelection && cn.id == this.selectedNode && !this.selectedFound) { cn._is = true; this.selectedNode = n; this.selectedFound = true; } str += this.node(cn, n); if (cn._ls) break; } } return str; }; // Creates the node icon, url and text dTree.prototype.node = function(node, nodeId) { var str = '<div class="dTreeNode">' + this.indent(node, nodeId); if (this.config.useIcons) { if (!node.icon) node.icon = (this.root.id == node.pid) ? this.icon.root : ((node._hc) ? this.icon.folder : this.icon.node); if (!node.iconOpen) node.iconOpen = (node._hc) ? this.icon.folderOpen : this.icon.node; if (this.root.id == node.pid) { node.icon = this.icon.root; node.iconOpen = this.icon.root; } str += '<img id="i' + this.obj + nodeId + '" src="' + ((node._io) ? node.iconOpen : node.icon) + '" alt="" />'; } if (node.url) { str += '<a id="s' + this.obj + nodeId + '" class="' + ((this.config.useSelection) ? ((node._is ? 'nodeSel' : 'node')) : 'node') + '" href="' + node.url + '"'; if (node.title) str += ' title="' + node.title + '"'; if (node.target) str += ' target="' + node.target + '"'; if (this.config.useStatusText) str += ' onmouseover="window.status=\'' + node.name + '\';return true;" onmouseout="window.status=\'\';return true;" '; if (this.config.useSelection && ((node._hc && this.config.folderLinks) || !node._hc)) str += ' onclick="javascript: ' + this.obj + '.s(' + nodeId + ');"'; str += '>'; } else if ((!this.config.folderLinks || !node.url) && node._hc && node.pid != this.root.id) str += '<a href="javascript: ' + this.obj + '.o(' + nodeId + ');" class="node">'; str += node.name; if (node.url || ((!this.config.folderLinks || !node.url) && node._hc)) str += '</a>'; str += '</div>'; if (node._hc) { str += '<div id="d' + this.obj + nodeId + '" class="clip" style="display:' + ((this.root.id == node.pid || node._io) ? 'block' : 'none') + ';">'; str += this.addNode(node); str += '</div>'; } this.aIndent.pop(); return str; }; // Adds the empty and line icons dTree.prototype.indent = function(node, nodeId) { var str = ''; if (this.root.id != node.pid) { for (var n=0; n<this.aIndent.length; n++) str += '<img src="' + ( (this.aIndent[n] == 1 && this.config.useLines) ? this.icon.line : this.icon.empty ) + '" alt="" />'; (node._ls) ? this.aIndent.push(0) : this.aIndent.push(1); if (node._hc) { str += '<a href="javascript: ' + this.obj + '.o(' + nodeId + ');"><img id="j' + this.obj + nodeId + '" src="'; if (!this.config.useLines) str += (node._io) ? this.icon.nlMinus : this.icon.nlPlus; else str += ( (node._io) ? ((node._ls && this.config.useLines) ? this.icon.minusBottom : this.icon.minus) : ((node._ls && this.config.useLines) ? this.icon.plusBottom : this.icon.plus ) ); str += '" alt="" /></a>'; } else str += '<img src="' + ( (this.config.useLines) ? ((node._ls) ? this.icon.joinBottom : this.icon.join ) : this.icon.empty) + '" alt="" />'; } return str; }; // Checks if a node has any children and if it is the last sibling dTree.prototype.setCS = function(node) { var lastId; for (var n=0; n<this.aNodes.length; n++) { if (this.aNodes[n].pid == node.id) node._hc = true; if (this.aNodes[n].pid == node.pid) lastId = this.aNodes[n].id; } if (lastId==node.id) node._ls = true; }; // Returns the selected node dTree.prototype.getSelected = function() { var sn = this.getCookie('cs' + this.obj); return (sn) ? sn : null; }; // Highlights the selected node dTree.prototype.s = function(id) { if (!this.config.useSelection) return; var cn = this.aNodes[id]; if (cn._hc && !this.config.folderLinks) return; if (this.selectedNode != id) { if (this.selectedNode || this.selectedNode==0) { eOld = document.getElementById("s" + this.obj + this.selectedNode); eOld.className = "node"; } eNew = document.getElementById("s" + this.obj + id); eNew.className = "nodeSel"; this.selectedNode = id; if (this.config.useCookies) this.setCookie('cs' + this.obj, cn.id); } }; // Toggle Open or close dTree.prototype.o = function(id) { var cn = this.aNodes[id]; this.nodeStatus(!cn._io, id, cn._ls); cn._io = !cn._io; if (this.config.closeSameLevel) this.closeLevel(cn); if (this.config.useCookies) this.updateCookie(); }; // Open or close all nodes dTree.prototype.oAll = function(status) { for (var n=0; n<this.aNodes.length; n++) { if (this.aNodes[n]._hc && this.aNodes[n].pid != this.root.id) { this.nodeStatus(status, n, this.aNodes[n]._ls) this.aNodes[n]._io = status; } } if (this.config.useCookies) this.updateCookie(); }; // Opens the tree to a specific node dTree.prototype.openTo = function(nId, bSelect, bFirst) { if (!bFirst) { for (var n=0; n<this.aNodes.length; n++) { if (this.aNodes[n].id == nId) { nId=n; break; } } } var cn=this.aNodes[nId]; if (cn.pid==this.root.id || !cn._p) return; cn._io = true; cn._is = bSelect; if (this.completed && cn._hc) this.nodeStatus(true, cn._ai, cn._ls); if (this.completed && bSelect) this.s(cn._ai); else if (bSelect) this._sn=cn._ai; this.openTo(cn._p._ai, false, true); }; // Closes all nodes on the same level as certain node dTree.prototype.closeLevel = function(node) { for (var n=0; n<this.aNodes.length; n++) { if (this.aNodes[n].pid == node.pid && this.aNodes[n].id != node.id && this.aNodes[n]._hc) { this.nodeStatus(false, n, this.aNodes[n]._ls); this.aNodes[n]._io = false; this.closeAllChildren(this.aNodes[n]); } } } // Closes all children of a node dTree.prototype.closeAllChildren = function(node) { for (var n=0; n<this.aNodes.length; n++) { if (this.aNodes[n].pid == node.id && this.aNodes[n]._hc) { if (this.aNodes[n]._io) this.nodeStatus(false, n, this.aNodes[n]._ls); this.aNodes[n]._io = false; this.closeAllChildren(this.aNodes[n]); } } } // Change the status of a node(open or closed) dTree.prototype.nodeStatus = function(status, id, bottom) { eDiv = document.getElementById('d' + this.obj + id); eJoin = document.getElementById('j' + this.obj + id); if (this.config.useIcons) { eIcon = document.getElementById('i' + this.obj + id); eIcon.src = (status) ? this.aNodes[id].iconOpen : this.aNodes[id].icon; } eJoin.src = (this.config.useLines)? ((status)?((bottom)?this.icon.minusBottom:this.icon.minus):((bottom)?this.icon.plusBottom:this.icon.plus)): ((status)?this.icon.nlMinus:this.icon.nlPlus); eDiv.style.display = (status) ? 'block': 'none'; }; // [Cookie] Clears a cookie dTree.prototype.clearCookie = function() { var now = new Date(); var yesterday = new Date(now.getTime() - 1000 * 60 * 60 * 24); this.setCookie('co'+this.obj, 'cookieValue', yesterday); this.setCookie('cs'+this.obj, 'cookieValue', yesterday); }; // [Cookie] Sets value in a cookie dTree.prototype.setCookie = function(cookieName, cookieValue, expires, path, domain, secure) { document.cookie = escape(cookieName) + '=' + escape(cookieValue) + (expires ? '; expires=' + expires.toGMTString() : '') + (path ? '; path=' + path : '') + (domain ? '; domain=' + domain : '') + (secure ? '; secure' : ''); }; // [Cookie] Gets a value from a cookie dTree.prototype.getCookie = function(cookieName) { var cookieValue = ''; var posName = document.cookie.indexOf(escape(cookieName) + '='); if (posName != -1) { var posValue = posName + (escape(cookieName) + '=').length; var endPos = document.cookie.indexOf(';', posValue); if (endPos != -1) cookieValue = unescape(document.cookie.substring(posValue, endPos)); else cookieValue = unescape(document.cookie.substring(posValue)); } return (cookieValue); }; // [Cookie] Returns ids of open nodes as a string dTree.prototype.updateCookie = function() { var str = ''; for (var n=0; n<this.aNodes.length; n++) { if (this.aNodes[n]._io && this.aNodes[n].pid != this.root.id) { if (str) str += '.'; str += this.aNodes[n].id; } } this.setCookie('co' + this.obj, str); }; // [Cookie] Checks if a node id is in a cookie dTree.prototype.isOpen = function(id) { var aOpen = this.getCookie('co' + this.obj).split('.'); for (var n=0; n<aOpen.length; n++) if (aOpen[n] == id) return true; return false; }; // If Push and pop is not implemented by the browser if (!Array.prototype.push) { Array.prototype.push = function array_push() { for(var i=0;i<arguments.length;i++) this[this.length]=arguments[i]; return this.length; } }; if (!Array.prototype.pop) { Array.prototype.pop = function array_pop() { lastElement = this[this.length-1]; this.length = Math.max(this.length-1,0); return lastElement; } }; |
|
From: <tr...@us...> - 2003-08-12 02:12:37
|
Update of /cvsroot/babeldoc/www.babeldoc.com/html/js In directory sc8-pr-cvs1:/tmp/cvs-serv6973/js Log Message: Directory /cvsroot/babeldoc/www.babeldoc.com/html/js added to the repository |
|
From: <tr...@us...> - 2003-08-12 02:06:56
|
Update of /cvsroot/babeldoc/www.babeldoc.com/html In directory sc8-pr-cvs1:/tmp/cvs-serv8399/html Modified Files: index.html sidebar.html Added Files: dtree.css Log Message: Lots of changes to the website - now with nice menu --- NEW FILE: dtree.css --- (This appears to be a binary file; contents omitted.) Index: index.html =================================================================== RCS file: /cvsroot/babeldoc/www.babeldoc.com/html/index.html,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** index.html 9 Aug 2003 15:36:26 -0000 1.2 --- index.html 12 Aug 2003 01:54:45 -0000 1.3 *************** *** 6,15 **** <meta name="keywords" content="babeldoc xml xsl jython javascript velocity pipeline eai b2b webmethods java universal document enterprise incredible yomamma"> </head> ! <frameset rows="90%,10%" frameborder="0"> ! <frameset cols="233,70%" frameborder="0"> ! <frame scrolling="no" src="sidebar.html" name="sidebar"/> ! <frame src="main.html" name="main"/> ! </frameset> ! <frame src="bottom.html" name="bottom"/> ! </frameset> </html> --- 6,12 ---- <meta name="keywords" content="babeldoc xml xsl jython javascript velocity pipeline eai b2b webmethods java universal document enterprise incredible yomamma"> </head> ! <body> ! <iframe frameborder="0" width="200" height="100%" name="sidebar" src="sidebar.html" ></iframe> ! <iframe frameborder="0" width="700" height="100%" name="main" src="main.html" ></iframe> ! </body> </html> Index: sidebar.html =================================================================== RCS file: /cvsroot/babeldoc/www.babeldoc.com/html/sidebar.html,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** sidebar.html 9 Aug 2003 15:36:26 -0000 1.2 --- sidebar.html 12 Aug 2003 01:54:45 -0000 1.3 *************** *** 5,22 **** <TITLE>babeldoc: Universal Document Processor</TITLE> <link href="site.css" rel="stylesheet" media="screen"> </HEAD> <BODY> ! <table width="126" border="0" cellspacing="2" cellpadding="2"> ! <tr height="30"> <td height="30"></td> </tr> ! <tr> <td bgcolor="orange">NAVIGATE</td> </tr> ! <tr> <td bgcolor="#d3d3d3"><a href="main.html" target="main">home</a></td> </tr> ! <tr> <td bgcolor="#d3d3d3"><a href="about.html" target="main">about</a></td> </tr> ! <tr> <td bgcolor="#d3d3d3"><a href="docs.html" target="main">documentation</a></td> </tr> ! <tr> <td bgcolor="#d3d3d3"><a href="http://sourceforge.net/project/showfiles.php?group_id=56976" target="main">download</a></td> </tr> ! <tr> <td bgcolor="#d3d3d3"><a href="development" target="main">browse</a></td> </tr> ! <tr> <td valign="bottom" bgcolor="#d3d3d3"><A href="http://sourceforge.net" target="main"> <IMG src="http://sourceforge.net/sflogo.php?group_id=53779&type=5" width="210" height="62" border="0" alt="SourceForge Logo"></A></td> </tr> ! <tr> <td align="center" valign="middle" bgcolor="#d3d3d3"><strong>bruce at triphop dot org</strong></td> </tr> ! <tr> <td><img src="images/pipelines.png" alt="" width="216" height="221" border="0"></td> </tr> ! </table> </BODY> </HTML> --- 5,36 ---- <TITLE>babeldoc: Universal Document Processor</TITLE> <link href="site.css" rel="stylesheet" media="screen"> + <link rel="StyleSheet" href="dtree.css" type="text/css" /> + <script type="text/javascript" src="js/dtree.js"></script> </HEAD> <BODY> ! <img src="images/pipelines.png" border="0"></td> </tr> ! <br/> ! <div class="dtree"> ! <script type="text/javascript"> ! <!-- ! ! d = new dTree('d'); ! ! d.add(0,-1,'Babeldoc'); ! d.add(1,0,'Main','main.html', 'main', 'main'); ! d.add(2,0,'About','about.html', 'about', 'main'); ! d.add(3,0,'Documentation'); ! d.add(4,3,'User Guide','development/readme/userguide.xml.html','userguide', 'main'); ! d.add(5,3,'Developers Guide','development/readme/devguide.xml.html','devguide', 'main'); ! d.add(6,3,'API','development/build/javadoc','api', 'main'); ! d.add(7,3,'Whitepaper','development/readme/babeldoc-whitepaper.pdf','whitepaper', 'main'); ! d.add(8,3,'Usages','development/readme/usage-whitepaper.pdf','usage', 'main'); ! d.add(9,0,'Download','http://sourceforge.net/project/showfiles.php?group_id=56976','download', 'main'); ! d.add(10,0,'Browse','development','browse', 'main'); ! ! document.write(d); ! //--> ! </script> ! </div> </BODY> </HTML> |
|
From: <tr...@us...> - 2003-08-12 00:50:21
|
Update of /cvsroot/babeldoc/babeldoc In directory sc8-pr-cvs1:/tmp/cvs-serv29462 Modified Files: build.properties Log Message: Moved up the version number Index: build.properties =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/build.properties,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** build.properties 9 Aug 2003 02:14:56 -0000 1.15 --- build.properties 12 Aug 2003 00:33:37 -0000 1.16 *************** *** 1,4 **** src = ./src ! babeldoc_version = 1.1.7-dev config = ./config modules = ./modules --- 1,4 ---- src = ./src ! babeldoc_version = 1.1.8-dev config = ./config modules = ./modules |
|
From: <tr...@us...> - 2003-08-12 00:28:33
|
Update of /cvsroot/babeldoc/babeldoc/modules/core/config/i18n In directory sc8-pr-cvs1:/tmp/cvs-serv28668/config/i18n Modified Files: messages.properties Log Message: Added the shutdown listener framework. Classes that want to be told when babeldoc is about to be shutdown implement the IShutdownListener and call EnvironmentLoader.addShutdownListener. Index: messages.properties =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/modules/core/config/i18n/messages.properties,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** messages.properties 10 Aug 2003 18:01:15 -0000 1.18 --- messages.properties 12 Aug 2003 00:28:29 -0000 1.19 *************** *** 412,413 **** --- 412,414 ---- core.pipeline.processor.threadpool.desc=Asynchronously process the pipeline documents using a threadpool. This is probably the most useful in a multithreaded environment. 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. + core.pipeline.processor.threadpool.option.keepAlive=The number of milliseconds that an idle thread in the threadpool will remain alive before being reclaimed. \ No newline at end of file |
|
From: <tr...@us...> - 2003-08-12 00:28:33
|
Update of /cvsroot/babeldoc/babeldoc/modules/core/src/com/babeldoc/core/pipeline/processor
In directory sc8-pr-cvs1:/tmp/cvs-serv28668/src/com/babeldoc/core/pipeline/processor
Modified Files:
ThreadPooledPipelineStageProcessor.java
Log Message:
Added the shutdown listener framework. Classes that want to be told when babeldoc is about to be shutdown implement the IShutdownListener and call EnvironmentLoader.addShutdownListener.
Index: ThreadPooledPipelineStageProcessor.java
===================================================================
RCS file: /cvsroot/babeldoc/babeldoc/modules/core/src/com/babeldoc/core/pipeline/processor/ThreadPooledPipelineStageProcessor.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** ThreadPooledPipelineStageProcessor.java 8 Aug 2003 23:43:11 -0000 1.3
--- ThreadPooledPipelineStageProcessor.java 12 Aug 2003 00:28:29 -0000 1.4
***************
*** 69,72 ****
--- 69,74 ----
import com.babeldoc.core.LogService;
import com.babeldoc.core.I18n;
+ import com.babeldoc.core.IShutdownListener;
+ import com.babeldoc.core.EnvironmentLoader;
import com.babeldoc.core.option.IConfigInfo;
import com.babeldoc.core.option.ConfigOption;
***************
*** 76,80 ****
import org.apache.commons.lang.NumberUtils;
- import EDU.oswego.cs.dl.util.concurrent.Executor;
import EDU.oswego.cs.dl.util.concurrent.PooledExecutor;
--- 78,81 ----
***************
*** 84,94 ****
*/
public class ThreadPooledPipelineStageProcessor
! extends SyncPipelineStageProcessor {
public static final String POOL_SIZE = "poolSize";
public static final int DEFAULT_POOLSIZE = 5;
private int poolsize;
! private Executor threadPool;
/**
--- 85,99 ----
*/
public class ThreadPooledPipelineStageProcessor
! extends SyncPipelineStageProcessor
! implements IShutdownListener {
public static final String POOL_SIZE = "poolSize";
+ public static final String KEEP_ALIVE = "keepAlive";
public static final int DEFAULT_POOLSIZE = 5;
+ public static final int DEFAULT_KEEPALIVE = 15*1000; // 15 seconds
private int poolsize;
! private int keepAlive;
! private PooledExecutor threadPool;
/**
***************
*** 102,107 ****
poolsize = NumberUtils.stringToInt((String)config.get(POOL_SIZE), DEFAULT_POOLSIZE);
! // System.out.println("Setting up a pool with size of: "+poolsize);
threadPool = new PooledExecutor(poolsize);
}
--- 107,114 ----
poolsize = NumberUtils.stringToInt((String)config.get(POOL_SIZE), DEFAULT_POOLSIZE);
! keepAlive = NumberUtils.stringToInt((String)config.get(KEEP_ALIVE), DEFAULT_KEEPALIVE);
threadPool = new PooledExecutor(poolsize);
+ threadPool.setKeepAliveTime(keepAlive);
+ EnvironmentLoader.addShutdownListener(this);
}
***************
*** 120,124 ****
throws PipelineException {
// ensure synchronized access to finalResults Collection if threads are spawned
! final Collection syncResults = Collections.synchronizedCollection(finalResults);
final int numResults = psResults.length;
for (int j = 0; j < numResults; j++) {
--- 127,131 ----
throws PipelineException {
// ensure synchronized access to finalResults Collection if threads are spawned
! final Collection syncResults = finalResults!=null?Collections.synchronizedCollection(finalResults):null;
final int numResults = psResults.length;
for (int j = 0; j < numResults; j++) {
***************
*** 156,160 ****
options.add(new ConfigOption(POOL_SIZE, IConfigOptionType.INTEGER,
! null, false, I18n.get("core.pipeline.processor.threadpool.desc")));
return options;
--- 163,170 ----
options.add(new ConfigOption(POOL_SIZE, IConfigOptionType.INTEGER,
! null, false, I18n.get("core.pipeline.processor.threadpool.option.poolSize")));
! options.add(new ConfigOption(KEEP_ALIVE, IConfigOptionType.INTEGER,
! Integer.toString(DEFAULT_KEEPALIVE), false,
! I18n.get("core.pipeline.processor.threadpool.option.keepAlive")));
return options;
***************
*** 179,182 ****
--- 189,214 ----
}
};
+ }
+
+ /**
+ * Callback method from the loader to signal that the babeldoc
+ * wants to shutdown. Please finalize, etc.
+ */
+ public void shutdown() {
+ new Thread(new Runnable() {
+ public void run() {
+ while(true) {
+ try {
+ Thread.sleep(1000);
+ if(threadPool.getPoolSize()==0) {
+ threadPool.shutdownNow();
+ return;
+ }
+ } catch (InterruptedException e) {
+ e.printStackTrace(); //To change body of catch statement use Options | File Templates.
+ }
+ }
+ }
+ }).start();
}
}
|
|
From: <tr...@us...> - 2003-08-12 00:28:33
|
Update of /cvsroot/babeldoc/babeldoc/modules/core/src/com/babeldoc/core In directory sc8-pr-cvs1:/tmp/cvs-serv28668/src/com/babeldoc/core Modified Files: BabeldocCommand.java EnvironmentLoader.java Added Files: IShutdownListener.java Log Message: Added the shutdown listener framework. Classes that want to be told when babeldoc is about to be shutdown implement the IShutdownListener and call EnvironmentLoader.addShutdownListener. --- NEW FILE: IShutdownListener.java --- /* ==================================================================== * 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: /cvsroot/babeldoc/babeldoc/modules/core/src/com/babeldoc/core/IShutdownListener.java,v 1.1 2003/08/12 00:28:29 triphop Exp $ * $DateTime$ * $Author: triphop $ * */ 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(); } Index: BabeldocCommand.java =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/modules/core/src/com/babeldoc/core/BabeldocCommand.java,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** BabeldocCommand.java 7 Aug 2003 18:29:21 -0000 1.15 --- BabeldocCommand.java 12 Aug 2003 00:28:29 -0000 1.16 *************** *** 174,178 **** }; execute(commandLine); ! } --- 174,178 ---- }; execute(commandLine); ! EnvironmentLoader.shutdown(); } *************** *** 300,304 **** */ protected void setup() { ! com.babeldoc.core.EnvironmentLoader.loadEnvironment(); } } --- 300,304 ---- */ protected void setup() { ! EnvironmentLoader.loadEnvironment(); } } Index: EnvironmentLoader.java =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/modules/core/src/com/babeldoc/core/EnvironmentLoader.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** EnvironmentLoader.java 19 Jul 2003 15:32:27 -0000 1.9 --- EnvironmentLoader.java 12 Aug 2003 00:28:29 -0000 1.10 *************** *** 75,78 **** --- 75,79 ---- import java.util.Iterator; import java.util.StringTokenizer; + import java.util.Collection; *************** *** 100,103 **** --- 101,106 ---- private static boolean envLoaded = false; + private static Collection shutdownListeners; + /** * Get a copy of the the search paths. *************** *** 151,154 **** --- 154,182 ---- String value = config.getString(key); System.setProperty(key, value); + } + } + + /** + * Add a shutdown listener to the list of listeners that need to be told about + * babeldoc shuting down. + * + * @param listener + */ + public static synchronized void addShutdownListener(IShutdownListener listener) { + if(shutdownListeners==null) { + shutdownListeners = new ArrayList(); + } + shutdownListeners.add(listener); + } + + /** + * Shutdown babeldoc - call all of the listeners shutdown method. + */ + public static synchronized void shutdown() { + if(shutdownListeners!=null) { + for (Iterator iterator = shutdownListeners.iterator(); iterator.hasNext();) { + IShutdownListener iShutdownListener = (IShutdownListener) iterator.next(); + iShutdownListener.shutdown(); + } } } |
|
From: <tr...@us...> - 2003-08-12 00:25:35
|
Update of /cvsroot/babeldoc/babeldoc/modules/core/src/com/babeldoc/core/journal/simple
In directory sc8-pr-cvs1:/tmp/cvs-serv26483
Modified Files:
SimpleJournal.java
Log Message:
Fixed issues with reading journal log.
Index: SimpleJournal.java
===================================================================
RCS file: /cvsroot/babeldoc/babeldoc/modules/core/src/com/babeldoc/core/journal/simple/SimpleJournal.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** SimpleJournal.java 19 Jul 2003 15:32:27 -0000 1.6
--- SimpleJournal.java 12 Aug 2003 00:11:24 -0000 1.7
***************
*** 68,71 ****
--- 68,72 ----
import com.babeldoc.core.I18n;
import com.babeldoc.core.LogService;
+ import com.babeldoc.core.VariableProcessor;
import com.babeldoc.core.config.ConfigService;
import com.babeldoc.core.journal.*;
***************
*** 81,84 ****
--- 82,87 ----
import java.util.Date;
+ import org.apache.commons.lang.NumberUtils;
+
/**
***************
*** 148,156 ****
static {
try {
! logFile = com.babeldoc.core.VariableProcessor.expandString(ConfigService.getString(
CONFIG_NAME, JOURNAL_LOGFILE));
logWriter = new FileWriter(logFile, true);
logPrinter = new CSVWriter(logWriter);
! trackerDir = com.babeldoc.core.VariableProcessor.expandString(ConfigService.getString(
CONFIG_NAME, JOURNAL_DIR));
--- 151,159 ----
static {
try {
! logFile = VariableProcessor.expandString(ConfigService.getString(
CONFIG_NAME, JOURNAL_LOGFILE));
logWriter = new FileWriter(logFile, true);
logPrinter = new CSVWriter(logWriter);
! trackerDir = VariableProcessor.expandString(ConfigService.getString(
CONFIG_NAME, JOURNAL_DIR));
***************
*** 159,167 ****
}
! try {
! logMaxSize = Integer.parseInt(ConfigService.getString(CONFIG_NAME,
! JOURNAL_MAXSIZE));
! } catch (Exception e) {
! }
} catch (Exception confx) {
System.out.println(confx);
--- 162,166 ----
}
! logMaxSize = NumberUtils.stringToInt(ConfigService.getString(CONFIG_NAME, JOURNAL_MAXSIZE));
} catch (Exception confx) {
System.out.println(confx);
***************
*** 196,200 ****
}
} catch (IOException iox) {
! throw new JournalException("[SimpleJournal.getAllTicketSteps]", iox);
}
--- 195,199 ----
}
} catch (IOException iox) {
! throw new JournalException("[SimpleJournal.getAllTickets]", iox);
}
***************
*** 233,242 ****
vec.add(qt);
-
- //LogService.getLogger().logDebug("Steps : " + values[1]);
}
}
} catch (IOException iox) {
! throw new JournalException("[SimpleJournal.getAllTicketSteps]", iox);
}
--- 232,241 ----
vec.add(qt);
}
}
} catch (IOException iox) {
! if(!(iox instanceof EOFException)) {
! throw new JournalException("[SimpleJournal.getAllTicketSteps]", iox);
! }
}
***************
*** 328,337 ****
try {
! CSVReader csvReader = new CSVReader(new FileReader(logFile));
! String[] values;
int index = 0;
int count = 0;
boolean found;
-
while (((values = csvReader.getAllFieldsInLine()) != null) &&
(count < jQuery.getNumResults())) {
--- 327,336 ----
try {
! BufferedReader reader = new BufferedReader(new FileReader(logFile));
! CSVReader csvReader = new CSVReader(reader);
! String[] values = null;
int index = 0;
int count = 0;
boolean found;
while (((values = csvReader.getAllFieldsInLine()) != null) &&
(count < jQuery.getNumResults())) {
***************
*** 376,382 ****
}
} catch (IOException iox) {
! throw new JournalException("", iox);
}
return (QueryTicket[]) (vec.toArray(new QueryTicket[0]));
}
--- 375,384 ----
}
} catch (IOException iox) {
! if(!(iox instanceof EOFException)) {
! throw new JournalException("", iox);
! }
}
+
return (QueryTicket[]) (vec.toArray(new QueryTicket[0]));
}
***************
*** 463,467 ****
rollLogFile();
} catch (IOException iox) {
! com.babeldoc.core.LogService.getInstance().logError(iox);
}
--- 465,469 ----
rollLogFile();
} catch (IOException iox) {
! LogService.getInstance().logError(iox);
}
***************
*** 489,492 ****
--- 491,500 ----
logPrinter.put(pstageName);
logPrinter.put(NULL);
+ }
+ logPrinter.nl();
+ try {
+ logWriter.flush();
+ } catch (IOException e) {
+ throw new JournalException("", e);
}
}
|
|
From: McDonald, B. <Bru...@ba...> - 2003-08-11 17:41:55
|
I have found the problem. it was in the move away from the ostermiller utils CSV code. I have a fixed SimpleJournal.java which I will check in tonight. Now, I have noticed that you have updated the processor so that it prints the ticket number. I am not sure that this is a good idea (run the new documentation pipeline to see why). It would be better just to print it out from the Babeldoc process command just prior to actually processing the document - is this going to be a problem for you? -----Original Message----- From: David Glick [mailto:dg...@co...] Sent: Monday, August 11, 2003 11:18 AM To: bab...@li... Subject: Re: [Babeldoc-devel] Journal tool broken? Thanks, Bruce. With any luck, fixing this will also fix the journalbrowser tool (did I mention that it didn't work for me, either?). David On Monday 11 August 2003 7:58 am, McDonald, Bruce wrote: > This certainly seems broken - I am looking into it now. > > -----Original Message----- > From: David Glick [mailto:dg...@co...] > Sent: Sunday, August 10, 2003 4:24 PM > To: bab...@li... > Subject: [Babeldoc-devel] Journal tool broken? > > > Hello to the great and powerful list, > > I can't get the journal tool to do anything besides printUsage(), > regardless of the command options I try. Have I forgotten to set > something? > > > Thanks, > > David -- David Glick Transmit Consulting, Inc 619-475-4052 dg...@tr... ------------------------------------------------------- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01 _______________________________________________ Babeldoc-devel mailing list Bab...@li... https://lists.sourceforge.net/lists/listinfo/babeldoc-devel |
|
From: McDonald, B. <Bru...@ba...> - 2003-08-11 17:34:32
|
Ok good - I will make the change. On another note, I am expanding the CallStage pipeline stage so that it can call another stage based on a test. If the test resolves true, then it calls otherwise nothing. -----Original Message----- From: David Glick [mailto:dg...@co...] Sent: Monday, August 11, 2003 1:24 PM To: bab...@li... Subject: Re: [Babeldoc-devel] Journal tool broken? Won't be a problem for me. I need the ticket number for testing, but it's not important to me how I get it (I actually didn't know where else to place it, so I took the easy route). David On Monday 11 August 2003 10:07 am, McDonald, Bruce wrote: > I have found the problem. it was in the move away from the ostermiller > utils CSV code. I have a fixed SimpleJournal.java which I will check in > tonight. > > Now, I have noticed that you have updated the processor so that it prints > the ticket number. I am not sure that this is a good idea (run the new > documentation pipeline to see why). It would be better just to print it > out from the Babeldoc process command just prior to actually processing the > document - is this going to be a problem for you? > > -----Original Message----- > From: David Glick [mailto:dg...@co...] > Sent: Monday, August 11, 2003 11:18 AM > To: bab...@li... > Subject: Re: [Babeldoc-devel] Journal tool broken? > > > Thanks, Bruce. With any luck, fixing this will also fix the journalbrowser > tool (did I mention that it didn't work for me, either?). > > David > > On Monday 11 August 2003 7:58 am, McDonald, Bruce wrote: > > This certainly seems broken - I am looking into it now. > > > > -----Original Message----- > > From: David Glick [mailto:dg...@co...] > > Sent: Sunday, August 10, 2003 4:24 PM > > To: bab...@li... > > Subject: [Babeldoc-devel] Journal tool broken? > > > > > > Hello to the great and powerful list, > > > > I can't get the journal tool to do anything besides printUsage(), > > regardless of the command options I try. Have I forgotten to set > > something? > > > > > > Thanks, > > > > David -- David Glick Transmit Consulting, Inc 619-475-4052 dg...@tr... ------------------------------------------------------- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01 _______________________________________________ Babeldoc-devel mailing list Bab...@li... https://lists.sourceforge.net/lists/listinfo/babeldoc-devel |
|
From: David G. <dg...@co...> - 2003-08-11 17:19:46
|
Won't be a problem for me. I need the ticket number for testing, but it's not important to me how I get it (I actually didn't know where else to place it, so I took the easy route). David On Monday 11 August 2003 10:07 am, McDonald, Bruce wrote: > I have found the problem. it was in the move away from the ostermiller > utils CSV code. I have a fixed SimpleJournal.java which I will check in > tonight. > > Now, I have noticed that you have updated the processor so that it prints > the ticket number. I am not sure that this is a good idea (run the new > documentation pipeline to see why). It would be better just to print it > out from the Babeldoc process command just prior to actually processing the > document - is this going to be a problem for you? > > -----Original Message----- > From: David Glick [mailto:dg...@co...] > Sent: Monday, August 11, 2003 11:18 AM > To: bab...@li... > Subject: Re: [Babeldoc-devel] Journal tool broken? > > > Thanks, Bruce. With any luck, fixing this will also fix the journalbrowser > tool (did I mention that it didn't work for me, either?). > > David > > On Monday 11 August 2003 7:58 am, McDonald, Bruce wrote: > > This certainly seems broken - I am looking into it now. > > > > -----Original Message----- > > From: David Glick [mailto:dg...@co...] > > Sent: Sunday, August 10, 2003 4:24 PM > > To: bab...@li... > > Subject: [Babeldoc-devel] Journal tool broken? > > > > > > Hello to the great and powerful list, > > > > I can't get the journal tool to do anything besides printUsage(), > > regardless of the command options I try. Have I forgotten to set > > something? > > > > > > Thanks, > > > > David -- David Glick Transmit Consulting, Inc 619-475-4052 dg...@tr... |
|
From: David G. <dg...@co...> - 2003-08-11 15:15:53
|
Thanks, Bruce. With any luck, fixing this will also fix the journalbrowser tool (did I mention that it didn't work for me, either?). David On Monday 11 August 2003 7:58 am, McDonald, Bruce wrote: > This certainly seems broken - I am looking into it now. > > -----Original Message----- > From: David Glick [mailto:dg...@co...] > Sent: Sunday, August 10, 2003 4:24 PM > To: bab...@li... > Subject: [Babeldoc-devel] Journal tool broken? > > > Hello to the great and powerful list, > > I can't get the journal tool to do anything besides printUsage(), > regardless of the command options I try. Have I forgotten to set > something? > > > Thanks, > > David -- David Glick Transmit Consulting, Inc 619-475-4052 dg...@tr... |
|
From: McDonald, B. <Bru...@ba...> - 2003-08-11 14:59:21
|
This certainly seems broken - I am looking into it now. -----Original Message----- From: David Glick [mailto:dg...@co...] Sent: Sunday, August 10, 2003 4:24 PM To: bab...@li... Subject: [Babeldoc-devel] Journal tool broken? Hello to the great and powerful list, I can't get the journal tool to do anything besides printUsage(), regardless of the command options I try. Have I forgotten to set something? Thanks, David -- David Glick Transmit Consulting, Inc 619-475-4052 dg...@tr... ------------------------------------------------------- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01 _______________________________________________ Babeldoc-devel mailing list Bab...@li... https://lists.sourceforge.net/lists/listinfo/babeldoc-devel |
|
From: <dgl...@us...> - 2003-08-11 07:25:41
|
Update of /cvsroot/babeldoc/babeldoc/modules/soap/config/i18n In directory sc8-pr-cvs1:/tmp/cvs-serv2175/modules/soap/config/i18n Modified Files: messages.properties Log Message: Soap response is now stored in an attribute 'SoapWriterResponse' in the document. Implemented username/password authentication. Index: messages.properties =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/modules/soap/config/i18n/messages.properties,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** messages.properties 7 Aug 2003 04:22:54 -0000 1.3 --- messages.properties 11 Aug 2003 07:25:38 -0000 1.4 *************** *** 13,15 **** soap.104=Error sending soap message soap.105=Error processing SOAP response ! soap.106=Return SOAP service response --- 13,18 ---- soap.104=Error sending soap message soap.105=Error processing SOAP response ! soap.106=Return SOAP service response as an attribute ! soap.107=Post soap document with authentication ! soap.108=User id for authentication ! soap.109=Password for authentication |
|
From: <dgl...@us...> - 2003-08-11 07:25:40
|
Update of /cvsroot/babeldoc/babeldoc/modules/soap/src/com/babeldoc/soap/pipeline/stage
In directory sc8-pr-cvs1:/tmp/cvs-serv2175/modules/soap/src/com/babeldoc/soap/pipeline/stage
Modified Files:
SoapWriterPipelineStage.java
Log Message:
Soap response is now stored in an attribute 'SoapWriterResponse' in the document.
Implemented username/password authentication.
Index: SoapWriterPipelineStage.java
===================================================================
RCS file: /cvsroot/babeldoc/babeldoc/modules/soap/src/com/babeldoc/soap/pipeline/stage/SoapWriterPipelineStage.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** SoapWriterPipelineStage.java 7 Aug 2003 04:21:44 -0000 1.11
--- SoapWriterPipelineStage.java 11 Aug 2003 07:25:37 -0000 1.12
***************
*** 75,78 ****
--- 75,79 ----
import java.io.ByteArrayOutputStream;
+ import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.Collection;
***************
*** 90,97 ****
*/
public class SoapWriterPipelineStage extends PipelineStage {
! public static final String SOAP_URL = "soapUrl";
! public static final String SOAP_ACTION = "soapAction";
! public static final String RESULT_STAGE = "resultStage";
! public static final String RESPONSE_DOC = "responseDoc";
/**
--- 91,101 ----
*/
public class SoapWriterPipelineStage extends PipelineStage {
! public static final String SOAP_URL = "soapUrl";
! public static final String SOAP_ACTION = "soapAction";
! public static final String RESULT_STAGE = "resultStage";
! public static final String RESPONSE_DOC = "responseDoc";
! public static final String AUTHENTICATION = "authentication";
! public static final String USERNAME = "username";
! public static final String PASSWORD = "password";
/**
***************
*** 112,125 ****
//add specific options
! options.add(new ConfigOption(SOAP_URL, IConfigOptionType.URL, null,
! false, I18n.get("soap.101")));
! options.add(new ConfigOption(SOAP_ACTION, IConfigOptionType.STRING,
null, false, I18n.get("soap.102")));
! options.add(new ConfigOption(RESULT_STAGE, IConfigOptionType.STRING,
null, true, I18n.get("soap.103")));
! options.add(new ConfigOption(RESULT_STAGE, IConfigOptionType.STRING,
null, true, I18n.get("soap.103")));
! options.add(new ConfigOption(RESPONSE_DOC, IConfigOptionType.BOOLEAN,
null, false, I18n.get("soap.106")));
return options;
--- 116,135 ----
//add specific options
! options.add(new ConfigOption(SOAP_URL, IConfigOptionType.URL,
! null, false, I18n.get("soap.101")));
! options.add(new ConfigOption(SOAP_ACTION, IConfigOptionType.STRING,
null, false, I18n.get("soap.102")));
! options.add(new ConfigOption(RESULT_STAGE, IConfigOptionType.STRING,
null, true, I18n.get("soap.103")));
! options.add(new ConfigOption(RESULT_STAGE, IConfigOptionType.STRING,
null, true, I18n.get("soap.103")));
! options.add(new ConfigOption(RESPONSE_DOC, IConfigOptionType.BOOLEAN,
null, false, I18n.get("soap.106")));
+ options.add(new ConfigOption(AUTHENTICATION, IConfigOptionType.BOOLEAN,
+ null, false, I18n.get("soap.107")));
+ options.add(new ConfigOption(USERNAME, IConfigOptionType.STRING,
+ null, false, I18n.get("soap.108")));
+ options.add(new ConfigOption(PASSWORD, IConfigOptionType.STRING,
+ null, false, I18n.get("soap.109")));
return options;
***************
*** 140,144 ****
*/
public static String sendSoapMessage(String soapUrl, String soapAction,
! boolean returnResponse, PipelineDocument document) throws Exception {
// create a message
MessageFactory mf = MessageFactory.newInstance();
--- 150,155 ----
*/
public static String sendSoapMessage(String soapUrl, String soapAction,
! boolean returnResponse, Authentication authentication, PipelineDocument document)
! throws Exception {
// create a message
MessageFactory mf = MessageFactory.newInstance();
***************
*** 152,155 ****
--- 163,177 ----
headers.addHeader("SOAPAction", soapAction);
+ // get the SOAP header
+ SOAPHeader header = message.getSOAPPart().getEnvelope().getHeader();
+
+ // if needed, add authentication
+ if (authentication != null) {
+ soapUrl = encodeURLForAuthentication(
+ soapUrl,
+ authentication.getUsername(),
+ authentication.getPassword());
+ }
+
// establish the connection
URLEndpoint endPoint = new URLEndpoint(soapUrl);
***************
*** 188,194 ****
String responseDoc = getOptions(RESPONSE_DOC);
boolean returnResponse = Boolean.valueOf(responseDoc).booleanValue();
String response = null;
try {
! response = sendSoapMessage(soapUrl, soapAction, returnResponse, this.getDocument());
} catch (Exception e) {
throw new PipelineException(I18n.get("soap.104"), e);
--- 210,233 ----
String responseDoc = getOptions(RESPONSE_DOC);
boolean returnResponse = Boolean.valueOf(responseDoc).booleanValue();
+
+ // determine if authentication is required
+ String authentication = getOptions(AUTHENTICATION);
+ boolean isAuthentication = Boolean.valueOf(authentication).booleanValue();
+ Authentication authenticationParams = null;
+ if (isAuthentication) {
+ authenticationParams = new Authentication(
+ getOptions(USERNAME),
+ getOptions(PASSWORD));
+ }
+
+ // post the soap message
String response = null;
try {
! response = sendSoapMessage(
! soapUrl,
! soapAction,
! returnResponse,
! authenticationParams,
! this.getDocument());
} catch (Exception e) {
throw new PipelineException(I18n.get("soap.104"), e);
***************
*** 196,209 ****
if (returnResponse) {
! try {
! return super.processHelper("text/xml", new String[] {response});
! }
! catch (Exception e) {
! throw new com.babeldoc.core.pipeline.PipelineException("SOAPWriter", e);
! }
}
! else {
! return super.processHelper();
! }
}
}
--- 235,318 ----
if (returnResponse) {
! // add the response as an attribute of the document
! this.getDocument().put("SoapWriterResponse", response);
}
! return super.processHelper();
! }
!
! /**
! * Encodes a URL for authentication
! * @return the encoded URL
! * @param url the web service url to post to
! * @param username the username for authentication
! * @param password the password for authentication
! * @throws Exception
! */
! private static String encodeURLForAuthentication(
! String url,
! String username,
! String password)
! throws Exception {
!
! // insert the encoded username and password into the passed URL such that
! // the URL:
! // http(s)://www.mysoapservice.com/service
! // is transformed into:
! // http(s)://encoded-username:enc...@ww.../service
! String retv = url.replaceFirst("://", "://"
! + URLEncoder.encode(username,"UTF-8")
! + ":" + URLEncoder.encode(password,"UTF-8") + "@");
! return retv;
! }
!
! /**
! * Stores the authentication parameters for use in sendSoapMessage
! */
! private class Authentication {
! private String username;
! private String password;
!
! /**
! * Creates an Authentication instance
! * @param username Username with which to authenticate
! * @param password Password with which to authenticate
! */
! public Authentication(String username, String password) {
! this.username = username;
! this.password = password;
! }
!
! /**
! * Returns the password.
! * @return String
! */
! public String getPassword() {
! return password;
! }
!
! /**
! * Returns the username.
! * @return String
! */
! public String getUsername() {
! return username;
! }
!
! /**
! * Sets the password.
! * @param password The password to set
! */
! public void setPassword(String password) {
! this.password = password;
! }
!
! /**
! * Sets the username.
! * @param username The username to set
! */
! public void setUsername(String username) {
! this.username = username;
! }
!
}
}
|
|
From: David G. <dg...@co...> - 2003-08-11 04:50:36
|
Thanks, Bruce. I've actually implemented the exact opposite, in that I'm taking the soap response and creating an attribute to store it against the original document. I'm not sure if this means that great minds think alike since the solution I arrived at was similar to your suggestion, or else I developed something completely reversed from what your great mind developed, and that makes me...? :-) Things are moving forward swimmingly, except that I've just found out that my soap post is required to authenticate. I'm trying to figure out how to do this now. Thanks again, David On Sunday 10 August 2003 9:24 pm, Bruce McDonald wrote: > David, > > Just a quick note - Merging documents from two pipelines (or sub-piplines) > is a difficult problem - What I was think about is: > > --->Store Doc on Attr--->XMit Doc(capture response to Doc) > > contd. ---->Place on new attr & restore old doc from attr. > > ? > > regards, > Bruce. > > On Sunday 10 August 2003 05:01 pm, David Glick wrote: > > Hi Bruce, > > > > Taking your advice, I'm now a Scripting expert (yeah, right!) (say, this > > *is* pretty powerful stuff!). However, I'm still unclear how to organize > > a > > > > pipeline as follows: > > |== SoapWriter ========| > > > > document == ??? stage === Scripting ===> > > > > |== NullStage (I think!) ==| > > > > I'm not sure how to split the document, and then remerge it into the > > Scripting stage. > > > > I've looked at the router and the callStage stages, but neither seem to > > have the desired effect of preserving the original document while > > providing a response document that I can process simultaneously. I've > > also considered invoking the CallStagePipelineStage directly in the > > Scripting stage, but I'm not sure if, once we get to that level of > > complexity, it might not be smarter to just create a new Pipeline stage > > anyway. > > > > Also, I'm unclear how to merge both documents in the same stage. > > > > Any advice is greatly appreciated. > > > > > > Thanks, > > > > David > > > > P.S. Another possibility that just occurred to me is to add an option to > > the SoapWriter class so that, if set, the returned document looks like: > > > > <SoapWriter> > > <SoapRequest> > > [[original document submitted to writer]] > > </SoapRequest> > > <SoapResponse> > > [[response from web service]] > > </SoapResponse> > > </SoapWriter> > > > > Is this a better way to go? > > > > On Saturday 09 August 2003 9:49 pm, Bruce McDonald wrote: > > > This would probably be a good job for the Scripting stage... Write some > > > nice javascript that saves the document (prior to sending it) and then > > > placing the response as attribute on the document and restoring the > > > original content. No need to write a new pipeline stage. > > > > > > The Scripting stage is really *VERY* powerful and the interpreted > > > Javascript runs very quickly... Its worth investigating. > > > > > > regards, > > > Bruce. > > > > > > On Saturday 09 August 2003 09:04 pm, David Glick wrote: > > > > Hello to the great and powerful list, > > > > > > > > I am writing a soap document to a web service and getting a response. > > > > I want to accept the response and add it as an attribute to the > > > > original document. What is the best way to do this? I can create a > > > > new stage based on the SoapWriter, but if Babeldoc already has some > > > > mechanism to do this, I'd rather use it. > > > > > > > > > > > > Thanks, > > > > > > > > David > > ------------------------------------------------------- > This SF.Net email sponsored by: Free pre-built ASP.NET sites including > Data Reports, E-commerce, Portals, and Forums are available now. > Download today and enter to win an XBOX or Visual Studio .NET. > http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01 > _______________________________________________ > Babeldoc-devel mailing list > Bab...@li... > https://lists.sourceforge.net/lists/listinfo/babeldoc-devel -- David Glick Transmit Consulting, Inc 619-475-4052 dg...@tr... |
|
From: Bruce M. <br...@mc...> - 2003-08-11 04:24:11
|
David,
Just a quick note - Merging documents from two pipelines (or sub-piplines) is
a difficult problem - What I was think about is:
--->Store Doc on Attr--->XMit Doc(capture response to Doc)
contd. ---->Place on new attr & restore old doc from attr.
?
regards,
Bruce.
On Sunday 10 August 2003 05:01 pm, David Glick wrote:
> Hi Bruce,
>
> Taking your advice, I'm now a Scripting expert (yeah, right!) (say, this
> *is* pretty powerful stuff!). However, I'm still unclear how to organize a
>
> pipeline as follows:
> |== SoapWriter ========|
>
> document == ??? stage === Scripting ===>
>
> |== NullStage (I think!) ==|
>
> I'm not sure how to split the document, and then remerge it into the
> Scripting stage.
>
> I've looked at the router and the callStage stages, but neither seem to
> have the desired effect of preserving the original document while providing
> a response document that I can process simultaneously. I've also
> considered invoking the CallStagePipelineStage directly in the Scripting
> stage, but I'm not sure if, once we get to that level of complexity, it
> might not be smarter to just create a new Pipeline stage anyway.
>
> Also, I'm unclear how to merge both documents in the same stage.
>
> Any advice is greatly appreciated.
>
>
> Thanks,
>
> David
>
> P.S. Another possibility that just occurred to me is to add an option to
> the SoapWriter class so that, if set, the returned document looks like:
>
> <SoapWriter>
> <SoapRequest>
> [[original document submitted to writer]]
> </SoapRequest>
> <SoapResponse>
> [[response from web service]]
> </SoapResponse>
> </SoapWriter>
>
> Is this a better way to go?
>
> On Saturday 09 August 2003 9:49 pm, Bruce McDonald wrote:
> > This would probably be a good job for the Scripting stage... Write some
> > nice javascript that saves the document (prior to sending it) and then
> > placing the response as attribute on the document and restoring the
> > original content. No need to write a new pipeline stage.
> >
> > The Scripting stage is really *VERY* powerful and the interpreted
> > Javascript runs very quickly... Its worth investigating.
> >
> > regards,
> > Bruce.
> >
> > On Saturday 09 August 2003 09:04 pm, David Glick wrote:
> > > Hello to the great and powerful list,
> > >
> > > I am writing a soap document to a web service and getting a response.
> > > I want to accept the response and add it as an attribute to the
> > > original document. What is the best way to do this? I can create a new
> > > stage based on the SoapWriter, but if Babeldoc already has some
> > > mechanism to do this, I'd rather use it.
> > >
> > >
> > > Thanks,
> > >
> > > David
|
|
From: David G. <dg...@co...> - 2003-08-10 20:50:34
|
Hi Bruce, Taking your advice, I'm now a Scripting expert (yeah, right!) (say, this *is* pretty powerful stuff!). However, I'm still unclear how to organize a pipeline as follows: |== SoapWriter ========| document == ??? stage === Scripting ===> |== NullStage (I think!) ==| I'm not sure how to split the document, and then remerge it into the Scripting stage. I've looked at the router and the callStage stages, but neither seem to have the desired effect of preserving the original document while providing a response document that I can process simultaneously. I've also considered invoking the CallStagePipelineStage directly in the Scripting stage, but I'm not sure if, once we get to that level of complexity, it might not be smarter to just create a new Pipeline stage anyway. Also, I'm unclear how to merge both documents in the same stage. Any advice is greatly appreciated. Thanks, David P.S. Another possibility that just occurred to me is to add an option to the SoapWriter class so that, if set, the returned document looks like: <SoapWriter> <SoapRequest> [[original document submitted to writer]] </SoapRequest> <SoapResponse> [[response from web service]] </SoapResponse> </SoapWriter> Is this a better way to go? On Saturday 09 August 2003 9:49 pm, Bruce McDonald wrote: > This would probably be a good job for the Scripting stage... Write some > nice javascript that saves the document (prior to sending it) and then > placing the response as attribute on the document and restoring the > original content. No need to write a new pipeline stage. > > The Scripting stage is really *VERY* powerful and the interpreted > Javascript runs very quickly... Its worth investigating. > > regards, > Bruce. > > On Saturday 09 August 2003 09:04 pm, David Glick wrote: > > Hello to the great and powerful list, > > > > I am writing a soap document to a web service and getting a response. I > > want to accept the response and add it as an attribute to the original > > document. What is the best way to do this? I can create a new stage > > based on the SoapWriter, but if Babeldoc already has some mechanism to do > > this, I'd rather use it. > > > > > > Thanks, > > > > David -- David Glick Transmit Consulting, Inc 619-475-4052 dg...@tr... |
|
From: David G. <dg...@co...> - 2003-08-10 20:13:47
|
Hello to the great and powerful list, I can't get the journal tool to do anything besides printUsage(), regardless of the command options I try. Have I forgotten to set something? Thanks, David -- David Glick Transmit Consulting, Inc 619-475-4052 dg...@tr... |
|
From: <dgl...@us...> - 2003-08-10 18:01:18
|
Update of /cvsroot/babeldoc/babeldoc/modules/core/src/com/babeldoc/core/pipeline/processor In directory sc8-pr-cvs1:/tmp/cvs-serv13403/modules/core/src/com/babeldoc/core/pipeline/processor Modified Files: SyncPipelineStageProcessor.java Log Message: Show ticket id after completed processing pipeline Index: SyncPipelineStageProcessor.java =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/modules/core/src/com/babeldoc/core/pipeline/processor/SyncPipelineStageProcessor.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** SyncPipelineStageProcessor.java 8 Aug 2003 23:43:11 -0000 1.2 --- SyncPipelineStageProcessor.java 10 Aug 2003 18:01:15 -0000 1.3 *************** *** 1,320 **** ! /* ==================================================================== ! * 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.pipeline.processor; ! ! import com.babeldoc.core.pipeline.*; ! import com.babeldoc.core.journal.IJournalTicket; ! import com.babeldoc.core.journal.JournalFactory; ! import com.babeldoc.core.journal.JournalException; ! import com.babeldoc.core.I18n; ! import com.babeldoc.core.LogService; ! import com.babeldoc.core.option.IConfigInfo; ! ! import java.util.*; ! ! /** ! * The default pipline stage processor executes ***EVERYTHING*** serialially. ! * This is of concern when a pipeline returns a number of results. Most of this ! * code used to live in the pipeline stage factory. ! */ ! public class SyncPipelineStageProcessor ! implements IPipelineStageProcessor { ! ! private IPipelineStageFactory stageFactory; ! ! // this is put in a ThreadLocal, since with Threads the same stage can be called by several Threads at once ! private ThreadLocal localStages = new ThreadLocal() { ! protected synchronized Object initialValue() { ! LogService.getInstance().logDebug(I18n.get("019005", "new")); ! return new HashMap(); ! } ! }; ! ! ! /** ! * Get the "owning" pipeline stage factory. ! * ! * @return ! */ ! public IPipelineStageFactory getStageFactory() { ! return stageFactory; ! } ! ! /** ! * Returns the pipeline stage type for this particular pipeline ! * ! * @param stageName ! * ! * @return ! * ! * @throws PipelineException ! */ ! public PipelineStageType getPipelineStageType(String stageName) ! throws PipelineException { ! return getStageFactory().getResolver().getPipelineStageType(stageName); ! } ! ! /** ! * Get and instantiate the named pipeline stage. ! * ! * @param stageName the unique name of the stage ! * ! * @return a reference to the pipeline stage ! * ! * @throws PipelineException DOCUMENT ME! ! */ ! public IPipelineStage getPipelineStage(String stageName) ! throws PipelineException { ! Map stages = (Map)localStages.get(); ! ! if (!stages.containsKey(stageName)) { ! LogService.getInstance().logDebug(I18n.get("019005", stageName)); ! ! try { ! PipelineStageType pipelineStageType = getPipelineStageType(stageName); ! Class stage = pipelineStageType.getTypeClass(); ! ! if (stage != null) { ! IPipelineStage pstage = (IPipelineStage) (stage.newInstance()); ! pstage.setName(stageName); ! pstage.setResolver(getStageFactory().getResolver()); ! pstage.setPipelineName(getStageFactory().getName()); ! stages.put(stageName, pstage); ! } else { ! throw new PipelineException(I18n.get("019010", ! pipelineStageType.getTypeName())); ! } ! } catch (InstantiationException ie) { ! throw new PipelineException(ie.getMessage(), ie); ! } catch (IllegalAccessException iae) { ! throw new PipelineException(iae.getMessage(), iae); ! } ! } ! ! return (IPipelineStage) stages.get(stageName); ! } ! ! ! /** ! * Process documents - this is the entry point for pipeline processing. If ! * the name of the next stage is not null, then process normally, otherwise ! * add them to the finalResults collection if the finalResults collection is not null. ! * ! * @param name of the next stage ! * @param document to process ! * @param ticket the tracker ticket ! * @param finalResults the resulting processed documents after all processing is completed ! * ! * @throws com.babeldoc.core.pipeline.PipelineException DOCUMENT ME! ! */ ! public void process(String name, PipelineDocument document, ! IJournalTicket ticket, Collection finalResults) throws PipelineException { ! if ((name != null) && !name.equals("null") && (document != null)) { ! LogService.getInstance().logInfo(I18n.get("019008", name)); ! ! // Get the pipeline stage for this name ! IPipelineStage pstage = getPipelineStage(name); ! ! if (pstage != null) { ! try { ! pstage.initialize(); ! } catch (Exception e) { ! throw new PipelineException("Exception while initializing", e); ! } ! pstage.setDocument(document); ! pstage.setTicket(ticket); ! trackDocument(pstage); ! ! processPipelineStage(pstage, finalResults); ! } else { ! LogService.getInstance().logError(I18n.get("019008", name), null); ! } ! } else { ! if (finalResults != null) { ! finalResults.add(new PipelineStageResult(null, document, ticket)); ! } ! } ! } ! ! /** ! * This method is call prior to any processing - it is a necessary configuration ! * prequisite. ! * ! * @param stageFactory set the associated stage factory for this processor ! */ ! public void configure(IPipelineStageFactory stageFactory, Map config) { ! this.stageFactory = stageFactory; ! } ! ! /** ! * Process the pipeline stage and then defer to eithe the multithreaded or single threaded ! * implementation - this needs to be extracted. ! * ! * @param pstage The pipeline stage to process ! * @param finalResults collection of documents after all processing is completed. ! * @throws com.babeldoc.core.pipeline.PipelineException ! */ ! protected void processPipelineStage(IPipelineStage pstage, Collection finalResults) ! throws PipelineException { ! ! // Process the pipeline stage, get the results of the processing ! PipelineStageResult [] psResults = pstage.processStage(); ! ! if(psResults!=null && psResults.length>0) { ! processPipelineStageResults(psResults, finalResults); ! } ! } ! ! /** ! * Process the pipeline stage finalResults. The gets called from process and ! * handles the finalResults from the processing. ! * ! * @param psResults The results of running the current stage on this document ! * @param finalResults Collection of documents after all processing done (after null) ! * ! * @throws com.babeldoc.core.pipeline.PipelineException ! */ ! protected void processPipelineStageResults(PipelineStageResult[] psResults, ! Collection finalResults) throws PipelineException { ! ! int numResults = psResults.length; ! for (int i = 0; i < numResults; ++i) { ! processPipelineStageResult(psResults[i], finalResults); ! } ! } ! ! /** ! * Process a single PipelineStageResult. ! * ! * @param psResult The pipeline stage result to process ! * @param finalResults the collection of processed documents. ! * @throws com.babeldoc.core.pipeline.PipelineException ! */ ! protected void processPipelineStageResult(PipelineStageResult psResult, Collection finalResults) ! throws PipelineException { ! String name = psResult.getNamePipelineStage(); ! PipelineDocument document = psResult.getDocument(); ! IJournalTicket ticket = psResult.getTicket(); ! ! this.process(name, document, ticket, finalResults); ! } ! ! /** ! * Track the document on the pipeline stage ! * ! * @param pstage ! * ! * @throws PipelineException DOCUMENT ME! ! */ ! protected void trackDocument(IPipelineStage pstage) ! throws PipelineException { ! if (pstage.isTracked()) { ! try { ! JournalFactory.getJournal().updateDocument(pstage.getTicket(), ! pstage.getDocument(), getStageFactory().getName() + "." + pstage.getName()); ! } catch (JournalException e) { ! LogService.getInstance().logError(e); ! throw new PipelineException(e.getMessage(), e); ! } ! } ! } ! ! /** ! * Get the configuration information for this processor ! * ! * @return IConfigInfo object ! */ ! public IConfigInfo getInfo() { ! return new ProcessorConfigInfo() { ! /** ! * This method returns type specific options ! * ! * @return comments ! */ ! public Collection getTypeSpecificOptions() { ! return new ArrayList(); ! } ! ! /** ! * Return description of this worker ! * ! * @return description ! */ ! public String getDescription() { ! return I18n.get("core.pipeline.processor.sync.desc"); ! } ! ! /** ! * return the name ! * ! * @return ! */ ! public String getName() { ! return "sync"; ! } ! }; ! } ! } --- 1,321 ---- ! /* ==================================================================== ! * 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.pipeline.processor; ! ! import com.babeldoc.core.pipeline.*; ! import com.babeldoc.core.journal.IJournalTicket; ! import com.babeldoc.core.journal.JournalFactory; ! import com.babeldoc.core.journal.JournalException; ! import com.babeldoc.core.I18n; ! import com.babeldoc.core.LogService; ! import com.babeldoc.core.option.IConfigInfo; ! ! import java.util.*; ! ! /** ! * The default pipline stage processor executes ***EVERYTHING*** serialially. ! * This is of concern when a pipeline returns a number of results. Most of this ! * code used to live in the pipeline stage factory. ! */ ! public class SyncPipelineStageProcessor ! implements IPipelineStageProcessor { ! ! private IPipelineStageFactory stageFactory; ! ! // this is put in a ThreadLocal, since with Threads the same stage can be called by several Threads at once ! private ThreadLocal localStages = new ThreadLocal() { ! protected synchronized Object initialValue() { ! LogService.getInstance().logDebug(I18n.get("019005", "new")); ! return new HashMap(); ! } ! }; ! ! ! /** ! * Get the "owning" pipeline stage factory. ! * ! * @return ! */ ! public IPipelineStageFactory getStageFactory() { ! return stageFactory; ! } ! ! /** ! * Returns the pipeline stage type for this particular pipeline ! * ! * @param stageName ! * ! * @return ! * ! * @throws PipelineException ! */ ! public PipelineStageType getPipelineStageType(String stageName) ! throws PipelineException { ! return getStageFactory().getResolver().getPipelineStageType(stageName); ! } ! ! /** ! * Get and instantiate the named pipeline stage. ! * ! * @param stageName the unique name of the stage ! * ! * @return a reference to the pipeline stage ! * ! * @throws PipelineException DOCUMENT ME! ! */ ! public IPipelineStage getPipelineStage(String stageName) ! throws PipelineException { ! Map stages = (Map)localStages.get(); ! ! if (!stages.containsKey(stageName)) { ! LogService.getInstance().logDebug(I18n.get("019005", stageName)); ! ! try { ! PipelineStageType pipelineStageType = getPipelineStageType(stageName); ! Class stage = pipelineStageType.getTypeClass(); ! ! if (stage != null) { ! IPipelineStage pstage = (IPipelineStage) (stage.newInstance()); ! pstage.setName(stageName); ! pstage.setResolver(getStageFactory().getResolver()); ! pstage.setPipelineName(getStageFactory().getName()); ! stages.put(stageName, pstage); ! } else { ! throw new PipelineException(I18n.get("019010", ! pipelineStageType.getTypeName())); ! } ! } catch (InstantiationException ie) { ! throw new PipelineException(ie.getMessage(), ie); ! } catch (IllegalAccessException iae) { ! throw new PipelineException(iae.getMessage(), iae); ! } ! } ! ! return (IPipelineStage) stages.get(stageName); ! } ! ! ! /** ! * Process documents - this is the entry point for pipeline processing. If ! * the name of the next stage is not null, then process normally, otherwise ! * add them to the finalResults collection if the finalResults collection is not null. ! * ! * @param name of the next stage ! * @param document to process ! * @param ticket the tracker ticket ! * @param finalResults the resulting processed documents after all processing is completed ! * ! * @throws com.babeldoc.core.pipeline.PipelineException DOCUMENT ME! ! */ ! public void process(String name, PipelineDocument document, ! IJournalTicket ticket, Collection finalResults) throws PipelineException { ! if ((name != null) && !name.equals("null") && (document != null)) { ! LogService.getInstance().logInfo(I18n.get("019008", name)); ! ! // Get the pipeline stage for this name ! IPipelineStage pstage = getPipelineStage(name); ! ! if (pstage != null) { ! try { ! pstage.initialize(); ! } catch (Exception e) { ! throw new PipelineException("Exception while initializing", e); ! } ! pstage.setDocument(document); ! pstage.setTicket(ticket); ! trackDocument(pstage); ! ! processPipelineStage(pstage, finalResults); ! } else { ! LogService.getInstance().logError(I18n.get("019008", name), null); ! } ! } else { ! LogService.getInstance().logInfo(I18n.get("019013", ticket.getId())); ! if (finalResults != null) { ! finalResults.add(new PipelineStageResult(null, document, ticket)); ! } ! } ! } ! ! /** ! * This method is call prior to any processing - it is a necessary configuration ! * prequisite. ! * ! * @param stageFactory set the associated stage factory for this processor ! */ ! public void configure(IPipelineStageFactory stageFactory, Map config) { ! this.stageFactory = stageFactory; ! } ! ! /** ! * Process the pipeline stage and then defer to eithe the multithreaded or single threaded ! * implementation - this needs to be extracted. ! * ! * @param pstage The pipeline stage to process ! * @param finalResults collection of documents after all processing is completed. ! * @throws com.babeldoc.core.pipeline.PipelineException ! */ ! protected void processPipelineStage(IPipelineStage pstage, Collection finalResults) ! throws PipelineException { ! ! // Process the pipeline stage, get the results of the processing ! PipelineStageResult [] psResults = pstage.processStage(); ! ! if(psResults!=null && psResults.length>0) { ! processPipelineStageResults(psResults, finalResults); ! } ! } ! ! /** ! * Process the pipeline stage finalResults. The gets called from process and ! * handles the finalResults from the processing. ! * ! * @param psResults The results of running the current stage on this document ! * @param finalResults Collection of documents after all processing done (after null) ! * ! * @throws com.babeldoc.core.pipeline.PipelineException ! */ ! protected void processPipelineStageResults(PipelineStageResult[] psResults, ! Collection finalResults) throws PipelineException { ! ! int numResults = psResults.length; ! for (int i = 0; i < numResults; ++i) { ! processPipelineStageResult(psResults[i], finalResults); ! } ! } ! ! /** ! * Process a single PipelineStageResult. ! * ! * @param psResult The pipeline stage result to process ! * @param finalResults the collection of processed documents. ! * @throws com.babeldoc.core.pipeline.PipelineException ! */ ! protected void processPipelineStageResult(PipelineStageResult psResult, Collection finalResults) ! throws PipelineException { ! String name = psResult.getNamePipelineStage(); ! PipelineDocument document = psResult.getDocument(); ! IJournalTicket ticket = psResult.getTicket(); ! ! this.process(name, document, ticket, finalResults); ! } ! ! /** ! * Track the document on the pipeline stage ! * ! * @param pstage ! * ! * @throws PipelineException DOCUMENT ME! ! */ ! protected void trackDocument(IPipelineStage pstage) ! throws PipelineException { ! if (pstage.isTracked()) { ! try { ! JournalFactory.getJournal().updateDocument(pstage.getTicket(), ! pstage.getDocument(), getStageFactory().getName() + "." + pstage.getName()); ! } catch (JournalException e) { ! LogService.getInstance().logError(e); ! throw new PipelineException(e.getMessage(), e); ! } ! } ! } ! ! /** ! * Get the configuration information for this processor ! * ! * @return IConfigInfo object ! */ ! public IConfigInfo getInfo() { ! return new ProcessorConfigInfo() { ! /** ! * This method returns type specific options ! * ! * @return comments ! */ ! public Collection getTypeSpecificOptions() { ! return new ArrayList(); ! } ! ! /** ! * Return description of this worker ! * ! * @return description ! */ ! public String getDescription() { ! return I18n.get("core.pipeline.processor.sync.desc"); ! } ! ! /** ! * return the name ! * ! * @return ! */ ! public String getName() { ! return "sync"; ! } ! }; ! } ! } |
|
From: <dgl...@us...> - 2003-08-10 18:01:18
|
Update of /cvsroot/babeldoc/babeldoc/modules/core/config/i18n
In directory sc8-pr-cvs1:/tmp/cvs-serv13403/modules/core/config/i18n
Modified Files:
messages.properties
Log Message:
Show ticket id after completed processing pipeline
Index: messages.properties
===================================================================
RCS file: /cvsroot/babeldoc/babeldoc/modules/core/config/i18n/messages.properties,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** messages.properties 8 Aug 2003 23:43:11 -0000 1.17
--- messages.properties 10 Aug 2003 18:01:15 -0000 1.18
***************
*** 186,189 ****
--- 186,190 ----
019011=Stage: {0} does not have a nextstage!
019012=Stage: {0} not found!
+ 019013=Finished processing ticket id# {0}
# com.babeldoc.core.pipeline.PipelineStage
|