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

add GenericMailet.getInitParameter(name,default)

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: 2.2.0, 2.3.0
    • Fix Version/s: 2.3.0
    • Labels:
      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

            People

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

              Dates

              • Created:
                Updated:
                Resolved: