IBarcodeTextAddin

Add-in responsible for generating the string code to be encoded into a Barcode. Uses information from Artifact Context. The only supported code type at the time of writing is QR.

Trigger Event(s): Document creation (upon client request)
Table 1. IBarcodeTextAddin interface methods declaration and description
Method Description

createCode

Uses information to generate the string code to be encoded into a Barcode of a given type

Parameter

Type

Description

codeType

CodeType

Barcode type (supported type is currently QR)

barcodeVariables

ArtifactVariables

Variables of the barcode request

artifactDetails

ArtifactDetails

Context of the artifact (artifact variables and properties) with read-only access

Returns

Type

Description

result

String

The string to be encoded

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

DefaultBarcodeTextAddin

Generates QR code image from given message. If no message is provided, then the artifactId is used

Configuration

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

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

	{
        "name": "artifact-barcode",
        "class": "novabase.connect.paperless.esign.core.extensions.impl.DefaultBarcodeTextAddin"
    },

	...
]

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

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

    {
        "type": "qr_code_text",
        "extension": "artifact-barcode"
    },

    ...
]