Uploaded image for project: 'James Server'
  1. James Server
  2. JAMES-438

add GenericMailet.getInitParameter(name,default)

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • 2.2.0, 2.3.0
    • 2.3.0
    • None

    Description

      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...

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            bago Stefano Bagnara
            amichai Amichai Rothman
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment