Foundations Apex API Developer Reference

fferpcore.ApplyMessagesToObjectRequest

global interface ApplyMessagesToObjectRequest

The purpose of this interface is to allow a specific SObject to have a series of messages associated with it. All methods in this interface must be implemented in order to use them.

Methods

getSObject

SObject getSObject()

This method returns the SObject that this ApplyMessageToObjectRequest is working with. This SObject may be new or existing. This method must be implemented by a class which implements ApplyMessagesToObjectRequest.

Return Value

The object to work on. It may be new or existing.

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 ApplyMessagesToObjectRequestImpl implements fferpcore.ApplyMessagesToObjectRequest
{
    ...
}

List<fferpcore.DeliveredMessage> messages = new List<fferpcore.DeliveredMessage>{new fferpcore.DeliveredMessageImpl()};

fferpcore.ApplyMessagesToObjectRequest request = new ApplyMessagesToObjectRequestImpl(SObjectExample__c, messages);

SObject returnedObject = request.getSObject();

getMessages

List<DeliveredMessage> getMessages()

This method returns the DeliveredMessages that this ApplyMessageToObjectRequest is working with. This method must be implemented by a class which implements ApplyMessagesToObjectRequest.

Return Value

The messages pertaining to the 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 ApplyMessagesToObjectRequestImpl implements fferpcore.ApplyMessagesToObjectRequest
{
    ...
}

List<fferpcore.DeliveredMessage> messages = new List<fferpcore.DeliveredMessage>{new fferpcore.DeliveredMessageImpl()};

fferpcore.ApplyMessagesToObjectRequest request = new ApplyMessagesToObjectRequestImpl(SObjectExample__c, messages);

List<fferpcore.DeliveredMessage> returnedMessages = request.getMessages();

preventSave

void preventSave()

This method attempts to prevent the saving of the SObject ApplyMessageToObjectRequest is working with. This method must be implemented by a class which implements ApplyMessagesToObjectRequest.

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 ApplyMessagesToObjectRequestImpl implements fferpcore.ApplyMessagesToObjectRequest
{
    ...
}

List<fferpcore.DeliveredMessage> messages = new List<fferpcore.DeliveredMessage>{new fferpcore.DeliveredMessageImpl()};

fferpcore.ApplyMessagesToObjectRequest request = new ApplyMessagesToObjectRequestImpl(SObjectExample__c, messages);

request.preventSave();
© Copyright 2009–2024 Certinia Inc. All rights reserved. Various trademarks held by their respective owners.