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
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | 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
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | 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
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | 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();
|
|