ERP Core API Developer Reference


global abstract class PublicationDescriber

A fferpcore.PublicationDescriber structure.



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(
            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));