Class SFDCServiceImpl
java.lang.Object
org.apache.unomi.sfdc.services.internal.SFDCServiceImpl
- All Implemented Interfaces:
SFDCService
Implementation of the Salesforce connector interface
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateOrUpdateLead(Profile profile) Create or update a lead based on a Unomi profile.booleandeleteLead(String leadId) findLeadIdsByIdentifierValue(String identifierFieldValue) getSObject(String sobjectName, String objectId) getSObjectDescribe(String sobjectName) booleanbooleanLoad the configuration from the persistence service (if it exists)booleanlogin(SFDCConfiguration sfdcConfiguration) Login into Salesforce using the configuration passed in the methods arguments.voidlogout()booleansaveConfiguration(SFDCConfiguration sfdcConfiguration) Save a Salesforce configuration into the persistence servicevoidsetDefaultSFDCConfiguration(SFDCConfiguration defaultSFDCConfiguration) voidsetPersistenceService(PersistenceService persistenceService) voidsetupPushListener(String channelName, org.cometd.bayeux.client.ClientSessionChannel.MessageListener messageListener) voidstart()voidstop()booleanupdateProfileFromLead(Profile profile) Updates a Unomi profile from a Salesforce lead
-
Constructor Details
-
SFDCServiceImpl
public SFDCServiceImpl()
-
-
Method Details
-
setPersistenceService
-
setDefaultSFDCConfiguration
-
getSFDCSession
- Specified by:
getSFDCSessionin interfaceSFDCService
-
loadConfiguration
Description copied from interface:SFDCServiceLoad the configuration from the persistence service (if it exists)- Specified by:
loadConfigurationin interfaceSFDCService- Returns:
- an instance of the configuration if it was found, null otherwise
-
saveConfiguration
Description copied from interface:SFDCServiceSave a Salesforce configuration into the persistence service- Specified by:
saveConfigurationin interfaceSFDCService- Parameters:
sfdcConfiguration- the configuration to persist- Returns:
- a boolean indicating if the save was successful or not
-
start
public void start() -
stop
public void stop() -
getRecentLeadIds
- Specified by:
getRecentLeadIdsin interfaceSFDCService
-
getSObject
-
getSObjectDescribe
-
getLead
- Specified by:
getLeadin interfaceSFDCService
-
getLeadMandatoryFields
-
deleteLead
-
findLeadIdsByIdentifierValue
- Specified by:
findLeadIdsByIdentifierValuein interfaceSFDCService
-
createOrUpdateLead
Description copied from interface:SFDCServiceCreate or update a lead based on a Unomi profile.- Specified by:
createOrUpdateLeadin interfaceSFDCService- Parameters:
profile- the Unomi profile to use to update leads- Returns:
- a String containing the identifier of the corresponding SFDC lead
-
updateProfileFromLead
Description copied from interface:SFDCServiceUpdates a Unomi profile from a Salesforce lead- Specified by:
updateProfileFromLeadin interfaceSFDCService- Parameters:
profile- the profile to update with the data coming from the lead- Returns:
- true if the profile was updated, false otherwise.
-
query
- Specified by:
queryin interfaceSFDCService
-
getLimits
- Specified by:
getLimitsin interfaceSFDCService
-
setupPushListener
public void setupPushListener(String channelName, org.cometd.bayeux.client.ClientSessionChannel.MessageListener messageListener) throws Exception - Throws:
Exception
-
login
public boolean login(SFDCConfiguration sfdcConfiguration) throws org.apache.http.HttpException, IOException Description copied from interface:SFDCServiceLogin into Salesforce using the configuration passed in the methods arguments.- Specified by:
loginin interfaceSFDCService- 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
-
logout
public void logout()- Specified by:
logoutin interfaceSFDCService
-
isConfigured
public boolean isConfigured() -
isConnected
public boolean isConnected()
-