public class

SalesforceConnector

extends BaseSalesforceConnector
java.lang.Object
   ↳ org.mule.modules.salesforce.BaseSalesforceConnector
     ↳ org.mule.modules.salesforce.SalesforceConnector
Known Direct Subclasses
Known Indirect Subclasses

Class Overview

The Salesforce Connector will allow to connect to the Salesforce application using regular username and password via the SOAP API. Almost every operation that can be done via the Salesforce's API can be done thru this connector. This connector will also work if your Salesforce objects are customized with additional fields or even you are working with custom objects.

Integrating with Salesforce consists of web service calls utilizing XML request/response setup over an HTTPS connection. The technical details of this connection such as request headers, error handling, HTTPS connection, etc. are all abstracted from the user to make implementation quick and easy.

{@sample.config INCLUDE_ERROR}

Summary

Fields
private static final Logger LOGGER
private BulkConnection bulkConnection REST connection to the bulk API
private PartnerConnection connection Partner connection
private LoginResult loginResult Login result
private static final Set<String> parentNames
[Expand]
Inherited Fields
From class org.mule.modules.salesforce.BaseSalesforceConnector
Public Constructors
SalesforceConnector()
Public Methods
synchronized void connect(String username, String password, String securityToken, String url, String proxyHost, int proxyPort, String proxyUsername, String proxyPassword)
Creates a new Salesforce session
synchronized void destroySession()
End the current session
MetaData getMetaData(MetaDataKey key)
List<MetaDataKey> getMetaDataKeys()
String getSessionId()
Returns the session id for the current connection
boolean isConnected()
void reconnect()
Protected Methods
ConnectorConfig createConnectorConfig(String endpoint, String username, String password, String proxyHost, int proxyPort, String proxyUsername, String proxyPassword)
Create connector config
BulkConnection getBulkConnection()
PartnerConnection getConnection()
LoginResult getLoginResult()
void setBulkConnection(BulkConnection bulkConnection)
void setConnection(PartnerConnection connection)
void setLoginResult(LoginResult loginResult)
[Expand]
Inherited Methods
From class org.mule.modules.salesforce.BaseSalesforceConnector
From class java.lang.Object
From interface org.mule.api.context.MuleContextAware

Fields

private static final Logger LOGGER

private BulkConnection bulkConnection

REST connection to the bulk API

private PartnerConnection connection

Partner connection

private LoginResult loginResult

Login result

private static final Set<String> parentNames

Public Constructors

public SalesforceConnector ()

Public Methods

public synchronized void connect (String username, String password, String securityToken, String url, String proxyHost, int proxyPort, String proxyUsername, String proxyPassword)

Creates a new Salesforce session

Parameters
username Username used to initialize the session
password Password used to authenticate the user
securityToken User's security token
url Salesforce endpoint URL
proxyHost Hostname of the proxy
proxyPort Port of the proxy
proxyUsername Username used to authenticate against the proxy
proxyPassword Password used to authenticate against the proxy
Throws
ConnectionException if a problem occurred while trying to create the session
ConnectionException

public synchronized void destroySession ()

End the current session

Throws
Exception

public MetaData getMetaData (MetaDataKey key)

Parameters
key
Throws
Exception

public List<MetaDataKey> getMetaDataKeys ()

Throws
Exception

public String getSessionId ()

Returns the session id for the current connection

Returns
  • the session id for the current connection

public boolean isConnected ()

public void reconnect ()

Throws
ConnectionException

Protected Methods

protected ConnectorConfig createConnectorConfig (String endpoint, String username, String password, String proxyHost, int proxyPort, String proxyUsername, String proxyPassword)

Create connector config

Parameters
endpoint Salesforce endpoint
username Username to use for authentication
password Password to use for authentication
proxyHost
proxyPort
proxyUsername
proxyPassword

protected BulkConnection getBulkConnection ()

protected PartnerConnection getConnection ()

protected LoginResult getLoginResult ()

protected void setBulkConnection (BulkConnection bulkConnection)

Parameters
bulkConnection

protected void setConnection (PartnerConnection connection)

Parameters
connection

protected void setLoginResult (LoginResult loginResult)

Parameters
loginResult