I think that this is more suitable variant:
<match class="MatchFaxRecipient">
<param1><param1>
<mailet class="SendMailAsFax">
<param1><param1>
</mailet>
</match>
Regards,
Miro.
Stefano Bagnara wrote:
Miroslav Nachev (JIRA) wrote:
Ideas for James Config XML changes
----------------------------------
Key: JAMES-685
URL: http://issues.apache.org/jira/browse/JAMES-685
Project: James
Issue Type: Improvement
Components: James Core
Affects Versions: 2.3.1-dev
Environment: James XML configuration file
Reporter: Miroslav Nachev
Are there any plans to change the XML Config file?
I mean that the following:
<mailet class="SendMailAsFax">
<match class="MatchFaxRecipient">
<param1><param1>
</match>
<param1><param1>
</mailet>
Given the workflow:
1) the matcher is executed
2) if the matcher match something the mailet is executed
maybe this alternative is much easier to understand:
<match class="MatchFaxRecipient">
<param1><param1>
<mailet class="SendMailAsFax">
<param1><param1>
</mailet>
</match>
otherwise
<mailet match="MatchFaxRecipient" class="SendMailAsFax">
<matcherparameter name="param1"></matcherparameter>
<param1></param1>
</mailet>
Both solution could be implemented in a backward compatible way. Any
preference? Any alternative solution?
I am asking because it is inconvenient to add parameters to the
matcher without names.
I agree.
Also it is good if is possible both matcher and mailet to have common
parameters with <common> tag for example.
I'm not sure about this: it doesn't happen often to have to use the
same parameters for matcher and mailets and this often means you're
duplicating some stuff in the code. Maybe you should refactor the
matcher/mailet so that they share no configurations.
The other idea is the parameters to be like Java Properties:
<parameters>
<parameter name="param1">value</parameter>
...
<parameter name="param1">value</parameter>
</parameters>
or instead parameter/parameters to use property/properties.
This variant is better for XML Schema definition.
I see that in wiki we have some previously discussed proposals about
this issue:
http://wiki.apache.org/james/JamesV3/MailetConfiguration
I think the proposals described there are too much XML intensive and
they depends on plans about the mailet apis.
I would like to keep this issue as a simple backward compatible change.
WDYT?
Stefano
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]