@Override public EndpointModel convert(MailServerModel model) { EndpointModel endpointModel = new EndpointModel(getEndpointType(), model.getId(), getSourceModelClass().getName()); endpointModel.add(property("port", model, true)); endpointModel.add(property("autoStart", model, TRUE).options(TRUE, FALSE)); endpointModel.add(property("autoAccept", model, TRUE).options(TRUE, FALSE)); endpointModel.add(property("splitMultipart", model, FALSE).options(TRUE, FALSE)); endpointModel.add( property("messageConverter", model).optionKey(MessageConverter.class.getName())); endpointModel.add( property("endpointAdapter", model).optionKey(EndpointAdapter.class.getName())); endpointModel.add(property("mailProperties", model).optionKey(Properties.class.getName())); endpointModel.add(property("timeout", model, "5000")); return endpointModel; }
@Override public EndpointModel convert(HttpClientModel model) { EndpointModel endpointModel = new EndpointModel(getEndpointType(), model.getId(), getSourceModelClass().getName()); endpointModel.add(property("requestUrl", model, true)); endpointModel.add( property("requestMethod", model, HttpMethod.POST.name()).options(getHttpMethodOptions())); endpointModel.add( property("errorStrategy", model, ErrorHandlingStrategy.PROPAGATE.getName()) .options(getErrorHandlingStrategyOptions())); endpointModel.add(property("pollingInterval", model, "500")); endpointModel.add( property("messageCorrelator", model).optionKey(MessageCorrelator.class.getName())); endpointModel.add( property("messageConverter", model).optionKey(MessageConverter.class.getName())); endpointModel.add( property("requestFactory", model).optionKey(ClientHttpRequestFactory.class.getName())); endpointModel.add(property("restTemplate", model).optionKey(RestTemplate.class.getName())); endpointModel.add(property("charset", model)); endpointModel.add(property("contentType", model)); endpointModel.add(property("interceptors", model)); addEndpointProperties(endpointModel, model); return endpointModel; }