add GenericMailet.getInitParameter(name,default)
------------------------------------------------

         Key: JAMES-438
         URL: http://issues.apache.org/jira/browse/JAMES-438
     Project: James
        Type: Improvement
  Components: Mailet API  
    Reporter: Amichai Rothman
    Priority: Trivial


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