import org.simantics.db.common.request.ResourceRead;
import org.simantics.db.common.request.UniqueRead;
import org.simantics.db.common.request.WriteResultRequest;
-import org.simantics.db.common.utils.Logger;
import org.simantics.db.exception.DatabaseException;
import org.simantics.db.layer0.variable.Variable;
import org.simantics.db.layer0.variable.Variables;
}
}
- public void print(RequestProcessor processor, Resource res, String wiki, String css, DocumentSettings settings, final PdfWriter writer, final Document document) throws DocumentException {
- try {
- Exportable exp = processor.syncRequest(new UniqueRead<Exportable>() {
-
- @Override
- public Exportable perform(ReadGraph graph) throws DatabaseException {
- return new Exportable(graph, res, wiki, css, settings, true);
- }
-
- });
- exp.export(document, writer);
- } catch (DocumentException e) {
- Logger.defaultLogError(e);
- } catch (DatabaseException e) {
- Logger.defaultLogError(e);
- }
+ public int print(RequestProcessor processor, Resource res, String wiki, String css, DocumentSettings settings, final PdfWriter writer, final Document document)
+ throws DocumentException, DatabaseException {
+ Exportable exp = processor.syncRequest(new UniqueRead<Exportable>() {
+ @Override
+ public Exportable perform(ReadGraph graph) throws DatabaseException {
+ return new Exportable(graph, res, wiki, css, settings, true);
+ }
+ });
+ return exp.export(document, writer);
}
public static String indexRootPath(ReadGraph graph, Variable selection) throws DatabaseException {