Class AbstractSalesforceProcessor
java.lang.Object
org.apache.camel.support.service.BaseService
org.apache.camel.support.service.ServiceSupport
org.apache.camel.component.salesforce.internal.processor.AbstractSalesforceProcessor
- All Implemented Interfaces:
AutoCloseable
,SalesforceProcessor
,org.apache.camel.Service
,org.apache.camel.ShutdownableService
,org.apache.camel.StatefulService
,org.apache.camel.SuspendableService
- Direct Known Subclasses:
AbstractRestProcessor
,AnalyticsApiProcessor
,BulkApiProcessor
,BulkApiV2Processor
,CompositeApiProcessor
,CompositeSObjectCollectionsProcessor
,PubSubApiProcessor
,RawProcessor
public abstract class AbstractSalesforceProcessor
extends org.apache.camel.support.service.ServiceSupport
implements SalesforceProcessor
-
Field Summary
Modifier and TypeFieldDescriptionprotected final SalesforceEndpoint
protected SalesforceHttpClient
protected static final boolean
protected static final boolean
protected final org.slf4j.Logger
protected SalesforceLoginConfig
protected static final boolean
protected final OperationName
protected boolean
protected SalesforceSession
protected static final boolean
Fields inherited from class org.apache.camel.support.service.BaseService
BUILT, FAILED, INITIALIZED, INITIALIZING, lock, NEW, SHUTDOWN, SHUTTING_DOWN, STARTED, STARTING, status, STOPPED, STOPPING, SUSPENDED, SUSPENDING
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
doStart()
getListParameter
(String propName, org.apache.camel.Exchange exchange, boolean convertInBody, boolean optional) protected final String
getParameter
(String propName, org.apache.camel.Exchange exchange, boolean convertInBody, boolean optional) Gets String value for a parameter from header, endpoint config, or exchange body (optional).protected final <T> T
getParameter
(String propName, org.apache.camel.Exchange exchange, boolean convertInBody, boolean optional, Class<T> parameterClass) Gets value for a parameter from header, endpoint config, or exchange body (optional).protected Class<?>
getSObjectClass
(String sObjectName, String className) protected Class<?>
getSObjectClass
(org.apache.camel.Exchange exchange) abstract boolean
process
(org.apache.camel.Exchange exchange, org.apache.camel.AsyncCallback callback) Methods inherited from class org.apache.camel.support.service.BaseService
build, doBuild, doFail, doInit, doLifecycleChange, doResume, doShutdown, doStop, doSuspend, fail, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspend
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.component.salesforce.internal.processor.SalesforceProcessor
determineHeaders
Methods inherited from interface org.apache.camel.Service
build, close, init, start, stop
Methods inherited from interface org.apache.camel.ShutdownableService
shutdown
Methods inherited from interface org.apache.camel.StatefulService
getStatus, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isSuspending
Methods inherited from interface org.apache.camel.SuspendableService
isSuspended, resume, suspend
-
Field Details
-
NOT_OPTIONAL
protected static final boolean NOT_OPTIONAL- See Also:
-
IS_OPTIONAL
protected static final boolean IS_OPTIONAL- See Also:
-
USE_BODY
protected static final boolean USE_BODY- See Also:
-
IGNORE_BODY
protected static final boolean IGNORE_BODY- See Also:
-
log
protected final org.slf4j.Logger log -
endpoint
-
endpointConfigMap
-
operationName
-
session
-
httpClient
-
loginConfig
-
classMap
-
eventClassMap
-
rawPayload
protected boolean rawPayload
-
-
Constructor Details
-
AbstractSalesforceProcessor
-
-
Method Details
-
doStart
- Overrides:
doStart
in classorg.apache.camel.support.service.BaseService
- Throws:
Exception
-
process
public abstract boolean process(org.apache.camel.Exchange exchange, org.apache.camel.AsyncCallback callback) - Specified by:
process
in interfaceSalesforceProcessor
-
getParameter
protected final String getParameter(String propName, org.apache.camel.Exchange exchange, boolean convertInBody, boolean optional) throws SalesforceException Gets String value for a parameter from header, endpoint config, or exchange body (optional).- Parameters:
exchange
- exchange to inspectconvertInBody
- converts In body to String value if truepropName
- name of propertyoptional
- iftrue
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 or on conversion errors.
-
getParameter
protected final <T> T getParameter(String propName, org.apache.camel.Exchange exchange, boolean convertInBody, boolean optional, Class<T> parameterClass) throws SalesforceException Gets value for a parameter from header, endpoint config, or exchange body (optional).- Parameters:
exchange
- exchange to inspectconvertInBody
- converts In body to parameterClass value if truepropName
- name of propertyoptional
- iftrue
returns null, otherwise throws RestExceptionparameterClass
- parameter type- Returns:
- value of property, or
null
for optional parameters if not found. - Throws:
SalesforceException
- if the property can't be found or on conversion errors.
-
getListParameter
protected List<String> getListParameter(String propName, org.apache.camel.Exchange exchange, boolean convertInBody, boolean optional) throws SalesforceException - Throws:
SalesforceException
-
getSObjectClass
- Throws:
SalesforceException
-
getSObjectClass
- Parameters:
sObjectName
- if provided, will attempt to look up class by simple nameclassName
- if provided, will attempt to look up class by fully qualified name- Returns:
- Class, if found.
- Throws:
SalesforceException
- if unable to find class by whichever parameter was non-null
-