@Override public final String createEndpointUri(final String scheme, final Map<String, String> options) throws URISyntaxException { final String sObjectName = options.get(SalesforceEndpointConfig.SOBJECT_NAME); final String query = "SELECT Id FROM " + sObjectName; final String topicName = topicNameFor(options); options.put("topicName", topicName); options.put(SalesforceEndpointConfig.SOBJECT_QUERY, query); options.remove(SalesforceEndpointConfig.SOBJECT_NAME); final String salesforceComponent = getComponentScheme(); if (!topicName.endsWith("_delete")) { final Enricher enricher = new Enricher( new ConstantExpression(salesforceComponent + ":getSObject?rawPayload=true&sObjectName=" + sObjectName)); enricher.setCamelContext(getCamelContext()); setBeforeConsumer(enricher); } return super.createEndpointUri(scheme, options); }
@Override public String createEndpointUri(final String scheme, final Map<String, String> options) throws URISyntaxException { final String sObjectName = options.get(SalesforceEndpointConfig.SOBJECT_NAME); final String query = "SELECT Id FROM " + sObjectName; options.put("topicName", topicNameFor(options)); options.put(SalesforceEndpointConfig.SOBJECT_QUERY, query); options.remove(SalesforceEndpointConfig.SOBJECT_NAME); final String salesforceComponent = getComponentName() + "-component"; final Enricher enricher = new Enricher( new ConstantExpression(salesforceComponent + ":getSObject?rawPayload=true&sObjectName=" + sObjectName)); enricher.setCamelContext(getCamelContext()); setBeforeConsumer(enricher); return super.createEndpointUri(scheme, options); }
@Override public Processor createProcessor(RouteContext routeContext) throws Exception { Expression exp = getExpression().createExpression(routeContext); boolean isShareUnitOfWork = getShareUnitOfWork() != null && getShareUnitOfWork(); boolean isIgnoreInvalidEndpoint = getIgnoreInvalidEndpoint() != null && getIgnoreInvalidEndpoint(); Enricher enricher = new Enricher(exp); enricher.setShareUnitOfWork(isShareUnitOfWork); enricher.setIgnoreInvalidEndpoint(isIgnoreInvalidEndpoint); AggregationStrategy strategy = createAggregationStrategy(routeContext); if (strategy != null) { enricher.setAggregationStrategy(strategy); } if (aggregateOnException != null) { enricher.setAggregateOnException(aggregateOnException); } return enricher; }
public ManagedEnricher(CamelContext context, Enricher processor, EnrichDefinition definition) { super(context, processor, definition); this.processor = processor; }
@Override public Enricher getProcessor() { return processor; }