Created
August 16, 2015 03:45
-
-
Save msrivastav13/01f18984d69c3597dc06 to your computer and use it in GitHub Desktop.
Extends the DataSource.Provider 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 an external system.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Extends the DataSource.Provider 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 an external system. | |
**/ | |
global class CurrencyDataSourceProvider extends DataSource.Provider { | |
/** | |
* Declares the types of authentication that can be used | |
* to access the external system | |
**/ | |
override global List<DataSource.AuthenticationCapability> getAuthenticationCapabilities() { | |
List<DataSource.AuthenticationCapability> capabilities =new List<DataSource.AuthenticationCapability>(); | |
//capabilities.add(DataSource.AuthenticationCapability.OAUTH); | |
capabilities.add(DataSource.AuthenticationCapability.ANONYMOUS); | |
return capabilities; | |
} | |
/** | |
* Declares the functional capabilities that the | |
* external system supports. | |
**/ | |
override global List<DataSource.Capability> getCapabilities() { | |
List<DataSource.Capability> capabilities =new List<DataSource.Capability>(); | |
capabilities.add(DataSource.Capability.ROW_QUERY); | |
//capabilities.add(DataSource.Capability.SEARCH); | |
return capabilities; | |
} | |
/** | |
* Declares the associated DataSource.Connection class. | |
**/ | |
override global DataSource.Connection getConnection(DataSource.ConnectionParams connectionParams) { | |
return new CurrencyDataSourceConnection(connectionParams); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment