Foundations Apex API Developer Reference

fferpcore.ChainedMapping

global inherited sharing abstract class ChainedMapping extends SubscriptionDescription.Mapping

Implements a decorator pattern for SubscriptionDescription.Mapping. Allows data to be transformed before being passed to the final Mapping. This Mapping performs its Immediate and Bulk actions before calling the next Mapping.

This class extends fferpcore.SubscriptionDescription.Mapping

Properties

Name Type Description
MESSAGE_KEY_UPSTREAM_RESULT List<String> The message key to use with SubscriptionDescription.ApplyMappingRequest.getValue() to return the value from the previous step in a chain.

Methods

ChainedMapping

global ChainedMapping(fferpcore.SubscriptionDescription.Mapping nextMapping)

Constructs a ChainedMapping.

Input Parameters

Name Type Description
nextMapping fferpcore.SubscriptionDescription.Mapping The mapping that will receive the result of this mapping.

getTargetFields

global override virtual Set<String> getTargetFields()

Implements Mapping.getTargetFields(). This implementation delegates to the next mapping.

performImmediateActions

global override void performImmediateActions(ApplyMappingRequest request)

Implements Mapping.performImmediateActions(). This implementation collects messages for each record and calls processImmediateRequest() once for each record.

performBulkActions

global override void performBulkActions()

Implements Mapping.performBulkActions(). Calls the processRequests() method, then calls the next Mapping with one request for each record containing the result for that record.

disableFields

global virtual override void disableFields(Set<String> fieldNames)

Implements Mapping.disableFields(). This implementation delegates to the next mapping.

isDisabled

global virtual override Boolean isDisabled()

Implements Mapping.isDisabled(). This implementation delegates to the next mapping.

fferpcore.ChainedMapping.CollectedRequest

global interface CollectedRequest

Aggregation of message requests.

Methods

getRecord

SObject getRecord()

Return the record that this request applies to.

getLatestValue

SubscriptionDescription.Value getLatestValue(List<String> path)

Return the value from the most recent message to contain data in the JSON path.

getLatestValues

List<SubscriptionDescription.Value> getLatestValues(List<List<String>> paths)

Return the values from the most recent message to contain data in any of the JSON paths.

setResult

void setResult(fferpcore.SubscriptionDescription.Value value)

Sets the result to be passed to the next fferpcore.SubscriptionDescription.Mapping in the chain.

respondError

void respondError(fferpcore.ErpErrorBody error)

Mark the messages in error.

© Copyright 2009–2023 Certinia Inc. All rights reserved. Various trademarks held by their respective owners.