public class SFDCServiceImpl extends Object implements SFDCService
Constructor and Description |
---|
SFDCServiceImpl() |
Modifier and Type | Method and Description |
---|---|
String |
createOrUpdateLead(Profile profile)
Create or update a lead based on a Unomi profile.
|
boolean |
deleteLead(String leadId) |
Set<String> |
findLeadIdsByIdentifierValue(String identifierFieldValue) |
Map<String,Object> |
getLead(String leadId) |
Set<String> |
getLeadMandatoryFields() |
Map<String,Object> |
getLimits() |
Set<String> |
getRecentLeadIds() |
SFDCSession |
getSFDCSession() |
Map<String,Object> |
getSObject(String sobjectName,
String objectId) |
Map<String,Object> |
getSObjectDescribe(String sobjectName) |
boolean |
isConfigured() |
boolean |
isConnected() |
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 service
|
void |
setDefaultSFDCConfiguration(SFDCConfiguration defaultSFDCConfiguration) |
void |
setPersistenceService(PersistenceService persistenceService) |
void |
setupPushListener(String channelName,
org.cometd.bayeux.client.ClientSessionChannel.MessageListener messageListener) |
void |
start() |
void |
stop() |
boolean |
updateProfileFromLead(Profile profile)
Updates a Unomi profile from a Salesforce lead
|
public void setPersistenceService(PersistenceService persistenceService)
public void setDefaultSFDCConfiguration(SFDCConfiguration defaultSFDCConfiguration)
public SFDCSession getSFDCSession()
getSFDCSession
in interface SFDCService
public SFDCConfiguration loadConfiguration()
SFDCService
loadConfiguration
in interface SFDCService
public boolean saveConfiguration(SFDCConfiguration sfdcConfiguration)
SFDCService
saveConfiguration
in interface SFDCService
sfdcConfiguration
- the configuration to persistpublic void start()
public void stop()
public Set<String> getRecentLeadIds()
getRecentLeadIds
in interface SFDCService
public Map<String,Object> getLead(String leadId)
getLead
in interface SFDCService
public boolean deleteLead(String leadId)
public Set<String> findLeadIdsByIdentifierValue(String identifierFieldValue)
findLeadIdsByIdentifierValue
in interface SFDCService
public String createOrUpdateLead(Profile profile)
SFDCService
createOrUpdateLead
in interface SFDCService
profile
- the Unomi profile to use to update leadspublic boolean updateProfileFromLead(Profile profile)
SFDCService
updateProfileFromLead
in interface SFDCService
profile
- the profile to update with the data coming from the leadpublic Map<String,Object> getLimits()
getLimits
in interface SFDCService
public void setupPushListener(String channelName, org.cometd.bayeux.client.ClientSessionChannel.MessageListener messageListener) throws Exception
Exception
public boolean login(SFDCConfiguration sfdcConfiguration) throws org.apache.http.HttpException, IOException
SFDCService
login
in interface SFDCService
sfdcConfiguration
- the configuration to use for the loginorg.apache.http.HttpException
- thrown if there was an error communicating with the Salesforce serverIOException
- thrown if there was an error communicating with the Salesforce serverpublic void logout()
logout
in interface SFDCService
public boolean isConfigured()
public boolean isConnected()
Copyright © 2014–2023 Apache Software Foundation. All rights reserved.