public static FileToStringTransformer fileToString() { return fileToString(null); }
public static JsonToObjectTransformer fromJson(JsonObjectMapper<?, ?> jsonObjectMapper) { return fromJson(null, jsonObjectMapper); }
public static MarshallingTransformer marshaller(Marshaller marshaller, ResultTransformer resultTransformer, ResultFactory resultFactory) { return marshaller(marshaller, resultTransformer, resultFactory, null); }
public static ObjectToJsonTransformer toJson(JsonObjectMapper<?, ?> jsonObjectMapper, ObjectToJsonTransformer.ResultType resultType) { return toJson(jsonObjectMapper, resultType, null); }
/** * The factory method for the {@link DecodingTransformer}. * @param codec the {@link Codec} to use. * @param typeExpression the target type SpEL expression. * @param <T> the target type. * @return the {@link DecodingTransformer} instance. * @since 1.2 */ public static <T> DecodingTransformer<T> decoding(Codec codec, String typeExpression) { return decoding(codec, PARSER.parseExpression(typeExpression)); }
public static PayloadSerializingTransformer serializer() { return serializer(null); }
public static ObjectToStringTransformer objectToString() { return objectToString(null); }
public static PayloadDeserializingTransformer deserializer() { return deserializer(null); }
public static MailToStringTransformer fromMail() { return fromMail(null); }
/** * Enhance an {@link IntegrationFlowBuilder} to add flow snippets, depending on * {@link FileConsumerProperties}. * @param flowBuilder the flow builder. * @param fileConsumerProperties the properties. * @return the updated flow builder. */ public static IntegrationFlowBuilder enhanceFlowForReadingMode(IntegrationFlowBuilder flowBuilder, FileConsumerProperties fileConsumerProperties) { switch (fileConsumerProperties.getMode()) { case contents: flowBuilder.enrichHeaders(Collections.<String, Object>singletonMap(MessageHeaders.CONTENT_TYPE, "application/octet-stream")) .transform(Transformers.fileToByteArray()); break; case lines: flowBuilder.enrichHeaders(Collections.<String, Object>singletonMap(MessageHeaders.CONTENT_TYPE, "text/plain")) .split(Files.splitter(true, fileConsumerProperties.getWithMarkers())); case ref: break; default: throw new IllegalArgumentException(fileConsumerProperties.getMode().name() + " is not a supported file reading mode."); } return flowBuilder; }
public static ObjectToJsonTransformer toJson(JsonObjectMapper<?, ?> jsonObjectMapper, String contentType) { return toJson(jsonObjectMapper, null, contentType); }
/** * The factory method for the {@link DecodingTransformer}. * @param codec the {@link Codec} to use. * @param typeFunction the target type function. * @param <T> the target type. * @return the {@link DecodingTransformer} instance. * @since 1.2 */ public static <T> DecodingTransformer<T> decoding(Codec codec, Function<Message<?>, Class<T>> typeFunction) { return decoding(codec, new FunctionExpression<Message<?>>(typeFunction)); }
public static PayloadSerializingTransformer serializer() { return serializer(null); }
public static ObjectToStringTransformer objectToString() { return objectToString(null); }
public static PayloadDeserializingTransformer deserializer() { return deserializer(null); }
public static MailToStringTransformer fromMail() { return fromMail(null); }
flowBuilder.enrichHeaders(Collections.<String, Object>singletonMap(MessageHeaders.CONTENT_TYPE, "application/octet-stream")) .transform(Transformers.fileToByteArray()); break; case lines:
public static MarshallingTransformer marshaller(Marshaller marshaller, ResultFactory resultFactory, boolean extractPayload) { return marshaller(marshaller, null, resultFactory, extractPayload); }
public static ObjectToJsonTransformer toJson() { return toJson(null, null, null); }
public static JsonToObjectTransformer fromJson() { return fromJson(null, null); }