fferpcore.Contextglobal inherited sharing 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. EnumsSourceType
Methods
getClassglobal abstract Type getClass() This method is provided to support serialization to Javascript. This method returns the class type of the associated context. This method must be implemented by a class that implements Context. Return ValueThis 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()); getInitMementoglobal abstract String getInitMemento() This method is provided to support serialization to Javascript. This method returns a string that describes the SObject to which the context is associated. This method must be implemented by a class that implements Context. Return ValueThis 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()); initialiseglobal abstract void initialise(String memento) This method is provided to support deserialization from Javascript. This method restores the state of the context ready for use. This method must be implemented by a class that implements Context. Input Parameters
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()); getDisplayDescriptionglobal abstract fferpcore.Context.DisplayDescription getDisplayDescription() This method returns information about the source to display. This method must be implemented by a class that implements Context. Return ValueInformation 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(); getPotentialChildrenglobal abstract List<fferpcore.Context.Source> getPotentialChildren() This method returns a complete list of the 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 that implements Context. Return ValueThe 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()); getSourceglobal abstract fferpcore.Context.Source getSource(String key) This method looks up a source by its key. This method must be implemented by a class that implements Context. Input Parameters
Return ValueLook 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.DisplayDescriptionglobal inherited sharing class DisplayDescription implements ObjectIO.SerializableObject A class that contains information about contexts and sources to be displayed on the user interface. Properties
Methods
DisplayDescriptionglobal DisplayDescription(String elementType, String nameLabel, String name, String descriptionLabel, String description) Constructs a Context.DisplayDescription. Input Parameters
DisplayDescriptionglobal DisplayDescription(String elementType, String nameLabel, String name, String relationshipName, String descriptionLabel, String description) Constructs a Context.DisplayDescription. Input Parameters
fferpcore.Context.SObjectContextglobal virtual inherited sharing class SObjectContext extends Context implements VirtualDataObject.Accessible An SObjectContext structure. This class/type extends Context. This class implements the following interfaces: Methods
SObjectContextglobal 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(); SObjectContextglobal SObjectContext(Schema.SObjectType type) This constructor relates this object with a specific SObject type. The methods from this class will make use of that SObject type. Input Parameters
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()); getClassglobal virtual override Type getClass() This method is provided to support serialization to Javascript. This method returns the class type of the associated context. Return ValueThis 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()); getInitMementoglobal virtual override String getInitMemento() This method is provided to support serialization to Javascript. This method returns a string that describes the SObject with which the context is associated. Return ValueThis 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()); initialiseglobal virtual override void initialise(String memento) This method is provided to support deserialization from Javascript. This method creates a new context ready for use. Input Parameters
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()); getDisplayDescriptionglobal virtual override fferpcore.Context.DisplayDescription getDisplayDescription() This method returns information about the source to display. Return ValueThis 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(); getPotentialChildrenglobal virtual override List<fferpcore.Context.Source> getPotentialChildren() This method returns a complete list of the fields on this particular SObject that are in the form of a Context.Source. Return ValueThis 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()); getSourceglobal virtual override fferpcore.Context.Source getSource(String key) This method looks up a source by using its key if that key is related to the current context. Input Parameters
Return ValueThis 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.Sourceglobal inherited sharing abstract class Source This class represents the source of information for each of the nodes. This is an abstract class and all abstract methods must be implemented for use. Methods
getKeyglobal 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 ValueThe 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()); getDisplayDescriptionglobal abstract fferpcore.Context.DisplayDescription getDisplayDescription() This method returns information about the source to display. This method must be implemented by a class that implements Context.Source. Return ValueInformation 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(); setInputContextglobal virtual void setInputContext(fferpcore.Context parent) This method passes the parent context down to any potential child sources. The default behavior of this method is to do nothing. This is required for some sources. An example Source which does this is Context.PassthroughSource. Input Parameters
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(); prepareglobal virtual fferpcore.DataSource prepare(fferpcore.DataSource dataSource) This method prepares the input fferpcore.DataSource so that it knows which data is required to build this Source. If the fferpcore.DataSource contains complex data, the fferpcore.DataSource for its child data is returned. Otherwise null is returned. Input Parameters
Return ValueThe datasource for child data if this DataSource returns complex data. Otherwise null. 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()); prepareglobal virtual fferpcore.DataSource prepare(fferpcore.DataSource dataSource, Intent intent) Prepare the given fferpcore.DataSource so this Source can obtain and update the necessary data. Input Parameters
Return ValueThe DataSource for the lookup or child data. Otherwise null. canGetScalarDataglobal 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 ValueTrue 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()); getScalarDataTypeglobal 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 ValueThe 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()); getDataglobal virtual Object getData(fferpcore.DataSource.Row row) This method returns the scalar data relating to the DataSource.Row. Return ValueScalar 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(); getDataglobal virtual Object getData(fferpcore.VirtualDataObject.Record record) This method returns the scalar data relating to the VirtualDataObject.Record. Return ValueScalar data relating to the VirtualDataObject.Record. Only applicable if canGetScalarData is true. getDataOptionalglobal virtual fferpcore.OptionalValue getDataOptional(fferpcore.DataSource.Row row) Input Parameters
Return ValueNull if the row has no value, otherwise an OptionalValue containing the data. canGetComplexDataglobal virtual Boolean canGetComplexData() This method returns whether this source is capable of providing complex data for child nodes. By default, this method returns false. Return ValueTrue 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()); canGetListDataglobal virtual Boolean canGetListData() This method returns whether a source is capable of providing data for list nodes. By default, this method returns false. Return ValueTrue if this source is capable of providing data for list nodes. getOutputContextglobal virtual fferpcore.Context getOutputContext() This method returns the current context of this source. 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 ValueContext 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(); getChildRowglobal virtual fferpcore.DataSource.Row getChildRow(fferpcore.DataSource.Row inputRow) This method should be implemented to return a wrapper for the field to which this source refers. Input Parameters
Return ValueRow 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) getChildRowglobal virtual fferpcore.VirtualDataObject.Record getChildRow(fferpcore.VirtualDataObject.Record record) This method should be implemented to return a wrapper for the field to which this source refers. Input Parameters
Return ValueRecord for children to build from. Only applicable if canGetComplexData is true. getChildRowOptionalglobal virtual fferpcore.OptionalValue getChildRowOptional(fferpcore.DataSource.Row inputRow) Input Parameters
Return ValueNull if the row has no child row, otherwise an OptionalValue containing the data. getListRowsglobal 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 references. Input Parameters
Return ValueIterator of child rows to build from. Only applicable if canGetListData is true. getListRowsglobal virtual fferpcore.VirtualDataObject.RecordList getListRows(fferpcore.VirtualDataObject.Record record) This method should be implemented to return a record list for the child records that this source references. Input Parameters
Return ValueRecord list to build from. Only applicable if canGetListData is true. getTypeglobal abstract fferpcore.Context.SourceType getType() This method should be used as an indication of whether this is one of the Foundations static sources, or whether it came from a Context. This method must be implemented by a class that implements Context.Source. Return ValueIndication of whether this is one of the Foundations 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()); hasAccessglobal 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 ValueTrue if the current user would normally have access to this data. putDataglobal virtual void putData(fferpcore.DataSource.Row row, Object data) Set the data at this Source on the given DataSource.Row. Input Parameters
addErrorglobal virtual void addError(fferpcore.DataSource.Row row, String errorMessage) Add an error at this Source on the given DataSource.Row. Input Parameters
getAsAccessibleglobal virtual fferpcore.VirtualDataObject.Accessible getAsAccessible() Return ValueThe accessibility of the Source. fferpcore.Context.SObjectSourceglobal inherited sharing 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
SObjectSourceglobal 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
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); getKeyglobal 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 ValueThis 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()); getDisplayDescriptionglobal 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 ValueThis 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(); canGetScalarDataglobal 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 ValueThis 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()); getScalarDataTypeglobal override fferpcore.DataType getScalarDataType() This method returns the data type name for the scalar data associated with this source. Return ValueThis 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()); canGetComplexDataglobal override Boolean canGetComplexData() This method returns whether or not this source is capable of providing complex data for child nodes. Return ValueThis 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()); getOutputContextglobal 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 ValueThis 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(); getChildRowglobal override fferpcore.DataSource.Row getChildRow(fferpcore.DataSource.Row inputRow) This method returns a wrapper for the field to which this source refers. 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
Return ValueThis 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); getTypeglobal 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 ValueThis 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) { ... } prepareglobal override fferpcore.DataSource prepare(fferpcore.DataSource dataSource) This method prepares the input fferpcore.DataSource so that it knows which 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
Return ValueThis 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); getDataglobal 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
Return ValueThis 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.StaticSourceglobal inherited sharing 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
StaticSourceglobal 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
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')); } StaticSourceglobal 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
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')); } getKeyglobal 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 ValueThis 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()); getDisplayDescriptionglobal 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 ValueThis 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(); canGetScalarDataglobal override Boolean canGetScalarData() Returns true to indicate this node can hold scalar type data. Return ValueThe 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()); getScalarDataTypeglobal 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 ValueThis 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)); getTypeglobal 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 ValueThis 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) { ... } getDataglobal Object getData() This method returns the data this StaticSource was constucted with. Return ValueThis 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()); getDescriptionglobal String getDescription() Returns the description specified when this StaticSource was constructed. Return ValueThis 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())) } } getDataglobal 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
Return ValueThis 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.PassthroughSourceglobal inherited sharing 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
PassthroughSourceglobal 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()); PassthroughSourceglobal PassthroughSource(String description) The default constructor for a PassthroughSource. Input Parameters
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); getKeyglobal 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 ValueThe 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. getDisplayDescriptionglobal 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 ValueInformation 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(); prepareglobal 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
Return ValueThis 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 setInputContextglobal override void setInputContext(fferpcore.Context ctx) This method passes the parent context down to any potential child sources. Input Parameters
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(); canGetComplexDataglobal 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 ValueTrue if this source is capable of providing complex data for child nodes. getOutputContextglobal 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 ValueContext 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()); getChildRowglobal 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
Return ValueRow 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. getTypeglobal 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 ValueThis 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.CorrelationSourceglobal inherited sharing 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
CorrelationSourceglobal CorrelationSource(SObjectField field, SObjectField fallbackField) Construct the source using the primary and fallback fields from an SObject. Input Parameters
getDisplayDescriptionglobal 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 ValueThis service returns a DisplayDescription object. canGetScalarDataglobal override Boolean canGetScalarData() Returns true to indicate this node can hold scalar type data. Return ValueThe default implementation of this method returns true. getScalarDataTypeglobal override fferpcore.DataType getScalarDataType() This method returns the data type name for the scalar data associated with this source. Return ValueThis service returns a DataType object. getTypeglobal 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 ValueThis service returns a SourceType object. prepareglobal override fferpcore.DataSource prepare(fferpcore.DataSource dataSource) This method prepares the input fferpcore.DataSource so that it knows which fields are required to build the message. Input Parameters
Return ValueThis service returns a DataSource object. getDataglobal 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
Return ValueThis service returns an Object object. fferpcore.Context.CompositeSourceglobal inherited sharing class CompositeSource extends Source Contains the source of data resulting from several sources chained together. This can be used to obtain data from related records using multiple lookup fields. This class extends fferpcore.Context.Source Methods
CompositeSourceglobal CompositeSource(List<Schema.SObjectField> fields) Constructs a CompositeSource. Input Parameters
CompositeSourceglobal CompositeSource(List<fferpcore.Context.Source> sources) Constructs a CompositeSource. Input Parameters
getKeyglobal override String getKey() This method returns the key by which the originating fferpcore.Context identifies this Source. This method is used by the Publication Description user interface. Return ValueThis service returns a String object. getDisplayDescriptionglobal 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 ValueThis service returns a DisplayDescription object. prepareglobal override fferpcore.DataSource prepare(fferpcore.DataSource dataSource) This method prepares the input fferpcore.DataSource so that it knows which fields are required to build the message. Input Parameters
Return ValueThis service returns a DataSource object. canGetScalarDataglobal override Boolean canGetScalarData() This method returns whether this source can return scalar data. Return ValueThis service returns a Boolean object. getScalarDataTypeglobal override fferpcore.DataType getScalarDataType() This method returns the data type name for the scalar data associated with this source. Return ValueThis service returns a DataType object. getDataglobal override Object getData(fferpcore.DataSource.Row row) This method returns the data relating to the DataSource.Row. Input Parameters
Return ValueThis service returns an Object object. canGetComplexDataglobal override Boolean canGetComplexData() This method returns whether this source is capable of providing complex data for child nodes. Return ValueThis service returns a Boolean object. getOutputContextglobal override fferpcore.Context getOutputContext() This method returns the context that this source is currently in. A CompositeSource returns the SObject that is associated with the last source. Return ValueThis service returns a Context object. getChildRowglobal override fferpcore.DataSource.Row getChildRow(fferpcore.DataSource.Row inputRow) This method returns a wrapper for the field to which this source refers. Input Parameters
Return ValueThis service returns a DataSource.Row object. getTypeglobal override fferpcore.Context.SourceType getType() This method is used as an indication that this source is a CompositeSource without having to perform type checks on the object. Return ValueThis service returns a SourceType object. fferpcore.Context.ListSourceglobal inherited sharing 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
ListSourceglobal ListSource(SObjectType childType, SObjectField childLookupField) Construct a ListSource. Input Parameters
ListSourceglobal ListSource(Schema.ChildRelationship childRelationship) Construct a ListSource. Input Parameters
withFilterglobal fferpcore.Context.ListSource withFilter(fferpcore.PublicationMatcher filter) Provides a fferpcore.PublicationMatcher that is used to filter the child records added to the message. Input Parameters
Return ValueThe original ListSource instance. This enables further methods to be invoked. withParentTypeglobal fferpcore.Context.ListSource withParentType(SObjectType parentType) Provides a parent object type. This is necessary for relationships with ambiguous lookup fields. For example, the ParentId field on the Attachment object. Input Parameters
Return ValueThe original ListSource instance. This enables further methods to be invoked. getKeyglobal 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 ValueThis service returns a String object. getDisplayDescriptionglobal 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 ValueThis service returns a DisplayDescription object. canGetListDataglobal override Boolean canGetListData() This method returns whether or not a source is capable of providing data for list nodes. Return ValueThis service returns a Boolean object. getOutputContextglobal 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 ValueThis service returns a Context object. getListRowsglobal 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
Return ValueIterator of child rows to build from. getTypeglobal 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 ValueThis service returns a SourceType object. prepareglobal override fferpcore.DataSource prepare(fferpcore.DataSource dataSource) This method prepares the input fferpcore.DataSource so that it knows which fields are required to build the message. Input Parameters
Return ValueThis service returns a DataSource object. fferpcore.Context.MapSourceglobal inherited sharing class MapSource extends Source implements ObjectIO.ActivatableObject MapSource represents a scalar value that is accessed from a fferpcore.DataSource using a string key. When constructing a message, a value with the key of this source can be given to a custom DataSource. Methods
MapSourceglobal MapSource(String key, String description, fferpcore.DataType dataType) This constructor creates a static source with the specified data and description. It can be used to provide constant values in messages. Input Parameters
getKeyglobal 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 ValueThis service returns a String object. getDescriptionglobal String getDescription() This method returns the description of this Source. This method is used by the Publication Description user interface. Return ValueThis service returns a String object. getDisplayDescriptionglobal 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 ValueThis service returns a DisplayDescription object. canGetScalarDataglobal override Boolean canGetScalarData() This method returns true since the data represented is scalar. Return ValueThis service returns a Boolean object. getScalarDataTypeglobal override fferpcore.DataType getScalarDataType() This method returns the data type name for the scalar data associated with this source. Return ValueThis service returns a DataType object. getTypeglobal override fferpcore.Context.SourceType getType() This method is used as an indication that this source is a MapSource without having to perform type checks on the object. Return ValueThis service returns a SourceType object. getDataglobal override Object getData(fferpcore.DataSource.Row row) This method returns the data relating to the DataSource.Row. Information about the field specified in the initial constructor of an SObjectSource is read and returned. If the field cannot be found, the method returns null. Input Parameters
Return ValueThis service returns an Object object. fferpcore.Context.FallbackSourceglobal inherited sharing class FallbackSource extends Source A dynamic source of data that uses the first source in the list that has a value other than null. This class extends fferpcore.Context.Source MethodsFallbackSourceglobal FallbackSource(List<fferpcore.Context.Source> sources) Construct a FallbackSource with the given sources. Input Parameters
|