/** * Filter the content in the supplied {@link Source} instance. * <p/> * Not producing a {@link Result}. * * @param source The content Source. * @throws SmooksException Failed to filter. */ public void filterSource(Source source) throws SmooksException { filterSource(createExecutionContext(), source, null); }
/** * Filter the content in the supplied {@link Source} instance, outputing data * to the supplied {@link Result} instances. * * @param source The filter Source. * @param results The filter Results. * @throws SmooksException Failed to filter. */ public void filterSource(Source source, Result... results) throws SmooksException { filterSource(createExecutionContext(), source, results); }
/** * Filter the content in the supplied {@link Source} instance. * <p/> * Not producing a {@link Result}. * * @param source The content Source. * @throws SmooksException Failed to filter. */ public void filterSource(Source source) throws SmooksException { filterSource(createExecutionContext(), source, null); }
/** * Filter the content in the supplied {@link Source} instance, outputing data * to the supplied {@link Result} instances. * * @param source The filter Source. * @param results The filter Results. * @throws SmooksException Failed to filter. */ public void filterSource(Source source, Result... results) throws SmooksException { filterSource(createExecutionContext(), source, results); }
/** * Filter the content in the supplied {@link Source} instance, outputing data * to the supplied {@link Result} instances. * * @param source The filter Source. * @param results The filter Results. * @throws SmooksException Failed to filter. */ public void filterSource(Source source, Result... results) throws SmooksException { filterSource(createExecutionContext(), source, results); }
/** * Filter the content in the supplied {@link Source} instance, outputing data * to the supplied {@link Result} instances. * * @param source The filter Source. * @param results The filter Results. * @throws SmooksException Failed to filter. */ public void filterSource(Source source, Result... results) throws SmooksException { filterSource(createExecutionContext(), source, results); }
/** * Filter the content in the supplied {@link Source} instance. * <p/> * Not producing a {@link Result}. * * @param source The content Source. * @throws SmooksException Failed to filter. */ public void filterSource(Source source) throws SmooksException { filterSource(createExecutionContext(), source, null); }
/** * Filter the content in the supplied {@link Source} instance. * * Not producing a {@link Result}. * * @param source The content Source. * @throws SmooksException Failed to filter. */ public void filterSource(Source source) throws SmooksException { filterSource(createExecutionContext(), source, null); }
// Instantiate Smooks with the config... Smooks smooks = new Smooks("smooks-config.xml"); try { // Filter the input message to the outputWriter... smooks.filterSource(new StreamSource(messageIn), new StreamResult(messageOut)); } finally { smooks.close(); }
public List bind(Reader csvStream) { AssertArgument.isNotNull(csvStream, "csvStream"); JavaResult javaResult = new JavaResult(); smooks.filterSource(new StreamSource(csvStream), javaResult); return (List) javaResult.getBean(beanId); }
public List bind(Reader csvStream) { AssertArgument.isNotNull(csvStream, "csvStream"); JavaResult javaResult = new JavaResult(); smooks.filterSource(new StreamSource(csvStream), javaResult); return (List) javaResult.getBean(beanId); }
public List bind(Reader fixedLengthStream) { AssertArgument.isNotNull(fixedLengthStream, "fixedLengthStream"); JavaResult javaResult = new JavaResult(); smooks.filterSource(new StreamSource(fixedLengthStream), javaResult); return (List) javaResult.getBean(beanId); }
public Map bind(Reader fixedLengthStream) { AssertArgument.isNotNull(fixedLengthStream, "fixedLengthStream"); JavaResult javaResult = new JavaResult(); smooks.filterSource(new StreamSource(fixedLengthStream), javaResult); return (Map) javaResult.getBean(beanId); }
public Map bind(Reader csvStream) { AssertArgument.isNotNull(csvStream, "csvStream"); JavaResult javaResult = new JavaResult(); smooks.filterSource(new StreamSource(csvStream), javaResult); return (Map) javaResult.getBean(beanId); }
public Map bind(Reader fixedLengthStream) { AssertArgument.isNotNull(fixedLengthStream, "fixedLengthStream"); JavaResult javaResult = new JavaResult(); smooks.filterSource(new StreamSource(fixedLengthStream), javaResult); return (Map) javaResult.getBean(beanId); }
public Map bind(Reader fixedLengthStream) { AssertArgument.isNotNull(fixedLengthStream, "fixedLengthStream"); JavaResult javaResult = new JavaResult(); smooks.filterSource(new StreamSource(fixedLengthStream), javaResult); return (Map) javaResult.getBean(beanId); }
public List bind(Reader fixedLengthStream) { AssertArgument.isNotNull(fixedLengthStream, "fixedLengthStream"); JavaResult javaResult = new JavaResult(); smooks.filterSource(new StreamSource(fixedLengthStream), javaResult); return (List) javaResult.getBean(beanId); }
public Map bind(Reader csvStream) { AssertArgument.isNotNull(csvStream, "csvStream"); JavaResult javaResult = new JavaResult(); smooks.filterSource(new StreamSource(csvStream), javaResult); return (Map) javaResult.getBean(beanId); }
public List bind(Reader fixedLengthStream) { AssertArgument.isNotNull(fixedLengthStream, "fixedLengthStream"); JavaResult javaResult = new JavaResult(); smooks.filterSource(new StreamSource(fixedLengthStream), javaResult); return (List) javaResult.getBean(beanId); }
/** * Unmarshals the fromStream to an Object. * </p> * The Camel framework will call this method from {@link UnMarshalProcessor#process(Exchange)} * and it will take care of setting the returned Object on the Out Message's body. * * @param exchange The Camel {@link Exchange}. * @param fromStream The InputStream that will be unmarshalled into an Object instance. */ public Object unmarshal(final Exchange exchange, final InputStream fromStream) throws Exception { final ExecutionContext execContext = smooks.createExecutionContext(); final Exports exports = Exports.getExports(smooks.getApplicationContext()); final Result[] results = exports.createResults(); smooks.filterSource(execContext, new StreamSource(fromStream), results); return getResult(exports, results, exchange); }