Show:      

ConvertController

Signature
global with sharing class ConvertController

ConvertController Methods

convert(data)

Convenient method that converts a DocConfig and returns the ContentVersionId or AttachmentId
Signature
webService static String convert(ConvertDataModel data)
Parameters
data
Type: ConvertDataModel
ConvertDataModel instance to use
Returns
ContentVersionId or AttachmentId (dependent on Delivery Type on DocConfig)
See
Example
 cadmus_core.ConvertController.convert(data);

convertAura(data)

Signature
@AuraEnabled
global static String convertAura(ConvertDataModel data)

convertToDocx(docConfigId, objectId)

Signature
webService static String convertToDocx(Id docConfigId, Id objectId)
Deprecated
use cadmus_core.ConvertController.convertWithWrapper(data)

convertToDocxAura(docConfigId, objectId)

Signature
@AuraEnabled
global static String convertToDocxAura(Id docConfigId, Id objectId)

convertToPdf(docConfigId, objectId)

Signature
webService static String convertToPdf(Id docConfigId, Id objectId)
Deprecated
use cadmus_core.ConvertController.convertWithWrapper(data)

convertToPdfAura(docConfigId, objectId)

Signature
@AuraEnabled
global static String convertToPdfAura(Id docConfigId, Id objectId)
Deprecated
use cadmus_core.ConvertController.convertWithWrapper(data)

convertWithWrapper(data)

Convert DocConfig or Pack defined in the ConvertDataModel
Signature
webService static DocGenerationWrapper convertWithWrapper(ConvertDataModel data)
Parameters
data
Type: ConvertDataModel
ConvertDataModel instance to use
Returns
DocGenerationWrapper
See
Example
 cadmus_core.ConvertController.convertWithWrapper(data);

ConvertController.ConvertDataModel

Class to capture all required convert data
Signature
global with sharing class ConvertDataModel
Example
 cadmus_core.ConvertController.ConvertDataModel cdm = new cadmus_core.ConvertController.ConvertDataModel();

ConvertController.ConvertDataModel Properties

Name Signature Description
alternativeName
webService String alternativeName
Which Alternative on your DocConfig to use
country
webService String country
Country, only used for DateTime formatting
deliveryOverwrite
webService String deliveryOverwrite
Use this Delivery instead of the one specified on the DocConfig.
Values: 'BASE64', 'FILES','FILES_OVERWRITE', 'FILES_ADD_VERSION', 'ATTACHMENTS', 'ATTACHMENTS_OVERWRITE'
docConfigId
webService Id docConfigId
SFDC Id of the DocConfig. Required when not specifying 'packId' or 'docConfigIds'
docConfigIds
webService List<Id> docConfigIds
Required! If you want to overwrite the DocConfigs in the Pack. List the DocConfig Ids here. A packId is also required
language
webService String language
Language, used for translation (eg TRANSLATION PICKLIST DataSource). By default, the first part of the locale is used. eg de_DE => de
locale
webService String locale
Which Locale to use. Locale is a combination of language and country. eg en_US, fr_CA, fr_BE, de_DE, de_AT
numCurrLocale
webService String numCurrLocale
Which Locale to use for Number and Currency formatting. eg en_US, fr_CA, fr_BE, de_DE, de_AT
objectId
webService Id objectId
Required! Record Id in which the convert process has to work
packId
webService Id packId
Id of the PDF Butler pack. Required when no DocConfigId is given
parameters
webService CadmusParameters parameters
There parameters are extra variables that can be used in the DataSources
pdfActionType
webService String pdfActionType
Merge the PDF's or not. In a pack or with Additional PDF's. Values: 'MERGE' or 'NONE'
targetType
webService String targetType
Export type, only used for DOCX convert. Values: PDF, DOCX
timeZone
webService String timeZone
only used for DateTime formatting