Accounting API Developer's Reference

c2g.SummarizationService

global with sharing class SummarizationService

The service class relating to Summarization in FinancialForce Accounting.

Methods

getAvailableSummarizationObjects

global static List<c2g.SummarizationService.Destination> getAvailableSummarizationObjects(String objectNameFragment)

Returns a list of available summarization object names with the given fragment

Input Parameters

Name Type Description
objectNameFragment String - the fragment of the available summarization object name to search for

Return Value

List<String> a list of available summarization object names with the given fragment

getTemplates

global static List<c2g.SummarizationService.SummarizationTemplate> getTemplates(Set<Id> templateIds)

Returns a list containing all Summarization Templates in the database for the given Ids

Input Parameters

Name Type Description
templateIds Set<Id> - the set of Summarization Template ids to get

Return Value

List<SummarizationService.SummarizationTemplate> a list of all Summarization Templates for the given ids.

saveTemplates

global static List<Id> saveTemplates(Set<c2g.SummarizationService.SummarizationTemplate> templates)

Save the given Summarization Templates

Input Parameters

Name Type Description
templates Set<c2g.SummarizationService.SummarizationTemplate> - the set of Summarization Templates to be saved

Return Value

List<Id> The Ids of the Summarization Templates which have been saved

runSummarization

global static void runSummarization(Set<Id> summarizationTemplateIds)

Run the summarization batch job for the specified summarization templates.

Input Parameters

Name Type Description
summarizationTemplateIds Set<Id> Identifies the summarization templates that you want to process.

Exceptions Thrown

Value Description
CODAException thrown when one of the specified summarization templates cannot be found in the database.

saveAndRunSummarizationTemplates

global static List<Id> saveAndRunSummarizationTemplates(Set<c2g.SummarizationService.SummarizationTemplate> templates)

Save and run the given Summarization Templates.

Input Parameters

Name Type Description
templates Set<c2g.SummarizationService.SummarizationTemplate> - the set of Summarization Templates to be saved and ran.

Return Value

List<Id> The Ids of the Summarization Templates which have been saved

purgeTemplateData

global static void purgeTemplateData(Set<id> templatesToPurge)

Purges all summarized data (Ie data on the destination table) for the given summarization template Ids

Input Parameters

Name Type Description
templatesToPurge, null Ids of the summarization templates to purge.

scheduleSummarization

global static void scheduleSummarization(Set<Id> summarizationTemplateIds, c2g.CronSpec cron)

Schedule the summarizations for the template Ids passed in to run based on the c2g.CronSpec given.

Input Parameters

Name Type Description
summarizationTemplateIds Set<Id> - The ids of the summarization templates to schedule
cron c2g.CronSpec - The CronSpec detailing when the summarizations should run

unscheduleSummarization

global static void unscheduleSummarization(Set<Id> summarizationTemplateIds)

Remove the summarization schedules for the template Ids passed in.

Input Parameters

Name Type Description
summarizationTemplateIds Set<Id> - The ids of the summarization templates to unschedule

c2g.SummarizationService.Filter

global class Filter implements ISummarizationServiceObject

A data transfer object (DTO) that corresponds to the Filter__c SObject. A Filter contains a number of filter elements to define the rules to be imposed on a particular field of a table (SObject). These rules determine the inclusion of data in particular cells of the specified field.

Properties

Name Type Description
id Id
filterElements List<c2g.SummarizationService.FilterElement>

Methods

Filter

global Filter()

c2g.SummarizationService.FilterElement

global class FilterElement implements ISummarizationServiceObject, Comparable

A data transfer object (DTO) that corresponds to the FilterElement__c SObject. A FilterElement defines the rules to be imposed on a particular field of a table (SObject). These rules determine the inclusion of data in particular cells of the specified field.

Properties

Name Type Description
id Id
operator String
field String
fromValue String
toValue String
openingBrackets Decimal
closingBrackets Decimal
combineType String
index Decimal

Methods

FilterElement

global FilterElement()

c2g.SummarizationService.SummarizationTemplate

global class SummarizationTemplate implements ISummarizationServiceObject

A data transfer object (DTO) that corresponds to the SummarizationTemplate__c SObject. A summarization template groups all the objects relating to one summarization template.

Properties

Name Type Description
id Id
Dataview c2g.CommonService.Identity
name String
destination String
objectToObjectMap c2g.SummarizationService.ObjectToObjectMap
filter c2g.SummarizationService.Filter
fieldProcesses List<c2g.SummarizationService.SummarizationTemplateFieldProcess>

Methods

SummarizationTemplate

global SummarizationTemplate()

c2g.SummarizationService.SummarizationTemplateFieldProcess

global class SummarizationTemplateFieldProcess implements ISummarizationServiceObject

A data transfer object (DTO) that corresponds to the SummarizationTemplateFieldProcess__c SObject. A summarization template field process object defines the means of aggregation to be imposed upon a particular field.

Properties

Name Type Description
id Id
fieldName String
process String

Methods

SummarizationTemplateFieldProcess

global SummarizationTemplateFieldProcess()

c2g.SummarizationService.ObjectToObjectMap

global class ObjectToObjectMap implements ISummarizationServiceObject

A data transfer object (DTO) that corresponds to the ObjectToObjectMap__c SObject. An ObjectToObjectMap represents how one or more SObject's fields link to another's, or to several other SObjects' fields.

Properties

Name Type Description
id Id
objectToObjectMapFieldLinks List<c2g.SummarizationService.ObjectToObjectMapFieldLink>

Methods

ObjectToObjectMap

global ObjectToObjectMap()

c2g.SummarizationService.ObjectToObjectMapFieldLink

global class ObjectToObjectMapFieldLink implements ISummarizationServiceObject

A data transfer object (DTO) that corresponds to the ObjectToObjectMapFieldLink__c SObject. An ObjectToObjectMapFieldLink defines the association between a field on one SObject and a field on another.

Properties

Name Type Description
id Id
fromField String
toField String
filter c2g.SummarizationService.Filter
displayOrder Decimal

Methods

ObjectToObjectMapFieldLink

global ObjectToObjectMapFieldLink()

c2g.SummarizationService.Destination

global class Destination

A data transfer object (DTO) that specifies a destination object for the summarization process. This object is read only.

Properties

Name Type Description
objectName String
objectLabel String