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

com.sas.services.publish.alerts
Interface TemplateInterface


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 SimpleTemplatefor more details on the substitution rules.

See Also:
TemplateFactory

Method Summary
 java.util.Map getMergeVariables()
          The merge variables to use during template substitutions.
 java.lang.String getPath()
          Return the path to the template as a String.
 java.lang.String getResult()
          Returns the template with merge variable substitutions applied.
 

Method Detail

getMergeVariables

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

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

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

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




Copyright © 2009 SAS Institute Inc. All Rights Reserved.