Class AbstractSalesforceProcessor

    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      protected void doStart()  
      protected List<String> getListParameter​(String propName, org.apache.camel.Exchange exchange, boolean convertInBody, boolean optional)  
      protected 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 <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 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
    • Constructor Detail

      • AbstractSalesforceProcessor

        public AbstractSalesforceProcessor​(SalesforceEndpoint endpoint)
    • Method Detail

      • doStart

        protected void doStart()
                        throws Exception
        Overrides:
        doStart in class org.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 interface SalesforceProcessor
      • 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 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 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 inspect
        convertInBody - converts In body to parameterClass value if true
        propName - name of property
        optional - if true returns null, otherwise throws RestException
        parameterClass - 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.
      • getSObjectClass

        protected Class<?> getSObjectClass​(String sObjectName,
                                           String className)
                                    throws SalesforceException
        Parameters:
        sObjectName - if provided, will attempt to look up class by simple name
        className - 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