org.apache.camel.component.salesforce.internal.processor
Class AbstractSalesforceProcessor

java.lang.Object
  extended by org.apache.camel.component.salesforce.internal.processor.AbstractSalesforceProcessor
All Implemented Interfaces:
SalesforceProcessor, org.apache.camel.Service
Direct Known Subclasses:
AbstractRestProcessor, BulkApiProcessor

public abstract class AbstractSalesforceProcessor
extends Object
implements SalesforceProcessor


Field Summary
protected  SalesforceEndpoint endpoint
           
protected  Map<String,String> endpointConfigMap
           
protected  org.eclipse.jetty.client.HttpClient httpClient
           
protected static boolean IGNORE_BODY
           
protected static boolean IS_OPTIONAL
           
protected  org.slf4j.Logger log
           
protected static boolean NOT_OPTIONAL
           
protected  OperationName operationName
           
protected  SalesforceSession session
           
protected static boolean USE_BODY
           
 
Constructor Summary
AbstractSalesforceProcessor(SalesforceEndpoint endpoint)
           
 
Method Summary
protected  String getParameter(String propName, org.apache.camel.Exchange exchange, boolean convertInBody, boolean optional)
          Gets value for a parameter from header, endpoint config, or exchange body (optional).
abstract  boolean process(org.apache.camel.Exchange exchange, org.apache.camel.AsyncCallback callback)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.camel.Service
start, stop
 

Field Detail

NOT_OPTIONAL

protected static final boolean NOT_OPTIONAL
See Also:
Constant Field Values

IS_OPTIONAL

protected static final boolean IS_OPTIONAL
See Also:
Constant Field Values

USE_BODY

protected static final boolean USE_BODY
See Also:
Constant Field Values

IGNORE_BODY

protected static final boolean IGNORE_BODY
See Also:
Constant Field Values

log

protected final org.slf4j.Logger log

endpoint

protected final SalesforceEndpoint endpoint

endpointConfigMap

protected final Map<String,String> endpointConfigMap

operationName

protected final OperationName operationName

session

protected final SalesforceSession session

httpClient

protected final org.eclipse.jetty.client.HttpClient httpClient
Constructor Detail

AbstractSalesforceProcessor

public AbstractSalesforceProcessor(SalesforceEndpoint endpoint)
Method Detail

process

public abstract boolean process(org.apache.camel.Exchange exchange,
                                org.apache.camel.AsyncCallback callback)
Specified by:
process in interface SalesforceProcessor

getParameter

protected final String getParameter(String propName,
                                    org.apache.camel.Exchange exchange,
                                    boolean convertInBody,
                                    boolean optional)
                             throws SalesforceException
Gets value for a parameter from header, endpoint config, or exchange body (optional).

Parameters:
exchange - exchange to inspect
convertInBody - converts In body to String value if true
propName - name of property
optional - if true returns null, otherwise throws RestException
Returns:
value of property, or null for optional parameters if not found.
Throws:
SalesforceException - if the property can't be found.


Apache Camel