com.vtence.molecule.decoration.PageCompositor Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of molecule Show documentation
Show all versions of molecule Show documentation
A web micro-framework for Java
package com.vtence.molecule.decoration;
import java.io.IOException;
import java.io.Writer;
public class PageCompositor implements Decorator {
private final ContentProcessor processor;
private final Layout layout;
public PageCompositor(ContentProcessor processor, Layout layout) {
this.layout = layout;
this.processor = processor;
}
public void decorate(Writer out, String content) throws IOException {
layout.render(out, processor.process(content));
}
}