Foundations Apex API Developer Reference

fferpcore.PublicationDescriber

global inherited sharing abstract class PublicationDescriber

A fferpcore.PublicationDescriber structure.

Methods

describe

global virtual fferpcore.MessageDescription describe()

This method returns a fferpcore.MessageDescription which contains information about which SObject type the publishing product is sending information about. Additionally, this specifies which fields any publications associated with this describer sends in their messages by default in addition to a field that specifies the correlation Id of a message.

Return Value

This service returns a MessageDescription object.

Sample Code

//Note: This sample code is for demonstration purposes only. It is not intended for
//use in a production environment, is not guaranteed against defects or errors, and
//is in no way optimized or streamlined.

//Example implementation of a describer.
public class ConcreteDescriber extends fferpcore.PublicationDescriber
{
    private static final SObjectType SOBJECT_TYPE = ExampleSObject__c.SObjectType;

    global override fferpcore.MessageDescription describe()
    {
        return new fferpcore.MessageDescription(
            getCorrelation(),
            getBody(),
            new fferpcore.Context.SObjectContext(SOBJECT_TYPE)
        );
    }

    public fferpcore.Context.Source getCorrelation()
    {
        return new fferpcore.Context.SObjectSource(ExampleSObject__c.EmployeeId__c);
    }

    public fferpcore.MessageDescription.Node getBody()
    {
        return new fferpcore.MessageDescription.MapNode()
            .withChild('Link Control', fferpcore.LinkControlBody.getOutgoingDescriptionNode(SOBJECT_TYPE, 'Example'))
            .withScalarChild('Name', ExampleSObject__c.Name)
            .withChild('Address', new fferpcore.MessageDescription.MapNode()
                .withScalarChild('Line 1', ExampleSObject__c.Address1__c)
            .withScalarChild('Phone', ExampleSObject__c.Phone__c)
            .withChild('Relationship Map', new fferpcore.MessageDescription.MapNode(ExampleSObject__c.Relationship__c)
                .withScalarChild('Relationship', Relationship__c.Name));
    }
}

describe

global virtual fferpcore.MessageDescription describe(fferpcore.PublicationDescriber.PublicationDescriptionRequest request)

Generate a fferpcore.MessageDescription using the specified PublicationDescriptionRequest to provide additional information such as the source object and correlation field.

Input Parameters

Name Type Description
request fferpcore.PublicationDescriber.PublicationDescriptionRequest The PublicationDescriptionRequest containing additional information.

Return Value

The generated MessageDescription.

fferpcore.PublicationDescriber.PublicationDescriptionRequest

global inherited sharing class PublicationDescriptionRequest

A request object containing additional information about the desired fferpcore.MessageDescription including the source object and correlation field.

Methods

PublicationDescriptionRequest

global PublicationDescriptionRequest(String sourceObject, String correlationField, String linkDeveloperName)

Construct a PublicationDescriptionRequest containing the source object, correlation field. and link developer name.

Input Parameters

Name Type Description
sourceObject String The API name of the source object.
correlationField String The API name of the correlation field.
linkDeveloperName String The developer name used in link control.

Return Value

A PublicationDescriptionRequest instance.

PublicationDescriptionRequest

global PublicationDescriptionRequest(String sourceObject, String correlationField, String linkDeveloperName, String virtualObject, String virtualObjectProvider)

Construct a PublicationDescriptionRequest containing the source object, correlation field, link developer name, and the virtual object and associated provider.

Input Parameters

Name Type Description
sourceObject String The API name of the source object.
correlationField String The API name of the correlation field.
linkDeveloperName String The developer name used in link control.
virtualObject String The name of the virtual object.
virtualObjectProvider String The name of the virtual object provider.

Return Value

A PublicationDescriptionRequest instance.

getSourceObject

global String getSourceObject()

Return Value

The API name of the source object.

getCorrelationField

global String getCorrelationField()

Return Value

The API name of the correlation field.

getLinkDeveloperName

global String getLinkDeveloperName()

Return Value

The developer name used in link control.

getVirtualObject

global String getVirtualObject()

Return Value

The name of the virtual object.

getVirtualObjectProvider

global String getVirtualObjectProvider()

Return Value

The name of the virtual object provider.

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