public void visitBefore(SAXElement element, ExecutionContext executionContext) throws SmooksException, IOException { Result result = FilterResult.getResult(executionContext, JavaResult.class); if (result != null) { Map beans = new HashMap(); ((JavaResult) result).setResultMap(beans); beans.put("theBean", "Hi there!"); } }
public void doFilter() throws SmooksException { Source source = FilterSource.getSource(executionContext); Result result = FilterResult.getResult(executionContext, StreamResult.class); doFilter(source, result); }