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: Dejan K. <dej...@nb...> - 2004-04-13 08:10:49
|
Martin Logan wrote: >Hi Dejan, > >Apologies for any problems I caused. I will spend more time thinking and >asking questions rather than looking at changes that would affect the >current implementation. > >I was chatting with Mike about a couple of things. > >1. A set of HOW TOs, some of which are in the forums and lists. > >I know that the ultimate goal would be to get them onto a wiki, but in >the meantime would you have any objection to me adding a chapter to the >user guide. At least that way they will be collected together in an XML >document that we could use to populate a wiki later. > > > That would be just great. There are many great tips in forums and mailing lists and it would be cool to have them collected in one chapter or FAQ. >2. A quick start guide. > >This would be for people like me that want to get up and running >quickly. I was thinking of doing something similar to the "Setting up a >project" section of the user guide but going into more detail and >showing some tips on velocity scripts etc. that way new users would have >a framework that they could extend to their particular needs. We could >make an archive of the directory structure and config files available. > > I think it would be good idea. Anyway, note that Babeldoc could be used in different ways - with scanners as standalone application or in managed enviroment with session beans, servlets, MDB... Martin, we appreciate your efforts. Documentation was always our weak side (as in 99% other open source projects) so we really need this kind of help! Dejan >Martin > > >-----Original Message----- >From: bab...@li... >[mailto:bab...@li...] On Behalf Of Dejan >Krsmanovic >Sent: Thursday, April 08, 2004 12:12 AM >To: Babeldoc Developer List >Subject: [Babeldoc-devel] MailboxScanner and attributes > > >Martin, all > >after receiving few e-mails I realized that many users already use >current mailbox scanner attributes bases on Address[], so I think we >should not change them (that is - we should revert your changes). I am >not sure if Velocity can operate with arrays (like Mike suggested), but >if it can then I guess it should be enough for getting actual e-mail >address. If not, then we could introduce new attributes that would >contain String representation of e-mail addresses. But we should take >care of compatibility with previous versions so we shoud not change >something that many users rely on. Sorry about this - in future I should >think twice before suggesting such things! > >Dejan > > > > >------------------------------------------------------- >This SF.Net email is sponsored by: IBM Linux Tutorials >Free Linux tutorial presented by Daniel Robbins, President and CEO of >GenToo technologies. Learn everything from fundamentals to system >administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click >_______________________________________________ >Babeldoc-devel mailing list Bab...@li... >https://lists.sourceforge.net/lists/listinfo/babeldoc-devel > > > |
|
From: Dejan K. <dej...@nb...> - 2004-04-08 07:12:19
|
Martin, all after receiving few e-mails I realized that many users already use current mailbox scanner attributes bases on Address[], so I think we should not change them (that is - we should revert your changes). I am not sure if Velocity can operate with arrays (like Mike suggested), but if it can then I guess it should be enough for getting actual e-mail address. If not, then we could introduce new attributes that would contain String representation of e-mail addresses. But we should take care of compatibility with previous versions so we shoud not change something that many users rely on. Sorry about this - in future I should think twice before suggesting such things! Dejan |
|
From: Martin L. <mar...@us...> - 2004-04-08 00:31:19
|
Update of /cvsroot/babeldoc/babeldoc/modules/scanner/src/com/babeldoc/scanner/worker In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2360/modules/scanner/src/com/babeldoc/scanner/worker Modified Files: MailboxScanner.java Log Message: Minor documentation updates Index: MailboxScanner.java =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/modules/scanner/src/com/babeldoc/scanner/worker/MailboxScanner.java,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** MailboxScanner.java 7 Apr 2004 17:16:15 -0000 1.33 --- MailboxScanner.java 8 Apr 2004 00:18:16 -0000 1.34 *************** *** 444,451 **** attrs.put(SCAN_PATH_KEY, path); attrs.put(SCAN_SUBJECT_KEY, originalMessage.getSubject()); ! attrs.put(SCAN_FROM_KEY, flattenAddress(originalMessage.getFrom())); ! attrs.put(SCAN_REPLYTO_KEY, flattenAddress(originalMessage.getReplyTo())); ! attrs.put(SCAN_TO_KEY , flattenAddress(originalMessage.getAllRecipients())); //attrs.put(SCAN_TO_KEY, originalMessage.getSubject()); --- 444,451 ---- attrs.put(SCAN_PATH_KEY, path); attrs.put(SCAN_SUBJECT_KEY, originalMessage.getSubject()); ! attrs.put(SCAN_FROM_KEY, originalMessage.getFrom()); ! attrs.put(SCAN_REPLYTO_KEY, originalMessage.getReplyTo()); ! attrs.put(SCAN_TO_KEY , originalMessage.getAllRecipients()); //attrs.put(SCAN_TO_KEY, originalMessage.getSubject()); *************** *** 483,504 **** } } - - /** - * Flattens Address[] array into comma separated list. - * In future we could separate address and Personal Name into separate attributes - * - * @param Address[] - * @throws Exception DOCUMENT ME! - */ - private String flattenAddress(Address[] addr) throws Exception { - - String addrList = ""; - for (int j = 0; j < addr.length; j++) { - addrList = addrList + addr[j].toString(); - if (j != addr.length - 1) {addrList = addrList + ", ";} - } - - return addrList; - } } --- 483,486 ---- |
|
From: Michael A. <mic...@ze...> - 2004-04-07 23:59:59
|
Hi, Martin,
I haven't tested that script. Did you get it to work? Please don't
commit anything until it's been checked.
But if you did get it working: cool.
Cheers...
Mike
On Wed, 2004-04-07 at 21:18, Martin Logan wrote:
> Based on this feedback, I should revert to the original types so that it=20
> does not impact anyone currently using this scanner.
>=20
> Leaving it as Address[] allows access to address or personalName if it=20
> returns an InternetAddress
>=20
> I will update the documentation to reflect that it returns Address[] and=20
> show the sample velocity script.
>=20
> Martin
>=20
> >From: Michael Ansley <mic...@ze...>
> >To: bab...@li...
> >Subject: Re: [Babeldoc-devel] MailboxScanner - Attributes from, reply-to=
and=20
> >to
> >Date: Wed, 07 Apr 2004 18:37:03 +0100
> >
> >Well, perhaps it should be array of String. Velocity can loop over
> >arrays:
> >
> >foreach ($address in $document.from)
> > <do what you need to using $address>
> >end
> >
> >Although, leaving it as Address[], you can do this:
> >
> >foreach ($address in $document.from)
> > <do what you need to using $address.toString()>
> >end
> >
> >to achieve what you need.
> >
> >Cheers...
> >
> >
> >Mike
> >
> >
> >On Wed, 2004-04-07 at 08:52, Dejan Krsmanovic wrote:
> > > Hi Martin,
> > > you are right about this. These attributes should be strings, not arr=
ay=20
> >of
> > > Address objects. It would be easer to work with Strings. You can comm=
it=20
> >your
> > > changes.
> > >
> > > Is everybody OK with this change?
> > > Dejan
> > >
> > >
> > >
> > > ----- Original Message -----
> > > From: "Martin Logan" <mar...@ho...>
> > > To: <bab...@li...>
> > > Sent: Wednesday, April 07, 2004 5:52 AM
> > > Subject: [Babeldoc-devel] MailboxScanner - Attributes from, reply-to =
and=20
> >to
> > >
> > >
> > > > I have been trying to use the $!{document.from} attribute from
> > > > MailboxScanner.
> > > >
> > > > I've noticed that it is returning Address[].
> > > >
> > > > Is this by design? If so, how do I get the list flatened to somethi=
ng=20
> >like
> > > a
> > > > comma separated list using Velocity scripting?
> > > >
> > > > If it s not by design, I have an update which will return a comma
> > > separtaed
> > > > lString list for from reply-to and to that I' can check in.
> > > >
> > > > Martin
> > > >
> > > > _________________________________________________________________
> > > > Check out MSN PC Safety & Security to help ensure your PC is protec=
ted=20
> >and
> > > > safe. http://specials.msn.com/msn/security.asp
> > > >
> > > >
> > > >
> > > > -------------------------------------------------------
> > > > This SF.Net email is sponsored by: IBM Linux Tutorials
> > > > Free Linux tutorial presented by Daniel Robbins, President and CEO =
of
> > > > GenToo technologies. Learn everything from fundamentals to system
> > > > administration.http://ads.osdn.com/?ad_id=3D1470&alloc_id=3D3638&op=
=3Dclick
> > > > _______________________________________________
> > > > Babeldoc-devel mailing list
> > > > Bab...@li...
> > > > https://lists.sourceforge.net/lists/listinfo/babeldoc-devel
> > >
> > >
> > >
> > >
> > > -------------------------------------------------------
> > > This SF.Net email is sponsored by: IBM Linux Tutorials
> > > Free Linux tutorial presented by Daniel Robbins, President and CEO of
> > > GenToo technologies. Learn everything from fundamentals to system
> > > administration.http://ads.osdn.com/?ad_id=3D1470&alloc_id=3D3638&op=
=3Dclick
> > > _______________________________________________
> > > Babeldoc-devel mailing list
> > > Bab...@li...
> > > https://lists.sourceforge.net/lists/listinfo/babeldoc-devel
> ><< signature.asc >>
>=20
> _________________________________________________________________
> FREE pop-up blocking with the new MSN Toolbar get it now!=20
> http://toolbar.msn.com/go/onm00200415ave/direct/01/
>=20
>=20
>=20
> -------------------------------------------------------
> This SF.Net email is sponsored by: IBM Linux Tutorials
> Free Linux tutorial presented by Daniel Robbins, President and CEO of
> GenToo technologies. Learn everything from fundamentals to system
> administration.http://ads.osdn.com/?ad_id=3D1470&alloc_id=3D3638&op=3Dcli=
ck
> _______________________________________________
> Babeldoc-devel mailing list
> Bab...@li...
> https://lists.sourceforge.net/lists/listinfo/babeldoc-devel
|
|
From: Martin L. <mar...@ho...> - 2004-04-07 20:18:15
|
Based on this feedback, I should revert to the original types so that it
does not impact anyone currently using this scanner.
Leaving it as Address[] allows access to address or personalName if it
returns an InternetAddress
I will update the documentation to reflect that it returns Address[] and
show the sample velocity script.
Martin
>From: Michael Ansley <mic...@ze...>
>To: bab...@li...
>Subject: Re: [Babeldoc-devel] MailboxScanner - Attributes from, reply-toand
>to
>Date: Wed, 07 Apr 2004 18:37:03 +0100
>
>Well, perhaps it should be array of String. Velocity can loop over
>arrays:
>
>foreach ($address in $document.from)
> <do what you need to using $address>
>end
>
>Although, leaving it as Address[], you can do this:
>
>foreach ($address in $document.from)
> <do what you need to using $address.toString()>
>end
>
>to achieve what you need.
>
>Cheers...
>
>
>Mike
>
>
>On Wed, 2004-04-07 at 08:52, Dejan Krsmanovic wrote:
> > Hi Martin,
> > you are right about this. These attributes should be strings, not array
>of
> > Address objects. It would be easer to work with Strings. You can commit
>your
> > changes.
> >
> > Is everybody OK with this change?
> > Dejan
> >
> >
> >
> > ----- Original Message -----
> > From: "Martin Logan" <mar...@ho...>
> > To: <bab...@li...>
> > Sent: Wednesday, April 07, 2004 5:52 AM
> > Subject: [Babeldoc-devel] MailboxScanner - Attributes from, reply-to and
>to
> >
> >
> > > I have been trying to use the $!{document.from} attribute from
> > > MailboxScanner.
> > >
> > > I've noticed that it is returning Address[].
> > >
> > > Is this by design? If so, how do I get the list flatened to something
>like
> > a
> > > comma separated list using Velocity scripting?
> > >
> > > If it s not by design, I have an update which will return a comma
> > separtaed
> > > lString list for from reply-to and to that I' can check in.
> > >
> > > Martin
> > >
> > > _________________________________________________________________
> > > Check out MSN PC Safety & Security to help ensure your PC is protected
>and
> > > safe. http://specials.msn.com/msn/security.asp
> > >
> > >
> > >
> > > -------------------------------------------------------
> > > This SF.Net email is sponsored by: IBM Linux Tutorials
> > > Free Linux tutorial presented by Daniel Robbins, President and CEO of
> > > GenToo technologies. Learn everything from fundamentals to system
> > > administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
> > > _______________________________________________
> > > Babeldoc-devel mailing list
> > > Bab...@li...
> > > https://lists.sourceforge.net/lists/listinfo/babeldoc-devel
> >
> >
> >
> >
> > -------------------------------------------------------
> > This SF.Net email is sponsored by: IBM Linux Tutorials
> > Free Linux tutorial presented by Daniel Robbins, President and CEO of
> > GenToo technologies. Learn everything from fundamentals to system
> > administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
> > _______________________________________________
> > Babeldoc-devel mailing list
> > Bab...@li...
> > https://lists.sourceforge.net/lists/listinfo/babeldoc-devel
><< signature.asc >>
_________________________________________________________________
FREE pop-up blocking with the new MSN Toolbar get it now!
http://toolbar.msn.com/go/onm00200415ave/direct/01/
|
|
From: Michael A. <mic...@ze...> - 2004-04-07 17:36:03
|
Well, perhaps it should be array of String. Velocity can loop over
arrays:
foreach ($address in $document.from)
<do what you need to using $address>
end
Although, leaving it as Address[], you can do this:
foreach ($address in $document.from)
<do what you need to using $address.toString()>
end
to achieve what you need.
Cheers...
Mike
On Wed, 2004-04-07 at 08:52, Dejan Krsmanovic wrote:
> Hi Martin,
> you are right about this. These attributes should be strings, not array o=
f
> Address objects. It would be easer to work with Strings. You can commit y=
our
> changes.
>=20
> Is everybody OK with this change?
> Dejan
>=20
>=20
>=20
> ----- Original Message -----=20
> From: "Martin Logan" <mar...@ho...>
> To: <bab...@li...>
> Sent: Wednesday, April 07, 2004 5:52 AM
> Subject: [Babeldoc-devel] MailboxScanner - Attributes from, reply-to and =
to
>=20
>=20
> > I have been trying to use the $!{document.from} attribute from
> > MailboxScanner.
> >
> > I've noticed that it is returning Address[].
> >
> > Is this by design? If so, how do I get the list flatened to something l=
ike
> a
> > comma separated list using Velocity scripting?
> >
> > If it s not by design, I have an update which will return a comma
> separtaed
> > lString list for from reply-to and to that I' can check in.
> >
> > Martin
> >
> > _________________________________________________________________
> > Check out MSN PC Safety & Security to help ensure your PC is protected =
and
> > safe. http://specials.msn.com/msn/security.asp
> >
> >
> >
> > -------------------------------------------------------
> > This SF.Net email is sponsored by: IBM Linux Tutorials
> > Free Linux tutorial presented by Daniel Robbins, President and CEO of
> > GenToo technologies. Learn everything from fundamentals to system
> > administration.http://ads.osdn.com/?ad_id=3D1470&alloc_id=3D3638&op=3Dc=
lick
> > _______________________________________________
> > Babeldoc-devel mailing list
> > Bab...@li...
> > https://lists.sourceforge.net/lists/listinfo/babeldoc-devel
>=20
>=20
>=20
>=20
> -------------------------------------------------------
> This SF.Net email is sponsored by: IBM Linux Tutorials
> Free Linux tutorial presented by Daniel Robbins, President and CEO of
> GenToo technologies. Learn everything from fundamentals to system
> administration.http://ads.osdn.com/?ad_id=3D1470&alloc_id=3D3638&op=3Dcli=
ck
> _______________________________________________
> Babeldoc-devel mailing list
> Bab...@li...
> https://lists.sourceforge.net/lists/listinfo/babeldoc-devel
|
|
From: Martin L. <mar...@us...> - 2004-04-07 17:29:45
|
Update of /cvsroot/babeldoc/babeldoc/readme/userguide In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13534/readme/userguide Modified Files: chapter3.xml Log Message: Minor documentation updates Index: chapter3.xml =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/readme/userguide/chapter3.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** chapter3.xml 25 Mar 2004 01:12:34 -0000 1.3 --- chapter3.xml 7 Apr 2004 17:16:42 -0000 1.4 *************** *** 7,15 **** <orderedlist> <listitem> ! <userinput>Jdbc</userinput> Unpooled Jdbc access to a database connection</listitem> <listitem> ! <userinput>Jndi</userinput> Jndi lookup to a database connection</listitem> <listitem> ! <userinput>Pooled</userinput> Pooled jdbc access to a database connection</listitem> </orderedlist> <para>Each of the named resources are defined in the <userinput>config/resources</userinput> as <userinput>resource-name</userinput>.properties. Each of the properties files has a required name/value pair called <userinput>type</userinput>. This can be one of the types as listed above. The rest of the configuration options are specific to the type of resource. These configuration options are given below:</para> --- 7,15 ---- <orderedlist> <listitem> ! <userinput>jdbc</userinput> Unpooled Jdbc access to a database connection</listitem> <listitem> ! <userinput>jndi</userinput> Jndi lookup to a database connection</listitem> <listitem> ! <userinput>pooled</userinput> Pooled jdbc access to a database connection</listitem> </orderedlist> <para>Each of the named resources are defined in the <userinput>config/resources</userinput> as <userinput>resource-name</userinput>.properties. Each of the properties files has a required name/value pair called <userinput>type</userinput>. This can be one of the types as listed above. The rest of the configuration options are specific to the type of resource. These configuration options are given below:</para> *************** *** 17,21 **** <section> ! <title>Jdbc</title> <para>Each simple jdbc resource defines a connection to a database using the following configuration options:</para> <orderedlist> --- 17,21 ---- <section> ! <title>jdbc</title> <para>Each simple jdbc resource defines a connection to a database using the following configuration options:</para> <orderedlist> *************** *** 24,28 **** </listitem> <listitem> ! <userinput>dbPasswd</userinput> password of the user. </listitem> <listitem> --- 24,28 ---- </listitem> <listitem> ! <userinput>dbPassword</userinput> password of the user. </listitem> <listitem> *************** *** 37,41 **** <section> ! <title>Jndi</title> <para>This resource is useful when running in a J2EE container. This allows for accessing datasources using JNDI. There is a single configuration option:</para> <orderedlist> --- 37,41 ---- <section> ! <title>jndi</title> <para>This resource is useful when running in a J2EE container. This allows for accessing datasources using JNDI. There is a single configuration option:</para> <orderedlist> *************** *** 46,50 **** <section> ! <title>Pooled</title> <para>Babeldoc provides a pooled connection using the (<ulink url="http://jakarta.apache.org/commons/dbcp/">Apache Commons DBCP</ulink>) library . The configuration for the resource is provided by the following configuration options</para> <orderedlist> --- 46,50 ---- <section> ! <title>pooled</title> <para>Babeldoc provides a pooled connection using the (<ulink url="http://jakarta.apache.org/commons/dbcp/">Apache Commons DBCP</ulink>) library . The configuration for the resource is provided by the following configuration options</para> <orderedlist> |
|
From: Martin L. <mar...@us...> - 2004-04-07 17:29:16
|
Update of /cvsroot/babeldoc/babeldoc/modules/scanner/src/com/babeldoc/scanner/worker In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13431/modules/scanner/src/com/babeldoc/scanner/worker Modified Files: MailboxScanner.java Log Message: Altered attributes from and replyTo to return String of comma sepated addresses. Added to attribute. Updated documentation Index: MailboxScanner.java =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/modules/scanner/src/com/babeldoc/scanner/worker/MailboxScanner.java,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** MailboxScanner.java 25 Dec 2003 15:14:00 -0000 1.32 --- MailboxScanner.java 7 Apr 2004 17:16:15 -0000 1.33 *************** *** 2,8 **** * ==================================================================== 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. --- 2,8 ---- * ==================================================================== The * Apache Software License, Version 1.1 [...1049 lines suppressed...] ! options.add(new ConfigOption(MailboxScanner.FROM_FILTER, ! IConfigOptionType.STRING, null, true, ! I18n.get("scanner.MailboxScannerInfo.option.fromFilter"))); ! ! options.add(new ConfigOption(MailboxScanner.TO_FILTER, ! IConfigOptionType.STRING, null, true, ! I18n.get("scanner.MailboxScannerInfo.option.toFilter"))); ! ! options.add(new ConfigOption(MailboxScanner.SUBJECT_FILTER, ! IConfigOptionType.STRING, null, true, ! I18n.get("scanner.MailboxScannerInfo.option.subjectFilter"))); ! ! options.add(new ConfigOption(MailboxScanner.DELETE, ! IConfigOptionType.BOOLEAN, "false", true, ! I18n.get("scanner.MailboxScannerInfo.option.deleteInvalid"))); ! ! return options; ! } } + |
|
From: Martin L. <mar...@us...> - 2004-04-07 17:29:16
|
Update of /cvsroot/babeldoc/babeldoc/modules/scanner/config/i18n In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13431/modules/scanner/config/i18n Modified Files: messages.properties Log Message: Altered attributes from and replyTo to return String of comma sepated addresses. Added to attribute. Updated documentation Index: messages.properties =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/modules/scanner/config/i18n/messages.properties,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** messages.properties 30 Mar 2004 19:15:41 -0000 1.20 --- messages.properties 7 Apr 2004 17:16:14 -0000 1.21 *************** *** 85,89 **** scanner.MailboxScanner.error.gettingMessage=Error getting message from mail ! scanner.MailboxScannerInfo.description=The MailboxScanner is used for scanning mail servers for e-mail messages. Document can be scanned from e-mail body or from attachments. This is very useful for integration with email enabled clients. An example would be purchase orders emailed to a mailbox scanned by Babeldoc. The From, To and Subject filters are regular expression filters. Enter regular expressions which, if matched, cause the matching email to be processed. For example, if you wanted to match a recipient address of fir...@se..., you would enter "first\\.last@server\\.com" in the toFilter. The expressions are effectively OR'd together, because if any one of the filters gets a match, the e-mail message will be processed. The toFilter is tested against all addresses in the TO field. It is <emphasis>NOT</emphasis> tested against the CC or BCC fields. Accessible attributes are subject, from and replyTo. scanner.MailboxScannerInfo.option.host=Mail server host name or address scanner.MailboxScannerInfo.option.protocol=Protocol which is used for connecting to mail server (pop3, imap...). Default is pop3 --- 85,89 ---- scanner.MailboxScanner.error.gettingMessage=Error getting message from mail ! scanner.MailboxScannerInfo.description=The MailboxScanner is used for scanning mail servers for e-mail messages. Document can be scanned from e-mail body or from attachments. This is very useful for integration with email enabled clients. An example would be purchase orders emailed to a mailbox scanned by Babeldoc. The From, To and Subject filters are regular expression filters. Enter regular expressions which, if matched, cause the matching email to be processed. For example, if you wanted to match a recipient address of fir...@se..., you would enter "first\\.last@server\\.com" in the toFilter. The expressions are effectively OR'd together, because if any one of the filters gets a match, the e-mail message will be processed. The toFilter is tested against all addresses in the TO field. It is <emphasis>NOT</emphasis> tested against the CC or BCC fields. Accessible attributes are subject, from, to and replyTo. scanner.MailboxScannerInfo.option.host=Mail server host name or address scanner.MailboxScannerInfo.option.protocol=Protocol which is used for connecting to mail server (pop3, imap...). Default is pop3 |
|
From: Dejan K. <dej...@nb...> - 2004-04-07 07:54:14
|
Hi Martin,
you are right about this. These attributes should be strings, not array of
Address objects. It would be easer to work with Strings. You can commit your
changes.
Is everybody OK with this change?
Dejan
----- Original Message -----
From: "Martin Logan" <mar...@ho...>
To: <bab...@li...>
Sent: Wednesday, April 07, 2004 5:52 AM
Subject: [Babeldoc-devel] MailboxScanner - Attributes from, reply-to and to
> I have been trying to use the $!{document.from} attribute from
> MailboxScanner.
>
> I've noticed that it is returning Address[].
>
> Is this by design? If so, how do I get the list flatened to something like
a
> comma separated list using Velocity scripting?
>
> If it s not by design, I have an update which will return a comma
separtaed
> lString list for from reply-to and to that I' can check in.
>
> Martin
>
> _________________________________________________________________
> Check out MSN PC Safety & Security to help ensure your PC is protected and
> safe. http://specials.msn.com/msn/security.asp
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by: IBM Linux Tutorials
> Free Linux tutorial presented by Daniel Robbins, President and CEO of
> GenToo technologies. Learn everything from fundamentals to system
> administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
> _______________________________________________
> Babeldoc-devel mailing list
> Bab...@li...
> https://lists.sourceforge.net/lists/listinfo/babeldoc-devel
|
|
From: Martin L. <mar...@ho...> - 2004-04-07 03:53:05
|
I have been trying to use the $!{document.from} attribute from
MailboxScanner.
I've noticed that it is returning Address[].
Is this by design? If so, how do I get the list flatened to something like a
comma separated list using Velocity scripting?
If it s not by design, I have an update which will return a comma separtaed
lString list for from reply-to and to that I' can check in.
Martin
_________________________________________________________________
Check out MSN PC Safety & Security to help ensure your PC is protected and
safe. http://specials.msn.com/msn/security.asp
|
|
From: Michael A. <mic...@us...> - 2004-04-06 23:42:48
|
Update of /cvsroot/babeldoc/babeldoc/modules/gui/src/com/babeldoc/gui/pipeline/builder In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11146/modules/gui/src/com/babeldoc/gui/pipeline/builder Modified Files: AddPipelineStageAction.java EditPipelineStageConfigAction.java PipelineBuilderController.java PipelineBuilderModel.java Added Files: PipelineTreeNode.java Log Message: Updated as a result of the configuration package changes Index: PipelineBuilderModel.java =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/modules/gui/src/com/babeldoc/gui/pipeline/builder/PipelineBuilderModel.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** PipelineBuilderModel.java 13 Sep 2003 15:33:11 -0000 1.10 --- PipelineBuilderModel.java 6 Apr 2004 23:29:55 -0000 1.11 *************** *** 66,82 **** package com.babeldoc.gui.pipeline.builder; import com.babeldoc.core.EnvironmentLoader; ! import com.babeldoc.core.option.IConfigData; ! import com.babeldoc.core.option.IConfigInfo; ! import com.babeldoc.core.option.ConfigData; ! import com.babeldoc.core.option.ConfigInfo; import com.babeldoc.core.config.ConfigService; import com.babeldoc.core.config.IConfig; ! import com.babeldoc.core.pipeline.*; import com.babeldoc.core.pipeline.simple.SimplePipelineStageFactory; import com.babeldoc.core.service.ServiceFactory; - import java.util.*; - /** --- 66,97 ---- package com.babeldoc.gui.pipeline.builder; + import java.util.ArrayList; + import java.util.Collections; + import java.util.Comparator; + import java.util.Iterator; + import java.util.List; + import java.util.Map; + import java.util.Properties; + import java.util.Set; + import com.babeldoc.core.EnvironmentLoader; ! import com.babeldoc.core.LogService; ! import com.babeldoc.core.config.ConfigException; import com.babeldoc.core.config.ConfigService; import com.babeldoc.core.config.IConfig; ! import com.babeldoc.core.option.ConfigData; ! import com.babeldoc.core.option.IConfigData; ! import com.babeldoc.core.option.IConfigInfo; ! import com.babeldoc.core.pipeline.IPipelineStageFactory; ! import com.babeldoc.core.pipeline.IPipelineStageResolver; ! import com.babeldoc.core.pipeline.PipelineException; ! import com.babeldoc.core.pipeline.PipelineFactory; ! import com.babeldoc.core.pipeline.PipelineFactoryFactory; ! import com.babeldoc.core.pipeline.PipelineStageFactory; ! import com.babeldoc.core.pipeline.PipelineStageResolver; ! import com.babeldoc.core.pipeline.PipelineStageType; import com.babeldoc.core.pipeline.simple.SimplePipelineStageFactory; import com.babeldoc.core.service.ServiceFactory; /** *************** *** 303,307 **** * @param stage */ ! public static void setPipelineEntryStage(String pipeline, String stage) { // Create the pipeline config and write it down IConfig config = getPipelineConfiguration(pipeline); --- 318,322 ---- * @param stage */ ! public static void setPipelineEntryStage(String pipeline, String stage) throws ConfigException { // Create the pipeline config and write it down IConfig config = getPipelineConfiguration(pipeline); *************** *** 374,378 **** */ public static void setPipelineStageProperties(String pipeline, String stage, ! Properties properties) { String pipelineKey = stage + DOT; IConfig config = getPipelineConfiguration(pipeline); --- 389,393 ---- */ public static void setPipelineStageProperties(String pipeline, String stage, ! Properties properties) throws ConfigException { String pipelineKey = stage + DOT; IConfig config = getPipelineConfiguration(pipeline); *************** *** 474,478 **** */ public static void createNewPipeline(String pipeline, String type) ! throws PipelineException { if (CONFIG.equals(pipeline)) { throw new PipelineException("This is a reserved name"); --- 489,493 ---- */ public static void createNewPipeline(String pipeline, String type) ! throws PipelineException, ConfigException { if (CONFIG.equals(pipeline)) { throw new PipelineException("This is a reserved name"); *************** *** 496,500 **** public static void updatePipelineStageConfig(String pipeline, String stage, IConfigInfo info ) ! throws PipelineException { // Create the pipeline config and write it down String configName = PIPELINE_SLASH + pipeline; --- 511,515 ---- public static void updatePipelineStageConfig(String pipeline, String stage, IConfigInfo info ) ! throws PipelineException, ConfigException { // Create the pipeline config and write it down String configName = PIPELINE_SLASH + pipeline; *************** *** 515,519 **** */ public static void createPipelineStage(String pipeline, String stage, ! String type) { IConfig config = PipelineBuilderModel.getPipelineConfiguration(pipeline); config.setString(stage + DOT_STAGETYPE, type); --- 530,534 ---- */ public static void createPipelineStage(String pipeline, String stage, ! String type) throws ConfigException { IConfig config = PipelineBuilderModel.getPipelineConfiguration(pipeline); config.setString(stage + DOT_STAGETYPE, type); *************** *** 527,531 **** * @param pipeline */ ! public static void deletePipeline(String pipeline) { IConfig oldconfig = ConfigService.getInstance().getConfig(PIPELINE_CONFIG_NAME); IConfig newconfig = ConfigService.getInstance().createConfig(PIPELINE_CONFIG_NAME); --- 542,546 ---- * @param pipeline */ ! public static void deletePipeline(String pipeline) throws ConfigException { IConfig oldconfig = ConfigService.getInstance().getConfig(PIPELINE_CONFIG_NAME); IConfig newconfig = ConfigService.getInstance().createConfig(PIPELINE_CONFIG_NAME); *************** *** 548,552 **** * @param stage */ ! public static void deletePipelineStage(String pipeline, String stage) { IConfig oldconfig = getPipelineConfiguration(pipeline); IConfig newconfig = ConfigService.getInstance().createConfig(PIPELINE_SLASH + --- 563,567 ---- * @param stage */ ! public static void deletePipelineStage(String pipeline, String stage) throws ConfigException { IConfig oldconfig = getPipelineConfiguration(pipeline); IConfig newconfig = ConfigService.getInstance().createConfig(PIPELINE_SLASH + *************** *** 572,583 **** */ public static void main(String[] args) throws Exception { ! PipelineBuilderModel model = new PipelineBuilderModel(); PipelineBuilderModel.createNewPipeline("mypipe", "simple"); PipelineBuilderModel.createNewPipeline("myotherpipe", "simple"); ! model.setPipelineEntryStage("mypipe", "rascal"); ! System.out.println(model.getPipelineEntryStage("mypipe")); ! System.out.println(model.getPipelineEntryStage("documentation")); ! System.out.println(model.getPipelineStageProperties("documentation", "attrdefault")); } --- 587,598 ---- */ public static void main(String[] args) throws Exception { ! //PipelineBuilderModel model = new PipelineBuilderModel(); PipelineBuilderModel.createNewPipeline("mypipe", "simple"); PipelineBuilderModel.createNewPipeline("myotherpipe", "simple"); ! PipelineBuilderModel.setPipelineEntryStage("mypipe", "rascal"); ! LogService.getInstance().logDebug(PipelineBuilderModel.getPipelineEntryStage("mypipe")); ! LogService.getInstance().logDebug(PipelineBuilderModel.getPipelineEntryStage("documentation")); ! LogService.getInstance().logDebug(PipelineBuilderModel.getPipelineStageProperties("documentation", "attrdefault")); } Index: AddPipelineStageAction.java =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/modules/gui/src/com/babeldoc/gui/pipeline/builder/AddPipelineStageAction.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** AddPipelineStageAction.java 13 Sep 2003 15:33:11 -0000 1.7 --- AddPipelineStageAction.java 6 Apr 2004 23:29:55 -0000 1.8 *************** *** 66,77 **** package com.babeldoc.gui.pipeline.builder; ! import com.babeldoc.gui.wizard.addstage.AddPipelineStageWizard; ! import com.babeldoc.gui.wizard.addstage.AddPipelineStageModel; ! import com.babeldoc.core.pipeline.PipelineException; ! import com.babeldoc.core.LogService; ! import com.babeldoc.core.option.IConfigInfo; import javax.swing.tree.TreeNode; ! import java.awt.event.ActionEvent; --- 66,79 ---- package com.babeldoc.gui.pipeline.builder; ! import java.awt.event.ActionEvent; import javax.swing.tree.TreeNode; ! ! import com.babeldoc.core.LogService; ! import com.babeldoc.core.config.ConfigException; ! import com.babeldoc.core.option.IConfigInfo; ! import com.babeldoc.core.pipeline.PipelineException; ! import com.babeldoc.gui.wizard.addstage.AddPipelineStageModel; ! import com.babeldoc.gui.wizard.addstage.AddPipelineStageWizard; *************** *** 114,117 **** --- 116,121 ---- } catch (PipelineException e1) { LogService.getInstance().logError(e1); + } catch (ConfigException e2) { + LogService.getInstance().logError(e2); } TreeNode pipeNode = getFrame().getTree().getTreeNodeForPipeline(treenode.toString()); Index: EditPipelineStageConfigAction.java =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/modules/gui/src/com/babeldoc/gui/pipeline/builder/EditPipelineStageConfigAction.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** EditPipelineStageConfigAction.java 17 Sep 2003 21:11:56 -0000 1.2 --- EditPipelineStageConfigAction.java 6 Apr 2004 23:29:55 -0000 1.3 *************** *** 66,79 **** package com.babeldoc.gui.pipeline.builder; ! import com.babeldoc.gui.config.ConfigOptionPanel; ! import com.babeldoc.core.pipeline.PipelineException; ! import com.babeldoc.core.option.IConfigInfo; ! import com.babeldoc.core.LogService; ! import java.awt.event.ActionEvent; import java.awt.event.ActionListener; - import java.awt.*; ! import javax.swing.*; --- 66,85 ---- package com.babeldoc.gui.pipeline.builder; ! import java.awt.BorderLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; ! import javax.swing.BorderFactory; ! import javax.swing.Box; ! import javax.swing.BoxLayout; ! import javax.swing.JButton; ! import javax.swing.JDialog; ! import javax.swing.JPanel; ! ! import com.babeldoc.core.LogService; ! import com.babeldoc.core.config.ConfigException; ! import com.babeldoc.core.option.IConfigInfo; ! import com.babeldoc.core.pipeline.PipelineException; ! import com.babeldoc.gui.config.ConfigOptionPanel; *************** *** 127,132 **** try { PipelineBuilderModel.updatePipelineStageConfig(pipeline, stage, info); ! } catch (PipelineException pe) { ! LogService.getInstance().logError(pe); } } --- 133,140 ---- try { PipelineBuilderModel.updatePipelineStageConfig(pipeline, stage, info); ! } catch (PipelineException e1) { ! LogService.getInstance().logError(e1); ! } catch (ConfigException e2) { ! LogService.getInstance().logError(e2); } } --- NEW FILE: PipelineTreeNode.java --- /* * Created on 01-Apr-2004 * * To change the template for this generated file go to * Window - Preferences - Java - Code Generation - Code and Comments */ package com.babeldoc.gui.pipeline.builder; /** * A node in the pipeline node * */ class PipelineTreeNode { public static final int PIPELINE_NODE_TYPE = 0; public static final int STAGE_NODE_TYPE = 1; public static final int CONFIG_NODE_TYPE = 2; private String name; private int nodeType; private boolean entryStage; /** * Creates a new PipelineTreeNode object. * * @param name DOCUMENT ME! * @param nodeType DOCUMENT ME! */ private PipelineTreeNode(String name, int nodeType) { this.name = name; this.nodeType = nodeType; } /** * make tree node as a configuration item * * @param name DOCUMENT ME! * * @return DOCUMENT ME! */ public static PipelineTreeNode configNode(String name) { return new PipelineTreeNode(name, CONFIG_NODE_TYPE); } /** * make tree node as a pipeline node * * @param name pipeline name * * @return DOCUMENT ME! */ public static PipelineTreeNode pipelineNode(String name) { return new PipelineTreeNode(name, PIPELINE_NODE_TYPE); } /** * make tree node as a pipeline stage * * @param name pipeline stage name * * @return */ public static PipelineTreeNode stageNode(String name) { return new PipelineTreeNode(name, STAGE_NODE_TYPE); } /** * @return true if this pipeline tree node is a configuration item */ public boolean isConfig() { return nodeType == CONFIG_NODE_TYPE; } /** * @return true if this pipeline tree node is a pipeline item */ public boolean isPipeline() { return nodeType == PIPELINE_NODE_TYPE; } /** * @return true if this pipeline tree node is a pipeline stage item */ public boolean isStage() { return nodeType == STAGE_NODE_TYPE; } /** * @return the name of tree node (for displays) */ public String toString() { return name; } public boolean isEntryStage() { return entryStage; } public void setEntryStage(boolean entryStage) { this.entryStage = entryStage; } } Index: PipelineBuilderController.java =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/modules/gui/src/com/babeldoc/gui/pipeline/builder/PipelineBuilderController.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** PipelineBuilderController.java 17 Sep 2003 21:11:56 -0000 1.7 --- PipelineBuilderController.java 6 Apr 2004 23:29:55 -0000 1.8 *************** *** 118,211 **** - /** - * A node in the pipeline node - * - */ - class PipelineTreeNode { - public static final int PIPELINE_NODE_TYPE = 0; - public static final int STAGE_NODE_TYPE = 1; - public static final int CONFIG_NODE_TYPE = 2; - private String name; - private int nodeType; - private boolean entryStage; - - /** - * Creates a new PipelineTreeNode object. - * - * @param name DOCUMENT ME! - * @param nodeType DOCUMENT ME! - */ - private PipelineTreeNode(String name, int nodeType) { - this.name = name; - this.nodeType = nodeType; - } - - /** - * make tree node as a configuration item - * - * @param name DOCUMENT ME! - * - * @return DOCUMENT ME! - */ - public static PipelineTreeNode configNode(String name) { - return new PipelineTreeNode(name, CONFIG_NODE_TYPE); - } - - /** - * make tree node as a pipeline node - * - * @param name pipeline name - * - * @return DOCUMENT ME! - */ - public static PipelineTreeNode pipelineNode(String name) { - return new PipelineTreeNode(name, PIPELINE_NODE_TYPE); - } - - /** - * make tree node as a pipeline stage - * - * @param name pipeline stage name - * - * @return - */ - public static PipelineTreeNode stageNode(String name) { - return new PipelineTreeNode(name, STAGE_NODE_TYPE); - } - - /** - * @return true if this pipeline tree node is a configuration item - */ - public boolean isConfig() { - return nodeType == CONFIG_NODE_TYPE; - } - - /** - * @return true if this pipeline tree node is a pipeline item - */ - public boolean isPipeline() { - return nodeType == PIPELINE_NODE_TYPE; - } - - /** - * @return true if this pipeline tree node is a pipeline stage item - */ - public boolean isStage() { - return nodeType == STAGE_NODE_TYPE; - } - - /** - * @return the name of tree node (for displays) - */ - public String toString() { - return name; - } - - public boolean isEntryStage() { - return entryStage; - } - - public void setEntryStage(boolean entryStage) { - this.entryStage = entryStage; - } - } --- 118,119 ---- |
|
From: Michael A. <mic...@us...> - 2004-04-06 23:42:47
|
Update of /cvsroot/babeldoc/babeldoc/modules/gui/src/com/babeldoc/gui/wizard/addstage In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11146/modules/gui/src/com/babeldoc/gui/wizard/addstage Modified Files: Tag: V1-2 AddPipelineStageModel.java Log Message: Updated as a result of the configuration package changes Index: AddPipelineStageModel.java =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/modules/gui/src/com/babeldoc/gui/wizard/addstage/AddPipelineStageModel.java,v retrieving revision 1.7 retrieving revision 1.7.4.1 diff -C2 -d -r1.7 -r1.7.4.1 *** AddPipelineStageModel.java 13 Sep 2003 15:33:11 -0000 1.7 --- AddPipelineStageModel.java 6 Apr 2004 23:29:55 -0000 1.7.4.1 *************** *** 66,69 **** --- 66,70 ---- package com.babeldoc.gui.wizard.addstage; + import com.babeldoc.core.config.ConfigException; import com.babeldoc.core.option.IConfigInfo; import com.babeldoc.core.option.MutableConfigValueException; *************** *** 119,124 **** /** ! * We write the pipeline stage information to the configuration files. ! * * @param finished */ --- 120,125 ---- /** ! * We write the pipeline stage information to the configuration files. ! * * @param finished */ *************** *** 127,131 **** if (finished) { ! PipelineBuilderModel.createPipelineStage(pipeline, stage, stageType); } } --- 128,136 ---- if (finished) { ! try { ! PipelineBuilderModel.createPipelineStage(pipeline, stage, stageType); ! } catch (ConfigException e1) { ! LogService.getInstance().logError(e1); ! } } } |
|
From: Michael A. <mic...@us...> - 2004-04-06 23:42:47
|
Update of /cvsroot/babeldoc/babeldoc/modules/gui/src/com/babeldoc/gui/wizard/setentrystage In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11146/modules/gui/src/com/babeldoc/gui/wizard/setentrystage Modified Files: Tag: V1-2 SetEntryStageModel.java Log Message: Updated as a result of the configuration package changes Index: SetEntryStageModel.java =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/modules/gui/src/com/babeldoc/gui/wizard/setentrystage/SetEntryStageModel.java,v retrieving revision 1.3 retrieving revision 1.3.4.1 diff -C2 -d -r1.3 -r1.3.4.1 *** SetEntryStageModel.java 26 Aug 2003 22:23:32 -0000 1.3 --- SetEntryStageModel.java 6 Apr 2004 23:29:55 -0000 1.3.4.1 *************** *** 66,69 **** --- 66,71 ---- package com.babeldoc.gui.wizard.setentrystage; + import com.babeldoc.core.LogService; + import com.babeldoc.core.config.ConfigException; import com.babeldoc.gui.pipeline.builder.PipelineBuilderModel; import com.babeldoc.gui.wizard.WizardModel; *************** *** 128,132 **** --- 130,138 ---- if (finished) { + try { PipelineBuilderModel.setPipelineEntryStage(pipeline, stage); + } catch (ConfigException e1) { + LogService.getInstance().logError(e1); + } } } |
|
From: Michael A. <mic...@us...> - 2004-04-03 15:35:56
|
Update of /cvsroot/babeldoc/babeldoc/modules/sql/src/com/babeldoc/sql/config In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19750/modules/sql/src/com/babeldoc/sql/config Modified Files: SqlConfigurationLoader.java SqlConfigService.java Removed Files: SqlConfig.java Log Message: Added the change notification functionality and refactored the IConfig implementations into a single DefaultConfig class. Index: SqlConfigService.java =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/modules/sql/src/com/babeldoc/sql/config/SqlConfigService.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** SqlConfigService.java 15 Aug 2003 00:25:30 -0000 1.7 --- SqlConfigService.java 3 Apr 2004 15:23:35 -0000 1.8 *************** *** 67,70 **** --- 67,76 ---- import com.babeldoc.core.I18n; + import com.babeldoc.core.LogService; + import com.babeldoc.core.config.ConfigChangeEvent; + import com.babeldoc.core.config.DefaultConfig; + import com.babeldoc.core.config.ConfigException; + import com.babeldoc.core.config.IConfigChangeListener; + import com.babeldoc.core.config.IConfigChangeNotifier; import com.babeldoc.core.config.IConfig; import com.babeldoc.core.config.IConfigService; *************** *** 72,76 **** --- 78,90 ---- import java.sql.*; + import java.util.ArrayList; + import java.util.HashMap; + import java.util.Iterator; + import java.util.List; import java.util.Locale; + import java.util.Map; + + import javax.naming.*; + import javax.sql.*; *************** *** 88,93 **** * @version 1.0 */ ! public class SqlConfigService implements IConfigService { ! /** constant: the name of the database */ public static final String DB_NAME = "dbName"; --- 102,111 ---- * @version 1.0 */ ! public class SqlConfigService implements IConfigService, IConfigChangeNotifier { ! ! /** Log service to use */ ! private LogService log = LogService.getInstance(SqlConfigService.class.getName()); ! ! /** constant: the name of the database */ public static final String DB_NAME = "dbName"; *************** *** 101,118 **** public static final String DB_DRIVER = "dbDriver"; /** constant: the select query to getChild the configuration data */ public static final String CONFIG_SELECT = "SELECT cfg_name, cfg_value FROM config WHERE cfg_name LIKE "; /** constant: delete the key */ ! public static final String CONFIG_DELETE = "delete from config WHERE cfg_name = ?"; /** constant: insert the key */ ! public static final String CONFIG_INSERT = "INSERT INTO config ( cfg_name , cfg_value ) values ( ? , ? )"; ! String dbDriver; // Instance variable settings. ! String dbName; ! String dbPasswd; ! String dbUrl; /** --- 119,155 ---- public static final String DB_DRIVER = "dbDriver"; + /** constant: the name of data source to use in a managed environment */ + public static final String DS_NAME = "dsName"; + + /** constant: whether to cache the connection object or not */ + public static final String DS_CACHE_CONNECTION = "dsCacheConnection"; + /** constant: the select query to getChild the configuration data */ public static final String CONFIG_SELECT = "SELECT cfg_name, cfg_value FROM config WHERE cfg_name LIKE "; /** constant: delete the key */ ! public static final String CONFIG_DELETE = "DELETE FROM config WHERE cfg_name = ?"; /** constant: insert the key */ ! public static final String CONFIG_INSERT = "INSERT INTO config ( cfg_name , cfg_value ) VALUES ( ? , ? )"; ! ! /** constant: update the key */ ! public static final String CONFIG_UPDATE = "UPDATE config SET cfg_value = ? WHERE cfg_name = ? )"; ! ! private Map changeListenerConfigs; ! private List allListeners; ! private String dbDriver; // Instance variable settings. ! private String dbName; ! private String dbPasswd; ! private String dbUrl; ! ! // DataSource name ! private String dsName; ! ! // Cache the data connection ! private boolean cacheConnection = false; ! private Connection cachedConnection = null; /** *************** *** 123,137 **** */ public SqlConfigService() { dbName = System.getProperty(DB_NAME); dbPasswd = System.getProperty(DB_PASSWORD); dbDriver = System.getProperty(DB_DRIVER); dbUrl = System.getProperty(DB_URL); ! if ((dbName != null) && (dbPasswd != null) && (dbDriver != null) && ! (dbUrl != null)) { try { Class.forName(dbDriver).newInstance(); } catch (Exception e) { ! System.err.println(I18n.get("000051", e)); } } --- 160,183 ---- */ public SqlConfigService() { + changeListenerConfigs = new HashMap(); + allListeners = new ArrayList(); dbName = System.getProperty(DB_NAME); dbPasswd = System.getProperty(DB_PASSWORD); dbDriver = System.getProperty(DB_DRIVER); dbUrl = System.getProperty(DB_URL); + dsName = System.getProperty(DS_NAME); + if (System.getProperty(DS_CACHE_CONNECTION) != null) { + if (System.getProperty(DS_CACHE_CONNECTION).toUpperCase().equals("Y") || + System.getProperty(DS_CACHE_CONNECTION).toUpperCase().equals("YES")) { + cacheConnection = true; + } + } ! if ((dbDriver != null) && (dbUrl != null) && (dsName == null)) { try { Class.forName(dbDriver).newInstance(); } catch (Exception e) { ! log.logWarn(I18n.get("000051", e)); ! log.logDebug(e); } } *************** *** 139,142 **** --- 185,279 ---- /** + * getConnection a connection from the correct source. This gets a connection + * object from either the Driver or a DataSource retrieved from a naming + * server + * + * @return the connection object + */ + private Connection getConnection() throws ConfigException { + Connection con; + + if ((dbName != null) + && (dbPasswd != null) + && (dbDriver != null) + && (dbUrl != null) + && (dsName == null)) { + // If using the driver directly + try { + log.logDebug( + "Connection parms: url = " + + dbUrl + + "; user = " + + dbName + + "; password = " + + dbPasswd + + "; driver = " + + dbDriver); + con = DriverManager.getConnection(dbUrl, dbName, dbPasswd); + } catch (SQLException e) { + throw new ConfigException(I18n.get("sql.106", e)); + } + } else if ((dbName != null) && (dbPasswd != null) && (dsName != null)) { + // If using a data source object in a managed environment + log.logDebug( + "Connection parms: data source name = " + + dsName + + "; user = " + + dbName); + if (cacheConnection && (cachedConnection != null)) { + log.logDebug("Connection cache hit"); + con = cachedConnection; + } else { + try { + Context ctx = new InitialContext(); + DataSource ds = (DataSource) ctx.lookup(dsName); + con = ds.getConnection(dbName, dbPasswd); + if (cacheConnection) { + cachedConnection = con; + } + } catch (NamingException e) { + throw new ConfigException(I18n.get("sql.107"), e); + } catch (SQLException e) { + throw new ConfigException(I18n.get("sql.106"), e); + } + } + } else { + // Couldn't figure out what to use + log.logDebug( + "Connection parms: url = " + + dbUrl + + "; user = " + + dbName + + "; driver = " + + dbDriver + + "; data source name = " + + dsName); + throw new ConfigException(I18n.get("sql.108")); + } + + return con; + } + + /** + * releaseConnection called to release the connection object. Callers of + * getConnection() should use releaseConnection once they are finished with + * the connection, in order to ensure that it's closed properly. This will + * allow for connection caching to be implemented at some point in the + * future. + * + * @param conn + * connection to release + */ + private void releaseConnection(Connection conn) throws ConfigException { + try { + if (!cacheConnection) { + conn.close(); + } + } catch (SQLException e) { + throw new ConfigException(I18n.get("sql.109"), e); + } + } + + /** * getChild a config bundle for the name and given locale. This extracts the * country and language strings from the locale object and calls the *************** *** 176,183 **** Statement stmt = null; ResultSet results = null; ! SqlConfig config = new SqlConfig(name, this); try { ! con = DriverManager.getConnection(dbUrl, dbName, dbPasswd); stmt = con.createStatement(); results = stmt.executeQuery(CONFIG_SELECT + "'" + name + "%'"); --- 313,320 ---- Statement stmt = null; ResultSet results = null; ! DefaultConfig config = new DefaultConfig(name, this); try { ! con = getConnection(); stmt = con.createStatement(); results = stmt.executeQuery(CONFIG_SELECT + "'" + name + "%'"); *************** *** 190,197 **** String ckey = key.substring(nameLen); config.setString(ckey, value); ! System.out.println(name + "+" + ckey + " = " + value); } } catch (Exception e) { ! System.err.println("[getConfig]: Exception" + e); } finally { try { --- 327,335 ---- String ckey = key.substring(nameLen); config.setString(ckey, value); ! log.logDebug(name + "+" + ckey + " = " + value); } } catch (Exception e) { ! log.logWarn(I18n.get("000051", e)); ! log.logDebug(e); } finally { try { *************** *** 210,214 **** try { ! con.close(); } catch (Exception x) { } --- 348,352 ---- try { ! releaseConnection(con); } catch (Exception x) { } *************** *** 216,220 **** ; } ! return config; } --- 354,358 ---- ; } ! log.logDebug("Config requested: " + config); return config; } *************** *** 228,232 **** */ public IConfig createConfig(String name) { ! return new SqlConfig(name, this); } --- 366,370 ---- */ public IConfig createConfig(String name) { ! return new DefaultConfig(name, this); } *************** *** 239,243 **** /** ! * package privacy - set the configuration value * * @param name the key of the option --- 377,381 ---- /** ! * public privacy - set the configuration value * * @param name the key of the option *************** *** 245,272 **** * @param value of the option */ ! void setString(String name, String key, String value) { Connection con = null; PreparedStatement pstmt1 = null; PreparedStatement pstmt2 = null; ResultSet results = null; ! // Build the string name/key - remember names + getChildrenNameSet getChild // stored in the same table. ! name += ("." + key); try { ! con = DriverManager.getConnection(dbUrl, dbName, dbPasswd); pstmt1 = con.prepareStatement(CONFIG_DELETE); ! pstmt1.setString(1, name); pstmt1.executeUpdate(); if (value != null) { pstmt2 = con.prepareStatement(CONFIG_INSERT); ! pstmt2.setString(1, name); pstmt2.setString(2, value); pstmt2.executeUpdate(); } } catch (Exception e) { ! System.err.println("[getConfig]: Exception" + e); } finally { try { --- 383,411 ---- * @param value of the option */ ! public void setString(String name, String key, String value) throws ConfigException { Connection con = null; PreparedStatement pstmt1 = null; PreparedStatement pstmt2 = null; ResultSet results = null; ! // Build the string name/key - remember names + getChildrenNameSet getChild // stored in the same table. ! String fqKey = name + "." + key; try { ! con = getConnection(); pstmt1 = con.prepareStatement(CONFIG_DELETE); ! pstmt1.setString(1, fqKey); pstmt1.executeUpdate(); if (value != null) { pstmt2 = con.prepareStatement(CONFIG_INSERT); ! pstmt2.setString(1, fqKey); pstmt2.setString(2, value); pstmt2.executeUpdate(); } } catch (Exception e) { ! log.logWarn(I18n.get("000051", e)); ! log.logDebug(e); } finally { try { *************** *** 294,298 **** try { ! con.close(); } catch (Exception x) { } --- 433,437 ---- try { ! releaseConnection(con); } catch (Exception x) { } *************** *** 300,303 **** --- 439,537 ---- ; } + configChanged(name); } + + /** + * Add a listener for a list of configurations + * + * @param listener + * the listener to add + * @param configs + * configuration names to listen for changes on + */ + public void addConfigChangeListener( + IConfigChangeListener listener, + String[] configs) + throws ConfigException { + for (int i = 0; i < configs.length; i++) { + List configList = (List) changeListenerConfigs.get(configs[i]); + if (configList == null) { + configList = new ArrayList(allListeners); + changeListenerConfigs.put(configs[i], configList); + } + configList.add(listener); + } + } + + /** + * Add a listener for a configuration + * + * @param listener + * the listener to add + * @param config + * configuration name to listen for changes on + */ + public void addConfigChangeListener( + IConfigChangeListener listener, + String config) + throws ConfigException { + List configList = (List) changeListenerConfigs.get(config); + if (configList == null) { + configList = new ArrayList(allListeners); + changeListenerConfigs.put(config, configList); + } + configList.add(listener); + } + + /** + * Add a listener for all configuration + * + * @param listener + * the listener to add + */ + public void addConfigChangeListener(IConfigChangeListener listener) + throws ConfigException { + allListeners.add(listener); + Iterator i = changeListenerConfigs.keySet().iterator(); + while (i.hasNext()) { + String config = (String) i.next(); + List configList = (List) changeListenerConfigs.get(config); + changeListenerConfigs.put(config, configList); + } + } + + /** + * Remove an existing listener + * + * @param listener + * the listener to remove + * @param config + * configuration name to listen for changes on + */ + public void removeConfigChangeListener(IConfigChangeListener listener) { + allListeners.remove(listener); + Iterator i = changeListenerConfigs.keySet().iterator(); + while (i.hasNext()) { + String config = (String) i.next(); + List configList = (List) changeListenerConfigs.get(config); + configList.remove(listener); + } + } + + /** + * Fire a configChanged event + * + * @param config + * name of the changed configuration + */ + public void configChanged(String config) { + List configList = (List) changeListenerConfigs.get(config); + if (configList != null) { + for (int i = 0; i < configList.size(); i++) { + IConfigChangeListener l = + (IConfigChangeListener) configList.get(i); + l.configChanged(new ConfigChangeEvent(config)); + } + } + } } Index: SqlConfigurationLoader.java =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/modules/sql/src/com/babeldoc/sql/config/SqlConfigurationLoader.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** SqlConfigurationLoader.java 27 Jun 2003 02:05:58 -0000 1.7 --- SqlConfigurationLoader.java 3 Apr 2004 15:23:35 -0000 1.8 *************** *** 66,83 **** package com.babeldoc.sql.config; - import com.babeldoc.core.I18n; - import com.babeldoc.core.BabeldocCommand; - - import org.apache.commons.cli.CommandLine; - import org.apache.commons.cli.OptionBuilder; - import org.apache.commons.cli.Options; - import java.io.File; import java.io.FileInputStream; import java.io.IOException; - import java.util.Enumeration; import java.util.Properties; /** --- 66,84 ---- package com.babeldoc.sql.config; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.util.Enumeration; import java.util.Properties; + import org.apache.commons.cli.CommandLine; + import org.apache.commons.cli.OptionBuilder; + import org.apache.commons.cli.Options; + + import com.babeldoc.core.BabeldocCommand; + import com.babeldoc.core.I18n; + import com.babeldoc.core.LogService; + import com.babeldoc.core.config.ConfigException; + /** *************** *** 185,190 **** } } catch (IOException e) { ! com.babeldoc.core.LogService.getInstance().logError(com.babeldoc.core.I18n.get( ! "002001") + file.toString(), e); } } --- 186,192 ---- } } catch (IOException e) { ! LogService.getInstance().logError(I18n.get("002001") + file.toString(), e); ! } catch (ConfigException e) { ! LogService.getInstance().logError(I18n.get("005201") + file.toString(), e); } } --- SqlConfig.java DELETED --- |
|
From: Michael A. <mic...@us...> - 2004-04-03 15:23:54
|
Update of /cvsroot/babeldoc/babeldoc/modules/core/src/com/babeldoc/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17518/modules/core/src/com/babeldoc/core Modified Files: Type.java Log Message: Added the change notification functionality, refactored the IConfig implementations into a single DefaultConfig class and added update methods to the configuration interfaces. Index: Type.java =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/modules/core/src/com/babeldoc/core/Type.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Type.java 27 Jun 2003 02:19:57 -0000 1.7 --- Type.java 3 Apr 2004 15:11:33 -0000 1.8 *************** *** 85,88 **** --- 85,92 ---- */ public abstract class Type implements Serializable { + + /** Log service to use */ + private LogService log = LogService.getInstance(Type.class.getName()); + private String typeName; *************** *** 111,115 **** */ public String getServiceName() { ! // System.out.println("Service: "+getServicePrefix()+"."+getTypeName()); return getServicePrefix() + "." + getTypeName(); } --- 115,119 ---- */ public String getServiceName() { ! log.logDebug("Service: " + getServicePrefix() + "." + getTypeName()); return getServicePrefix() + "." + getTypeName(); } |
|
From: Michael A. <mic...@us...> - 2004-04-03 15:23:54
|
Update of /cvsroot/babeldoc/babeldoc/modules/core/src/com/babeldoc/core/user In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17518/modules/core/src/com/babeldoc/core/user Modified Files: UserFactoryType.java Log Message: Added the change notification functionality, refactored the IConfig implementations into a single DefaultConfig class and added update methods to the configuration interfaces. Index: UserFactoryType.java =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/modules/core/src/com/babeldoc/core/user/UserFactoryType.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** UserFactoryType.java 27 Jun 2003 02:20:00 -0000 1.4 --- UserFactoryType.java 3 Apr 2004 15:11:33 -0000 1.5 *************** *** 78,82 **** public class UserFactoryType extends Type { /** store the type for this instance */ ! public static final String SERVICE_PREFIX = "Userfactory"; /** --- 78,82 ---- public class UserFactoryType extends Type { /** store the type for this instance */ ! public static final String SERVICE_PREFIX = "UserFactory"; /** |
|
From: Michael A. <mic...@us...> - 2004-04-03 15:23:54
|
Update of /cvsroot/babeldoc/babeldoc/modules/core/src/com/babeldoc/core/option In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17518/modules/core/src/com/babeldoc/core/option Modified Files: ConfigData.java Log Message: Added the change notification functionality, refactored the IConfig implementations into a single DefaultConfig class and added update methods to the configuration interfaces. Index: ConfigData.java =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/modules/core/src/com/babeldoc/core/option/ConfigData.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** ConfigData.java 13 Sep 2003 03:33:42 -0000 1.4 --- ConfigData.java 3 Apr 2004 15:11:32 -0000 1.5 *************** *** 69,72 **** --- 69,73 ---- import com.babeldoc.core.config.ConfigService; import com.babeldoc.core.config.IConfig; + import com.babeldoc.core.config.ConfigException; import com.mindprod.csv.CSVReader; *************** *** 370,374 **** * @return filled config object */ ! public static IConfig getConfigFromData(IConfig config, IConfigData data) { Stack names = new Stack(); getConfigFromData(data.getName(), config, data, names); --- 371,375 ---- * @return filled config object */ ! public static IConfig getConfigFromData(IConfig config, IConfigData data) throws ConfigException { Stack names = new Stack(); getConfigFromData(data.getName(), config, data, names); *************** *** 385,389 **** * @param data the configuration data object */ ! protected static void getConfigFromData(String stageName, IConfig config, IConfigData data, Stack names) { if(data.getNumberChildren()>0) { Set children = data.getChildrenNameSet(); --- 386,390 ---- * @param data the configuration data object */ ! protected static void getConfigFromData(String stageName, IConfig config, IConfigData data, Stack names) throws ConfigException { if(data.getNumberChildren()>0) { Set children = data.getChildrenNameSet(); *************** *** 424,427 **** --- 425,431 ---- return false; } + public void setDirty(boolean dirty) { + + } public void setString(String key, String value) { props.setProperty(key, value); *************** *** 436,439 **** --- 440,446 ---- return props.keySet(); } + public Map getProperties() { + return props; + } } |
|
From: Michael A. <mic...@us...> - 2004-04-03 15:23:54
|
Update of /cvsroot/babeldoc/babeldoc/modules/core/src/com/babeldoc/core/config/light In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17518/modules/core/src/com/babeldoc/core/config/light Modified Files: LightConfigService.java Removed Files: LightConfig.java Log Message: Added the change notification functionality, refactored the IConfig implementations into a single DefaultConfig class and added update methods to the configuration interfaces. Index: LightConfigService.java =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/modules/core/src/com/babeldoc/core/config/light/LightConfigService.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** LightConfigService.java 5 Aug 2003 23:13:44 -0000 1.12 --- LightConfigService.java 3 Apr 2004 15:11:32 -0000 1.13 *************** *** 70,73 **** --- 70,75 ---- import com.babeldoc.core.Named; import com.babeldoc.core.ResourceLoader; + import com.babeldoc.core.config.ConfigException; + import com.babeldoc.core.config.DefaultConfig; import com.babeldoc.core.config.IConfig; import com.babeldoc.core.config.IConfigService; *************** *** 100,104 **** public static final String DOT_PROPERTIES = ".properties"; ! /** * Default constructor */ --- 102,109 ---- public static final String DOT_PROPERTIES = ".properties"; ! /** Log service to use */ ! private LogService log = LogService.getInstance(LightConfigService.class.getName()); ! ! /** * Default constructor */ *************** *** 128,136 **** String newname = getPropertyFileName(name); ! // System.out.println("Loading: "+ name); Properties properties = mergePropertiesFileFromUserSearchPath(newname, new Properties()); ! return new LightConfig(name, properties); } --- 133,141 ---- String newname = getPropertyFileName(name); ! log.logDebug("Loading: " + name); Properties properties = mergePropertiesFileFromUserSearchPath(newname, new Properties()); ! return (IConfig) new DefaultConfig(name, properties, this); } *************** *** 172,176 **** */ public IConfig createConfig(String name) { ! return new LightConfig(name, new Properties()); } --- 177,181 ---- */ public IConfig createConfig(String name) { ! return new DefaultConfig(name, new Properties(), this); } *************** *** 228,233 **** output = new FileOutputStream(file); file.createNewFile(); ! ((LightConfig) config).saveMe(output); ! ((LightConfig) config).setDirty(false); return true; --- 233,240 ---- output = new FileOutputStream(file); file.createNewFile(); ! Properties p = new Properties(); ! p.putAll(config.getProperties()); ! p.store(output, name + " configuration"); ! config.setDirty(false); return true; *************** *** 268,270 **** --- 275,288 ---- return properties; } + + /** + * Set the value for the named property for the named configuration + * + * @param configName name of the configuration to update + * @param propertyName name of the property value to set + * @param value value to set + */ + public void setString(String configName, String propertyName, String value) throws ConfigException { + throw new ConfigException("Method not implemented"); + } } --- LightConfig.java DELETED --- |
|
From: Michael A. <mic...@us...> - 2004-04-03 15:23:54
|
Update of /cvsroot/babeldoc/babeldoc/modules/core/src/com/babeldoc/core/config In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17518/modules/core/src/com/babeldoc/core/config Modified Files: IConfigService.java IConfig.java ConfigService.java Added Files: ConfigChangeEvent.java IConfigChangeNotifier.java ConfigException.java ConfigChangeNotifier.java DefaultConfig.java IConfigChangeListener.java Log Message: Added the change notification functionality, refactored the IConfig implementations into a single DefaultConfig class and added update methods to the configuration interfaces. --- NEW FILE: IConfigChangeListener.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/config/IConfigChangeListener.java,v 1.1 2004/04/03 15:11:33 michaelansley Exp $ * $DateTime$ * $Author: michaelansley $ * */ package com.babeldoc.core.config; /** * <p>An interface for classes that wish to recieve events when a configuration * object changes</p> * * @author Bmcdonald * @version 1.3 */ public interface IConfigChangeListener { /** * Method called when the configuration data changes for a configuration * object. * * @param event the configuration change event */ public void configChanged(ConfigChangeEvent event); } --- NEW FILE: IConfigChangeNotifier.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/config/IConfigChangeNotifier.java,v 1.1 2004/04/03 15:11:32 michaelansley Exp $ * $DateTime$ * $Author: michaelansley $ * */ package com.babeldoc.core.config; /** * <p>An interface for classes that wish to recieve events when a configuration * object changes</p> * * @author Bmcdonald * @version 1.3 */ public interface IConfigChangeNotifier { /** * Add a configuration change listener to this * * @param listener */ public void addConfigChangeListener(IConfigChangeListener listener) throws ConfigException; /** * Add a configuration change listener to this object and a configuration * that this listener is interested in. * * @param listener the listener to recieve notifications * @param config the configuration of interest */ public void addConfigChangeListener(IConfigChangeListener listener, String config) throws ConfigException; /** * Add a configuration change listener to this object and a configuration * that this listener is interested in. * * @param listener the listener to recieve notifications * @param configs the configurations of interest */ public void addConfigChangeListener(IConfigChangeListener listener, String [] configs) throws ConfigException; /** * remove the listener from the list of configuration change listeners. * * @param listener the listener to remove */ public void removeConfigChangeListener(IConfigChangeListener listener); /** * Fire event to all the configurations that are interested in this event. * * @param config */ public void configChanged(String config); } Index: IConfigService.java =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/modules/core/src/com/babeldoc/core/config/IConfigService.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** IConfigService.java 27 Jun 2003 02:19:57 -0000 1.4 --- IConfigService.java 3 Apr 2004 15:11:32 -0000 1.5 *************** *** 118,120 **** --- 118,132 ---- */ public boolean saveConfig(String name, IConfig config); + + /** + * Set a given configuration variable for a given configuration + * + * @param configName configuration name + * @param propertyName configuration property name + * @param value value to set + * + * @return + */ + public void setString(String configName, String propertyName, String value) throws ConfigException; + } Index: ConfigService.java =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/modules/core/src/com/babeldoc/core/config/ConfigService.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** ConfigService.java 27 Jun 2003 02:19:57 -0000 1.12 --- ConfigService.java 3 Apr 2004 15:11:33 -0000 1.13 *************** *** 68,71 **** --- 68,72 ---- import com.babeldoc.core.LogService; import com.babeldoc.core.config.light.LightConfigService; + import com.babeldoc.core.I18n; import org.apache.commons.collections.LRUMap; *************** *** 90,94 **** * @version 1.0 */ ! public class ConfigService implements IConfigService { /** constant: configuration file */ public static final String CONFIG = "babel.config"; --- 91,96 ---- * @version 1.0 */ ! public class ConfigService ! implements IConfigService, IConfigChangeNotifier { /** constant: configuration file */ public static final String CONFIG = "babel.config"; *************** *** 271,273 **** --- 273,350 ---- } } + + /** + * Add a configuration change listener to this + * + * @param listener + */ + public void addConfigChangeListener(IConfigChangeListener listener) throws com.babeldoc.core.config.ConfigException { + if(configService instanceof IConfigChangeNotifier) { + ((IConfigChangeNotifier)configService).addConfigChangeListener(listener); + } else { + throw new com.babeldoc.core.config.ConfigException(I18n.get("005200")); + } + } + + /** + * Add a configuration change listener to this object and a configuration + * that this listener is interested in. + * + * @param listener the listener to recieve notifications + * @param config the configuration of interest + */ + public void addConfigChangeListener(IConfigChangeListener listener, String config) throws com.babeldoc.core.config.ConfigException { + if(configService instanceof IConfigChangeNotifier) { + ((IConfigChangeNotifier)configService).addConfigChangeListener(listener, config); + } else { + throw new com.babeldoc.core.config.ConfigException(I18n.get("005200")); + } + } + + /** + * Add a configuration change listener to this object and a configuration + * that this listener is interested in. + * + * @param listener the listener to recieve notifications + * @param configs the configurations of interest + */ + public void addConfigChangeListener(IConfigChangeListener listener, String[] configs) throws com.babeldoc.core.config.ConfigException { + if(configService instanceof IConfigChangeNotifier) { + ((IConfigChangeNotifier)configService).addConfigChangeListener(listener, configs); + } else { + throw new com.babeldoc.core.config.ConfigException(I18n.get("005200")); + } + } + + /** + * remove the listener from the list of configuration change listeners. + * + * @param listener the listener to remove + */ + public void removeConfigChangeListener(IConfigChangeListener listener) { + if(configService instanceof IConfigChangeNotifier) { + ((IConfigChangeNotifier)configService).removeConfigChangeListener(listener); + } else { + // Do what? + } + } + + /** + * Fire event to all the configurations that are interested in this event. + * + * @param config + */ + public void configChanged(String config) { + if(configService instanceof IConfigChangeNotifier) { + ((IConfigChangeNotifier)configService).configChanged(config); + } + } + + public boolean isConfigChangeNotifier() { + return configService instanceof IConfigChangeNotifier; + } + + public void setString(String configName, String propertyName, String value) throws ConfigException { + configService.setString(configName, propertyName, value); + } } --- NEW FILE: ConfigException.java --- /* * Created on 14-Mar-2004 * * To change the template for this generated file go to * Window - Preferences - Java - Code Generation - Code and Comments */ package com.babeldoc.core.config; import com.babeldoc.core.GeneralException; /** * @author mikea * * To change the template for this generated type comment go to * Window - Preferences - Java - Code Generation - Code and Comments */ public class ConfigException extends GeneralException { /** * @param message * @param exception */ public ConfigException(String message, Throwable exception) { super(message, exception); // TODO Auto-generated constructor stub } /** * @param message */ public ConfigException(String message) { super(message); // TODO Auto-generated constructor stub } /** * */ public ConfigException() { super(); // TODO Auto-generated constructor stub } } --- NEW FILE: DefaultConfig.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/config/DefaultConfig.java,v 1.1 2004/04/03 15:11:32 michaelansley Exp $ * $DateTime$ * $Author: michaelansley $ * */ package com.babeldoc.core.config; import java.util.HashMap; import java.util.Map; import java.util.Properties; import java.util.Set; /** * <strong>SqlConfig</strong> * * <p> * a simple implementation of a IConfig interface. This class should * be used in almost all required cases, with sub-classing only required * in extraordinary circumstances. * </p> * * @author michaelansley * @version 1.0 */ public class DefaultConfig extends com.babeldoc.core.Named implements IConfig { /** instance: the parent service */ IConfigService service; /** instance: the config data (name/value pairs) */ private Map data; /** The dirty flag - how tell if this data has changed since load */ private boolean dirty = false; /** * The constructor * * @param name configuration object name * @param service DOCUMENT ME! */ public DefaultConfig(String name, IConfigService service) { super(name); this.service = service; data = new HashMap(); } /** * Construct a config object using a name and a resource bundle * * @param name name of the configuration object * @param properties the properties to store. */ public DefaultConfig(String name, Map properties, IConfigService service) { super(name); this.service = service; this.data = new HashMap(properties); } /** * Get the state of the dirty flag. * * @return dirty flag */ public boolean isDirty() { return dirty; } /** * Set a configuration option value. * * @param name the key of the option * @param value value of the option */ public void setString(String name, String value) throws ConfigException { service.setString(this.getName(), name, value); data.put(name, value); setDirty(true); } /** * Get the string configuration setting for the name * * @param name the configuration option key * * @return the value of the configuration option */ public String getString(String name) { return (String) data.get(name); } /** * does this configuration object have this key? * * @param name * * @return true if key found, else false. */ public boolean hasKey(String name) { return data.containsKey(name); } /** * Get an enumeration of all the configurations. * * @return */ public Set keys() { return data.keySet(); } /** * Set the state of the dirty flag. * * @param dirty */ public void setDirty(boolean dirty) { this.dirty = dirty; } /** * Set the state of the dirty flag. * * @param dirty */ public Map getProperties() { return data; } } --- NEW FILE: ConfigChangeNotifier.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/config/ConfigChangeNotifier.java,v 1.1 2004/04/03 15:11:32 michaelansley Exp $ * $DateTime$ * $Author: michaelansley $ * */ package com.babeldoc.core.config; import java.util.Map; import java.util.HashMap; import java.util.Iterator; /** * <p>An implementation for the IConfigChangeNotifier</p> * * @author Bmcdonald * @version 1.3 */ public class ConfigChangeNotifier { Map listeners = new HashMap(); /** * Add a configuration change listener. This configuration change listener is * always fired when a configuration changes - it responds to changes in any * configuration. * * @param listener */ public void addConfigChangeListener(IConfigChangeListener listener) { listeners.put(listener, new String[] {}); } /** * Add a configuration change listener to this object and a configuration * that this listener is interested in. * * @param listener the listener to recieve notifications * @param config the configuration of interest */ public void addConfigChangeListener(IConfigChangeListener listener, String config) { listeners.put(listener, new String[] {config}); } /** * Add a configuration change listener to this object and a configuration * that this listener is interested in. * * @param listener the listener to recieve notifications * @param configs the configurations of interest */ public void addConfigChangeListener(IConfigChangeListener listener, String [] configs) { listeners.put(listener, configs); } /** * remove the listener from the list of configuration change listeners. * * @param listener the listener to remove */ public void removeConfigChangeListener(IConfigChangeListener listener) { listeners.remove(listener); } /** * Fire event to all the configurations that are interested in this event. * * @param config */ public void configChanged(String config) { for(Iterator keys = listeners.keySet().iterator(); keys.hasNext();) { IConfigChangeListener listener = (IConfigChangeListener)keys.next(); String [] configs = (String[])listeners.get(listener); // If the config is null or the list of interested configs for this // listener is null, then fire the change if(config==null||configs==null||configs.length == 0) { listener.configChanged(new ConfigChangeEvent(config)); } else { // Otherwise try and find the changed configuration in the // list of configs that this listener is interested in. for(int i = 0; i < configs.length; ++i) { if(config.equals(configs[i])) { listener.configChanged(new ConfigChangeEvent(config)); } } } } } } --- NEW FILE: ConfigChangeEvent.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/config/ConfigChangeEvent.java,v 1.1 2004/04/03 15:11:32 michaelansley Exp $ * $DateTime$ * $Author: michaelansley $ * */ package com.babeldoc.core.config; /** * Change event that is sent when a configuration change is detected by the * configuration server * * @author bmcdonald * @version 1.3 */ public class ConfigChangeEvent { public String config; /** * Construct this configuration. * * @param config */ public ConfigChangeEvent(String config) { this.config = config; } } Index: IConfig.java =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/modules/core/src/com/babeldoc/core/config/IConfig.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** IConfig.java 27 Jun 2003 02:19:57 -0000 1.5 --- IConfig.java 3 Apr 2004 15:11:32 -0000 1.6 *************** *** 68,71 **** --- 68,72 ---- import java.io.Serializable; + import java.util.Map; import java.util.Set; *************** *** 73,78 **** /** * <p> ! * Interface for all configuration objects. A configuration object is a ! * simplified hashmap wherein string data is stored indexed by string name. * </p> * --- 74,79 ---- /** * <p> ! * Interface for all configuration objects. A configuration object is an ! * extended map wherein string data is stored indexed by string name. * </p> * *************** *** 81,84 **** --- 82,86 ---- */ public interface IConfig extends com.babeldoc.core.INamed, Serializable { + /** * Get the state of the dirty flag *************** *** 89,92 **** --- 91,101 ---- /** + * Set the state of the dirty flag to true + * + * @return + */ + public void setDirty(boolean dirty); + + /** * Set the configuration option. This may not be implemented in all * interfaces. It is intended for more sophistacated implementations. *************** *** 95,99 **** * @param value of the option */ ! public void setString(String key, String value); /** --- 104,108 ---- * @param value of the option */ ! public void setString(String key, String value) throws ConfigException; /** *************** *** 121,123 **** --- 130,139 ---- */ public Set keys(); + + /** + * Get all the name/value pairs as a Properties object. + * + * @return properties + */ + public Map getProperties(); } |
|
From: Michael A. <mic...@ze...> - 2004-04-03 10:59:05
|
Gents, In the file com.babeldoc.core.user.UserFactoryType, there is a constant SERVICE_PREFIX with the value "Userfactory". The corresponding configuration file uses "UserFactory". I'm inclined to change the code rather than the config file, but I'm wary of the impact this may have on production systems. Would those who have production systems please advise whether changing this would be a minor annoyance or a rather larger problem so that we can assess which way to make the change? Thanks... Mike |
|
From: Michael A. <mic...@us...> - 2004-03-31 17:07:00
|
Update of /cvsroot/babeldoc/babeldoc/modules/core/src/com/babeldoc/core/pipeline In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17155/modules/core/src/com/babeldoc/core/pipeline Modified Files: IPipelineFactory.java Log Message: Added an interface method for clearing cached configuration. Index: IPipelineFactory.java =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/modules/core/src/com/babeldoc/core/pipeline/IPipelineFactory.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** IPipelineFactory.java 12 Aug 2003 23:44:44 -0000 1.6 --- IPipelineFactory.java 31 Mar 2004 16:55:10 -0000 1.7 *************** *** 115,117 **** --- 115,133 ---- public void process(String name, PipelineDocument document, IJournalTicket ticket, Collection results) throws PipelineException; + + /** + * + * Method to clear all the pipeline configuration caches + * + */ + public void clearCache(); + + /** + * + * Method to clear a specific pipeline configuration cache + * + * @param name the name of the pipeline stage to clear from the cache + */ + public void clearCache(String name); + } |
|
From: Dejan K. <dej...@ya...> - 2004-03-31 07:21:46
|
Thanks Martin, We really need this kind of help! I am not sure where is 'To' attribute commented? In code, docs...? Note that SMTPscanner does not exist anymore - it is called MailboxScanner now, since it does not use SMTP at all! Maybe there are references to this scanner in documentation but it should be changed to Mailbox. And as I could see it does support filtering based on 'To' attribute. Bruce, we should put new documentation on site. Is this process automated (I know you wrote some scripts for this last year)? Dejan P.S. Martin, please subscribe to babeldoc developer list if you are not already! Our conversation should go through list. --- Martin Logan <Mar...@ho...> wrote: > Hi Dejan, > > Finally finished first rev. This is mainly minor > adjustments to the > chapter XML, message files and some java source. I > adjusted one of the > XSL files to sort the stages alphabetically. > > There's a lot more work that could be done > - some of the java files do not use the message > files. > - The defaults are being put in the options but > toXML is not exposing > them. (I added as many defaults to the messages as I > could see) > - Some pieces are not getting listed (I'm not a java > programmer, but > could probably track this down eventually.) > > I can look at the PDF piece, but I have to get back > to the day job. > > Finally, do you know why the "To" attribute is > commented out in the SMTP > scanner. I was going to use some aliases for some > customers. > > Anyway, I hope this helps a little. > > Martin > __________________________________ Do you Yahoo!? Yahoo! Finance Tax Center - File online. File on time. http://taxes.yahoo.com/filing.html |
|
From: David K. <dav...@al...> - 2004-03-31 06:11:48
|
Dejan Krsmanovic wrote: > Hi all, Hi Dejan! > I just wanted to let you know that I have granted > commit rights to Martin Logan (I guess you 've noticed > that). Martin wanted to help us to make documentation > stuff better and clearer - at least those stuff he > needs for a project. Excellent! I have been quiet on the list for quite some time now, but it's nice to see various changes trickle in here and there, now and then. Hopefully I will get to contribute some more in the future, as well. We'll see. (For the interested: I use Babeldoc to receive two feeds of "realtime" news from separate distributors, process the news items via various transforms/contortions, and then feed our backend databases with the results. Works very well indeed, in full production. Thanks Babeldoc!) > So, welcome Martin! Indeed! Very welcome! > Dejan /David |
|
From: Dejan K. <dej...@ya...> - 2004-03-30 22:09:42
|
Hi all, I just wanted to let you know that I have granted commit rights to Martin Logan (I guess you 've noticed that). Martin wanted to help us to make documentation stuff better and clearer - at least those stuff he needs for a project. So, welcome Martin! Dejan __________________________________ Do you Yahoo!? Yahoo! Finance Tax Center - File online. File on time. http://taxes.yahoo.com/filing.html |