### *** This interface provides Binary Compatibility only, not Source Compatibility ***

Package com.sas.services.publish.alerts

# Interface TemplateInterface

@SASScope("ALL") @BinaryCompatibilityOnly public interface TemplateInterface
The TemplateInterface provides common behavior for alert templates. Templates can be defined by a physical file location, a WebDAV URL or generic URL.

The template is a file that enables a site to customize the contents of an alert notification. The templates can contain variables that will be substituted with the corresponding merge variable values. Templates use variables that begin with the percent symbol (%). When the alert notification is processed by the delivery transports, the variables will be substituted with the provided merge variables. For example, the template may contain the following text:

         To: %ADDRESSEE_NAME
         I am sending you this message as a result of recent account activity.

When the alert notification is sent, the delivery transport processes the alert notification by substituting the merge variables into the template. If a merge variable of ADDRESSEE_NAME is provided with a value of "Jane Smith", then the resulting alert notification will look like this:

         To: Jane Smith
         I am sending you this message as a result of recent account activity.

See `SimpleTemplate`for more details on the substitution rules.

See Also:
  - `TemplateFactory`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Map`
  `getMergeVariables()`
  The merge variables to use during template substitutions.
  `String`
  `getPath()`
  Return the path to the template as a String.
  `String`
  `getResult()`
  Returns the template with merge variable substitutions applied.

- ## Method Details

  - ### getMergeVariables

    Map getMergeVariables()
    The merge variables to use during template substitutions. The merge variables are a mapping of variable names and their values. If the template contains variable directives that match any of the merge variables, the merge variable value will be substituted in the resulting template output.
    Returns:
      the merge variables

  - ### getResult

    String getResult() throws ServiceException
    Returns the template with merge variable substitutions applied.
    Returns:
      the resulting template after the merge variable substitions have been applied.
    Throws:
      `ServiceException` - If an error occurs during processing.

  - ### getPath

    String getPath()
    Return the path to the template as a String. A template can be identified by a physical file system path, a WebDAV location or a URL.
    Returns:
      the path