DSTemplateDelegate

class DSTemplateDelegate : DSBaseDelegate, IDisposableHandler

This class handles template tasks

Constructors

Link copied to clipboard
fun DSTemplateDelegate()

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
open override fun addDisposableToCompositeDisposable(disposable: Disposable)
Link copied to clipboard
fun cacheTemplate(templateId: String, cacheTemplateListener: DSCacheTemplateListener)

Caches the template which includes downloading the template and documents which will then be available for offline signing.

Link copied to clipboard
open override fun clearAllDisposables()
Link copied to clipboard
fun getDownloadedTemplatesFullDefinition(listFilter: DSListFilter, templateListListener: DSTemplateDefinitionListListener)

Fetches the downloaded templates from the Database

Link copied to clipboard

This method returns an instance of the DSOfflineUseTemplateListener

Link copied to clipboard

This method returns an instance of the DSOfflineUseTemplateWithPhotoListener

Link copied to clipboard

This method returns an instance of the DSOnlineUseTemplateListener

Link copied to clipboard
fun getTemplate(templateId: String, filter: DSTemplateFilter?, templateListener: DSTemplateListener)

Fetches the template

Link copied to clipboard
fun getTemplates(filter: DSTemplatesFilter, templateListListener: DSTemplateListListener)

Fetches templates of the logged in user

Link copied to clipboard
fun removeCachedTemplate(template: DSTemplateDefinition, removeListener: DSRemoveTemplateListener)

Deletes the cached template from the local database. Since the operation needs to happen asynchronously the success/failure is returned in the DSRemoveTemplateListener callback

Link copied to clipboard
open override fun removeDisposableFromCompositeDisposable(disposable: Disposable): Boolean
Link copied to clipboard
fun retrieveCachedTemplate(templateId: String, cachedTemplateListener: DSGetCachedTemplateListener)

Retrieves the cached template given the template id. Since the operation needs to happen asynchronously the success/failure is returned in the DSGetCachedTemplateListener callback

Link copied to clipboard
fun retrieveDownloadedTemplates(templateListListener: DSTemplateListListener)

Fetches the downloaded templates from the Database

Link copied to clipboard
fun setOfflineUseTemplateListener(listener: DSOfflineUseTemplateListener?)
Link copied to clipboard
fun setOnlineUseTemplateListener(listener: DSOnlineUseTemplateListener?)
Link copied to clipboard
fun updateCachedTemplate(templateId: String, updateCachedTemplateListener: DSUpdateCachedTemplateListener)

Fetches the template from API and compares the lastModified Date with that of the cached Template. If it's not the same, remove the cached template and get the latest one from server

Link copied to clipboard
fun useTemplateOffline(context: Context, templateId: String, envelopeDefaults: DSEnvelopeDefaults?, offlineUseTemplateListener: DSOfflineUseTemplateListener)

Send an Envelope derived from a Template in Offline mode

fun useTemplateOffline(context: Context, templateId: String, envelopeDefaults: DSEnvelopeDefaults?, pdfToAddUri: URI?, insertPdfAtPosition: DSDocumentInsertAtPosition?, offlineUseTemplateListener: DSOfflineUseTemplateListener)

Creates an Envelope derived from a Template in Offline mode. Use this API when the SignWithPhoto Capture implementation is NOT handled by the client.

Link copied to clipboard
fun useTemplateOfflineWithPhoto(context: Context, templateId: String, envelopeDefaults: DSEnvelopeDefaults?, offlineUseTemplateWithPhotoListener: DSOfflineUseTemplateWithPhotoListener)

Send an Envelope derived from a Template in Offline mode

fun useTemplateOfflineWithPhoto(context: Context, templateId: String, envelopeDefaults: DSEnvelopeDefaults?, pdfToAddUri: URI?, insertPdfAtPosition: DSDocumentInsertAtPosition?, offlineUseTemplateWithPhotoListener: DSOfflineUseTemplateWithPhotoListener)

Creates an Envelope derived from a Template in Offline mode. Use this API when the SignWithPhoto Capture implementation is handled by the client

Link copied to clipboard
fun useTemplateOnline(context: Context, templateId: String, envelopeDefaults: DSEnvelopeDefaults?, onlineUseTemplateListener: DSOnlineUseTemplateListener)

Send an Envelope derived from a Template in Online mode