Provider Class

Extend this base class to create a custom adapter for Lightning Connect. The class informs Salesforce of the functional and authentication capabilities that are supported by or required to connect to the external system.

Namespace

DataSource

Usage

Create an Apex class that extends DataSource.Provider to specify the following.
  • The types of authentication that can be used to access the external system
  • The features that are supported for the connection to the external system
  • The Apex class that extends DataSource.Connection to sync the external system’s schema and to handle the queries and searches of the external data

The values that are returned by the DataSource.Provider class determine which settings are available in the external data source definition in Salesforce. To access the external data source definition from Setup, enter External Data Sources in the Quick Find box, then select External Data Sources.

Provider Methods

The following are methods for Provider.

getAuthenticationCapabilities()

Returns the types of authentication that can be used to access the external system.

Signature

public List<DataSource.AuthenticationCapability> getAuthenticationCapabilities()

getCapabilities()

Returns the functional operations that the external system supports and the required endpoint settings for the external data source definition in Salesforce.

Signature

public List<DataSource.Capability> getCapabilities()

Return Value

Type: List<DataSource.Capability>

getConnection(connectionParams)

Returns a connection that points to an instance of the external data source.

Signature

public DataSource.Connection getConnection(DataSource.ConnectionParams connectionParams)

Parameters

connectionParams
Type: DataSource.ConnectionParams
Credentials for authenticating to the external system.

Return Value

Type: DataSource.Connection