DSMTemplatesManager Class Reference

#import <DSMTemplatesManager.h>

Inheritance diagram for DSMTemplatesManager:

Instance Methods

(void) - listTemplatesWithCompletion:
 
(void) - listTemplatesWithSearchPredicate:Completion:
 
(void) - listTemplatesWithFolderId:completion:
 
(void) - listTemplatesWithTemplateName:searchOptions:completion:
 
(void) - listTemplateFoldersWithCompletion:
 
(DSMTemplateCacheState) - cacheStateOfTemplateWithId:
 
(DSMEnvelopeTemplate *) - cachedTemplateWithId:includePdfs:
 
(void) - cacheTemplateWithId:completion:
 
(void) - removeCachedTemplateWithId:
 
(void) - removeCachedTemplates
 
(NSArray *) - cachedTemplates
 
(NSArray *) - cachedTemplateIds
 
(NSUInteger) - cachedTemplateCount
 
(BOOL) - canCacheEnvelopeTemplate:error:
 
(void) - presentSendTemplateControllerWithTemplateWithId:signingMode:presentingController:animated:completion:
 
(void) - presentSendTemplateControllerWithTemplateWithId:envelopeDefaults:pdfToInsert:insertAtPosition:signingMode:presentingController:animated:completion:
 

Properties

id< DSMTemplatesManagerDelegate > delegate
 The DSMTemplatesManagerDelegate class' delegate object. More...
 

Detailed Description

It contains methods provide methods that can be used to list, cache and uncache templates. Also, to initiate the signing ceremony with DocuSignSDK provided UI components for online/offline signing mode.

See also
DSMTemplatesManager.h

Method Documentation

◆ cachedTemplateCount()

- (NSUInteger) cachedTemplateCount

number of templates cached for offline use.

Returns
NSUInteger

◆ cachedTemplateIds()

- (NSArray *) cachedTemplateIds

Retrive all list of cached templateId's.

Returns
NSArray <NSString *>

◆ cachedTemplates()

- (NSArray *) cachedTemplates

Retrive all list of cached templates.

Returns
NSArray <DSMEnvelopeTemplate *>

◆ cachedTemplateWithId:includePdfs:()

- (DSMEnvelopeTemplate *) cachedTemplateWithId: (NSString *)  templateId
includePdfs: (BOOL)  includePdfs 

Gives previously cached template details.

Parameters
templateIdAn ID of the template to be retrived.
includePdfsretrive/include the pdf's or not.
Returns
DSMEnvelopeTemplate

◆ cacheStateOfTemplateWithId:()

- (DSMTemplateCacheState) cacheStateOfTemplateWithId: (NSString *)  templateId

Gives status of a template.

Parameters
templateIdAn ID of the template whose status is enquired.
Returns
DSMTemplateCacheState
See also
DSMTemplateCacheState.h

◆ cacheTemplateWithId:completion:()

- (void) cacheTemplateWithId: (NSString *)  templateId
completion: (void(^)(NSError *))  completionBlock 

Cache a template for offline use.

Parameters
templateIdAn ID of the template to be cached.
completionBlockCan pass in a completion block to be executed on completion of cache.

◆ canCacheEnvelopeTemplate:error:()

- (BOOL) canCacheEnvelopeTemplate: (DSMEnvelopeTemplate *)  envelopeTemplate
error: (NSError *__autoreleasing *)  error 

Can a template be cached and used for offline signing(some of the templates which are not supported in mobile signing can not be cached).

Parameters
envelopeTemplatetemplate to be cached.
errorIf error is passed it will be updated with the reason for unavailability for signing/cache in mobile.
Returns
BOOL
Warning
This will default to NO and unable to cache reason is passed back only when error instence is passed while calling this.

◆ listTemplateFoldersWithCompletion:()

- (void) listTemplateFoldersWithCompletion: (void(^)(NSArray< DSMFolder * > *folders, NSError *error))  completionBlock

Retrieve the list of template folders for the currently logged in user.

Parameters
completionBlockThe completion block to be execute once the list of template folders is retrieved.

◆ listTemplatesWithCompletion:()

- (void) listTemplatesWithCompletion: (void(^)(NSArray< DSMEnvelopeTemplateDefinition * > *envelopeTemplateDefinitions, NSError *error))  completionBlock

Retrieves the list of templates available to the currently logged in user.

Parameters
completionBlockThe completion block to be execute once the list of templates is retrieved.

◆ listTemplatesWithFolderId:completion:()

- (void) listTemplatesWithFolderId: (NSString *)  folderId
completion: (void(^)(NSArray< DSMEnvelopeTemplateDefinition * > *envelopeTemplateDefinitions, NSError *error))  completionBlock 

Retrieves the list of templates available to the currently logged in user within a given folder.

Parameters
folderIdThe ID of the folder from which to retrieve the templates from.
completionBlockThe completion block to be execute once the list of templates is retrieved.

◆ listTemplatesWithSearchPredicate:Completion:()

- (void) listTemplatesWithSearchPredicate: (NSPredicate *)  predicate
Completion: (void(^)(NSArray< DSMEnvelopeTemplateDefinition * > *envelopeTemplateDefinitions, NSError *error))  completionBlock 

Retrieves the list of templates available to the currently logged in user matching the given predicate.

Parameters
predicateThe predicate to match the templates with. A predicate of nil returns all templates.
completionBlockThe completion block to be execute once the list of templates is retrieved.

◆ listTemplatesWithTemplateName:searchOptions:completion:()

- (void) listTemplatesWithTemplateName: (NSString *)  templateName
searchOptions: (DSMSearchOptions)  options
completion: (void(^)(NSArray< DSMEnvelopeTemplateDefinition * > *envelopeTemplateDefinitions, NSError *error))  completionBlock 

Retrieves the list of templates available to the currently logged in user for given template name.

Parameters
templateNameThe name of the template to retrieve.
optionsSpecifies the type of search conducted on the template name.
completionBlockThe completion block to be execute once the list of templates is retrieved.

◆ presentSendTemplateControllerWithTemplateWithId:envelopeDefaults:pdfToInsert:insertAtPosition:signingMode:presentingController:animated:completion:()

- (void) presentSendTemplateControllerWithTemplateWithId: (NSString *)  templateId
envelopeDefaults: (DSMEnvelopeDefaults *)  envelopeDefaults
pdfToInsert: (NSData *)  pdfToInsert
insertAtPosition: (DSMDocumentInsertAtPosition)  insertAtPosition
signingMode: (DSMSigningMode)  signingMode
presentingController: (UIViewController *)  presentingController
animated: (BOOL)  animated
completion: (void(^)(UIViewController *viewController, NSError *error))  completion 

Start Signing/Sending envelope off of a template with the given templateId.

Parameters
envelopeDefaults[Optional] Customizable envelope data before starting the signing ceremony
See also
DSMEnvelopeDefaults.h
Parameters
pdfToInsert[Optional] Offline signing only, include a PDF to be inserted at begining or end of envelope documents. if signingMode is DSMSigningModeOnline, pdfToInsert would be silently ignored.
insertAtPositionspecigies if the pdf needs to eb inserted at the beginging or end of Envelope.
signingModeis DSMSigningModeOnline, if sign and send needs to happen online(using online web signing component) OR it will be DSMSigningModeOffline if signing in Offline (using native signing components).
presentingControllersigning component/controller will be presented on top of the given presentingController passed.
animatedif the presentation of sign and send be animated or not.
completioncompletion block to be executed after signing/sending is complete/finished
Warning
passing nil to a presentationController will not be able to load the sign and send flow. this defaulting is currently available only for offline signing and if pdfToInsert is passed and with out specifying insertAtPosition it will be defaulted to begining(DSMDocumentInsertAtPositionBeginning).
See also
DSMDocumentInsertAtPosition.h for more details on ENUM to be passed for param insertAtPosition
DSMSigningMode.h

◆ presentSendTemplateControllerWithTemplateWithId:signingMode:presentingController:animated:completion:()

- (void) presentSendTemplateControllerWithTemplateWithId: (NSString *)  templateId
signingMode: (DSMSigningMode)  signingMode
presentingController: (UIViewController *)  presentingController
animated: (BOOL)  animated
completion: (void(^)(UIViewController *viewController, NSError *error))  completion 

Start Signing/Sending envelope off of a template with given templateId.

Parameters
signingModeis DSMSigningModeOnline, if sign and send needs to happen online(using online web signing component) OR it will be DSMSigningModeOffline if signing in Offline (using native signing components).
presentingControllersigning component/controller will be presented on top of the given presentingController passed.
animatedIf the presentation of sign and send be animated or not.
completionCompletion block to be executed after signing/sending is complete/finished
Warning
passing nil to a presentationController will not be able to load the sign and send flow.
See also
DSMSigningMode.h

◆ removeCachedTemplates()

- (void) removeCachedTemplates

Remove all previously cached templates.

◆ removeCachedTemplateWithId:()

- (void) removeCachedTemplateWithId: (NSString *)  templateId

Remove previously cached template.

Parameters
templateIdAn ID of the template to be removed.

Property Documentation

◆ delegate

- (id<DSMTemplatesManagerDelegate>) delegate
readwritenonatomicweak

The DSMTemplatesManagerDelegate class' delegate object.

See also
DSMTemplatesManagerDelegate.h
Warning
This delegate is used to notify cache success or failure for a given template id.

The documentation for this class was generated from the following file: