ITemplateLoadAddin

Add-in responsible for triggering loading an existing artifact template from a specific location.

Trigger Event(s): Document creation from template; Template reading
Table 1. ITemplateLoadAddin interface methods declaration and description
Method Description

loadTemplate

Loads a template by name. Throws and exception if template not found

Parameter

Type

Description

template

String

Template name

Returns

Type

Description

artifact

byte[]

Artifact in byte array form

eSign brings an out-of-the box implementation for this interface that is described below
Table 2. Available implementations for ITemplateLoadAddin
Implementation Default Description

DefaultTemplateLoadAddin

Fetches the artifact template by name from the following directory [ESIGN-HOME]/resources/templates

Configuration

First the add-in needs to be loaded as an extension,

"_comment" : "List all the extensions to be used",
"extensions" :
[
	...

	{
        "name": "template-loading",
        "class": "novabase.connect.paperless.esign.core.extensions.impl.DefaultTemplateLoadAddin"
    },

	...
]

Optionally, set as the default add-in by establishing the class path for the type "template_load"

"_comment" : "List all the default addins to be used",
"addins" :
[
    ...

    {
        "type": "template_load",
        "extension": "template-loading"
    },

    ...
]