Andrei,
I presume you're modifying the matcher loader and config classes so that
JamesSpoolManager can pass the Configuration object, and adding
MatcherConfig.getInitParameter().
In MailetConfigImpl.getInitParameter, you might try the following:
configuration.getChildren(getMailetname() + ":" + name)
This supports the:
<mailet matcher="Foo[=cond]" class="Bar">
<Foo:tagname>value</Foo:tagname>
<Bar:tagname>value</Bar:tagname>
</mailet>
qualification I mentioned in an earlier note. if that fails, try:
configuration.getChildren("mailet-config:" + name)
which supports the <mailet-config:tagname>value</mailet-config:tagname>
style tag. Finally, and only for MailetConfigImpl, try:
configuration.getChildren(name);
You'll copy that method to MatcherConfigImpl, change mailet to matcher, and
remove the third case, which is only for mailets (provides compatibility
with existing configuration files).
As I said before, the code changes to the current code are very small. This
presumes that we stick with the basic Config.getInitParameter() scheme. I
imagine that Serge would not have a complaint about doing this, but if he
had wanted to use the full Configuration interface from Avalan, I suspect
he'd have done so by now.
--- Noel
-----Original Message-----
From: Andrei Ivanov [mailto:[EMAIL PROTECTED]]
Sent: Saturday, May 18, 2002 17:00
To: James Developers List
Subject: Re: James -> Phonix 4.0aX (minor changes)
Ok, I'll try to use your approach in my code to see how it works. Actually
you must be right because what I am doing now doesn't use matchers at all,
that logically resulted for me in my proposal (since I've been using that
extensively in my architecture where there are no matchers and therefore
there is no risk to flatten namespaces).
Andrei
----- Original Message -----
From: "Noel J. Bergman" <[EMAIL PROTECTED]>
To: "James Developers List" <[EMAIL PROTECTED]>
Sent: Saturday, May 18, 2002 11:36 PM
Subject: RE: James -> Phonix 4.0aX (minor changes)
> Andrei,
>
> Another alternative to your:
>
> <mailet ...>
> <addSubject enable="true" truncate="10"/>
> </mailet>
>
> could be:
>
> <mailet ...>
> <mailet-config:addSubject enable="true" truncate="10"/>
> </mailet>
>
> Similarly, my:
>
> <mailet matcher="Foo[=cond]" class="Bar">
> <matcher-config>
> <tagname>value</tagname>
> </matcher-config>
> <mailet-config>
> <tagname>value</tagname>
> </mailet-config>
> </mailet>
>
> could be:
>
> <mailet matcher="Foo[=cond]" class="Bar">
> <matcher-config:tagname>value</matcher-config:tagname>
> <mailet-config:tagname>value</mailet-config:tagname>
> </mailet>
>
> Unqualified tags would be assumed, for compatibility with previous
> releases of James, to be part of the mailet configuration.
>
> --- Noel
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>