Foundations Apex API Developer Reference

fferpcore.MappingDescriber

global abstract class MappingDescriber

Base class that is extended to define a mapping describer.
Required if using the FDN Mappings component.
You must reference the name of the concrete class in the Small Data field of a Foundations configuration item record.
The Process field on the record must contain the following value: Foundations Mapping Process.

Enums

MappingType

A type of mapping that is supported by the FDN Mappings component.

Value Description
NONE A mapping with an empty source or target.
ADVANCED_LOOKUP A mapping that populates a lookup to an object that contains records with non-unique names.
FIELD A mapping that reads data from a source field or populates a target field.
STATIC_LITERAL A mapping that uses a static value as the source data.
CHILD A mapping that reads data from source child records to create or update target child records.

Methods

getSourceContext

global abstract fferpcore.Context getSourceContext()

Specify the type of source objects that the mappings will read.
Concrete implementations exist for typical usage.

Return Value

An instance of a concrete Context.

Sample Data

new fferpcore.Context.SObjectContext(Account.SObjectType)

getTargetContext

global abstract fferpcore.Context getTargetContext()

Specify the type of target object that the mappings will write to.
Concrete implementations exist for typical usage.

Return Value

An instance of a concrete Context.

Sample Data

new fferpcore.Context.SObjectContext(Account.SObjectType)

getManagedMappings

global virtual List<fferpcore.TransformMapping> getManagedMappings()

Specify any managed mappings that are fixed and therefore not configurable by the user.
Returns an empty list by default if not overridden.

Return Value

A list of TransformMapping instances, each corresponding to a single managed mapping.

getCustomMappings

global virtual List<fferpcore.MappingService.CustomMapping> getCustomMappings(String process)

Specify any custom mappings for the mapping process.
Required only if the mapping process does not store custom mappings as Foundations mapping records.

Input Parameters

Name Type Description
process String The process name using this MappingDescriber.

Return Value

A list of MappingService.CustomMapping instances, each corresponding to a single custom mapping.

saveCustomMappings

global virtual void saveCustomMappings(String process, List<fferpcore.MappingService.CustomMapping> customMappings)

Specify how any custom mappings should be saved.
Required only if the mapping process does not store custom mappings as Foundations mapping records.

Input Parameters

Name Type Description
process String The process name using this MappingDescriber.
customMappings List<fferpcore.MappingService.CustomMapping> The list of custom mappings to be saved. The save is not incremental so this list will always include every custom mapping for the process.

supportsCustomMappings

global virtual Boolean supportsCustomMappings()

Return Value

Whether this mapping process supports custom mappings. True if not overridden.

supportsManagedMappingOverride

global virtual Boolean supportsManagedMappingOverride()

Return Value

Whether this mapping process supports overriding managed mappings with custom mappings. True by default.

supportsTargetChildTypes

global virtual Boolean supportsTargetChildTypes()

Return Value

Whether this mapping process supports target child types. True if not overridden.

requiresMappingNames

global virtual Boolean requiresMappingNames()

Return Value

Whether mappings for this mapping process require names and whether the Mapping Name column is displayed on the FDN Mappings component. True if mapping names are required and visible.

getSupportedMappingTypes

global virtual Set<fferpcore.MappingDescriber.MappingType> getSupportedMappingTypes()

Return Value

The mapping types that are supported for this mapping process. Returns the standard configuration if not overridden.

getSaveLabel

global virtual String getSaveLabel()

Return Value

The label displayed on the button that saves a mapping.

getSaveAndNewLabel

global virtual String getSaveAndNewLabel()

Return Value

The label displayed on the button that saves a mapping and prompts the user to create a new mapping.

getProcessLabel

global virtual String getProcessLabel()

Return Value

The process label associated with the describer.

supportsCustomQueryField

global virtual Boolean supportsCustomQueryField()

Return Value

Whether this mapping process supports custom advanced lookup mappings with a custom query field. False by default.

© Copyright 2009–2022 FinancialForce.com, inc. All rights reserved. Various trademarks held by their respective owners.