OpenConcerto

Dépôt officiel du code source de l'ERP OpenConcerto
sonarqube

svn://code.openconcerto.org/openconcerto

Rev

Rev 132 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 132 Rev 180
Line 78... Line 78...
78
    private final ODSingleXMLDocument substitute(Map<String, Object> data) throws FileNotFoundException, IOException {
78
    private final ODSingleXMLDocument substitute(Map<String, Object> data) throws FileNotFoundException, IOException {
79
        final ODPackage pkg = this.pkg == null ? new ODPackage(this.file) : this.pkg;
79
        final ODPackage pkg = this.pkg == null ? new ODPackage(this.file) : this.pkg;
80
        try {
80
        try {
81
            this.transform(pkg.toSingle());
81
            this.transform(pkg.toSingle());
82
            // MAYBE fireStatusChange with the number of tag done out of the total
82
            // MAYBE fireStatusChange with the number of tag done out of the total
-
 
83
            try (final Template template = new Template(pkg)) {
83
            return new Template(pkg).createDocument(new OGNLDataModel(data));
84
                return template.createDocument(new OGNLDataModel(data));
-
 
85
            }
84
        } catch (Exception exn) {
86
        } catch (Exception exn) {
85
            throw ExceptionUtils.createExn(IOException.class, "generation error in " + this, exn);
87
            throw ExceptionUtils.createExn(IOException.class, "generation error in " + this, exn);
86
        }
88
        }
87
    }
89
    }
88
 
90