[ http://issues.apache.org/jira/browse/JAMES-438?page=all ]
     
Stefano Bagnara resolved JAMES-438:
-----------------------------------

    Resolution: Fixed

added the suggested method. There is room for improvements on the whole 
"sharable" code between mailets, but I would like to keep this for another 
issue.

> add GenericMailet.getInitParameter(name,default)
> ------------------------------------------------
>
>          Key: JAMES-438
>          URL: http://issues.apache.org/jira/browse/JAMES-438
>      Project: James
>         Type: Improvement

>   Components: Mailet API
>     Versions: 2.3.0a1, 2.2.0
>     Reporter: Amichai Rothman
>     Assignee: Stefano Bagnara
>     Priority: Trivial
>      Fix For: 2.3.0a2

>
> GenericMailet is made to be a convenient basic Mailet implementation, so it 
> may be useful for it to provide this standard form of convenience method:
> String getInitParameter(String name, String default) {
>   String param = getInitParameter(name);
>   return param != null ? param : default;
> }
> Another similar convenience method might verify that a given parameter exists 
> and throw an appropriate standard exception if it does not.
> Same goes for a parameter accessor that parses and returns integers(or throws 
> standard exception if invalid formatted number).
> Currently, handling init params requires doing these anyway, so it ay as well 
> be in the generic implementation...

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to