Package org.apache.unomi.sfdc.services
Interface SFDCService
-
- All Known Implementing Classes:
SFDCServiceImpl
public interface SFDCService
Public interface for the Salesforce connector
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description String
createOrUpdateLead(Profile profile)
Create or update a lead based on a Unomi profile.Set<String>
findLeadIdsByIdentifierValue(String identifierFieldValue)
Map<String,Object>
getLead(String leadId)
Map<String,Object>
getLimits()
Set<String>
getRecentLeadIds()
SFDCSession
getSFDCSession()
SFDCConfiguration
loadConfiguration()
Load the configuration from the persistence service (if it exists)boolean
login(SFDCConfiguration sfdcConfiguration)
Login into Salesforce using the configuration passed in the methods arguments.void
logout()
Map<String,Object>
query(String query)
boolean
saveConfiguration(SFDCConfiguration sfdcConfiguration)
Save a Salesforce configuration into the persistence serviceboolean
updateProfileFromLead(Profile profile)
Updates a Unomi profile from a Salesforce lead
-
-
-
Method Detail
-
loadConfiguration
SFDCConfiguration loadConfiguration()
Load the configuration from the persistence service (if it exists)- Returns:
- an instance of the configuration if it was found, null otherwise
-
saveConfiguration
boolean saveConfiguration(SFDCConfiguration sfdcConfiguration)
Save a Salesforce configuration into the persistence service- Parameters:
sfdcConfiguration
- the configuration to persist- Returns:
- a boolean indicating if the save was successful or not
-
login
boolean login(SFDCConfiguration sfdcConfiguration) throws org.apache.http.HttpException, IOException
Login into Salesforce using the configuration passed in the methods arguments.- Parameters:
sfdcConfiguration
- the configuration to use for the login- Returns:
- true if the login was successful, false otherwise
- Throws:
org.apache.http.HttpException
- thrown if there was an error communicating with the Salesforce serverIOException
- thrown if there was an error communicating with the Salesforce server
-
getSFDCSession
SFDCSession getSFDCSession()
-
logout
void logout()
-
createOrUpdateLead
String createOrUpdateLead(Profile profile)
Create or update a lead based on a Unomi profile.- Parameters:
profile
- the Unomi profile to use to update leads- Returns:
- a String containing the identifier of the corresponding SFDC lead
-
updateProfileFromLead
boolean updateProfileFromLead(Profile profile)
Updates a Unomi profile from a Salesforce lead- Parameters:
profile
- the profile to update with the data coming from the lead- Returns:
- true if the profile was updated, false otherwise.
-
-