@Connector(name="sfdc-composite", schemaVersion="6.0", friendlyName="Salesforce Composite", minMuleVersion="3.7") @ReconnectOn(exceptions=InvalidSessionException.class) @RequiresEnterpriseLicense(allowEval=true) public class SalesforceCompositeConnector extends Object
Constructor and Description |
---|
SalesforceCompositeConnector() |
Modifier and Type | Method and Description |
---|---|
Map<String,Object> |
createSobjectTree(String type,
List<Map<String,Object>> sObjects)
Sends a list of SObject trees to Salesforce to be created.
|
List<Map<String,Object>> |
executeCompositeBatch(List<Map<String,Object>> subRequests,
org.mule.api.MuleEvent event)
Sends all the sub-requests in one batch for execution to server.
|
ApplicationContext |
getApplicationContext() |
Config |
getConnectorConfig()
Get composite config.
|
String |
getSubRequestCorrelationId(org.mule.api.MuleEvent muleEvent) |
Map<String,Object> |
postCreate(Map<String,Object> createResult,
String subRequestCorrelationId,
org.mule.api.MuleEvent muleEvent)
The purpose of this method is to provide metadata for the result of create.
|
void |
postDelete(Map<String,Object> deleteResult,
String subRequestCorrelationId,
org.mule.api.MuleEvent muleEvent)
The purpose of this method is to provide metadata for the result of delete.
|
Map<String,Object> |
postGetLimits(Map<String,Object> getLimitsResult,
String subRequestCorrelationId,
org.mule.api.MuleEvent muleEvent)
The purpose of this method is to provide metadata for the result of create.
|
org.mule.streaming.ProviderAwarePagingDelegate<Map<String,Object>,SalesforceCompositeConnector> |
postQuery(String query,
Map<String,Object> queryResult,
String subRequestCorrelationId,
org.mule.api.MuleEvent muleEvent,
org.mule.streaming.PagingConfiguration pagingConfiguration)
The purpose of this method is to provide metadata for the result of query.
|
org.mule.streaming.ProviderAwarePagingDelegate<Map<String,Object>,SalesforceCompositeConnector> |
postQueryAll(String query,
Map<String,Object> queryResult,
String subRequestCorrelationId,
org.mule.api.MuleEvent muleEvent,
org.mule.streaming.PagingConfiguration pagingConfiguration)
The purpose of this method is to provide metadata for the result of create.
|
Map<String,Object> |
postRetrieve(String type,
Map<String,Object> retrieveData,
String subRequestCorrelationId,
org.mule.api.MuleEvent muleEvent)
The purpose of this method is to provide metadata for the result of retrieve.
|
List<Map<String,Object>> |
postSearch(Map<String,Object> searchResult,
String subRequestCorrelationId,
org.mule.api.MuleEvent muleEvent)
The purpose of this method is to provide metadata for the result of search.
|
void |
postUpdate(Map<String,Object> updateResult,
String subRequestCorrelationId,
org.mule.api.MuleEvent muleEvent)
The purpose of this method is to provide metadata for the result of update.
|
void |
preConfig() |
Map<String,Object> |
preCreate(String type,
Map<String,Object> sObject,
String subRequestCorrelationId,
org.mule.api.MuleEvent muleEvent)
The purpose of this method is to provide metadata for create based on object that is going to be created and generates a sub-request to be given for execution to
org.mule.modules.salesforce.composite.SalesforceCompositeConnector#executeCompositeBatch(String, java.util.List).
|
Map<String,Object> |
preDelete(String type,
Map<String,Object> sObject,
String subRequestCorrelationId,
org.mule.api.MuleEvent muleEvent)
The purpose of this method is to provide metadata for delete based on object that is going to be deleted and generates a sub-request to be given for execution to
org.mule.modules.salesforce.composite.SalesforceCompositeConnector#executeCompositeBatch(String, java.util.List).
|
Map<String,Object> |
preGetLimits(String subRequestCorrelationId,
org.mule.api.MuleEvent muleEvent)
The purpose of this method is to provide metadata for getLimits and generates a sub-request to be given for execution to
org.mule.modules.salesforce.composite.SalesforceCompositeConnector#executeCompositeBatch(String, java.util.List).
|
Map<String,Object> |
preQuery(String query,
String subRequestCorrelationId,
org.mule.api.MuleEvent muleEvent)
The purpose of this method is to provide metadata for query based on object that is going to be queried and generates a sub-request to be given for execution to
org.mule.modules.salesforce.composite.SalesforceCompositeConnector#executeCompositeBatch(String, java.util.List).
|
Map<String,Object> |
preQueryAll(String query,
String subRequestCorrelationId,
org.mule.api.MuleEvent muleEvent)
The purpose of this method is to provide metadata for query based on object that is going to be queried and generates a sub-request to be given for execution to
org.mule.modules.salesforce.composite.SalesforceCompositeConnector#executeCompositeBatch(String, java.util.List).
|
Map<String,Object> |
preRetrieve(Map<String,Object> retrieveData,
String subRequestCorrelationId,
org.mule.api.MuleEvent muleEvent)
The purpose of this method is to provide metadata for retrieve based on object that is going to be retrieved and generates a sub-request to be given for execution to
org.mule.modules.salesforce.composite.SalesforceCompositeConnector#executeCompositeBatch(String, java.util.List).
|
Map<String,Object> |
preSearch(String search,
String subRequestCorrelationId,
org.mule.api.MuleEvent muleEvent)
The purpose of this method is to provide the user a way to input a SOSL String and generates a sub-request to be given for execution to
org.mule.modules.salesforce.composite.SalesforceCompositeConnector#executeCompositeBatch(java.util.List).
|
Map<String,Object> |
preUpdate(String type,
Map<String,Object> sObject,
String subRequestCorrelationId,
org.mule.api.MuleEvent muleEvent)
The purpose of this method is to provide metadata for update based on object that is going to be updated and generates a sub-request to be given for execution to
org.mule.modules.salesforce.composite.SalesforceCompositeConnector#executeCompositeBatch(java.util.List, MuleEvent).
|
List<Map<String,Object>> |
processDefaultMessageCollectionResult(List<Map<String,Object>> listOfResults,
org.mule.DefaultMessageCollection muleMessage) |
void |
setConnectorConfig(Config connectorConfig)
Set composite config.
|
void |
setSubRequestCorrelationId(org.mule.api.MuleEvent muleEvent,
String subRequestCorrelationId) |
String |
toNativeQuery(org.mule.common.query.DsqlQuery query) |
void |
validateThatTheResponseIsAddressedToMe(org.mule.api.MuleEvent muleEvent,
String subRequestCorrelationId) |
@Start public void preConfig()
@Processor @MetaDataScope(value=PreCreateMetadataCategory.class) public Map<String,Object> preCreate(@MetaDataKeyParam(affects=BOTH) String type, @RefOnly@Default(value="#[payload]") Map<String,Object> sObject, String subRequestCorrelationId, org.mule.api.MuleEvent muleEvent) throws ValidationException
The purpose of this method is to provide metadata for create based on object that is going to be created and generates a sub-request to be given for execution to org.mule.modules.salesforce.composite.SalesforceCompositeConnector#executeCompositeBatch(String, java.util.List).
type
- - type of object that is going to be createdsObject
- - object that is going to be created as a map that sticks to metadata for selected typesubRequestCorrelationId
- - this is the identifier provided by user for the sub-request. It will be used to by post operation to correlate the resultmuleEvent
- - Mule eventValidationException
- - in case that input data is not validpublic void setSubRequestCorrelationId(org.mule.api.MuleEvent muleEvent, String subRequestCorrelationId)
@Processor @MetaDataScope(value=PostCreateMetadataCategory.class) public Map<String,Object> postCreate(@RefOnly@Default(value="#[payload]") Map<String,Object> createResult, @NotNull String subRequestCorrelationId, org.mule.api.MuleEvent muleEvent) throws PostOperationException
The purpose of this method is to provide metadata for the result of create. It takes as input one record from the result returned by org.mule.modules.salesforce.composite.SalesforceCompositeConnector#executeCompositeBatch(String, java.util.List) which belongs to create sub-request generated by org.mule.modules.salesforce.composite.SalesforceCompositeConnector#preCreate(String, java.util.Map).
createResult
- - the result of create sub-requestsubRequestCorrelationId
- - this is the identifier provided by user for the sub-request. It will be used to by post operation to correlate the resultmuleEvent
- - mule eventPostOperationException
- in case that it was unable to execute post create actionspublic void validateThatTheResponseIsAddressedToMe(@NotNull org.mule.api.MuleEvent muleEvent, @Nullable String subRequestCorrelationId) throws PostOperationException
PostOperationException
public String getSubRequestCorrelationId(org.mule.api.MuleEvent muleEvent)
@Processor @MetaDataScope(value=PreUpdateMetadataCategory.class) public Map<String,Object> preUpdate(@MetaDataKeyParam(affects=BOTH) String type, @RefOnly@Default(value="#[payload]") Map<String,Object> sObject, @NotNull String subRequestCorrelationId, org.mule.api.MuleEvent muleEvent) throws ValidationException
The purpose of this method is to provide metadata for update based on object that is going to be updated and generates a sub-request to be given for execution to org.mule.modules.salesforce.composite.SalesforceCompositeConnector#executeCompositeBatch(java.util.List, MuleEvent).
type
- - type of object that is going to be updatedsObject
- - object that is going to be updated as a map that sticks to metadata for selected typesubRequestCorrelationId
- - this is the identifier provided by user for the sub-request. It will be used to by post operation to correlate the resultmuleEvent
- - Mule eventexecuteCompositeBatch(java.util.List, MuleEvent)
ValidationException
- - in case that input data is not valid@Processor public void postUpdate(@RefOnly@Default(value="#[payload]") Map<String,Object> updateResult, @NotNull String subRequestCorrelationId, org.mule.api.MuleEvent muleEvent) throws PostOperationException
The purpose of this method is to provide metadata for the result of update. It takes as input one record from the result returned by org.mule.modules.salesforce.composite.SalesforceCompositeConnector#executeCompositeBatch(String, java.util.List) which belongs to update sub-request generated by org.mule.modules.salesforce.composite.SalesforceCompositeConnector#preUpdate(String, java.util.Map).
updateResult
- - the result of update sub-requestsubRequestCorrelationId
- - this is the identifier provided by user for the sub-request. It will be used to by post operation to correlate the resultmuleEvent
- - Mule eventPostOperationException
- in case that it was unable to execute post update actions@Processor @MetaDataScope(value=PreDeleteMetadataCategory.class) public Map<String,Object> preDelete(@MetaDataKeyParam(affects=BOTH) String type, @RefOnly@Default(value="#[payload]") Map<String,Object> sObject, @NotNull String subRequestCorrelationId, org.mule.api.MuleEvent muleEvent) throws ValidationException
The purpose of this method is to provide metadata for delete based on object that is going to be deleted and generates a sub-request to be given for execution to org.mule.modules.salesforce.composite.SalesforceCompositeConnector#executeCompositeBatch(String, java.util.List).
type
- - type of object that is going to be deletedsObject
- - map with the id of the object that is going to be deleted mapped to "Id" keysubRequestCorrelationId
- - this is the identifier provided by user for the sub-request. It will be used to by post operation to correlate the resultmuleEvent
- - Mule eventValidationException
- - in case that input data is not valid@Processor public void postDelete(@RefOnly@Default(value="#[payload]") Map<String,Object> deleteResult, @NotNull String subRequestCorrelationId, org.mule.api.MuleEvent muleEvent) throws PostOperationException
The purpose of this method is to provide metadata for the result of delete. It takes as input one record from the result returned by org.mule.modules.salesforce.composite.SalesforceCompositeConnector#executeCompositeBatch(String, java.util.List) which belongs to delete sub-request generated by org.mule.modules.salesforce.composite.SalesforceCompositeConnector#preDelete(String, java.util.Map).
deleteResult
- - the result of delete sub-requestsubRequestCorrelationId
- - this is the identifier provided by user for the sub-request. It will be used to by post operation to correlate the resultmuleEvent
- - Mule eventPostOperationException
- in case that it was unable to execute post delete actions@Processor @MetaDataScope(value=PreGetLimitsMetadataCategory.class) public Map<String,Object> preGetLimits(@NotNull String subRequestCorrelationId, org.mule.api.MuleEvent muleEvent)
The purpose of this method is to provide metadata for getLimits and generates a sub-request to be given for execution to org.mule.modules.salesforce.composite.SalesforceCompositeConnector#executeCompositeBatch(String, java.util.List).
subRequestCorrelationId
- - this is the identifier provided by user for the sub-request. It will be used to by post operation to correlate the resultmuleEvent
- - Mule event@Processor @MetaDataScope(value=PostGetLimitsMetadataCategory.class) public Map<String,Object> postGetLimits(@RefOnly@Default(value="#[payload]") Map<String,Object> getLimitsResult, @NotNull String subRequestCorrelationId, org.mule.api.MuleEvent muleEvent) throws PostOperationException
The purpose of this method is to provide metadata for the result of create. It takes as input one record from the result returned by org.mule.modules.salesforce.composite.SalesforceCompositeConnector#executeCompositeBatch(String, java.util.List) which belongs to create sub-request generated by org.mule.modules.salesforce.composite.SalesforceCompositeConnector#preCreate(String, java.util.Map).
getLimitsResult
- - the result of create sub-requestsubRequestCorrelationId
- - this is the identifier provided by user for the sub-request. It will be used to by post operation to correlate the resultmuleEvent
- - Mule eventPostOperationException
- in case the result from Salesforce is an error message@Processor @MetaDataScope(value=PreQueryMetadataCategory.class) public Map<String,Object> preQuery(@Query@Placement(group="Query") String query, @NotNull String subRequestCorrelationId, org.mule.api.MuleEvent muleEvent) throws PreOperationException, ValidationException
The purpose of this method is to provide metadata for query based on object that is going to be queried and generates a sub-request to be given for execution to org.mule.modules.salesforce.composite.SalesforceCompositeConnector#executeCompositeBatch(String, java.util.List).
query
- - the query that is going to be ran in executeCompositeBatchsubRequestCorrelationId
- - this is the identifier provided by user for the sub-request. It will be used to by post operation to correlate the resultmuleEvent
- - Mule eventPreOperationException
- - thrown when the query given as input could not be encoded in the URLValidationException
- - in case that input data is not valid@Processor @MetaDataScope(value=PreQueryMetadataCategory.class) public Map<String,Object> preQueryAll(@Query@Placement(group="Query") String query, @NotNull String subRequestCorrelationId, org.mule.api.MuleEvent muleEvent) throws PreOperationException, ValidationException
The purpose of this method is to provide metadata for query based on object that is going to be queried and generates a sub-request to be given for execution to org.mule.modules.salesforce.composite.SalesforceCompositeConnector#executeCompositeBatch(String, java.util.List).
query
- - the query that is going to be ran in executeCompositeBatchsubRequestCorrelationId
- - this is the identifier provided by user for the sub-request. It will be used to by post operation to correlate the resultmuleEvent
- - Mule eventPreOperationException
- - thrown when the query given as input could not be encoded in the URLValidationException
- - in case that input data is not valid@Processor @Paged @MetaDataScope(value=PostQueryMetadataCategory.class) public org.mule.streaming.ProviderAwarePagingDelegate<Map<String,Object>,SalesforceCompositeConnector> postQuery(@Query@Placement(group="Query") String query, @RefOnly@Default(value="#[payload]") Map<String,Object> queryResult, @NotNull String subRequestCorrelationId, org.mule.api.MuleEvent muleEvent, org.mule.streaming.PagingConfiguration pagingConfiguration) throws PostOperationException
The purpose of this method is to provide metadata for the result of query. It takes as input one record from the result returned by org.mule.modules.salesforce.composite.SalesforceCompositeConnector#executeCompositeBatch(String, java.util.List) which belongs to query sub-request generated by org.mule.modules.salesforce.composite.SalesforceCompositeConnector#preQuery(String, java.util.Map).
query
- - the query ran in executeCompositeBatch - needed for datasense, to bring the output metadataqueryResult
- - the result of query sub-requestsubRequestCorrelationId
- - this is the identifier provided by user for the sub-request. It will be used to by post operation to correlate the resultmuleEvent
- - Mule eventpagingConfiguration
- - Paging configurationPostOperationException
- in case the result from Salesforce is an error message@Processor @Paged @MetaDataScope(value=PostQueryMetadataCategory.class) public org.mule.streaming.ProviderAwarePagingDelegate<Map<String,Object>,SalesforceCompositeConnector> postQueryAll(@Query@Placement(group="Query") String query, @RefOnly@Default(value="#[payload]") Map<String,Object> queryResult, @NotNull String subRequestCorrelationId, org.mule.api.MuleEvent muleEvent, org.mule.streaming.PagingConfiguration pagingConfiguration) throws PostOperationException
The purpose of this method is to provide metadata for the result of create. It takes as input one record from the result returned by org.mule.modules.salesforce.composite.SalesforceCompositeConnector#executeCompositeBatch(String, java.util.List) which belongs to create sub-request generated by org.mule.modules.salesforce.composite.SalesforceCompositeConnector#preCreate(String, java.util.Map).
query
- - the query ran in executeCompositeBatch - needed for datasense, to bring the output metadataqueryResult
- - the result of create sub-requestsubRequestCorrelationId
- - this is the identifier provided by user for the sub-request. It will be used to by post operation to correlate the resultmuleEvent
- - Mule eventpagingConfiguration
- - Paging configurationPostOperationException
- in case the result from Salesforce is an error message@Processor @MetaDataScope(value=PreSearchMetadataCategory.class) public Map<String,Object> preSearch(@Default(value="#[payload]")@Placement(group="Search") String search, @NotNull String subRequestCorrelationId, org.mule.api.MuleEvent muleEvent) throws PreOperationException, ValidationException
The purpose of this method is to provide the user a way to input a SOSL String and generates a sub-request to be given for execution to org.mule.modules.salesforce.composite.SalesforceCompositeConnector#executeCompositeBatch(java.util.List).
search
- - the SOSL string that is going to be ran in executeCompositeBatchsubRequestCorrelationId
- - this is the identifier provided by user for the sub-request. It will be used to by post operation to correlate the resultmuleEvent
- - Mule eventPreOperationException
- - thrown when the search string given as input could not be encoded in the URLValidationException
- - in case that input data is not valid@Processor public List<Map<String,Object>> postSearch(@RefOnly@Default(value="#[payload]") Map<String,Object> searchResult, @NotNull String subRequestCorrelationId, org.mule.api.MuleEvent muleEvent) throws PostOperationException
The purpose of this method is to provide metadata for the result of search. It takes as input one record from the result returned by org.mule.modules.salesforce.composite.SalesforceCompositeConnector#executeCompositeBatch(String, java.util.List) which belongs to search sub-request generated by org.mule.modules.salesforce.composite.SalesforceCompositeConnector#preSearch(String, java.util.Map).
searchResult
- - the result of search sub-requestsubRequestCorrelationId
- - this is the identifier provided by user for the sub-request. It will be used to by post operation to correlate the resultmuleEvent
- - Mule eventPostOperationException
- in case the result from Salesforce is an error message@QueryTranslator public String toNativeQuery(org.mule.common.query.DsqlQuery query)
@Processor @MetaDataScope(value=ExecuteMetadataCategory.class) public List<Map<String,Object>> executeCompositeBatch(@RefOnly@Default(value="#[payload]") List<Map<String,Object>> subRequests, org.mule.api.MuleEvent event) throws BatchExecutionException, ValidationException
Sends all the sub-requests in one batch for execution to server.
subRequests
- - sub-requests to be sent to serverevent
- - Mule eventBatchExecutionException
- in case that it was unable to execute sub requestsValidationException
- - in case that input data is not valid@Processor @MetaDataScope(value=SObjectTreeMetadataCategory.class) public Map<String,Object> createSobjectTree(@MetaDataKeyParam(affects=BOTH)@FriendlyName(value="SObject Root Type") String type, @RefOnly@FriendlyName(value="SObject Tree")@Default(value="#[payload]") List<Map<String,Object>> sObjects) throws UnableToCreateSObjectTreeException
Sends a list of SObject trees to Salesforce to be created.
type
- - the sObject type of the root of the treessObjects
- - a list of maps containing representing the list of trees that need to be createdUnableToCreateSObjectTreeException
- in case that it was unable to execute the requestpublic List<Map<String,Object>> processDefaultMessageCollectionResult(List<Map<String,Object>> listOfResults, org.mule.DefaultMessageCollection muleMessage)
@Processor @MetaDataScope(value=PreRetrieveMetadataCategory.class) public Map<String,Object> preRetrieve(@RefOnly@Default(value="#[payload]") Map<String,Object> retrieveData, @NotNull String subRequestCorrelationId, org.mule.api.MuleEvent muleEvent) throws PreOperationException, ValidationException
The purpose of this method is to provide metadata for retrieve based on object that is going to be retrieved and generates a sub-request to be given for execution to org.mule.modules.salesforce.composite.SalesforceCompositeConnector#executeCompositeBatch(String, java.util.List).
retrieveData
- - object that is going to be retrieved as a map that sticks to metadata for selected typesubRequestCorrelationId
- - this is the identifier provided by user for the sub-request. It will be used to by post operation to correlate the resultmuleEvent
- - Mule eventPreOperationException
- in case that something went wrong while preparing sub-requestValidationException
- - in case that input data is not valid@Processor @MetaDataScope(value=PostRetrieveMetadataCategory.class) @NotNull public Map<String,Object> postRetrieve(@MetaDataKeyParam(affects=OUTPUT) String type, @NotNull@RefOnly@Default(value="#[payload]") Map<String,Object> retrieveData, @NotNull String subRequestCorrelationId, org.mule.api.MuleEvent muleEvent) throws PostOperationException
The purpose of this method is to provide metadata for the result of retrieve. It takes as input one record from the result returned by org.mule.modules.salesforce.composite.SalesforceCompositeConnector#executeCompositeBatch(String, java.util.List) which belongs to retrieve sub-request generated by org.mule.modules.salesforce.composite.SalesforceCompositeConnector#preRetrieve(String, java.util.Map).
type
- - type of object that is going to be retrievedretrieveData
- - the result of retrieve sub-requestsubRequestCorrelationId
- - this is the identifier provided by user for the sub-request. It will be used to by post operation to correlate the resultmuleEvent
- - Mule eventPostOperationException
- in case the result from Salesforce is an error messagepublic Config getConnectorConfig()
Config
public void setConnectorConfig(Config connectorConfig)
connectorConfig
- composite's config (@link Config)public ApplicationContext getApplicationContext()
Copyright © 2010–2018. All rights reserved.