Packaged abstract class
Namespace: overcast
Extends ComponentPluginV5
Implements Loggable
The ComponentPluginV6 abstract class provides a way for Overcast Components to execute custom code.
See the Overcast Component Plugin Template for the full implementation example.
The class and method visibility must be global so the Overcast managed package can call it.
Implement the necessary functions by overriding them.
(ComponentPlugin) beforeScenarioCall(recordId, referenceFieldValues, importParameters, settings)
(ComponentPlugin) afterScenarioCall(returnedData, cmp, settings)
(ComponentPluginV2) afterComponentMetadataLoaded(recordId, cmp)
(ComponentPluginV2) afterReferenceValuesLoaded(recordId, componentName, referenceValues)
(ComponentPluginV2) onScenarioException(ex, retData)
(ComponentPluginV3) afterReferenceValuesLoaded(recordId, componentName, referenceValues, referenceChildValues)
(ComponentPluginV4) onBackendMessageReceived(backendMessage)
(ComponentPluginV5) afterStoredDataLoaded(storedData, slpData)
(Loggable) setLogger(logger)
RollbackByException informs whether or not to create a Database Save Point to allow performing a rollback on the transaction if an exception occurs. Creating a Save Point is a DML operation, so if a web callout needs to be made in the same transaction, then this should be set to false. This property should be set in the constructor of the plugin class.
If rollbackByException is true, roll back the DML operation performed within afterScenarioCall when an exception occurs.
If rollbackByException is false, no Database SavePoint is created, and no rollback is performed.
Default value is false.
Signature
Boolean rollbackByException
This method is called when the plugin is instantiated.
Signature
void setLogger(overcast.Logger logger)
beforeScenarioCall(BeforeScenarioCallParams param)
This method is the same as ComponentPlugin.beforeScenarioCall but this method is passed the data with all inputs (inputParameters, referenceValues, etc.) merged.
Signature
void beforeScenarioCall(overcast.ComponentPluginV6.BeforeScenarioCallParams param)
Parameters
param
Type: BeforeScenarioCallParams
Parameters of type BeforeScenarioCallParams.
Return Value
Type: void
beforeReturningData(BeforeReturningDataParams param)
This method is executed just before returning data to the client. The difference from afterScenarioCall() is that in afterScenarioCall, the output of the Scenario comes across untransformed, whereas in this method, the data is input as a parameter that is then transformed by the Settings, e.g. Lookup, Picklist, etc...
Signature
void beforeReturningData(overcast.ComponentPluginV6.BeforeReturningDataParams param)
Parameters
param
Type: BeforeReturningDataParams
Parameters of type BeforeReturningDataParams.
Return Value
Type: void
getScenarioName(GetScenarioNameParams param)
This method is Gets the scenario name for switching the scenario. Used to run a scenario other than the one specified in the component, called before beforeScenarioCall().
Signature
string getScenarioName(overcast.ComponentPluginV6.GetScenarioNameParams param)
Parameters
param
Type: GetScenarioNameParams
Parameters of type GetScenarioNameParams.
Return Value
Type: string
Name of the scenario you actually want to run.
This class is a parameter class for beforeScenarioCall.
Properties
recordId
Type: Id
The ID of the record for the page the Component is executing on. For example, if the Component is on an Account detail screen, recordId will be the ID of the Account the user has on screen.
parameters
Type: Map<String, Object>
Data sent to the backend system, including values set in the Component Field setting. It can be added, deleted, or modified.
settings
Type: Map<String, Object>
The Parameter Mapping configuration defined as Settings. Allows the custom values that have been defined in the Component Definition to be read and used in this method for custom processing.
This class is a parameter class for beforeReturningData.
Properties
recordId
Type: Id
The ID of the record for the page the Component is executing on. For example, if the component is on an Account detail screen, recordId will be the ID of the Account the user has on screen.
returnData
Type: Map<String, Object>
In addition to the output from the Scenario, the data includes values that have been changed or added by the Settings. It can be added, deleted, or modified.
settings
Type: Map<String, Object>
The Parameter Mapping configuration defined as Settings. Allows the custom values that have been defined in the Component Definition to be read and used in this method for custom processing.
This class is a parameter class for getScenarioName.
Properties
recordId
Type: Id
The ID of the record for the page the Component is executing on. For example, if the Component is on an Account detail screen, recordId will be the ID of the Account the user has on screen.
parameters
Type: Map<String, Object>
Data sent to the backend system, including values set in the Component Field setting. It can be added, deleted, or modified.
referenceFieldValues
Type: Map<String,Object>
A collection of all the reference values that have been loaded from the database from the configured parameter mappings.
settings
Type: Map<String, Object>
The Parameter Mapping configuration defined as Settings. Allows the custom values that have been defined in the Component Definition to be read and used in this method for custom processing.