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

Package com.sas.services.publish.alerts

# Class TemplateFactory

java.lang.Object
com.sas.services.publish.alerts.TemplateFactory

@SASScope("ALL") @BinaryCompatibilityOnly public class TemplateFactory extends Object
A factory used to manufacture alert template objects. Templates can be accessed by a file-system path, a WebDAV location or a URL.

The template is a file that enables a site to customize the contents of an alert notification. See `TemplateInterface`for more details.

See Also:
  - `TemplateInterface`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `TemplateFactory()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static TemplateInterface`
  `getDAVTemplate(String path, String user, String password)`
  Creates an instance of a template that can be accessed on a WebDAV server.
  `static TemplateInterface`
  `getDAVTemplate(URL url, String user, String password)`
  Creates an instance of a template that can be accessed on a WebDAV server.
  `static TemplateInterface`
  `getFileTemplate(String path)`
  Create an instance of template that can be accessed by a file-system path.
  `static TemplateInterface`
  `getURLTemplate(String path)`
  Creates an instance of a template that can be accessed by a URL.
  `static TemplateInterface`
  `getURLTemplate(URL url)`
  Creates an instance of a template that can be accessed by a URL.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### TemplateFactory

    public TemplateFactory()

- ## Method Details

  - ### getFileTemplate

    public static TemplateInterface getFileTemplate(String path)
    Create an instance of template that can be accessed by a file-system path.
    Parameters:
      `path` - The path that identifies the template.
    Returns:
      File template

  - ### getDAVTemplate

    public static TemplateInterface getDAVTemplate(String path, String user, String password) throws ServiceException
    Creates an instance of a template that can be accessed on a WebDAV server.
    Parameters:
      `path` - The URL as a String that identifies the template on the WebDAV server.
      `user` - The WebDAV user name.
      `password` - The WebDAV password.
    Returns:
      a template identified by a WebDAV location
    Throws:
      `ServiceException` - If an error occurs initializing the DAV template.

  - ### getDAVTemplate

    public static TemplateInterface getDAVTemplate(URL url, String user, String password)
    Creates an instance of a template that can be accessed on a WebDAV server.
    Parameters:
      `url` - The URL that identifies the template on the WebDAV server.
      `user` - The WebDAV user name.
      `password` - The WebDAV password.
    Returns:
      a template identified by a WebDAV location

  - ### getURLTemplate

    public static TemplateInterface getURLTemplate(String path) throws ServiceException
    Creates an instance of a template that can be accessed by a URL.
    Parameters:
      `path` - The URL as a String that identifies the template on the WebDAV server.
    Returns:
      a template identified by a URL location
    Throws:
      `ServiceException` - If an error occurs initializing the URL template.

  - ### getURLTemplate

    public static TemplateInterface getURLTemplate(URL url)
    Creates an instance of a template that can be accessed by a URL.
    Parameters:
      `url` - The URL that identifies the template on the WebDAV server.
    Returns:
      a template identified by a URL location