Uploaded image for project: 'DSpace'
  1. DSpace
  2. DS-3872

More powerful email template language, and a richer set of substituents

    XMLWordPrintable

    Details

    • Attachments:
      0
    • Comments:
      7
    • Documentation Status:
      Complete or Committed

      Description

      Email templates are limited to substituting parameters provided by the caller.  It would be convenient, for example, to be able to also substitute configuration properties.

      To this end, I propose to replace the simple MessageFormat.format() with a much more powerful templating language:  Apache Velocity.  It is a simple matter to make all DSpace configuration properties available to templates, in addition to the message parameters provided by the caller.

      Further improvements are easily imagined.  For example:  named parameters rather than indexed parameters.  It would be easily done.  Other sources of substituents may come to mind.

      This change will require changes to the templates, making them a little more verbose.  For example, "bla bla {0} bla" becomes 'bla bla ${params[0]} bla'.  But now one can also write 'bla bla ${config.get("dspace.name")} bla'.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              mwood Mark H. Wood
              Reporter:
              mwood Mark H. Wood
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: