ERP Core API Developer Reference

fferpcore.Context

global abstract class Context

This class represents a context for creating new Sources which in turn can be used to create new Nodes. A fferpcore.Context may represent an SObjectType, currently the only type of context supported.
Contexts are descriptive, used at design time. At runtime they correspond to DataSource.Row, and describe the fferpcore.DataSource.Row that the Sources they create will operate on.

Enums

SourceType

Value Description
FROM_CONTEXT Source of the data is a field on the current context.
LITERAL Source is a static value that is defined by the publication.
PASSTHROUGH A Source designed to pass through the input context.
CORRELATION Source of the data is a field, unless null, in which case it uses a fallback field.

Methods

getClass

global abstract Type getClass()

This method exists to support serialization to Javascript. This method returns the class type of the associated context. This method must be implemented by a class which implements Context.

Return Value

This service returns a Type 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.

public class ContextImpl extends fferpcore.Context
{
    public override type getClass()
    {
        return ContextImpl.class;
    }

    ...
}

fferpcore.Context contextExample = new ContextImpl();

System.assertEquals(ContextImpl.class, contextExample.getClass());

getInitMemento

global abstract String getInitMemento()

This method exists to support serialization to Javascript. This method returns a string which describes the SObject the context is associated to. This method must be implemented by a class which implements Context.

Return Value

This service returns a String 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.

public class ContextImpl extends fferpcore.Context
{   //In this example we have specifically designated ContextImpl to reference ExampleObject__c 
    public override string getInitMemento()
    {
        return ExampleObject__c.getDescribe().getName();
    }
}

fferpcore.Context contextExample = new ContextImpl();

System.assertEquals('ExampleObject__c', contextExample.getInitMemento());

initialise

global abstract void initialise(String memento)

This method exists to support deserialization from Javascript. This method creates a new context ready for use. This method must be implemented by a class which implements Context.

Input Parameters

Name Type Description
memento String The name of the SObject we want to create.

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.

public class ContextImpl extends fferpcore.Context
{
    public override void initialise(String memento)
    {
        m_sObjectType = Schema.getGlobalDescribe().get(memento);
        if(m_sObjectType == null)
        {
            throw new Exceptions.MessagingException('SObjectType ' + memento + ' not recognised.');
        }
    }
    ...
}

fferpcore.Context contextExample = new ContextImpl();

contextExample.initialise('ExampleObject__c');

System.assertEquals('ExampleObject__c', contextExample.getInitMemento());

getDisplayDescription

global abstract fferpcore.Context.DisplayDescription getDisplayDescription()

This method is used to return information about the source to display. This method must be implemented by a class which implements Context.

Return Value

Information for display of this Source to the user.

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.

public class ContextImpl extends fferpcore.Context
{
    public override fferpcore.Context.DisplayDescription getDisplayDescription()
    {
        Schema.DescribeSObjectResult describe = ExampleObject.describe();
        return new fferpcore.Context.DisplayDescription(
            'ContextImpl',
            'ExampleObject__c', describe.getName(),
            'Example Object Label', describe.getLabel()
        );
    }
}

fferpcore.Context contextExample = new ContextImpl();

fferpcore.Context.DisplayDescription description = contextExample.getDisplayDescription();

getPotentialChildren

global abstract List<fferpcore.Context.Source> getPotentialChildren()

This method is used to return a complete list of any fields on this particular SObject. Fields on related objects are not included. Each field is described as a fferpcore.Context.Source in the returned list. This method must be implemented by a class which implements Context.

Return Value

The potential children for this context.

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.

/** 
 * We will assume the following fields only on ExampleObject__c:
 * Name
 * Email__c
 * Phone__c
 * Address__c
 * In reality use this would return all standard Salesforce fields eg. CreatedById etc
 */
public class ContextImpl extends fferpcore.Context
{
    public override List<fferpcore.Context.Source> getPotentialChildren()
    {
        List<Source> ret = new List<Source>();
        Map<String, Schema.SObjectField> fieldMap = getFieldMap();
        for(String key : fieldMap.keySet())
        {
            ret.add(makeSource(fieldMap, key));
        }
        return ret;
    }

    private Source makeSource(Map<String, Schema.SObjectField> fieldMap, String key)
    {
        Schema.SObjectField field = fieldMap.get(key);
        if(field != null)
        {
            return new fferpcore.Context.SObjectSource(key, field);
        }
        return null;
    }
    ...
}

fferpcore.Context contextExample = new ContextImpl();

List<fferpcore.Context.Source> returnValue = contextExample.getPotentialChildren();

System.assertEquals(4, returnValue.size());

getSource

global abstract fferpcore.Context.Source getSource(String key)

This method is used to look up a source by its key. This method must be implemented by a class which implements Context.

Input Parameters

Name Type Description
key String The key should be the API name of the field you want to find.

Return Value

Look up a source by its key.

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.

/** 
 * We will assume the following fields only on ExampleObject__c:
 * Name
 * Email__c
 * Phone__c
 * Address__c
 * In actual use this would return all standard Salesforce fields eg. CreatedById etc
 */
public class ContextImpl extends fferpcore.Context
{
    public override Source getSource(String key)
    {
        return makeSource(getFieldMap(), key);
    }

    private Source makeSource(Map<String, Schema.SObjectField> fieldMap, String key)
    {
        Schema.SObjectField field = fieldMap.get(key);
        if(field != null)
        {
            return new fferpcore.Context.SObjectSource(key, field);
        }
        return null;
    }
    ...
}

fferpcore.Context contextExample = new ContextImpl();

fferpcore.Context.Source returnValue = contextExample.getSource('Name');

System.assertEquals('Name', returnValue.getKey());

fferpcore.Context.DisplayDescription

global class DisplayDescription

A class for containing information about contexts and sources to be displayed on the UI.

Properties

Name Type Description
elementType String A display name for the type of this this is. For example "SObject Field"
nameLabel String The label to use for the name. For example "API Name"
name String A short name by which this thing is known. For example "Phone__c"
descriptionLabel String The label to use for the description. For example "Label"
description String A longer more readable description of the thing. For example "Work Phone Number"

Methods

DisplayDescription

global DisplayDescription(String elementType, String nameLabel, String name, String descriptionLabel, String description)

Constructs a fferpcore.Context.DisplayDescription

Input Parameters

Name Type Description
elementType String The display name for the type this is of. For example "SObject Field".
nameLabel String The label to use for the name. For example "API Name".
name String A short name by which this thing is known. For example "Phone__c".
descriptionLabel String The label to use for the description. For example "Label".
description String A longer more readable description of the thing. For example "Work Phone Number".

fferpcore.Context.SObjectContext

global class SObjectContext extends Context

An SObjectContext structure. This class/type extends Context.

This class extends fferpcore.Context

Methods

SObjectContext

global SObjectContext()

The default is for internal use only and is not recommended for use. Use the constructor that takes SObjectType as an argument instead.

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.

fferpcore.Context.SObjectContext context = new fferpcore.Context.SObjectContext();

SObjectContext

global SObjectContext(Schema.SObjectType type)

This constructor is used to relate this object with a specific SObject type. The methods from this class will make use of that SObject type.

Input Parameters

Name Type Description
type Schema.SObjectType The SObject this context refers to.

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.

fferpcore.Context.SObjectContext context = new fferpcore.Context.SObjectContext(ExampleObject__c.SObjectType);

System.assertEquals('ExampleObject__c', context.getInitMemento());

getClass

global override Type getClass()

This method exists to support serialization to Javascript. This method returns the class type of the associated context.

Return Value

This service returns a Type 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.

fferpcore.Context.SObjectContext context = new fferpcore.Context.SObjectContext(ExampleObject__c.SObjectType);

System.assertEquals(fferpcore.Context.SObjectContext.class, context.getClass());

getInitMemento

global override String getInitMemento()

This method exists to support serialization to Javascript. This method returns a string which describes the SObject the context is associated to.

Return Value

This service returns a String 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.

fferpcore.Context.SObjectContext context = new fferpcore.Context.SObjectContext(ExampleObject__c.SObjectType);

System.assertEquals('ExampleObject__c', context.getInitMemento());

initialise

global override void initialise(String memento)

This method exists to support deserialization from Javascript. This method creates a new context ready for use.

Input Parameters

Name Type Description
memento String The name of the SObject we want to create.

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.

fferpcore.Context.SObjectContext context = new fferpcore.Context.SObjectContext();

context.initialise('ExampleObject__c');

System.assertEquals('ExampleObject__c', context.getInitMemento());

getDisplayDescription

global override fferpcore.Context.DisplayDescription getDisplayDescription()

This method returns information about the source to display.

Return Value

This service returns a DisplayDescription 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.

fferpcore.Context.SObjectContext context = new fferpcore.Context.SObjectContext(ExampleObject__c.SObjectType);

fferpcore.Context.DisplayDescription description = context.getDisplayDescription();

getPotentialChildren

global override List<fferpcore.Context.Source> getPotentialChildren()

This method is used to return a complete list of any fields on this particular SObject which are in the form of a Context.Source.

Return Value

This service returns a list of Source objects.

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.

/**
 * We will assume the following fields only on ExampleObject__c:
 * Name
 * Email__c
 * Phone__c
 * Address__c
 * In reality use this would return all standard Salesforce fields eg. CreatedById etc
 */

fferpcore.Context.SObjectContext context = new fferpcore.Context.SObjectContext(ExampleObject__c.SObjectType);

List<fferpcore.Context.Source> returnValue = context.getPotentialChildren();

System.assertEquals(4, returnValue.size());

getSource

global override fferpcore.Context.Source getSource(String key)

This method is used to look up a source by its key that is related to the current context.

Input Parameters

Name Type Description
key String The key should be the API name of the field you want to find

Return Value

This service returns a Source 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.

/**
 * We will assume the following fields only on ExampleObject__c:
 * Name
 * Email__c
 * Phone__c
 * Address__c
 * In actual use this would return all standard Salesforce fields eg. CreatedById etc
 */

fferpcore.Context.SObjectContext context = new fferpcore.Context.SObjectContext(ExampleObject__c.SObjectType);

fferpcore.Context.Source returnValue = context.getSource('Name');

System.assertEquals('Name', returnValue.getKey());

fferpcore.Context.Source

global abstract class Source

This class represents where the information for each of the nodes comes from. This is an abstract class and all abstract methods must be implemented for use.

Methods

getKey

global virtual String getKey()

This method returns the key by which the originating fferpcore.Context knows this Source. If the source is standalone like StaticSource or PassthroughSource this method returns null. If this source can be specified from the context like SObjectSource then the key associated with this source is returned.

Return Value

The key by which the originating Context knows this Source, or null for the Root Source or a Source that stands alone such as Static or Passthrough Sources.

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.

public class SourceImpl extends fferpcore.Context.Source
{
    ...
}

SourceImpl source = new SourceImpl();

System.assertEquals(null, source.getKey());

getDisplayDescription

global abstract fferpcore.Context.DisplayDescription getDisplayDescription()

This method is used to return information about the source to display. This method must be implemented by a class which implements Context.Source.

Return Value

Information for display of this Source to the user.

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.

public class SourceImpl extends fferpcore.Context.Source
{
    public override fferpcore.Context.DisplayDescription getDisplayDescription()
    {
        Schema.DescribeSObjectResult describe = ExampleObject.describe();
        return new fferpcore.Context.DisplayDescription(
            'SourceImpl',
            'ExampleObject__c', describe.getName(),
            'Example Object Label', describe.getLabel()
        );
    }
}

fferpcore.Context.Source sourceExample = new SourceImpl();

fferpcore.Context.DisplayDescription description = sourceExample.getDisplayDescription();

setInputContext

global virtual void setInputContext(fferpcore.Context parent)

This method is used to pass the parent context down to any potential child sources. The default behavior of this method doesn't do anything. This would be needed by some sources. An example Source which does this is Context.PassthroughSource.

Input Parameters

Name Type Description
parent fferpcore.Context The context of the parent we want to pass down.

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.

public class SourceImpl extends fferpcore.Context.Source
{
    public fferpcore.Context m_inputContext;
    public override void setInputContext(fferpcore.Context context)
    {
        m_inputContext = context;
    }

    public override fferpcore.Context getOutputContext()
    {
        return m_inputContext;
    }
    ...
}

fferpcore.Context.Source sourceExample = new SourceImpl();

sourceExample.setInputContext(new fferpcore.Context.SObjectContext(ExampleObject__c.SObjectType));

ferpcore.Context.SObjectContext context = sourceExample.getOutputContext();

prepare

global virtual fferpcore.DataSource prepare(fferpcore.DataSource dataSource)

This method prepares the input fferpcore.DataSource so that it knows what data is required to build this Source. It should return the fferpcore.DataSource for any children if this Source returns Complex Data. Null otherwise.

Input Parameters

Name Type Description
dataSource fferpcore.DataSource The DataSource that we want to get setup to get information from.

Return Value

The datasource for any children if this Source returns Complex Data. Null otherwise.

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.

public class SourceImpl extends fferpcore.Context.Source
{
    public override fferpcore.DataSource prepare(fferpcore.DataSource dataSource)
    {
        dataSource.requireField(m_field);
        if(canGetComplexData())
        {
            return dataSource.requireLookupField(m_field);
        }
        return null;
    }
}

public class DataSourceImpl extends fferpcore.DataSource
{
    ...
}

fferpcore.Context.Source sourceExample = new SourceImpl();

DataSourceImpl data = sourceExample.prepare(new DataSourceImpl());

canGetScalarData

global virtual Boolean canGetScalarData()

This method returns true if this source is capable of providing Scalar data, e.g. 'Foo'. By default, this method returns false. An example Source which overrides this method is Context.StaticSource.

Return Value

True if this source is capable of providing Scalar data.

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.

//In this example we will not override this method
public class SourceImpl extends fferpcore.Context.Source
{
    ...
}

fferpcore.Context.Source sourceExample = new SourceImpl();

System.assert(!sourceExample.canGetScalarData());

getScalarDataType

global virtual fferpcore.DataType getScalarDataType()

This method returns the data type name for the scalar data associated with this source. By default, this method returns null. An example Source which overrides this method is Context.StaticSource.

Return Value

The data type name for the scalar data.

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.

//In this example this method returns a datatype for an Integer with a size of 10 with no precision
public class SourceImpl extends fferpcore.Context.Source
{
    public override fferpcore.DataType getScalarDataType()
    {
        return new fferpcore.DataType(Schema.DisplayType.Integer, 10, null);
    }
}

fferpcore.Context.Source sourceExample = new SourceImpl();

fferpcore.DataType dataType = sourceExample.getScalarDataType();

System.assertEquals('Integer(10)', dataType.toString());

getData

global virtual Object getData(fferpcore.DataSource.Row row)

This method returns the scalar data relating to the DataSource.Row. This is only applicable if canGetScalarData is true. An example Source which does this is Context.StaticSource.

Return Value

Scalar data relating to the DataSource.Row. Only applicable if canGetScalarData is true.

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.

public class SourceImpl extends fferpcore.Context.Source
{
    private Object m_data;

    SourceImpl(Object data)
    {
        m_data = data;
    }

    public override Object getData(fferpcore.DataSource.Row row)
    {
        return m_data;
    }
}

public class DataSourceImpl extends fferpcore.DataSource
{
    ...

    public class RowImpl extends fferpcore.DataSource.Row
    {
        RowImpl()
        {

        }
        ...
    }
}

fferpcore.MessageDescription.Node node = new fferpcore.MessageDescription.ScalarNode(new SourceImpl('Example'));

fferpcore.Context.Source exampleSource = node.getSource();

canGetComplexData

global virtual Boolean canGetComplexData()

This method returns whether or not a source is capable of providing complex data for child nodes. By default, this method returns false.

Return Value

True if this source is capable of providing complex data for child nodes.

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.

//In this example we will use a source which is similar to SObjectSource
public class SourceImpl extends fferpcore.Context.Source
{
    public override Boolean canGetComplexData()
    {
        return true;
    }
}

fferpcore.Context.Source source = SourceImpl();

System.assert(source.canGetComplexData());

canGetListData

global virtual Boolean canGetListData()

This method returns whether or not a source is capable of providing data for list nodes. By default, this method returns false.

Return Value

True if this source is capable of providing data for list nodes.

getOutputContext

global virtual fferpcore.Context getOutputContext()

This method returns the context that this source is currently in. For example, an SObjectSource will return the current SObject that is associated with the source. In order for this to be returned, the class itself must be able to support complex data. By default, this method returns null.

Return Value

Context describing the complex data. Only applicable if canGetComplexData is true.

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.

//In this example we will use a source which is similar to SObjectSource
public class SourceImpl extends fferpcore.Context.Source
{
    private fferpcore.Context m_outputContext;

    public override fferpcore.Context getOutputContext()
    {
        if(m_outputContext == null)
        {
            m_outputContext = canGetComplexData() ?
                new fferpcore.Context.SObjectContext(
                //The SObject we want + the field we use to uniquely identify
                ) : null;
        }
        return m_outputContext;
    }
}

public fferpcore.MessageDescription.Node getBody()
{
    return new fferpcore.MessageDescription.MapNode(new SourceImpl());
}

fferpcore.MessageDescription description = new fferpcore.MessageDescription(
            new fferpcore.Context.SObjectSource(HCMFakeWorker__c.EmployeeId__c),
            getBody(),
            new fferpcore.Context.SObjectContext(Accout.SObjectType)
        );

fferpcore.Context context = description.getBody().getSource().getOutputContext();

getChildRow

global virtual fferpcore.DataSource.Row getChildRow(fferpcore.DataSource.Row inputRow)

This method should be implemented to return a wrapper for the field on the record that this source is in reference to. By default, this returns the input row.

Input Parameters

Name Type Description
inputRow fferpcore.DataSource.Row The current row on the DataSource from which to get the information.

Return Value

Row for children to build from. Only applicable if canGetComplexData is true.

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.

/**
 * Without providing an implementation for this method, this method will return the input row despite any modifications to the object.
 */
public class ExampleSource extends fferpcore.Context.Source
{
    //Doesn't override getChildRow

    //implements required methods
}

fferpcore.Context.Source mySource = new ExampleSource();

fferpcore.DataSource.Row inputRow = getRow(); //get row from somewhere
fferpcore.DataSource.Row returnedRow = mySource.getChildRow(inputRow);

System.assertEquals(row, returnedRow)

getListRows

global virtual Iterator<fferpcore.DataSource.Row> getListRows(fferpcore.DataSource.Row inputRow)

This method should be implemented to return an iterator of rows for the child records that this source is in reference to. By default, this returns null.

Input Parameters

Name Type Description
inputRow fferpcore.DataSource.Row The current row on the DataSource from which to get the information.

Return Value

Iterator of child rows to build from. Only applicable if canGetListData is true.

getType

global abstract fferpcore.Context.SourceType getType()

This method should be used as an indication of whether this is one of the ERP static sources, or whether it came from a Context. This method must be implemented by a class which implements Context.Source.

Return Value

Indication of whether this is one of the ERP-ME static sources, or whether it came from a Context.

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.

public class SourceImpl extends fferpcore.Context.Source
{
    public override fferpcore.Context.SourceType getType()
    {
        return fferpcore.Context.SourceType.FROM_CONTEXT;
    }
}

fferpcore.Context.Source sourceExample = new SourceImpl();

System.assertEquals(fferpcore.Context.SourceType.FROM_CONTEXT, sourceExample.getType());

hasAccess

global virtual Boolean hasAccess()

Checks whether the current user has access to this data. For example, if this Source represents an SObjectField then the user must have read access to that field. The default implementation of this method returns true.

Return Value

True if the current user would normally have access to this data.

fferpcore.Context.SObjectSource

global class SObjectSource extends Source

The source of the data is a field on an SObject. fferpcore.Message descriptions will normally be created using this type.

This class extends fferpcore.Context.Source

Methods

SObjectSource

global SObjectSource(Schema.SObjectField field)

This constructor a field which can be used to associate this source with a particular field on an SObject.

Input Parameters

Name Type Description
field Schema.SObjectField The field on the SObject we want to associate this source with.

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.

fferpcore.Context.SObjectSource source = new fferpcore.Context.SObjectSource(ExampleObject__c.ExampleField__c);

getKey

global override String getKey()

This method returns the key by which the originating fferpcore.Context knows this Source. This method is used by the Publication Description user interface.

Return Value

This service returns a String 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.

//Inside your PublicationDescriber Implementation
global class HCMResourceUpdateDescriber extends fferpcore.PublicationDescriber
{
    private static final SObjectType SOBJECT_TYPE = HCMFakeWorker__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(HCMFakeWorker__c.EmployeeId__c);
    }

    public fferpcore.MessageDescription.Node getBody()
    {
        return new fferpcore.MessageDescription.MapNode()
            .withChild('Example', new fferpcore.MessageDescription.ScalarNode(new fferpcore.Context.SObjectSource('Key', ExampleObject__c.Field__c)));
    }
}

fferpcore.MessageDescription description = new HCMResourceUpdateDescriber().describe();
fferpcore.MessageDescription.MapNode body = (fferpcore.MessageDescription.MapNode) description.getBody();

System.assertEquals(1, body.getChildren().size());
System.assertEquals('Key', body.getChildren()[0].getSource().getKey());

getDisplayDescription

global override fferpcore.Context.DisplayDescription getDisplayDescription()

This method returns information about the source to display. This method is used by the user interface to display information about the source.

Return Value

This service returns a DisplayDescription 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.

fferpcore.Context.SObjectSource source = new fferpcore.Context.SObjectSource(ExampleObject__c.FieldExample__c);

fferpcore.Context.DisplayDescription description = source.getDisplayDescription();

canGetScalarData

global override Boolean canGetScalarData()

This method returns true since an SObjectField can always return scalar data. Objects specified as a lookup appear as IDs. This is a method which has been written for use on the Publication user interface.

Return Value

This service returns a Boolean 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.

fferpcore.Context.SObjectSource source = new fferpcore.Context.SObjectSource(Account.Name);

System.assert(source.canGetScalarData());

getScalarDataType

global override fferpcore.DataType getScalarDataType()

This method returns the data type name for the scalar data associated with this source.

Return Value

This service returns a DataType 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.

//We will assume EmployeeId__c is a string of length 5
fferpcore.Context.SObjectSource source = new fferpcore.Context.SObjectSource(HCMFakeWorker__c.EmployeeId__c);

System.assertEquals('String(5)', source.getScalarDataType());

canGetComplexData

global override Boolean canGetComplexData()

This method returns whether or not this source is capable of providing complex data for child nodes.

Return Value

This service returns a Boolean 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.

public fferpcore.MessageDescription.Node getBody()
{
    return new fferpcore.MessageDescription.MapNode(new fferpcore.Context.SObjectSource(HCMFakeWorker__c.Name));
}

fferpcore.MessageDescription description = new fferpcore.MessageDescription(
            new fferpcore.Context.SObjectSource(HCMFakeWorker__c.EmployeeId__c),
            getBody(),
            new fferpcore.Context.SObjectContext(SOBJECT_TYPE)
        );

System.assert(!description.getBody().getSource().canGetComplexData());

getOutputContext

global override fferpcore.Context getOutputContext()

This method returns the context that this source is currently in. An SObjectSource will return the current SObject that is associated with the source.

Return Value

This service returns a Context 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.

public fferpcore.MessageDescription.Node getBody()
{
    return new fferpcore.MessageDescription.MapNode(new fferpcore.Context.SObjectSource(HCMFakeWorker__c.Name));
}

fferpcore.MessageDescription description = new fferpcore.MessageDescription(
            new fferpcore.Context.SObjectSource(HCMFakeWorker__c.EmployeeId__c),
            getBody(),
            new fferpcore.Context.SObjectContext(SOBJECT_TYPE)
        );

fferpcore.Context context = description.getBody().getSource().getOutputContext();

getChildRow

global override fferpcore.DataSource.Row getChildRow(fferpcore.DataSource.Row inputRow)

This method returns a wrapper for the field that this source is in reference to. For example, if this source is in reference to the name field of an SObject, the information from that field will be returned.

Input Parameters

Name Type Description
inputRow fferpcore.DataSource.Row The current row on the DataSource from which to get the information.

Return Value

This service returns a DataSource.Row 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.

public class RowExample extends DataSource.Row
{
    private SObject m_record;
    private DataSourceExample m_DataSource;

    //This method will return a DataSource containing information about the field we are trying 
    //to look at
    public override fferpcore.DataSource.Row getRelation(SObjectField field)
    {
        Id objectId = (Id) m_record.get(field);

        //We will assume this class exists
        DataSourceExample example = 
        m_DataSource.m_relationalDataSources.get(field);

        return example.getRow(objectId);
    }
    ...
}

RowExample row = new RowExample();

fferpcore.Context.SObjectSource source = new fferpcore.Context.SObjectSource(HCMFakeWorker__c.Name);

fferpcore.DataSource.Row returnedRow = source.getChildRow(row);

getType

global override fferpcore.Context.SourceType getType()

This method is used as an indication that this source is an SObjectSource without having to perform type checks on the object.

Return Value

This service returns a SourceType 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.

fferpcore.Context.SObjectSource source = new fferpcore.Context.SObjectSource(HCMFakeWorker__c.Name);

if(source.getType() == fferpcore.Context.SourceType.FROM_CONTEXT)
{
    ...
}
else if (source.getType() == fferpcore.Context.SourceType.LITERAL)
{
    ...
}
else if (source.getType() == fferpcore.Context.SourceType.PASSTHROUGH)
{
    ...
}

prepare

global override fferpcore.DataSource prepare(fferpcore.DataSource dataSource)

This method prepares the input fferpcore.DataSource so that it knows what fields are required to build the message. It returns the fferpcore.DataSource if the source is a reference to another SObject. Otherwise, it returns null.

Input Parameters

Name Type Description
dataSource fferpcore.DataSource The DataSource that we want to get setup to get information from.

Return Value

This service returns a DataSource 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.

public class DataSourceImpl extends fferpcore.DataSource
{
    ...
}

fferpcore.Context.SObjectSource sourceExample = new fferpcore.Context.SObjectSource(HCMFakeWorker__c.Name);

DataSourceImpl data = sourceExample.prepare(new DataSourceImpl());

System.assertEquals(null, data);

getData

global override Object getData(fferpcore.DataSource.Row row)

This method returns the data relating to the DataSource.Row. It reads the information about the field specified in the initial constructor of an SObjectSource and returns it. If the field cannot be found, it returns null.

Input Parameters

Name Type Description
row fferpcore.DataSource.Row A wrapper to access the data.

Return Value

This service returns an Object 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.

//Department__c is a relationship field on the HCMFakeWorker__c object
public class DataSourceImpl extends fferpcore.DataSource
{
    ...

    public class RowImpl extends fferpcore.DataSource.Row
    {
        RowImpl()
        {
            ...
            //If this can't find information for this source
            return null;
        }
        ...
    }
}

fferpcore.Context.SObjectSource sourceExample1 = new fferpcore.Context.SObjectSource(HCMFakeWorker__c.Department__c);
DataSourceImpl data = sourceExample1.prepare(new DataSourceImpl());

fferpcore.Context.SObjectSource sourceExample2 = new fferpcore.Context.SObjectSource(Department__c.Name);
sourceExample2.prepare(data);

Iterator<DataSourceImpl.RowImpl> it = data.runQuery();

DataSourceImpl.RowImpl row = it.next();

Object obj = sourceExample1.getData(row);

fferpcore.Context.StaticSource

global class StaticSource extends Source

Source is a static value that is defined by the publication. fferpcore.PublicationDescriber must provide a description as it cannot be automatically generated.

This class extends fferpcore.Context.Source

Methods

StaticSource

global StaticSource(String description)

This constructor creates a StaticSource with no data. It can be used to put an empty node in the message.

Input Parameters

Name Type Description
description String The name of this source.

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.

/**
 * Create the description for our message
 */
public fferpcore.MessageDescription.Node getBody()
{
    return new fferpcore.MessageDescription.MapNode()
        .withChild(UpdateResourceMessage.LINK_CONTROL_KEY, fferpcore.LinkControlBody.getOutgoingDescriptionNode(PSAFakeResource__c.SObjectType, 'PSA'))
        .withScalarChild(UpdateResourceMessage.NAME_KEY, PSAFakeResource__c.Name)
        .withChild(UpdateResourceMessage.ADDRESS_KEY, new fferpcore.MessageDescription.MapNode()
            .withScalarChild(UpdateResourceMessage.ADDRESS_LINE_1_KEY, PSAFakeResource__c.Address1__c)
            .withScalarChild(UpdateResourceMessage.ADDRESS_LINE_2_KEY, PSAFakeResource__c.Address2__c))
        .withScalarChild(new fferpcore.Context.StaticSource('Placeholder'))
        .withScalarChild(new fferpcore.Context.StaticSource('Goodbye', 'Message End'));
}

StaticSource

global StaticSource(Object data, String description)

This constructor creates a static source with the specified data and description. It can be used to provide constant values in messages.

Input Parameters

Name Type Description
data Object The data value for this node.
description String The name of this source.

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.

/**
 * Create the description for our message
 */
public fferpcore.MessageDescription.Node getBody()
{
    return new fferpcore.MessageDescription.MapNode()
        .withChild(UpdateResourceMessage.LINK_CONTROL_KEY, fferpcore.LinkControlBody.getOutgoingDescriptionNode(PSAFakeResource__c.SObjectType, 'PSA'))
        .withScalarChild(UpdateResourceMessage.NAME_KEY, PSAFakeResource__c.Name)
        .withChild(UpdateResourceMessage.ADDRESS_KEY, new fferpcore.MessageDescription.MapNode()
            .withScalarChild(UpdateResourceMessage.ADDRESS_LINE_1_KEY, PSAFakeResource__c.Address1__c)
            .withScalarChild(UpdateResourceMessage.ADDRESS_LINE_2_KEY, PSAFakeResource__c.Address2__c))
        .withScalarChild(new fferpcore.Context.StaticSource('Placeholder'))
        .withScalarChild(new fferpcore.Context.StaticSource('Goodbye', 'Message End'));
}

getKey

global override String getKey()

On a StaticSource, this method always returns null. On other types of source, this method returns the key by which the originating fferpcore.Context knows this Source.

Return Value

This service returns a String 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.

fferpcore.Context.StaticSource source = new fferpcore.Context.StaticSource(6, 'Sides on a cube');
System.assertEquals(null, source.getKey());

getDisplayDescription

global override fferpcore.Context.DisplayDescription getDisplayDescription()

This method returns information about the source to display. This method is used by the user interface to display information about the source.

Return Value

This service returns a DisplayDescription 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.

fferpcore.Context.StaticSource source = new fferpcore.Context.StaticSource('blue', 'Example color');

fferpcore.Context.DisplayDescription description = source.getDisplayDescription();

canGetScalarData

global override Boolean canGetScalarData()

Returns true to indicate this node can hold scalar type data.

Return Value

The default implementation of this method returns true.

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.

fferpcore.Context.StaticSource source = new fferpcore.Context.StaticSource(6, 'Sides on a cube');
System.assertEquals(true, source.canGetScalarData());

getScalarDataType

global override fferpcore.DataType getScalarDataType()

This method returns the data type name for the scalar data associated with this source. As a StaticSource can hold data of any type (the constructor takes an Object parameter), the default return value is 'new DataType(Schema.DisplayType.anytype, null, null)'.

Return Value

This service returns a DataType 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.

fferpcore.Context.StaticSource source = new fferpcore.Context.StaticSource(6, 'Sides on a cube');
DataType dt = source.getScalarDataType();
System.debug('Data is type: ' + String.valueOf(dt));

getType

global override fferpcore.Context.SourceType getType()

This method is used as an indication that this source is a StaticSource without having to perform type checks on the object.

Return Value

This service returns a SourceType 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.

fferpcore.Context.StaticSource source = new fferpcore.Context.StaticSource('Goodbye', 'Message End');

if(source.getType() == fferpcore.Context.SourceType.FROM_CONTEXT)
{
    ...
}
else if (source.getType() == fferpcore.Context.SourceType.LITERAL)
{
    ...
}
else if (source.getType() == fferpcore.Context.SourceType.PASSTHROUGH)
{
    ...
}

getData

global Object getData()

This method returns the data this StaticSource was constucted with.

Return Value

This service returns an Object 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.

fferpcore.Context.StaticSource source = new fferpcore.Context.StaticSource(6, 'Sides on a cube');
System.assertEquals(6, source.getData());

getDescription

global String getDescription()

Returns the description specified when this StaticSource was constructed.

Return Value

This service returns a String 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.

/**
 * Find some details of the provided StaticSources
 */
public void logDetails(List<fferpcore.Context.StaticSource> sources)
{
    for (fferpcore.Context.StaticSource source : sources)
    {
        System.debug(source.getDescription + ': ' + String.valueOf(source.getData()))
    }
}

getData

global override Object getData(fferpcore.DataSource.Row row)

This method returns the data this StaticSource was constucted with. The fferpcore.DataSource.Row parameter has no effect.

Input Parameters

Name Type Description
row fferpcore.DataSource.Row This parameter is ignored.

Return Value

This service returns an Object 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.

fferpcore.Context.StaticSource source = new fferpcore.Context.StaticSource(6, 'Sides on a cube');
fferpcore.DataSource.Row row = new DataSourceImpl.RowImpl();
System.assertEquals(6, source.getData(row));

fferpcore.Context.PassthroughSource

global class PassthroughSource extends Source

A PassthroughSource structure. A Passthrough source retains and passes the context received to any nodes beneath it. Passthrough sources can only be put onto MapNodes. This class/type extends Context.Source.

This class extends fferpcore.Context.Source

Methods

PassthroughSource

global PassthroughSource()

The default constructor for a PassthroughSource.

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.

fferpcore.MessageDescription.MapNode node = new fferpcore.MessageDescription.MapNode(new fferpcore.Context.PassthroughSource());

System.assertEquals(fferpcore.Context.SourceType.PASSTHROUGH, node.getSource().getType());

PassthroughSource

global PassthroughSource(String description)

The default constructor for a PassthroughSource.

Input Parameters

Name Type Description
description String The description we want to give to this source.

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.

fferpcore.MessageDescription.MapNode node = new fferpcore.MessageDescription.MapNode(new fferpcore.Context.PassthroughSource('Foo'));

fferpcore.Context.Source source = node.getSource();

System.assertEquals(fferpcore.Context.SourceType.PASSTHROUGH, source.getType());

System.assertEquals('Foo', source.getDisplayDescription().description);

getKey

global override String getKey()

This method returns null as a passthrough source is not known by the current context. This method will return null no matter what.

Return Value

The key by which the originating Context knows this Source, or null for the Root Source or a Source that stands alone such as Static or Passthrough Sources.

getDisplayDescription

global override fferpcore.Context.DisplayDescription getDisplayDescription()

This method returns information about the source to display. This method is used by the user interface to display information about the source.

Return Value

Information for display of this Source to the user.

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.

fferpcore.Context.StaticSource source = new fferpcore.Context.StaticSource('blue', 'Example color');

fferpcore.Context.DisplayDescription description = source.getDisplayDescription();

prepare

global override fferpcore.DataSource prepare(fferpcore.DataSource parentSource)

This method returns the same datasource that was input. This is because a Passthrough Source retains the same context that was given to it so the fferpcore.DataSource does not have to do any work.

Input Parameters

Name Type Description
parentSource fferpcore.DataSource The DataSource that we want to get setup to get information from.

Return Value

This service returns a DataSource 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.

This method always returns the input DataSource despite what happens to the object

setInputContext

global override void setInputContext(fferpcore.Context ctx)

This method passes the parent context down to any potential child sources.

Input Parameters

Name Type Description
ctx fferpcore.Context The context of the parent we want to pass down.

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.

fferpcore.Context.PassthroughSource sourceExample = new fferpcore.Context.PassthroughSource();

sourceExample.setInputContext(new fferpcore.Context.SObjectContext(ExampleObject__c.SObjectType));

ferpcore.Context.SObjectContext context = sourceExample.getOutputContext();

canGetComplexData

global override Boolean canGetComplexData()

This method returns true since a Passthrough Source is capable of providing complex data for any child nodes. Unlike StaticSources which cannot provide complex data as they simply represent a fixed value.

Return Value

True if this source is capable of providing complex data for child nodes.

getOutputContext

global override fferpcore.Context getOutputContext()

Returns the output context associated with this node. For a PassthroughSource, the output context is always the same as the input context.

Return Value

Context describing the complex data. Only applicable if canGetComplexData is true.

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.

fferpcore.Context.PassthroughSource source = new fferpcore.Context.PassthroughSource('Example');
fferpcore.Context.SObjectContext context = new fferpcore.Context.SObjectContext(Account.SObjectType);
source.setInputContext(context);
System.assertEquals(context, source.getOutputContext());

getChildRow

global override fferpcore.DataSource.Row getChildRow(fferpcore.DataSource.Row inputRow)

Returns the fferpcore.DataSource.Row for children to build from. This is only applicable if canGetComplexData is true. The default behavior is to return the input parameter without modification.

Input Parameters

Name Type Description
inputRow fferpcore.DataSource.Row The current row on the DataSource from which to get the information.

Return Value

Row for children to build from. Only applicable if canGetComplexData is true.

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.

//When called on a PassthroughSource, getChildRow always returns the input parameter.

getType

global override fferpcore.Context.SourceType getType()

This method is used as an indication that this source is a PassthroughSource without having to perform type checks on the object.

Return Value

This service returns a SourceType 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.

fferpcore.Context.PassthroughSource source = new fferpcore.Context.PassthroughSource('pts');

if(source.getType() == fferpcore.Context.SourceType.FROM_CONTEXT)
{
    ...
}
else if (source.getType() == fferpcore.Context.SourceType.LITERAL)
{
    ...
}
else if (source.getType() == fferpcore.Context.SourceType.PASSTHROUGH)
{
    ...
}

fferpcore.Context.CorrelationSource

global class CorrelationSource extends Source

The source of the data is a field on an SObject. Unless empty, when it uses an additional fallback field.

This class extends fferpcore.Context.Source

Methods

CorrelationSource

global CorrelationSource(SObjectField field, SObjectField fallbackField)

Construct the source using the primary and fallback fields from an SObject.

Input Parameters

Name Type Description
field SObjectField The field on the SObject we want to associate this source with.
fallbackField SObjectField The fallback field to use if the original field is empty.

getDisplayDescription

global override fferpcore.Context.DisplayDescription getDisplayDescription()

This method returns information about the source to display. This method is used by the user interface to display information about the source.

Return Value

This service returns a DisplayDescription object.

canGetScalarData

global override Boolean canGetScalarData()

Returns true to indicate this node can hold scalar type data.

Return Value

The default implementation of this method returns true.

getScalarDataType

global override fferpcore.DataType getScalarDataType()

This method returns the data type name for the scalar data associated with this source.

Return Value

This service returns a DataType object.

getType

global override fferpcore.Context.SourceType getType()

This method is used as an indication that this source is a CorrelationSource without having to perform type checks on the object.

Return Value

This service returns a SourceType object.

prepare

global override fferpcore.DataSource prepare(fferpcore.DataSource dataSource)

This method prepares the input fferpcore.DataSource so that it knows what fields are required to build the message.

Input Parameters

Name Type Description
dataSource fferpcore.DataSource The DataSource that we want to get setup to get information from.

Return Value

This service returns a DataSource object.

getData

global override Object getData(fferpcore.DataSource.Row row)

This method returns the data relating to the DataSource.Row. It reads the information about the field specified in the initial constructor. If the field is empty, it instead reads the fallback field. If the field cannot be found, it returns null.

Input Parameters

Name Type Description
row fferpcore.DataSource.Row A wrapper to access the data.

Return Value

This service returns an Object object.

fferpcore.Context.ListSource

global class ListSource extends Source

The source of the data is a list of child records on an SObject.

This class extends fferpcore.Context.Source

Methods

ListSource

global ListSource(SObjectType childType, SObjectField childLookupField)

Construct a ListSource.

Input Parameters

Name Type Description
childType SObjectType The SObjectType of the child records.
childLookupField SObjectField The SObjectField on the child looking up to the parent.

ListSource

global ListSource(Schema.ChildRelationship childRelationship)

Construct a ListSource.

Input Parameters

Name Type Description
childRelationship Schema.ChildRelationship The ChildRelationship between the child records and parent.

getKey

global override String getKey()

This method returns the key by which the originating fferpcore.Context knows this Source. This method is used by the Publication Description user interface.

Return Value

This service returns a String object.

getDisplayDescription

global override fferpcore.Context.DisplayDescription getDisplayDescription()

This method returns information about the source to display. This method is used by the user interface to display information about the source.

Return Value

This service returns a DisplayDescription object.

canGetListData

global override Boolean canGetListData()

This method returns whether or not a source is capable of providing data for list nodes.

Return Value

This service returns a Boolean object.

getOutputContext

global override fferpcore.Context getOutputContext()

This method returns the context that this source is currently in. A ListSource will return the child SObject that is associated with the source.

Return Value

This service returns a Context object.

getListRows

global override Iterator<fferpcore.DataSource.Row> getListRows(fferpcore.DataSource.Row inputRow)

This method should be implemented to return an iterator of rows for the child records that this source is in reference to.

Input Parameters

Name Type Description
inputRow fferpcore.DataSource.Row The current row on the DataSource from which to get the information.

Return Value

Iterator of child rows to build from.

getType

global override fferpcore.Context.SourceType getType()

This method is used as an indication that this source is a ListSource without having to perform type checks on the object.

Return Value

This service returns a SourceType object.

prepare

global override fferpcore.DataSource prepare(fferpcore.DataSource dataSource)

This method prepares the input fferpcore.DataSource so that it knows what fields are required to build the message.

Input Parameters

Name Type Description
dataSource fferpcore.DataSource The DataSource that we want to get setup to get information from.

Return Value

This service returns a DataSource object.